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

# Retail Rates

> Fetch rates before initiating a retail transaction. Direct FX publishes a rate board; the Pan-African Ramp issues a priced quote you must pass into the transaction.

The two retail corridors price very differently. Direct FX returns a rate board you read; the Pan-African Ramp returns a quote with an id that the deposit or withdrawal then requires.

| | Direct FX | Pan-African Ramp |
| - | - | - |
| Endpoint | `GET /transactions/v2/rate_quote` | `GET /transactions/v2/direct_ramp/rate_quote` |
| Returns | Current rates for all supported pairs | A single priced quote with an id |
| Validity | Read at any time, not reserved | 120 seconds |
| Needed to transact? | No | Yes — `quoteId` is required |

***

> [tab] Direct FX
>
> ```
> GET /transactions/v2/rate_quote
> ```
>
> Returns the live board for every Direct FX pair in the chosen direction.
>
> #### Query parameters
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | `trx_type` | string | ✓ | Direction: `onramp` or `offramp` |
>
> > [!WARNING]
> >
> > This endpoint prices the whole board, not a specific transaction. It returns every supported pair regardless of what you ask for, and it does not calculate a payout amount — multiply the rate yourself.
>
> ```javascript Node.js theme={null}
> const options = {
>   method: 'GET',
>   headers: {
>     accept: 'application/json',
>     'ngnc-sec-key': 'YOUR_SECRET_KEY'
>   }
> };
>
> fetch('https://api.linkio.world/transactions/v2/rate_quote?trx_type=onramp', options)
>   .then(response => response.json())
>   .then(response => console.log(response))
>   .catch(err => console.error(err));
> ```
>
> ```python Python theme={null}
> import requests
>
> url = "https://api.linkio.world/transactions/v2/rate_quote"
>
> params = {"trx_type": "onramp"}
> headers = {
>     "accept": "application/json",
>     "ngnc-sec-key": "YOUR_SECRET_KEY"
> }
>
> response = requests.get(url, params=params, headers=headers)
> print(response.text)
> ```
>
> #### Response — on-ramp
>
> Keys read fiat → stablecoin. `NGNUSDC` is the naira a user pays for one USDC.
>
> ```json theme={null}
> {
>   "NGNUSDC": 1587.9,
>   "USDUSDC": 1.0095
> }
> ```
>
> #### Response — off-ramp
>
> Keys read stablecoin → fiat. `USDCNGN` is the naira a user receives for one USDC.
>
> ```json theme={null}
> {
>   "USDCNGN": 1572.4,
>   "USDCUSD": 0.9905
> }
> ```
>
> > [!NOTE]
> >
> > The key order flips between directions: on-ramp is `NGNUSDC`, off-ramp is `USDCNGN`. Read the direction from the key, not the position.

> [tab] Pan-African Ramp
>
> ```
> GET /transactions/v2/direct_ramp/rate_quote
> ```
>
> Prices one transaction and reserves it for 120 seconds. The returned `quoteId` is required by the deposit and withdrawal calls.
>
> #### Query parameters
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | `asset` | string | ✓ | Fiat side of the pair: NGN, GHS, KES, SLE, ZAR, UGX, ZMW, XAF |
> | `stables` | string | ✓ | Stablecoin side, e.g. `USDC` |
> | `amount` | string | ✓ | Amount in the source asset for this direction |
> | `trx_type` | string | ✓ | Direction: `onramp` or `offramp` |
> | `payment_method` | string | ✓ | Rail to settle on — see [Fiat payment methods](https://docs.linkio.world/docs/fiat-payment-methods.md) |
> | `customer_id` | string | | Links the quote to a registered customer |
>
> ```javascript Node.js theme={null}
> const params = new URLSearchParams({
>   asset: 'NGN',
>   stables: 'USDC',
>   amount: '100000',
>   trx_type: 'onramp',
>   payment_method: 'bank_transfer'
> });
>
> const options = {
>   method: 'GET',
>   headers: {
>     accept: 'application/json',
>     'ngnc-sec-key': 'YOUR_SECRET_KEY'
>   }
> };
>
> fetch(`https://api.linkio.world/transactions/v2/direct_ramp/rate_quote?${params}`, options)
>   .then(response => response.json())
>   .then(response => console.log(response))
>   .catch(err => console.error(err));
> ```
>
> ```python Python theme={null}
> import requests
>
> url = "https://api.linkio.world/transactions/v2/direct_ramp/rate_quote"
>
> params = {
>     "asset": "NGN",
>     "stables": "USDC",
>     "amount": "100000",
>     "trx_type": "onramp",
>     "payment_method": "bank_transfer"
> }
> headers = {
>     "accept": "application/json",
>     "ngnc-sec-key": "YOUR_SECRET_KEY"
> }
>
> response = requests.get(url, params=params, headers=headers)
> print(response.text)
> ```
>
> #### Response
>
> `200 OK`
>
> ```json theme={null}
> {
>   "status": "Success",
>   "message": "Rate retrieved",
>   "data": {
>     "quoteId": "VHlwZXM6OkNhc2hyYW1wOjpBUEk6OlJhbXBRdW90ZS0yOTJmNjA3ZC0xMzBiLTRjMjctOGVlMy05OGE4Njg0NDVhNjg=",
>     "trx_type": "onramp",
>     "amount": "100000",
>     "rate": "1365.300",
>     "payoutAmount": "73.24",
>     "validity": "120 seconds",
>     "date": "2026-10-03 15:12"
>   }
> }
> ```
>
> > [!NOTE]
> >
> > `quoteId` is a long base64 string, not a UUID — pass it through unchanged. `rate` and `payoutAmount` come back as strings, so parse them before doing arithmetic.
>
> > [!WARNING]
> >
> > A quote can be used once. After 120 seconds it expires and the deposit or withdrawal is rejected — request a fresh one rather than retrying with the same `quoteId`.

***

[Retail Off-Ramp](https://docs.linkio.world/docs/off-ramp.md)

[B2B Coverage](https://docs.linkio.world/docs/business-service.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.