> For the complete documentation index, see [llms.txt](https://docs.dimes.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dimes.fi/for-developers/getting-started/environments.md).

# Environments

Multiply exposes two independent environments. Each has its own base URL, API keys, contract addresses, and data — they share no state.

## Comparison

| Aspect             | Production                                              | Sandbox                                                           |
| ------------------ | ------------------------------------------------------- | ----------------------------------------------------------------- |
| **Purpose**        | Live positions with real pUSD                           | Integration testing with test pUSD and fake outcome tokens        |
| **REST base URL**  | `https://api.dimes.fi/v1`                               | `https://api-sandbox.dimes.fi/v1`                                 |
| **WebSocket URL**  | `wss://api.dimes.fi/v1/ws/prediction-markets/positions` | `wss://api-sandbox.dimes.fi/v1/ws/prediction-markets/positions`   |
| **Swagger UI**     | `https://api.dimes.fi/v1/customer-docs`                 | `https://api-sandbox.dimes.fi/v1/customer-docs`                   |
| **API key prefix** | `dm_live_skey_...`                                      | `dm_sbx_skey_...`                                                 |
| **Resource IDs**   | `dm_pos_...`, `dm_off_...`, `dm_mkt_...`                | `dm_pos_sdx_...`, `dm_off_sdx_...`, `dm_mkt_sdx_...`              |
| **Chain**          | Polygon mainnet                                         | Polygon mainnet                                                   |
| **pUSD**           | Real pUSD                                               | Test pUSD (minted on request to your wallet by the Dimes team)    |
| **Outcome tokens** | Real Polymarket CTF                                     | Fake CTF                                                          |
| **Vault contract** | Production `LeveragedPredictionVaultV1`                 | Separate sandbox `LeveragedPredictionVaultV1` (different address) |
| **Market data**    | Live Polymarket markets                                 | Live Polymarket markets (read-only)                               |
| **Funds at risk**  | Yes                                                     | No                                                                |

## Picking an environment

* **Building a new integration?** Start in [sandbox](/for-developers/getting-started/sandbox.md). Request a sandbox API key via the Telegram link on [dimes.fi](https://dimes.fi), then follow the [Quickstart](/for-developers/getting-started/quickstart.md) against `https://api-sandbox.dimes.fi/v1`.
* **Running an existing integration in production?** Keep using `https://api.dimes.fi/v1` with your `dm_live_skey_...` key.

Keys are environment-scoped and not interchangeable. A `dm_live_skey_...` key is rejected by `api-sandbox.dimes.fi`, and a `dm_sbx_skey_...` key is rejected by `api.dimes.fi`.

{% tabs %}
{% tab title="REST API" %}

```bash
# Production
curl https://api.dimes.fi/v1/prediction-markets/markets \
  -H "Authorization: Bearer <jwt>"

# Sandbox
curl https://api-sandbox.dimes.fi/v1/prediction-markets/markets \
  -H "Authorization: Bearer <jwt>"
```

{% endtab %}

{% tab title="SDK" %}

```typescript
// Production (default)
const client = new DimesClient({auth});

// Sandbox
const client = new DimesClient({
  baseUrl: "https://api-sandbox.dimes.fi",
  auth,
});
```

{% endtab %}
{% endtabs %}

## Parity

Sandbox mirrors production on every REST endpoint, WebSocket event, response shape, error code, resolver/settlement behavior, rate limit, and auth rule. The only intentional differences:

* **Separate vault contract** at a different address.
* **Test pUSD and fake Polymarket CTF** instead of the real tokens. Test pUSD is minted to your wallet on request by the Dimes team.
* **No SLA.** Sandbox may be reset or paused for maintenance on short notice.

## Contract addresses

See [Contract Addresses](/for-developers/wallet-integration/contract-addresses.md) for the canonical list of production and sandbox vault, pUSD, and CTF addresses with Polygonscan links.
