private/execute_block_trade
Changed onSettles a block trade: a multi-leg trade that two parties agree off the platform, directly or through a broker. Each party signs its own side. The maker side signs the same payload as an RFQ quote and the taker side signs the same payload as an RFQ execution, over the same priced legs. Anyone who holds both signed sides can submit them, and the submitter needs no access to either subaccount. A submitter can add a broker fee to each side with extra_fee and referral_code, up to that side's signed max_fee. The trade settles at the signed prices in one atomic step. The total cost must be inside the currency's RFQ price band for both sides, as within_price_band in private/simulate_block_trade and private/verify_block_trade reports. Each leg must be at least 100 times its instrument's minimum_amount. Returns the block_trade_id and the trades of each side. Fails with block_trade_outside_price_band (11123) if the total cost is outside the band, with block_trades_not_available_for_currency (11124) if the currency has no band, and with invalid_amount (11012) if a leg is too small. Requires the block_trade off-chain scope; RFQ scopes do not cover block trades. A session key that signs a side needs block_trade and an RFQ trade scope for every instrument in the legs, or fails with unauthorized_key_scope (14031).
Request
- Base URLhttps://api.derive.xyz/v3
- AuthAPI key in header X-DeriveWallet and API key in header X-DeriveTimestamp and API key in header X-DeriveSignature
Request body
One party's side of a block trade, signed by that party.
One party's side of a block trade, signed by that party.
Response
Success
Result for private/execute_block_trade: the trades each side took.
UUID v4 string
Changes
- info
endpoint added
- info