Prices come from routing, not a feed
Theprice on a quote reflects live pricing across venues, routing optimized for reliability and capital efficiency, and any margin configuration on your tier. Treat the quote as the truth for pricing: never reconstruct or cache a rate beyond its expires_at. For an indicative rate with no execution promise, read List all prices instead.
Market rate or locked quote
Lock the quote whenever a user sees a rate before confirming, and whenever you promise a fixed price. An NGN order without a
quote_id needs a reference and fills at the market rate. Quotes expire fast: about 10 seconds in production, and in sandbox 30 seconds for NGN pairs and about 5 minutes for crypto pairs, so drive a visible countdown from expires_at and disable the confirm action when it passes.
What atomic execution buys you
An order fills completely or fails cleanly; there is no partial state. If the quote expired, the balance is short, or execution errors, no funds move and you get a clean error. Consequently:- Never debit a user before
trade.completedarrives. - A failed trade needs no cleanup, only a fresh quote.
- On NGN pairs, retrying with the same
referenceis safe: it returns the original order. On crypto pairs it can trade twice, so look the order up first. See Execute a trade.
Amounts and rates
Requests takequantity in major units of the base currency: "0.0001" BTC, "10" USDT, "5000" for ₦5,000. The quoted price is per unit of base currency in the quote currency, and the exchange block on every quote spells out exactly what you send and receive, so display from it rather than computing your own conversion.
Common questions
Why do quotes expire so quickly?
Why do quotes expire so quickly?
Markets move. A quote that stayed valid would let callers exploit price changes at Bitnob’s expense, so each one carries a short
expires_at. Executing after expiry fails cleanly with 422 and code PRECONDITION_FAILED; fetch a fresh quote. For display-only pricing with no expiry, use List all prices.What is a spread, and can I add my own?
What is a spread, and can I add my own?
The spread is the difference between the rate a user gets and the market rate, and it is how trading platforms earn. You can pass Bitnob’s rate through untouched or apply your own markup on top before showing it; the quote’s rate is the executable floor.
How are prices determined?
How are prices determined?
From centralized exchanges, OTC desks, and internal routing. You do not manage any of it; the quote you receive is trusted and executable, and your system receives the promised output or nothing.
Can I fetch quotes without trading?
Can I fetch quotes without trading?
Yes, quotes are free and don’t commit you to anything. But for browsing and pricing calculators, use indicative rates instead: List all prices for crypto pairs and Get exchange rate for NGN pairs. Create a quote only when the user is ready to confirm. NGN quotes are checked against your balance and back a single order.
What happens during execution?
What happens during execution?
Quote validation, balance check, execution, credit to the destination balance, then the
trade.completed event. Any failure along the way moves no funds.What am I responsible for as an integrator?
What am I responsible for as an integrator?
Unique
reference per trade, no execution of expired quotes, webhook-driven state rather than trusting the synchronous response, and reconciliation of trades against balances. See Handle trading failures.A complete sell flow
A user holds 100,000 sats and wants stablecoins:- Create a quote for the BTC → USDT pair.
- Show “You’ll receive $45.12” with a countdown from
expires_at. - On confirmation, submit the order with the quote
id,price, and yourreference. - On
trade.completed, credit your ledger and show success. - Optionally continue into a payout to a bank or mobile money account.