# Markets

sidebar:
  order: 11

## GET /api/quantis/v2/rates/markets/

Returns the current USDT/VES exchange rate from Binance plus two computed values: `average` (midpoint between BCV-USD and USDT) and `difference` (the spread between USDT and BCV-USD).

| | |
|---|---|
| **Method** | `GET` |
| **URL** | `https://app.vzla.io/api/quantis/v2/rates/markets/` |
| **Authentication** | `Authorization: Bearer vzlaio_...` |
| **Parameters** | None |

### Request

```bash
curl --request GET \
  --url 'https://app.vzla.io/api/quantis/v2/rates/markets/' \
  --header 'Authorization: Bearer vzlaio_YOUR_TOKEN_HERE'
```

---
sidebar:
  order: 11

### Response

#### `data`

| Field | Type | Description |
|---|---|---|
| `timestamp` | string (ISO 8601 datetime) | When this snapshot was last fetched |
| `usdt` | object | USDT/VES rate from Binance |
| `computed` | object | Derived values comparing USDT against BCV-USD |

**`data.usdt`**

| Field | Type | Description |
|---|---|---|
| `rate` | string | VES per 1 USDT |
| `indicator_pct` | string | Percentage change from the previous rate |
| `indicator_amount` | string | Absolute change from the previous rate in VES |
| `market` | string | Always `"Binance"` |

**`data.computed.average`**

Midpoint between the BCV-USD rate and the USDT rate.

| Field | Type | Description |
|---|---|---|
| `rate` | string | Computed average rate in VES |
| `indicator_pct` | string | Percentage change of this average from the previous snapshot |
| `indicator_amount` | string | Absolute change of this average in VES |

**`data.computed.difference`**

How much higher USDT trades versus the official BCV-USD rate.

| Field | Type | Description |
|---|---|---|
| `amount` | string | USDT rate minus BCV-USD rate, in VES |
| `indicator_pct` | string | Percentage change of the spread from the previous snapshot |
| `indicator_amount` | string | Absolute change of the spread in VES |

#### `meta`

| Field | Type | Description |
|---|---|---|
| `source` | string | Always `"markets"` |
| `currency_quote` | string | Always `"VES"` |
| `instrument` | string | Always `"USDT"` |

---
sidebar:
  order: 11

### Response headers

| Header | Description |
|---|---|
| `X-API-Version` | `2.0` |
| `X-Quota-Limit` | Your monthly request limit |
| `X-Quota-Remaining` | Requests remaining this month |
| `X-Quota-Reset` | ISO 8601 timestamp of next quota reset |
| `X-Request-ID` | UUID for this request |

---
sidebar:
  order: 11

### Example response

```json
{
  "data": {
    "timestamp": "2026-05-06T20:08:56.581073+00:00",
    "usdt": {
      "rate": "656.92582500",
      "indicator_pct": "0.00060890",
      "indicator_amount": "0.00400000",
      "market": "Binance"
    },
    "computed": {
      "average": {
        "rate": "575.15116250",
        "indicator_pct": "1.70015878",
        "indicator_amount": "9.61501250"
      },
      "difference": {
        "amount": "163.54932500",
        "indicator_pct": "7.62450901",
        "indicator_amount": "11.58642500"
      }
    }
  },
  "meta": {
    "source": "markets",
    "currency_quote": "VES",
    "instrument": "USDT"
  }
}
```

---
sidebar:
  order: 11

### HTTP status codes

| Code | Meaning |
|---|---|
| `200 OK` | Success. |
| `401 Unauthorized` | Missing or invalid token. |
| `405 Method Not Allowed` | Only GET is supported. |
| `429 Too Many Requests` | Monthly quota exhausted. |
| `500 Internal Server Error` | Server error. Retry after a short delay. |

#### 401 — no Authorization header

```json
{
  "error": {
    "code": "auth_missing",
    "message": "Authentication credentials were not provided"
  }
}
```

#### 401 — invalid token

```json
{
  "error": {
    "code": "auth_token_unknown",
    "message": "Invalid token format"
  }
}
```

#### 429

```json
{
  "error": {
    "code": "quota_exceeded",
    "message": "Monthly quota limit exceeded.",
    "details": {
      "reset_at": "2026-06-01T00:00:00Z"
    }
  }
}
```
**Note:** This endpoint is cached for **5 minutes**, matching Binance's update cadence.