Request for Quote (RFQ)
POST
https://api.sfox.com/v1/quote
Returns an actionable one-sided quote for the specified currency pair.
After sending an RFQ, the API will return a quote with a price at which a trade can be executed. If you agree with the price, you can request the execution of the trade using the orders endpoint.
In the orders request, you will need to specify the same:
currency_pair
quantity
quote_id
and, if specified in the quote request, the
client_quote_id
Quote requests are rate limited to 10 requests per second.
Request Body
Name | Type | Description |
---|---|---|
| string | The currency pair for the quote. e.g. |
| string | The side for the quote (whether you are buying or selling). Possible values:
|
| number | The base currency quantity for the quote (e.g. |
| number | The quote currency quantity for the quote (e.g. |
| string | An optional idempotent identifier for your quote. If specified, you must specify the same value in the |
Response Body
Field | Description |
---|---|
| Unique identifier for the quote. Note: to execute an order on this quote you will specify this |
| The base currency quantity of the quote |
| The quote currency amount of the quote |
| The currency pair for the quote request |
| The quote side–whether you are buying or selling |
| The datetime the quote will expire |
| The datetime the quote was generated |
| The quote price–the price to buy this quantity. Returned if |
| The quote price–the price to sell this quantity. Returned if |
Responses
Example Request
End-to-End Example
The following example details the end-to-end process of requesting a quote from the RFQ endpoint and executing an order to trade on that quote
RFQ
Request: Requested a quote to purchase 1 BTC on the BTC/USD pair
Response: Received a purchase price of
23243.49136824
for 1 BTC with Quote IDcb436399-9db7-11ed-8ea6-0e5724aafd6b
which is later specified in the orderrequest
Request | |
Response |
Order Execution
Request: Placed an order to buy 1 BTC on the BTC/USD pair and specified the previously received quote ID
cb436399-9db7-11ed-8ea6-0e5724aafd6b
Response: Received an “Order Filled” response, purchasing 1 BTC at the previously quoted unit price of
23243.49136824
RFQ orders are Fill-or-Kill (FOK): Will be responded to with a “Done” (filled) or “Canceled” (rejected) order. The entire quantity will be filled or none at all
Receive synchronous response: The response will reflect a terminal state of an order
Are not guaranteed to be filled if placed within the quote expiry
Only one order will be accepted per quote
The order quantity must be less than or equal to the quote quantity
Will settle immediately to your sFOX account if filled
Request | |
Response |
Last updated