RFQ

private/cancel_quote

Changed on

Cancels one open quote owned by the subaccount, identified by quote_id (optionally further constrained by rfq_id, label, or nonce). Returns the cancelled quote, or a quote-not-found error if it does not exist or is no longer open. Requires an RFQ trade scope.

post/private/cancel_quote

Request

  • Base URL
    https://api.derive.xyz/v3
  • Auth
    API key in header X-DeriveWallet and API key in header X-DeriveTimestamp and API key in header X-DeriveSignature

Request body

CancelQuoteRequest required
label, string nullable
nonce, string nullable
quote_id, string uuid required

UUID v4 string

rfq_id, string uuid nullable

Optional UUID v4 string

subaccount_id, integer required

Response

Success

Quote required
batch_status, 'Batching' | 'Executing' | 'Da' | 'Proving' | 'Settling' | 'Settled' | 'BatchingError' | 'ExecutingError' | 'DaError' | 'ProvingError' | 'SettlingError' | 'SettledError' nullable

Batch lifecycle status — the single source of lifecycle truth for every operation in the batch (individual ops carry no status of their own). Each stage has a healthy variant and a corresponding ...Error variant meaning that stage failed. Serialized as the variant name (string) in API responses.

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
creation_timestamp, integer required
direction, 'buy' | 'sell' required
extra_fee, string 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

fee, string 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

fill_pct, string 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

is_transfer, boolean required
label, string required
last_update_timestamp, integer required
legs, PricedLegParamsAndResponse[] required
legs_hash, string required
liquidity_role, 'maker' | 'taker' required
max_fee, string 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

mmp, boolean required
nonce, string required
quote_id, string uuid required

UUID v4 string

rfq_id, string uuid required

UUID v4 string

signature_expiry_sec, integer required
status, 'open' | 'filled' | 'cancelled' | 'expired' required
subaccount_id, integer required
tx_hash, string nullable

Blockchain transaction hash (only for executed quotes).

Changes

    • info

      the endpoint scheme security DeriveWallet AND DeriveTimestamp AND DeriveSignature was added to the API

    • info

      added the media type application/json for the response with the status