BlockTrades

Create block trade

Create a parent block trade for multi-party execution.

Block trades coordinate execution across multiple parties. The initiator creates a parent block trade specifying trade details and required signers, who must submit offers before execution.

Requirements:

  • Required signers must have active onboarding and block trade functionality
  • Valid StarkNet signature with expiration timestamp
  • Each trade specifies market, size, price, and order details

Workflow:

  1. Initiator creates parent block trade
  2. Required signers submit offers
  3. Initiator executes with selected offers
  4. All trades processed together
post/block-trades

Request body

block_expirationinteger required

Unix timestamp in milliseconds when block expires

noncestring required

Unique nonce for this block trade request

required_signersstring[] required

List of accounts that can participate in the block trade

signaturesobject required

Map of account addresses to their signatures. Can be empty or partial.

tradesobject required

Map of market symbol to trade info (one per market)

Example request

{
  "block_expiration": 1640995800000,
  "nonce": "67890"
}

Response

Created

block_expirationinteger

Unix timestamp in milliseconds when block expires

block_idstring

Backend-generated unique identifier

block_type'DIRECT' | 'OFFER_BASED'
created_atinteger

When block was created

failure_reasonstring

Reason for failure (if status is FAILED). Names a participant by role, never by address: <maker>, <taker>, <initiator>, <participant> (a party whose side is ambiguous), or <redacted> (an identifier belonging to no participant)

initiatorstring

Account that initiated this block trade

last_updated_atinteger

When block was last updated

noncestring

Original block nonce

parent_block_idstring

Parent block ID (if offer-based)

required_signersstring[]

List of accounts that can participate in the block trade

signaturesobject

Current signatures on this block (for signature verification)

status'CREATED' | 'OFFER_COLLECTION' | 'READY_TO_EXECUTE' | 'EXECUTING' | 'PENDING_SETTLEMENT' | 'COMPLETED' | 'FAILED' | 'CANCELLED'
tradesobject

Map of market to trade details

Example response

{
  "block_expiration": 1640995800000,
  "block_id": "block_456",
  "created_at": 1640995200000,
  "initiator": "0x123...abc",
  "last_updated_at": 1640995400000,
  "nonce": "67890",
  "parent_block_id": "block_123"
}

Changes

