# Environments

Multiply exposes two independent environments. Each has its own base URL, its own API keys, its own contract addresses, and its own data — they do not share state in any way.

## Comparison

| Aspect             | Production                                              | Sandbox                                                           |
| ------------------ | ------------------------------------------------------- | ----------------------------------------------------------------- |
| **Purpose**        | Live positions with real USDC                           | Integration testing with fake USDC 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                                                   |
| **USDC**           | Real USDC                                               | Fake USDC (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/sandbox.md). Request a sandbox API key via the Telegram link on [dimes.fi](https://dimes.fi), then follow the [Quickstart](/for-developers/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. If it works in sandbox, it works in production. The only intentional differences are:

* **Separate vault contract** at a different address.
* **Fake USDC and fake Polymarket CTF** instead of the real tokens. Sandbox USDC is minted to your wallet on request by the Dimes team.
* **No SLA.** Sandbox may be reset or paused for maintenance on short notice. Do not build production workloads or customer-facing demos on it.

## Contract addresses

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dimes.fi/for-developers/environments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
