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.,USDC-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.,USDC-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, USDC's base unit is 1/1,000,000 of a USDC (1,000,000 base units = 1 USDC).
To purchase 100 USDC, set receive_amount to 100000000.
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": "USDC-USD",
"side": "buy",
"receive_amount": 100000000,
"deliver_amount": 10005,
"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 17 days ago
What’s Next
