RFQ

private/send_rfq

Taker-side call that opens a new RFQ for a multi-leg structure on a subaccount, inviting makers to quote it. You supply the legs (instrument, amount, and direction per leg) plus optional min/max total cost limits that filter only the best quote, a partial-fill step, a label, and a list of specific counterparties to restrict who can see it. Returns the created RFQ including its assigned id and validity window. Requires trade scope for every instrument in the legs.

post/private/send_rfq

Request

  • Base URL: https://api.derive.xyz/v3
  • URL: https://api.derive.xyz/v3/private/send_rfq
  • Auth: none declared

Request body

clientstring
counterpartiesstring[] nullable
extra_feestring decimal

Non-negative decimal string of the human value (e.g. "1.5"), up to 12 fractional digits; a string or JSON number is accepted

labelstring
max_total_coststring decimal nullable

Highest total cost you accept when you execute as buyer (direction: buy). Optional decimal string (e.g. "500") or JSON number.

Total cost is in USD for the full RFQ size, from your side of the trade. A positive cost means you pay. A negative cost means you receive.

private/rfq_get_best_quote and the {subaccount_id}.best.quotes channel skip quotes above this value. This is a quote filter only. private/execute_quote does not check it, and private/poll_quotes returns all quotes. Makers do not see this value.

min_total_coststring decimal nullable

Highest total cost you accept when you execute as seller (direction: sell). Optional decimal string (e.g. "-180") or JSON number.

It uses the same sign as max_total_cost, so a sale that pays you has a negative cost. To set the smallest amount you will receive, send that amount as a negative number. For example, -180 skips quotes that pay you less than 180. A positive value such as 180 skips only quotes that cost you more than 180.

It applies in the same places as max_total_cost. private/execute_quote does not check it. Makers do not see this value.

partial_fill_stepstring decimal

Non-negative decimal string of the human value (e.g. "1.5"), up to 12 fractional digits; a string or JSON number is accepted

referral_codestring
subaccount_idinteger required

Response

Success

ask_total_coststring decimal nullable required

Optional decimal string of the human value (e.g. "1.5"), up to 12 fractional digits, or null; a string or JSON number is accepted

bid_total_coststring decimal nullable required

Optional decimal string of the human value (e.g. "1.5"), up to 12 fractional digits, or null; a string or JSON number is accepted

cancel_reason'' | 'user_request' | 'insufficient_margin' | 'signed_max_fee_too_low' | 'mmp_trigger' | 'cancel_on_disconnect' | 'session_key_deregistered' | 'subaccount_withdrawn' | 'rfq_no_longer_open' | 'compliance' | 'validation_failed' required
counterpartiesAddress[] nullable
creation_timestampinteger required
filled_direction'buy' | 'sell'
filled_pctstring decimal required

Non-negative decimal string of the human value (e.g. "1.5"), up to 12 fractional digits; a string or JSON number is accepted

labelstring required
last_update_timestampinteger required
mark_total_coststring decimal nullable required

Optional decimal string of the human value (e.g. "1.5"), up to 12 fractional digits, or null; a string or JSON number is accepted

max_total_coststring decimal nullable required

The max_total_cost sent with the RFQ, as a decimal string, or null. It filters the best quote only. See private/send_rfq.

min_total_coststring decimal nullable required

The min_total_cost sent with the RFQ, as a decimal string, or null. It filters the best quote only. See private/send_rfq.

partial_fill_stepstring decimal required

Non-negative decimal string of the human value (e.g. "1.5"), up to 12 fractional digits; a string or JSON number is accepted

rfq_idstring uuid required

UUID v4 string

status'open' | 'filled' | 'cancelled' | 'expired' required
subaccount_idinteger required
total_coststring decimal nullable required

Optional decimal string of the human value (e.g. "1.5"), up to 12 fractional digits, or null; a string or JSON number is accepted

valid_untilinteger required
walletstring required

20-byte Ethereum address as a 0x-prefixed lowercase hex string.

Changes

No recorded changes to this operation across all 1 revision of this API.