# Markets

## GET /api/quantis/v3/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/v3/rates/markets/` |
| **Authentication** | `Authorization: Bearer qapi_...` |
| **Parameters** | None |

### Request

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

---

### 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"` |

---

### 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"
  }
}
```

---

### HTTP status codes

| Code | Meaning |
|---|---|
| `200 OK` | Success. |
| `401 Unauthorized` | Missing, invalid or revoked key. |
| `405 Method Not Allowed` | Only GET is supported. |
| `429 Too Many Requests` | Monthly quota spent (`quota_exceeded`) or rate limit hit (`throttled`). See [Tiers and limits](/quantis/v3/tiers-and-limits/). |
| `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 key

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

#### 429: monthly quota spent

```json
{
  "error": {
    "code": "quota_exceeded",
    "message": "Monthly quota exceeded. It resets on the 1st of next month."
  }
}
```

#### 429: rate limit hit

```json
{
  "error": {
    "code": "throttled",
    "message": "Rate limit exceeded",
    "details": {
      "retry_after": 1
    }
  }
}
```
**Note:** This endpoint is cached for **5 minutes**, matching Binance's update cadence.