Skip to main content
Version: v2

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:

ParameterTypeRequiredDescription
pairsstringNoComma-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 / tostringNoSource / target currency codes (alternative to pairs)
from_network / to_networkstringNoNetwork codes for from/to; required when using contract addresses
from_contract_address / to_contract_addressstringNoToken contract addresses; require the matching *_network. Empty string resolves to the network's main currency
deposit_amountstringNoDeposit 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_defibooleanNoReturn DeFi pricing and DeFi-specific limits. Must be true for the DeFi order flow
is_fixed_ratebooleanNoFixed-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_ratebooleanNoCeFi 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_quotebooleanNoDeFi fixed-rate only, default false. When true on a single-pair request with deposit_amount, performs actionable (bindable) quoting. Otherwise rows stay indicative
include_etabooleanNoAdds eta_seconds to each row (median recent completion time for CeFi, fixed estimate for DeFi; null when unavailable). Off by default
markupintegerNoDynamic 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_ratestringNoDeprecated — use markup. Same fee as a decimal fraction ("0.005")
fiat_onlybooleanNoOnly fiat pairs
crypto_onlybooleanNoOnly crypto pairs
validate_ipbooleanNoValidates the client IP with the same logic as order creation; failure → 400

Response

200 — array of rate rows.

Row fields:

FieldTypeAlways presentDescription
pairstringyesPair name, {to}{from} — e.g. BTCUSDC
fromstringyesCurrency you send
tostringyesCurrency you receive
ratestringyesMarked-up ask, deposit units per 1 receive unit. Excludes fixed fees
withdrawal_feestringyesCombined fixed fees, denominated in the to currency
min_deposit_amount / max_deposit_amountstringyesDeposit limits
min_withdraw_amount / max_withdraw_amountstringyesReceive limits
rate_idstringnoQuote snapshot id for this row. Absent when is_floating_rate=true
expiration_time_unixstringnoUnix timestamp (seconds, as a string) when the quote expires. Absent when is_floating_rate=true
withdraw_amountstringnoReceive-amount preview; present only when deposit_amount was passed with exactly one pair (up to 18 decimals)
eta_secondsinteger/nullnoPresent only with include_eta=true
applied_referral_ratestringnoDynamic 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"
}
]
Quotes are ephemeral

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

StatusMeaningBody
400Invalid parameters — conflicting filters, deposit_amount with multiple pairs, both markup and referral_rate, IP validation failure{"detail": "Invalid input"}
401Missing/invalid credentials{"detail": "Authentication credentials were not provided."}
404No 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