RFQ

private/accept_block_proposal

Changed on

Accepts a block proposal and executes its block trade at once. The caller signs the taker side of private/execute_block_trade for its own subaccount, over the legs and prices of the proposal, in the opposite direction to the proposal's direction. Send proposal_id with the signed fields subaccount_id, nonce, signer, max_fee, signature_expiry_sec and signature. The params have no legs or direction: the exchange uses those of the proposal, so a side signed over other terms fails the signature check. The first valid accept wins. The block trade executes at the prices of the proposal, with no broker fee. Returns the proposal with status executed and its block_trade_id. A failed accept leaves the proposal open, unless the maker side can no longer execute. The proposal is then cancelled, and the accept fails with block_proposal_not_open (11118). The error of a failed accept has no details, so it shows nothing about the maker. The caller can check its own side with private/verify_block_trade. If the outcome of the block trade is not known, the proposal stays executing until it expires, and private/get_block_trades shows whether the block trade executed. Fails with block_proposal_not_found (11117) if no proposal has that id, or if the proposal has a recipient_wallet that is not the caller's wallet. Fails with block_proposal_not_open (11118) if the proposal is not open: it executed, was cancelled or declined, expired, or another accept is in progress. Fails with block_trade_same_owner (11115) if the caller's wallet made the proposal, and with block_trade_outside_price_band (11123) if the total cost is now outside the price band. Requires the block_trade off-chain scope. A session key that signs the side needs block_trade and an RFQ trade scope for every instrument in the legs.

post/private/accept_block_proposal

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

AcceptBlockProposalRequest required

The caller's taker side, signed as for private/execute_block_trade over the legs of the proposal, in the opposite direction.

max_fee, string decimal required

Highest total fee this side pays, in USD.

nonce, string required
proposal_id, string uuid required

UUID v4 string

signature, string required
signature_expiry_sec, integer required
signer, string required

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

subaccount_id, integer required

Response

Success

BlockProposalResultPublic required

A block proposal as every other wallet sees it.

block_trade_id, string uuid nullable required

The block trade, once the proposal executes.

creation_timestamp, integer required
currency, string required
direction, 'buy' | 'sell' required

The maker's direction. The taker trades the opposite.

expires_at_sec, integer required

The last second (UTC) at which the proposal can be accepted.

last_update_timestamp, integer required
legs, PricedLegParamsAndResponse[] required
listed, boolean required

Whether the proposal is on the public list.

proposal_id, string uuid required

UUID v4 string

risk_universe_id, integer required
status, union required

Changes