# Quotes

## Create a quote

<mark style="color:$success;">`POST`</mark> :  `/api/v1/quotes`

Generate a real-time quote with a locked exchange rate.

**Required scopes:** `quotes:write` or `all`

**Request body**

<table><thead><tr><th width="203.65625">Parameter</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>recipientId</code></td><td>UUID</td><td>Required</td><td>UUID of a KYC-approved recipient</td></tr><tr><td><code>direction</code></td><td>string</td><td>Optional</td><td><code>OFF_RAMP</code> (default) or <code>ON_RAMP</code></td></tr><tr><td><code>sourceChain</code></td><td>string</td><td>Required</td><td><code>SOLANA</code>, <code>ETHEREUM</code>, <code>POLYGON</code>, <code>BASE</code>, <code>TRON</code>, or <code>BSC</code></td></tr><tr><td><code>sourceAsset</code></td><td>string</td><td>Required</td><td><code>USDC</code>, <code>USDT</code>, <code>ETH</code>, or <code>SOL</code></td></tr><tr><td><code>notionalAmount</code></td><td>number</td><td>Required</td><td>Amount in source asset. Min: 10, Max: 1,000,000</td></tr><tr><td><code>destinationCurrency</code></td><td>string</td><td>Required</td><td><code>NGN</code>, <code>KES</code>, <code>GHS</code>, <code>ZAR</code>, <code>UGX</code>, <code>TZS</code>, <code>USD</code>, <code>EUR</code>, <code>GBP</code>, <code>BRL</code>, or <code>TRY</code></td></tr><tr><td><code>destinationCountry</code></td><td>string</td><td>Required</td><td>ISO 3166-1 alpha-2 country code (e.g. <code>NG</code>)</td></tr><tr><td><code>deliveryRail</code></td><td>string</td><td>Required</td><td><code>BANK_TRANSFER</code>, <code>ACH</code>, <code>WIRE</code>, <code>SEPA</code>, <code>SEPA_INSTANT</code>, or <code>FPS</code></td></tr><tr><td><code>clientReference</code></td><td>string</td><td>Optional</td><td>Your internal reference (max 128 chars)</td></tr></tbody></table>

CURL REQUEST&#x20;

```bash
curl -X POST https://zynta-lastmile-api.up.railway.app/api/v1/quotes \
  -H "x-api-key: sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "recipientId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "direction": "OFF_RAMP",
    "sourceChain": "SOLANA",
    "sourceAsset": "USDC",
    "notionalAmount": 1000,
    "destinationCurrency": "NGN",
    "destinationCountry": "NG",
    "deliveryRail": "BANK_TRANSFER"
  }'
```

NODE JS EXAMPLE REQUEST:

```javascript
const response = await fetch(
  'https://zynta-lastmile-api.up.railway.app/api/v1/quotes',
  {
    method: 'POST',
    headers: {
      'x-api-key': 'sk_test_...',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      recipientId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
      direction: 'OFF_RAMP',
      sourceChain: 'SOLANA',
      sourceAsset: 'USDC',
      notionalAmount: 1000,
      destinationCurrency: 'NGN',
      destinationCountry: 'NG',
      deliveryRail: 'BANK_TRANSFER'
    })
  }
);
const quote = await response.json();
```

**Example Response `201 Created`**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "recipientId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "direction": "OFF_RAMP",
  "sourceChain": "SOLANA",
  "sourceAsset": "USDC",
  "sourceAmount": 1000,
  "destinationCurrency": "NGN",
  "destinationAmount": 1640925.00,
  "exchangeRate": 1650.00,
  "deliveryRail": "BANK_TRANSFER",
  "fees": {
    "platform": 5.00,
    "network": 0.50,
    "total": 5.50
  },
  "expiresAt": "2026-03-24T14:15:00Z",
  "status": "ACTIVE",
  "createdAt": "2026-03-24T14:00:00Z"
}
```

***

### Retrieve a quote

<mark style="color:blue;">`GET`</mark> :  `/api/v1/quotes/{id}`

Returns quote details including rate, fees, and expiry status.

**Required scopes:** `quotes:read` or `all`

**Response fields**

| Field                 | Type     | Description                        |
| --------------------- | -------- | ---------------------------------- |
| `id`                  | UUID     | Unique quote identifier            |
| `recipientId`         | UUID     | Associated recipient               |
| `direction`           | string   | `OFF_RAMP` or `ON_RAMP`            |
| `sourceChain`         | string   | Blockchain network                 |
| `sourceAsset`         | string   | Crypto asset                       |
| `sourceAmount`        | number   | Amount in source asset             |
| `destinationCurrency` | string   | Fiat currency code                 |
| `destinationAmount`   | number   | Amount the recipient will receive  |
| `exchangeRate`        | number   | Locked exchange rate               |
| `deliveryRail`        | string   | Payment delivery method            |
| `fees`                | object   | `platform`, `network`, `total`     |
| `expiresAt`           | datetime | Quote expiry (ISO 8601)            |
| `status`              | string   | `ACTIVE`, `EXPIRED`, or `EXECUTED` |

{% hint style="info" %}
Quotes expire after a set window (typically 15 minutes). Always check `expiresAt` before creating a transfer. If the quote has expired, request a new one.&#x20;
{% endhint %}


---

# 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.zynta.com/api-reference/quotes.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.
