Generate Quote
How do I generate a quote?
Use the POST /api/quotes endpoint
To generate a quote, you need:
- A
customer_guid-- retrieve it fromGET /api/customersif needed. - A
symbolin pair format (e.g.,BTC-USD) -- seeGET /api/symbolsfor supported symbols.
Quote validity
Quotes in sandbox are valid for 30 seconds. Production quotes are valid for 8 seconds.
Request parameters
Set the following fields in the request body:
customer_guid-- the customer's identifiersymbol-- the trading pair (e.g.,BTC-USD)side--buyorsell- Either
receive_amountordeliver_amount(not both):receive_amountspecifies how much crypto to receivedeliver_amountspecifies how much fiat to spend
All amounts are in base units. For example, Bitcoin's base unit is 1 satoshi (100,000,000 satoshis = 1 BTC).
To purchase 0.1 BTC, set receive_amount to 10000000.
Bank-level tradingTo trade at the bank level instead of the customer level, provide
bank_guidinstead ofcustomer_guidwhen creating the quote.
Response
An example POST /api/quotes response:
{
"guid": "<quote_guid>",
"customer_guid": "<customer_guid>",
"symbol": "BTC-USD",
"side": "buy",
"receive_amount": 10000000,
"deliver_amount": 293407,
"fee": 0,
"issued_at": "2022-05-11T19:47:52.048Z",
"expires_at": "2022-05-11T19:48:22.048Z"
}
Quote expirationIf you execute a trade after the quote has expired, the trade will fail.
Updated 11 days ago
What’s Next
