Method Name
private/replace_quote
private/replace_quoteCancel an existing quote with nonce or quote_id and create new quote with different quote_id in a single RPC call.
If the cancel fails, the new quote will not be created.
If the cancel succeeds but the new quote fails, the old quote will still be cancelled.
Required minimum session key permission level is admin
Parameters
|
direction
string required Quote direction, buy means trading each leg at its direction, sell means trading each leg in the opposite direction.enum buy sell
|
|
max_fee
string required Max fee ($ for the full trade). Request will be rejected if the supplied max fee is below the estimated fee for this trade. |
|
nonce
integer required Unique nonce defined as a concatenated UTC timestamp in ms and random number up to 6 digits (e.g. 1695836058725001, where 001 is the random number)
|
|
rfq_id
string required RFQ ID the quote is for |
|
signature
string required Ethereum signature of the quote |
|
signature_expiry_sec
integer required Unix timestamp in seconds. Expiry MUST be at least 310 seconds from now. Once time till signature expiry reaches 300 seconds, the quote will be considered expired. This buffer is meant to ensure the trade can settle on chain in case of a blockchain congestion. |
|
signer
string required Owner wallet address or registered session key that signed the quote |
|
subaccount_id
integer required Subaccount ID |
|
legs
array of objects required Quote legs |
|
legs[].
amount
string required Amount in units of the base |
|
legs[].
direction
string required Leg direction enum buy sell
|
|
legs[].
instrument_name
string required Instrument name |
|
legs[].
price
string required Leg price |
|
client
string Optional client that sent the quote |
|
label
string Optional user-defined label for the quote |
|
mmp
boolean Whether the quote is tagged for market maker protections (default false) |
|
nonce_to_cancel
integer Cancel quote by nonce (choose either quote_id or nonce). |
|
quote_id_to_cancel
string Cancel quote by quote_id (choose either quote_id or nonce). |
Response
| id string or integer required |
| result object required |
|
result.
create_quote_error
object or null required Optional. Returns error during new quote creation |
| result.create_quote_error. code integer required |
| result.create_quote_error. message string required |
| result.create_quote_error. data string or null |
|
result.
quote
object or null required New quote that was created |
|
result.quote.
cancel_reason
string required Cancel reason, if any enum user_request insufficient_margin signed_max_fee_too_low mmp_trigger cancel_on_disconnect session_key_deregistered subaccount_withdrawn rfq_no_longer_open compliance
|
|
result.quote.
creation_timestamp
integer required Creation timestamp in ms since Unix epoch |
|
result.quote.
direction
string required Quote direction enum buy sell
|
|
result.quote.
extra_fee
string required Extra fee in USDC added by the referring client (included in quote fee) |
|
result.quote.
fee
string required Fee paid for this quote (if executed) |
|
result.quote.
fill_pct
string required Percentage of the RFQ that this quote would fill, from 0 to 1. |
|
result.quote.
is_transfer
boolean required Whether the order was generated through private/transfer_position
|
|
result.quote.
label
string required User-defined label, if any |
|
result.quote.
last_update_timestamp
integer required Last update timestamp in ms since Unix epoch |
|
result.quote.
legs_hash
string required Hash of the legs of the best quote to be signed by the taker. |
|
result.quote.
liquidity_role
string required Liquidity role enum maker taker
|
|
result.quote.
max_fee
string required Signed max fee |
|
result.quote.
mmp
boolean required Whether the quote is tagged for market maker protections (default false) |
|
result.quote.
nonce
integer required Nonce |
|
result.quote.
quote_id
string required Quote ID |
|
result.quote.
rfq_id
string required RFQ ID |
|
result.quote.
signature
string required Ethereum signature of the quote |
|
result.quote.
signature_expiry_sec
integer required Unix timestamp in seconds |
|
result.quote.
signer
string required Owner wallet address or registered session key that signed the quote |
|
result.quote.
status
string required Status enum open filled cancelled expired
|
|
result.quote.
subaccount_id
integer required Subaccount ID |
|
result.quote.
tx_hash
string or null required Blockchain transaction hash (only for executed quotes) |
|
result.quote.
tx_status
string or null required Blockchain transaction status (only for executed quotes) enum requested pending settled reverted ignored timed_out
|
|
result.quote.
legs
array of objects required Quote legs |
|
result.quote.legs[].
amount
string required Amount in units of the base |
|
result.quote.legs[].
direction
string required Leg direction enum buy sell
|
|
result.quote.legs[].
instrument_name
string required Instrument name |
|
result.quote.legs[].
price
string required Leg price |
|
result.
cancelled_quote
object required Quote that was cancelled |
|
result.cancelled_quote.
cancel_reason
string required Cancel reason, if any enum user_request insufficient_margin signed_max_fee_too_low mmp_trigger cancel_on_disconnect session_key_deregistered subaccount_withdrawn rfq_no_longer_open compliance
|
|
result.cancelled_quote.
creation_timestamp
integer required Creation timestamp in ms since Unix epoch |
|
result.cancelled_quote.
direction
string required Quote direction enum buy sell
|
|
result.cancelled_quote.
extra_fee
string required Extra fee in USDC added by the referring client (included in quote fee) |
|
result.cancelled_quote.
fee
string required Fee paid for this quote (if executed) |
|
result.cancelled_quote.
fill_pct
string required Percentage of the RFQ that this quote would fill, from 0 to 1. |
|
result.cancelled_quote.
is_transfer
boolean required Whether the order was generated through private/transfer_position
|
|
result.cancelled_quote.
label
string required User-defined label, if any |
|
result.cancelled_quote.
last_update_timestamp
integer required Last update timestamp in ms since Unix epoch |
|
result.cancelled_quote.
legs_hash
string required Hash of the legs of the best quote to be signed by the taker. |
|
result.cancelled_quote.
liquidity_role
string required Liquidity role enum maker taker
|
|
result.cancelled_quote.
max_fee
string required Signed max fee |
|
result.cancelled_quote.
mmp
boolean required Whether the quote is tagged for market maker protections (default false) |
|
result.cancelled_quote.
nonce
integer required Nonce |
|
result.cancelled_quote.
quote_id
string required Quote ID |
|
result.cancelled_quote.
rfq_id
string required RFQ ID |
|
result.cancelled_quote.
signature
string required Ethereum signature of the quote |
|
result.cancelled_quote.
signature_expiry_sec
integer required Unix timestamp in seconds |
|
result.cancelled_quote.
signer
string required Owner wallet address or registered session key that signed the quote |
|
result.cancelled_quote.
status
string required Status enum open filled cancelled expired
|
|
result.cancelled_quote.
subaccount_id
integer required Subaccount ID |
|
result.cancelled_quote.
tx_hash
string or null required Blockchain transaction hash (only for executed quotes) |
|
result.cancelled_quote.
tx_status
string or null required Blockchain transaction status (only for executed quotes) enum requested pending settled reverted ignored timed_out
|
|
result.cancelled_quote.
legs
array of objects required Quote legs |
|
result.cancelled_quote.legs[].
amount
string required Amount in units of the base |
|
result.cancelled_quote.legs[].
direction
string required Leg direction enum buy sell
|
|
result.cancelled_quote.legs[].
instrument_name
string required Instrument name |
|
result.cancelled_quote.legs[].
price
string required Leg price |
Example
{request_example_shell}{request_example_javascript}{request_example_python}The above command returns JSON structured like this:
{response_example_json}