Rates
GET /rate/ returns current exchange rates and quote data for trading pairs. It is the v2 successor of the v1 /info/bulk/ endpoint.
Concepts — quote lifetimes, pricing modes, fee math, actionable vs indicative quotes — are covered in Rates & Pricing. This page is the parameter/response contract.
Get rates
Request
curl -X GET "https://api.n.exchange/en/api/v2/rate/?pairs=BTCETH" \
-H "Accept: application/json" \
-H "Authorization: ApiKey YOUR_API_KEY"
Authentication: API key or x-referral-token — see Authentication. Provide x-referral-token for referral-scoped quotes and partner rate terms.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
pairs | string | No | Comma-separated pair names (e.g. BTCUSDC,ETHBTC). Cannot be combined with the individual currency parameters below. Omitting every filter returns the full catalogue — avoid in production, see Rates & Pricing |
from / to | string | No | Source / target currency codes (alternative to pairs) |
from_network / to_network | string | No | Network codes for from/to; required when using contract addresses |
from_contract_address / to_contract_address | string | No | Token contract addresses; require the matching *_network. Empty string resolves to the network's main currency |
deposit_amount | string | No | Deposit amount in the from currency. With exactly one pair, the response row includes a withdraw_amount preview computed through the order-pricing path. Required (with actionable_quote=true) for actionable DeFi fixed-rate quotes. With more than one pair → 400 |
is_defi | boolean | No | Return DeFi pricing and DeFi-specific limits. Must be true for the DeFi order flow |
is_fixed_rate | boolean | No | Fixed-rate pricing. CeFi: signals fixed-rate order intent (rate_id included, same as default). DeFi: enables RFQ-based fixed-rate quoting. Mutually exclusive with is_floating_rate |
is_floating_rate | boolean | No | CeFi only (ignored for DeFi). When true, rate_id and expiration_time_unix are omitted and no price lock is stored — orders execute at the live rate at creation time |
actionable_quote | boolean | No | DeFi fixed-rate only, default false. When true on a single-pair request with deposit_amount, performs actionable (bindable) quoting. Otherwise rows stay indicative |
include_eta | boolean | No | Adds eta_seconds to each row (median recent completion time for CeFi, fixed estimate for DeFi; null when unavailable). Off by default |
markup | integer | No | Dynamic partner fee in basis points (50 = 0.5%). Custom capability — must be pre-enabled on your referral code. Mutually exclusive with referral_rate (both → 400) |
referral_rate | string | No | Deprecated — use markup. Same fee as a decimal fraction ("0.005") |
fiat_only | boolean | No | Only fiat pairs |
crypto_only | boolean | No | Only crypto pairs |
validate_ip | boolean | No | Validates the client IP with the same logic as order creation; failure → 400 |
Response
200 — array of rate rows.
Row fields:
| Field | Type | Always present | Description |
|---|---|---|---|
pair | string | yes | Pair name, {to}{from} — e.g. BTCUSDC |
from | string | yes | Currency you send |
to | string | yes | Currency you receive |
rate | string | yes | Marked-up ask, deposit units per 1 receive unit. Excludes fixed fees |
withdrawal_fee | string | yes | Combined fixed fees, denominated in the to currency |
min_deposit_amount / max_deposit_amount | string | yes | Deposit limits |
min_withdraw_amount / max_withdraw_amount | string | yes | Receive limits |
rate_id | string | no | Quote snapshot id for this row. Absent when is_floating_rate=true |
expiration_time_unix | string | no | Unix timestamp (seconds, as a string) when the quote expires. Absent when is_floating_rate=true |
withdraw_amount | string | no | Receive-amount preview; present only when deposit_amount was passed with exactly one pair (up to 18 decimals) |
eta_seconds | integer/null | no | Present only with include_eta=true |
applied_referral_rate | string | no | Dynamic partner fee actually applied (decimal, after partner cap / 50-50 excess split). Present only when a dynamic fee was requested |
Example response:
[
{
"pair": "BTCUSDC",
"from": "USDC",
"to": "BTC",
"withdrawal_fee": "0.00050000",
"rate": "45000.00",
"rate_id": "abc123-000000",
"max_withdraw_amount": "10.00000000",
"min_withdraw_amount": "0.00100000",
"max_deposit_amount": "500000.00",
"min_deposit_amount": "50.00",
"expiration_time_unix": "1697365800"
}
]
Example — amount preview (single pair + deposit_amount):
curl -X GET "https://api.n.exchange/en/api/v2/rate/?pairs=BTCUSDC&deposit_amount=500" \
-H "Accept: application/json" \
-H "Authorization: ApiKey YOUR_API_KEY"
[
{
"pair": "BTCUSDC",
"from": "USDC",
"to": "BTC",
"withdrawal_fee": "0.00050000",
"rate": "45000.00",
"rate_id": "abc123-000001",
"max_withdraw_amount": "10.00000000",
"min_withdraw_amount": "0.00100000",
"max_deposit_amount": "500000.00",
"min_deposit_amount": "50.00",
"expiration_time_unix": "1697365800",
"withdraw_amount": "0.01061111"
}
]
Example — actionable DeFi fixed-rate quote:
curl -X GET "https://api.n.exchange/en/api/v2/rate/?pairs=USDCARBETHARB&is_defi=true&is_fixed_rate=true&deposit_amount=10&actionable_quote=true" \
-H "Accept: application/json" \
-H "Authorization: ApiKey YOUR_API_KEY" \
-H "x-referral-token: YOUR_REFERRAL_TOKEN"
[
{
"pair": "USDCARBETHARB",
"from": "ETHARB",
"to": "USDCARB",
"withdrawal_fee": "0.02000000",
"rate": "0.00040000",
"rate_id": "a1b2c3d4-000000",
"expiration_time_unix": "1761000050",
"max_withdraw_amount": "250000",
"min_withdraw_amount": "20",
"max_deposit_amount": "100",
"min_deposit_amount": "0.008",
"withdraw_amount": "24999.98000000"
}
]
rate_id and limits expire quickly. Fetch a fresh quote at submit time and follow the refresh-on-submit flow. Never cache rate_id.
Errors
| Status | Meaning | Body |
|---|---|---|
400 | Invalid parameters — conflicting filters, deposit_amount with multiple pairs, both markup and referral_rate, IP validation failure | {"detail": "Invalid input"} |
401 | Missing/invalid credentials | {"detail": "Authentication credentials were not provided."} |
404 | No pairs match the filters, or the requested pair has no quotable liquidity right now | {"detail": "No trading pairs found"} |
A 404 for a specific pair usually means temporarily unavailable, not unsupported — see pair availability. Full error semantics: Errors & Rate Limits.
Next steps
- Rates & Pricing concepts
- Orders — using
rate_idat creation