Changed in 9 of the 65 revisions of this API.263522

  • 48fe202ea88822See the full diff
    • added the new UNWIND_TRANSFER enum value to the /////////// response property for the response status

      response-property-enum-value-added

    • added the new UNWIND_TRANSFER enum value to the /////////// response property for the response status

      response-property-enum-value-added

    • removed the TRANSFER enum value from the /////////// response property for the response status

      response-property-enum-value-removed

    • removed the TRANSFER enum value from the /////////// response property for the response status

      response-property-enum-value-removed

    • added the new BLOCK_TRADE_REPLAYED_SIGNATURE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new EVM_VAULT_OPERATORS_DISABLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new VAULT_DATA_PRIVATE enum value to the //// response property for the response status

      response-property-enum-value-added

    • removed the INVALID_RHINOFI_QUOTE enum value from the //// response property for the response status

      response-property-enum-value-removed

    • removed the INVALID_RHINOFI_QUOTE_COMMIT enum value from the //// response property for the response status

      response-property-enum-value-removed

    • removed the INVALID_RHINOFI_REQUEST enum value from the //// response property for the response status

      response-property-enum-value-removed

    • added the new IP_NOT_ALLOWED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new MARKET_NOT_SETTLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_INVALID_SIGNATURE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_SIGNER_KEY_UNAUTHORIZED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new optional request property //

      new-optional-request-property

    • added the optional property // to the response with the status

      response-optional-property-added

    • added the new EVM_ADDRESS_ALREADY_ONBOARDED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new INSUFFICIENT_EVM_BALANCE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new PORTFOLIO_MARGIN_INVALID_ACCOUNT_KIND enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new PORTFOLIO_MARGIN_ONBOARDING_DISABLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • removed the BAD_STARKNET_REQUEST enum value from the //// response property for the response status

      response-property-enum-value-removed

    • removed the INVALID_PRICE_PRECISION enum value from the //// response property for the response status

      response-property-enum-value-removed

    • removed the TRANSACTION_NOT_FOUND enum value from the //// response property for the response status

      response-property-enum-value-removed

  • 46a57608a790252210See the full diff
    • the // request property type changed from object to no type

      request-property-type-changed

    • the /////// request property type changed from object to no type

      request-property-type-changed

    • the /////// request property type changed from object to no type

      request-property-type-changed

    • the // request property type changed from object to no type

      request-property-type-changed

    • the /////// request property type changed from object to no type

      request-property-type-changed

    • the /////// request property type changed from object to no type

      request-property-type-changed

    • the // request property type changed from object to no type

      request-property-type-changed

    • the response's property type changed from object to no type for status

      response-property-type-changed

    • the response's property type changed from object to no type for status

      response-property-type-changed

    • the response's property type changed from object to no type for status

      response-property-type-changed

    • the // response's property type changed from object to no type for status

      response-property-type-changed

    • the /////// response's property type changed from object to no type for status

      response-property-type-changed

    • the /////// response's property type changed from object to no type for status

      response-property-type-changed

    • the /////// response's property type changed from object to no type for status

      response-property-type-changed

    • the // response's property type changed from object to no type for status

      response-property-type-changed

    • the /////// response's property type changed from object to no type for status

      response-property-type-changed

    • the /////// response's property type changed from object to no type for status

      response-property-type-changed

    • the // response's property type changed from object to no type for status

      response-property-type-changed

    • the /////// response's property type changed from object to no type for status

      response-property-type-changed

    • the /////// response's property type changed from object to no type for status

      response-property-type-changed

    • the /////// response's property type changed from object to no type for status

      response-property-type-changed

    • the // response's property type changed from object to no type for status

      response-property-type-changed

    • the /////// response's property type changed from object to no type for status

      response-property-type-changed

    • the /////// response's property type changed from object to no type for status

      response-property-type-changed

    • the // response's property type changed from object to no type for status

      response-property-type-changed

    • added the new BLOCK_TRADE_ACCOUNT_MISMATCH enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_ALREADY_CANCELLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_EXPIRED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_INVALID_STATUS enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_MISSING_SIGNATURE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_MISSING_SIGNERS enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_MISSING_TRADES enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_NOT_ENABLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_NOT_FOUND enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new BLOCK_TRADE_UNAUTHORIZED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new EVM_SIGNATURE_VERIFICATION_FAILED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new INVALID_EVM_SIGNATURE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new MEDIA_NOT_FOUND enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_ALREADY_CANCELLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_INVALID_STATUS enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_PARENT_MISMATCH enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_PARENT_NOT_ACCEPTING enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new OFFER_UNAUTHORIZED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new PENDING_SETTLEMENT enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new PORTFOLIO_MARGIN_CONFIG_NOT_FOUND enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new SUBKEY_NOT_ACTIVATABLE enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new XP_TRANSFERS_DISABLED enum value to the //// response property for the response status

      response-property-enum-value-added

    • added the new optional request property ///////

      new-optional-request-property

    • added the new optional request property ///////

      new-optional-request-property

    • added the new optional request property ///////

      new-optional-request-property

    • added the new optional request property ///////

      new-optional-request-property

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property /////// to the response with the status

      response-optional-property-added

    • added the optional property /////// to the response with the status

      response-optional-property-added

    • added the optional property /////// to the response with the status

      response-optional-property-added

    • added the optional property /////// to the response with the status

      response-optional-property-added

    • removed the INVALID_JOIN_WAITLIST_REQUEST enum value from the //// response property for the response status

      response-property-enum-value-removed

  • 846a2e2b455b12See the full diff
    • added required request body

      request-body-added-required

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

      response-media-type-added

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

      response-media-type-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog