> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yativo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Crypto API References

> Complete reference for all Yativo Crypto API endpoints

<Info>
  The **Try It** panel on every endpoint page defaults to **Sandbox** (testnet, no real funds). Use the Base URL dropdown to switch to Production when you're ready to go live. [Jump to playground instructions →](#using-the-api-playground)
</Info>

## Status & Monitoring

Yativo provides two public status pages for production/live/main environments:

* [status.yativo.com](https://status.yativo.com) — primary status and uptime monitoring
* [status2.yativo.com](https://status2.yativo.com) — open-source backup status page

Check these pages for real-time uptime, incident history, and scheduled maintenance.

## Before you start

**Account creation and login happen at the dashboard — not through the API.**

| Environment | Dashboard                                                      | API Base URL                               |
| ----------- | -------------------------------------------------------------- | ------------------------------------------ |
| Live        | [crypto.yativo.com](https://crypto.yativo.com)                 | `https://crypto-api.yativo.com/api/v1`     |
| Sandbox     | [sandbox-crypto.yativo.com](https://sandbox-crypto.yativo.com) | `https://crypto-sandbox.yativo.com/api/v1` |

Sign up is **passwordless** — enter your email, confirm the one-time code, and you're in. Once logged in, go to **Settings → API Keys** to generate credentials for API access.

***

## Authentication

Every API endpoint (except `POST /auth/token`) requires:

```
Authorization: Bearer YOUR_ACCESS_TOKEN
```

### Getting a Bearer token

Exchange your API key and secret for a short-lived token. Tokens expire after **60 minutes**; API keys never expire.

```bash theme={null}
curl -X POST 'https://crypto-api.yativo.com/api/v1/auth/token' \
  -H 'Content-Type: application/json' \
  -d '{
    "api_key":    "yativo_...",
    "api_secret": "..."
  }'
```

```json Response theme={null}
{
  "success": true,
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "expires_at": "2026-03-28T11:00:00.000Z"
}
```

Refresh by calling `POST /auth/token` again before the token expires — no separate refresh endpoint needed.

See [Authentication](/yativo-crypto/authentication) for the full flow including scopes and the auto-refresh pattern.

***

## Common headers

| Header            | Required       | Description                     |
| ----------------- | -------------- | ------------------------------- |
| `Authorization`   | Yes            | `Bearer YOUR_ACCESS_TOKEN`      |
| `Content-Type`    | Yes (POST/PUT) | `application/json`              |
| `Idempotency-Key` | Optional       | Prevents duplicate transactions |

***

## Response format

```json theme={null}
{
  "status": true,
  "message": "Human-readable message",
  "data": { ... }
}
```

Errors return `"status": false` with an appropriate HTTP status code (400, 401, 403, 404, 422, 429, 500).

***

## Sandbox

The sandbox at `https://crypto-sandbox.yativo.com/api` uses testnet blockchains — **no real funds**.

### Using the API playground

Every endpoint page has a **Try It** panel on the right. Here's how to use it:

<Steps>
  <Step title="Choose your environment">
    Use the **Base URL** dropdown at the top of the panel to switch between:

    * `https://crypto-sandbox.yativo.com/api` — **Sandbox** (testnet, no real funds)
    * `https://crypto-api.yativo.com/api` — **Production** (mainnet, real funds)

    The playground defaults to **Sandbox** so you can experiment safely.
  </Step>

  <Step title="Enter your Bearer token">
    Paste your access token into the **Authorization** field. The playground adds the `Bearer` prefix automatically.

    Don't have a token yet? See [Getting a Bearer token](#getting-a-bearer-token) below, or use the shared sandbox credentials.
  </Step>

  <Step title="Fill in parameters and send">
    Populate the required fields, then click **Send** to execute the request against the selected environment.
  </Step>
</Steps>

### Shared sandbox credentials

A pre-populated sandbox account is available for immediate testing:

```bash theme={null}
curl -X POST '/auth/token' \
  -H 'Content-Type: application/json' \
  -d '{
    "api_key":    "yativo_e072b3ef7e30fcb420183aa86ddd8452abd28a9ac8f5d04d",
    "api_secret": "df8da4d6b855c7e89bd3b4216dd0a1f4b30de1963c9bff0dcd666b15a0f836a5"
  }'
```

For isolated sandbox data, sign up at [sandbox-crypto.yativo.com](https://sandbox-crypto.yativo.com) and generate your own sandbox keys.

***

## Further reading

* [Authentication guide](/yativo-crypto/authentication)
* [API Keys](/yativo-crypto/api-keys)
* [Webhooks](/yativo-crypto/webhooks)
* [Error codes](/yativo-crypto/errors)
* [Sandbox overview](/sandbox/overview)
