Block Trades
The block trades API contains private endpoints for querying, submitting, and confirming block trades. It requires a Base64-encoded SHA256 HMAC signature as defined in Authentication.
For more information on block trades, see Block Trades. For specifics on the status of a block trade, see Block Trade Statuses.
Querying Block Trades
| HTTP Method | Endpoint |
|---|---|
GET | /block-trades |
The endpoint supports the following query parameters:
| Parameter | Notes |
|---|---|
symbol | Filter by product symbol, only works in production |
product_id | Filter by product ID, only works in production |
product_type | Filter by product type, only works in production |
clearing_firm_code | Filter by clearing firm code, only works in production |
account_id | Filter by account code, only works in production |
connection_id | Filter by connection ID, only works in production |
status | Block trade status filter |
day | Get range for day, overrides begin_time and end_time |
limit | Limit number of block trades per page |
begin_time | Begin time for block trade execution time range, see Time for more details |
end_time | End time for block trade execution time range, see Time for more details |
order | Page order, either asc or desc |
cursor | Cursor string for paginated query |
The endpoint returns a pagination response of the type Pagination<BlockTrade, CursorInfo>. More details
on paginated APIs can be found in Pagination.
BlockTrade is defined as follows:
export interface BlockTrade {
account_id: string;
block_trade_id: number;
counterparty_id: string;
counterparty_email: string | null;
symbol: string;
side: Side;
price: number;
product_id: number;
quantity: number;
exec_time: string;
report_time: string;
status: BlockTradeStatus;
status_reason: string | null;
status_time: string | null;
}
export type BlockTradeStatus = 'Pending' | 'Canceled' | 'Rejected' | 'Confirmed' | 'Accepted';
Submitting a Block Trade
| HTTP Method | Endpoint |
|---|---|
POST | /block-trades |
Submits a new block trade as the leader. The block trade is created in Pending status and must be
confirmed by the counterparty via the confirmation endpoint before it is
submitted to the exchange.
The endpoint supports the following query parameters:
| Parameter | Optionality | Notes |
|---|---|---|
account_id | required | Account code of the leader's clearing account |
short_name | required | Short clearing member name of the leader's clearing account |
The request body is a NewBlockTrade, defined as follows:
export interface NewBlockTrade {
leader_block_trader_id: string | null;
counterparty_block_trader_id: string;
product_id: number;
side: Side;
price: number;
quantity: number;
cti: CustomerTypeIndicator;
execution_time: string;
}
export type Side = 'Bid' | 'Ask';
export type CustomerTypeIndicator = 1 | 2 | 3 | 4;
| Field | Optionality | Notes |
|---|---|---|
leader_block_trader_id | optional | Block trader ID of the leader. Required when authenticating with an organization connection; derived from the connection for user connections (must match the connection's block trader if supplied) |
counterparty_block_trader_id | required | Block trader ID of the counterparty (follower) |
product_id | required | Product ID of the traded product |
side | required | Side of the leader; the counterparty takes the opposite side |
price | required | Agreed price of the block trade |
quantity | required | Quantity of the block trade, must be positive |
cti | required | Customer Type Indicator of the leader |
execution_time | required | Time the trade was agreed upon, see Time for more details |
On success, the endpoint returns a BlockTradeCreated with status Pending:
export interface BlockTradeCreated {
block_trade_id: number;
status: BlockTradeStatus;
}
Example request body:
{
"leader_block_trader_id": "7f5124f5-bce2-37ce-7457-9f9597c4ec7d",
"counterparty_block_trader_id": "d994c300-05f8-3207-61aa-08101f12e061",
"product_id": 5,
"side": "Ask",
"price": 9,
"quantity": 41,
"cti": 4,
"execution_time": "2021-01-25T00:00:37Z"
}
Example response:
{
"block_trade_id": 5,
"status": "Pending"
}
Confirming a Block Trade
| HTTP Method | Endpoint |
|---|---|
POST | /block-trades/{block_trade_id}/confirmation |
Confirms a pending block trade as the counterparty (follower). The block_trade_id path parameter is
the ID returned when the block trade was submitted. On confirmation, the block trade is submitted to
the exchange for acceptance.
The endpoint supports the following query parameters:
| Parameter | Optionality | Notes |
|---|---|---|
account_id | required | Account code of the follower's clearing account |
short_name | required | Short clearing member name of the follower's clearing account |
The request body is a ConfirmBlockTrade, defined as follows:
export interface ConfirmBlockTrade {
follower_block_trader_id: string | null;
cti: CustomerTypeIndicator;
}
| Field | Optionality | Notes |
|---|---|---|
follower_block_trader_id | optional | Block trader ID of the follower. Required when authenticating with an organization connection; derived from the connection for user connections (must match the connection's block trader if supplied) |
cti | required | Customer Type Indicator of the follower |
On success, the endpoint returns a BlockTradeConfirmation with status Accepted:
export interface BlockTradeConfirmation {
block_trade_id: number;
ack_id: string;
status: BlockTradeStatus;
}
Example request body:
{
"follower_block_trader_id": "5bfa46c8-cb39-b041-81e0-d2d6f079f6eb",
"cti": 2
}
Example response:
{
"block_trade_id": 5,
"ack_id": "322",
"status": "Accepted"
}
Start Trading
Leveraged spot, perpetuals, futures, options, and prediction markets, all on one CFTC-regulated exchange with crypto margin and settlement.