curl --request GET \
--url https://test.deribit.com/api/v2/private/get_block_trades \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "private/get_block_trades",
"params": {
"currency": "BTC",
"count": 1
}
}
'{
"jsonrpc": "2.0",
"result": [
{
"trades": [
{
"trade_seq": 4,
"trade_id": "92462",
"timestamp": 1565093070164,
"tick_direction": 2,
"state": "filled",
"price": 0.0151,
"order_type": "limit",
"order_id": "343121",
"matching_id": null,
"liquidity": "M",
"iv": 72.38,
"instrument_name": "BTC-9AUG19-11500-P",
"index_price": 11758.65,
"fee_currency": "BTC",
"fee": 0,
"direction": "sell",
"block_trade_id": "66",
"amount": 2.3
},
{
"trade_seq": 41,
"trade_id": "92460",
"timestamp": 1565093070164,
"tick_direction": 2,
"state": "filled",
"price": 11753,
"order_type": "limit",
"order_id": "343117",
"matching_id": null,
"liquidity": "M",
"instrument_name": "BTC-9AUG19",
"index_price": 11758.65,
"fee_currency": "BTC",
"fee": 0,
"direction": "sell",
"block_trade_id": "66",
"amount": 50
}
],
"timestamp": 1565093070165,
"id": "66"
}
]
}Returns a list of the userโs block trades. If currency is not provided, returns block trades for all currencies. block_rfq_id can be provided to receive block trades related to that particular Block RFQ.
๐ Related Article: Block Trading
Scope: block_trade:read
curl --request GET \
--url https://test.deribit.com/api/v2/private/get_block_trades \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "private/get_block_trades",
"params": {
"currency": "BTC",
"count": 1
}
}
'{
"jsonrpc": "2.0",
"result": [
{
"trades": [
{
"trade_seq": 4,
"trade_id": "92462",
"timestamp": 1565093070164,
"tick_direction": 2,
"state": "filled",
"price": 0.0151,
"order_type": "limit",
"order_id": "343121",
"matching_id": null,
"liquidity": "M",
"iv": 72.38,
"instrument_name": "BTC-9AUG19-11500-P",
"index_price": 11758.65,
"fee_currency": "BTC",
"fee": 0,
"direction": "sell",
"block_trade_id": "66",
"amount": 2.3
},
{
"trade_seq": 41,
"trade_id": "92460",
"timestamp": 1565093070164,
"tick_direction": 2,
"state": "filled",
"price": 11753,
"order_type": "limit",
"order_id": "343117",
"matching_id": null,
"liquidity": "M",
"instrument_name": "BTC-9AUG19",
"index_price": 11758.65,
"fee_currency": "BTC",
"fee": 0,
"direction": "sell",
"block_trade_id": "66",
"amount": 50
}
],
"timestamp": 1565093070165,
"id": "66"
}
]
}The currency symbol
Currency, i.e "BTC", "ETH", "USDC"
BTC, ETH, USDC, USDT, EURR Count of Block Trades returned, maximum - 101
1 <= x <= 101Response will contain block trades older than the one provided in this field Block trade id
"154"
The id of the oldest block trade to be returned, start_id is required with end_id
Block trade id
"154"
ID of the Block RFQ
Broker code to filter block trades. Only broker clients can use broker_code to filter broker block trades. Use any for all block trades.
"2krM7sJsx"
Success response
The JSON-RPC version (2.0)
2.0 Hide child attributes
Block trade id
"154"
The timestamp (milliseconds since the Unix epoch)
1536569522277
Hide child attributes
Unique (per currency) trade identifier
The sequence number of the trade within instrument
Unique instrument identifier
"BTC-PERPETUAL"
The timestamp of the trade (milliseconds since the UNIX epoch)
1517329113791
Id of the user order (maker or taker), i.e. subscriber's order id that took part in the trade
Always null
Trade direction of the taker
buy, sell Direction of the "tick" (0 = Plus Tick, 1 = Zero-Plus Tick, 2 = Minus Tick, 3 = Zero-Minus Tick).
0, 1, 2, 3 Index Price at the moment of trade
The price of the trade
Trade amount. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin.
User's fee in units of the specified fee_currency
Currency, i.e "BTC", "ETH", "USDC"
BTC, ETH, USDC, USDT, EURR Order state: "open", "filled", "rejected", "cancelled", "untriggered" or "archive" (if order was archived)
open, filled, rejected, cancelled, untriggered, archive Mark Price at the moment of trade
Order type: "limit, "market", or "liquidation"
limit, market, liquidation Advanced type of user order: "usd" or "implv" (only for options; omitted if not applicable)
usd, implv Trade size in contract units (optional, may be absent in historical trades)
Option implied volatility for the price (Option only)
Underlying price for implied volatility calculations (Options only)
Optional field (only for trades caused by liquidation): "M" when maker side of trade was under liquidation, "T" when taker side was under liquidation, "MT" when both sides of trade were under liquidation
M, T, MT Describes what was role of users order: "M" when it was maker order, "T" when it was taker order
M, T User defined label (presented only when previously set for order by user)
Block trade id - when trade was part of a block trade
"154"
ID of the Block RFQ - when trade was part of the Block RFQ
ID of the Block RFQ quote - when trade was part of the Block RFQ
true if user order is reduce-only
true if user order is post-only
true if user order is MMP
true if user order is marked by the platform as a risk reducing order (can apply only to orders placed by PM users)
true if user order was created with API
Profit and loss in base currency.
Optional field containing leg trades if trade is a combo trade (present when querying for only combo trades and in combo_trades events)
Optional field containing combo instrument name if the trade is a combo trade
Optional field containing combo trade identifier if the trade is a combo trade
QuoteSet of the user order (optional, present only for orders placed with private/mass_quote)
QuoteID of the user order (optional, present only for orders placed with private/mass_quote)
List of allocations for Block RFQ pre-allocation. Each allocation specifies user_id, amount, and fee for the allocated part of the trade. For broker client allocations, a client_info object will be included.
Hide child attributes
Amount allocated to this user.
Fee for the allocated part of the trade.
User ID to which part of the trade is allocated. For brokers the User ID is obstructed.
Optional client allocation info for brokers.
Hide child attributes
ID of a client; available to broker. Represents a group of users under a common name.
ID assigned to a single user in a client; available to broker.
Name of the linked user within the client; available to broker.
The name of the application that executed the block trade on behalf of the user (optional).
"Example Application"
Broker code associated with the broker block trade.
"2krM7sJsx"
Name of the broker associated with the block trade.
"Test Broker"
The id that was sent in the request
Was this page helpful?