> For the complete documentation index, see [llms.txt](https://docs.kaiko.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kaiko.com/rest-api/cefi-derivatives-markets/market-data/top-trades-by-unique-trade.md). Agents can also search and read this documentation through its [MCP server](https://docs.kaiko.com/~gitbook/mcp).

# Top trades by unique trade

{% hint style="info" %}

### This data is available as an add-on for the following Kaiko packages:

* Level 1 & Level 2 Data \[Level 1 Tick-Level]

*Subscriptions with "CeFi Derivatives" as the market type.*
{% endhint %}

## What is this endpoint for?

> The option trades of one underlying that match one trade structure, a set of directed legs.\
> One row per option trade, or block leg, on the options of one underlying (\`exchange\`, \`base\_asset\`, \`quote\_asset\`) belonging to a trade whose structure is exactly \`unique\_trade\`: a set of legs, each a direction and an instrument (\`buy:btc27jun25108000c\`). A block trade matches when the set of its legs' (Kaiko direction, instrument) equals the requested set; an on-screen trade matches when the set is that one leg. The row is the one of \`top-trades\`, futures hedge included. A row is unique on (\`exchange\`, \`instrument\`, \`timestamp\`, \`block\_trade\_id\`, \`hedge\_instrument\`).\
> \
> \*\*Unlike \`top-trades\`, no size threshold.\*\* Every matching trade is returned, whatever its size. \`block\_amount\` is the block's total size and \`null\` for an on-screen trade.\
> \
> \*\*Underlying.\*\* \`quote\_asset\` is the currency the options are quoted and settled in, \`usd\` by default: \`usd\` selects the inverse options and \`usdc\` or \`usdt\` the linear ones.\
> \
> \*\*Time window.\*\* \`\[start\_time, end\_time)\`, millisecond precision: a parameter with finer digits is a 400. \`end\_time\` defaults to now and \`start\_time\` to 1,830 days before \`end\_time\`. The maximum window is 1,830 days: a wider one returns 400 naming the cap, never a narrowed window.\
> \
> \*\*Filters.\*\* \`expiry\_after\` keeps only the options still live at that instant and defaults to now, so by default only structures on unexpired options are returned; pass an earlier instant to include expired ones. \`is\_block\_trade\` and \`block\_trade\_id\` work as on \`top-trades\`.\
> \
> \*\*Order.\*\* Fixed, as on the endpoint this replaces: newest first, then the larger \`trade\_amount\`, then the higher \`price\_usd\`, then \`instrument\`. There is no \`sort\`.\
> \
> \*\*No pagination (a deliberate exception to the paging rule).\*\* Like the Amberdata endpoint it replaces, every response holds the whole window: there is no \`page\_size\`, and \`meta.next\_url\` is always \`null\`. A window holding 100,000 matching rows or more returns 400 asking for a narrower window, never a truncated 200.\
> \
> \*\*Identity: an underlying \`exchange\` has never held is 404 \`unknown\_instrument\`.\*\* The markets held are the currencies of the decorated trades, history included, refreshed from the tables, so a newly listed underlying needs no release. A held underlying with no data in the window is 200 with \`data: \[]\`; a malformed \`base\_asset\` or \`quote\_asset\`, or an \`exchange\` outside the enum, is 400. An instrument in \`unique\_trade\` that never traded is 200 with \`data: \[]\`; a malformed one is 400.\
> \
> \*\*No history gate.\*\* Any key holding the access type reads the whole retained history.\
> \
> \*\*Units and nulls.\*\* As on \`top-trades\`: \`trade\_iv\` is nominal, prices are in the option's quote currency except \`price\_usd\` and \`size\_usd\`, and a value the venue did not report is \`null\`, never \`0\`.

```json
{"openapi":"3.1.1","info":{"title":"Kaiko API","version":"2026-10-01"},"tags":[{"name":"Trades flow","description":"Options trades flow: the trades of listed crypto options, decorated with the order book around each trade, and the analytics derived from them; and the option prints of US-listed equities and ETFs, decorated with the quotes, greeks and implied volatility around each one, their most traded options and the contracts traded per session and option."}],"servers":[{"url":"https://api.kaiko.io","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Your Kaiko API key. Sent on every request. Never in a query parameter.\n"}},"parameters":{"OptionExchangeQuery":{"name":"exchange","in":"query","required":true,"description":"Exchange listing the options, part of the underlying's identity with `base_asset` and `quote_asset`.","schema":{"$ref":"#/components/schemas/OptionExchange"}},"BaseAssetQuery":{"name":"base_asset","in":"query","required":true,"description":"Base asset code.","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]*$"}},"InverseDefaultQuoteAssetQuery":{"name":"quote_asset","in":"query","required":false,"description":"Quote and settlement currency of the options, `usd` by default: `usd` selects the inverse options, `usdc` or `usdt` the linear ones.","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]*$","default":"usd"}},"UniqueTradeQuery":{"name":"unique_trade","in":"query","required":true,"description":"The trade structure, comma-separated legs, each `<direction>:<instrument>`: `buy` or `sell` (Kaiko's aggressor direction) and the Kaiko instrument code. Matched as a set: order and repeats do not matter.","style":"form","explode":false,"schema":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","pattern":"^(buy|sell):[a-z0-9][a-z0-9._-]*$"}}},"ExpiryAfterNowQuery":{"name":"expiry_after","in":"query","required":false,"description":"Keep only the options still live at this instant: expiry at or after it, ISO 8601 UTC, millisecond precision. Defaults to now.","schema":{"type":"string","format":"date-time"}},"IsBlockTradeQuery":{"name":"is_block_trade","in":"query","required":false,"description":"`true` keeps only the legs of block trades, `false` only on-screen trades. Omitted means both. `false` together with `block_trade_id` returns 400.","schema":{"type":"boolean"}},"BlockTradeIdQuery":{"name":"block_trade_id","in":"query","required":false,"description":"Keep only the legs of this block trade, by the venue's block trade id.","schema":{"type":"string","minLength":1}},"StartTimeQuery":{"name":"start_time","in":"query","required":false,"description":"Inclusive start of the window, ISO 8601 UTC. The endpoint documents its precision and its default when omitted; a nanosecond endpoint accepts any precision from seconds to nanoseconds.\n","schema":{"type":"string","format":"date-time"}},"EndTimeQuery":{"name":"end_time","in":"query","required":false,"description":"Exclusive end of the window, ISO 8601 UTC, at the precision the endpoint documents. Defaults to now. Must be after `start_time`.\n","schema":{"type":"string","format":"date-time"}},"ApiVersionQuery":{"name":"api_version","in":"query","required":false,"description":"Contract version to serve, as a date. Each endpoint serves its newest version released on or before it, so one date pins the whole API. When omitted, the endpoint's oldest version still served is used, so breaking changes only reach clients that raise their date. Append `-preview` (`2027-02-01-preview`) to also be served preview versions, which carry no stability promise. A date in the future, or one resolving to a retired version, returns 400 `unsupported_api_version`. The version served is echoed in `meta.api_version`, and `meta.url` and `meta.next_url` always carry this parameter. No `default` here on purpose: it differs per endpoint, and the request validator would otherwise fill in one date for all of them.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(-preview)?$"}}},"schemas":{"OptionExchange":{"type":"string","enum":["drbt","okex","bbit"],"description":"Kaiko code of an options exchange: `drbt` (Deribit), `okex` (OKX), `bbit` (Bybit)."},"ListTradesFlowTopTradesResponse":{"type":"object","description":"The notable trades of the window, newest first.","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TopTrade"}},"meta":{"$ref":"#/components/schemas/Meta"}}},"TopTrade":{"type":"object","description":"One notable option trade (or block leg) with its size and greek exposures, and one futures leg of its block, if any. Unique on (`exchange`, `instrument`, `timestamp`, `block_trade_id`, `hedge_instrument`). Every key is present on every row; a value the venue did not report is `null`, never `0`.","required":["exchange","base_asset","quote_asset","timestamp","instrument","exchange_direction","kaiko_direction","block_trade_id","number_of_legs","trade_amount","block_amount","trade_iv","price","price_usd","index_price","open_interest_change","size_usd","size_delta","size_vega","size_gamma","size_theta","hedge_instrument","hedge_is_buy_side","hedge_price","hedge_volume"],"properties":{"exchange":{"$ref":"#/components/schemas/OptionExchange"},"base_asset":{"type":"string","description":"Underlying asset code, as in the query."},"quote_asset":{"type":"string","description":"Quote and settlement currency of the options, as in the query (`usd` for inverse options)."},"timestamp":{"type":"string","format":"date-time","description":"Time of the trade as the venue reported it, ISO 8601 UTC, millisecond precision (3 fractional digits, trailing zeros kept)."},"instrument":{"type":"string","description":"Kaiko instrument code of the option traded."},"exchange_direction":{"$ref":"#/components/schemas/TradeDirection"},"kaiko_direction":{"$ref":"#/components/schemas/TradeDirection"},"block_trade_id":{"type":["string","null"],"description":"The venue's id of the block trade this trade is a leg of. `null` when not applicable: an on-screen trade."},"number_of_legs":{"type":["integer","null"],"format":"int32","description":"Option legs of the block trade matching the filters; futures legs are not counted, unlike `number_of_legs` on decorated trades. `null` when not applicable: an on-screen trade."},"trade_amount":{"type":["number","null"],"format":"double","description":"Size of the trade, in contracts. `null` when not reported."},"block_amount":{"type":["number","null"],"format":"double","description":"Total size of the block trade's legs matching the filters, in contracts; the trade's own size for an on-screen trade. The size the threshold is judged on. `null` when not reported."},"trade_iv":{"type":["number","null"],"format":"double","description":"Implied volatility of the trade, nominal (`0.45` is 45 %). `null` when not reported."},"price":{"type":["number","null"],"format":"double","description":"Price of the trade in the option's quote currency (`base_asset` for inverse options). `null` when not reported."},"price_usd":{"type":["number","null"],"format":"double","description":"Price of the trade in USD. `null` when not reported."},"index_price":{"type":["number","null"],"format":"double","description":"Index price of the underlying at the trade, in USD. `null` when not reported."},"open_interest_change":{"type":["number","null"],"format":"double","description":"Change in the option's open interest across the trade, in contracts. `null` when not reported."},"size_usd":{"type":["number","null"],"format":"double","description":"The trade's premium in USD, `trade_amount` times `price_usd`. `null` when either is not reported."},"size_delta":{"type":["number","null"],"format":"double","description":"The trade's delta exposure, `trade_amount` times the option's delta. `null` when either is not reported."},"size_vega":{"type":["number","null"],"format":"double","description":"The trade's vega exposure, `trade_amount` times the option's vega. `null` when either is not reported."},"size_gamma":{"type":["number","null"],"format":"double","description":"The trade's gamma exposure, `trade_amount` times the option's gamma. `null` when either is not reported."},"size_theta":{"type":["number","null"],"format":"double","description":"The trade's theta exposure, `trade_amount` times the option's theta. `null` when either is not reported."},"hedge_instrument":{"type":["string","null"],"description":"Kaiko instrument code of a futures leg of the same block trade (`btcperpetual`, `btc30oct26`). `null` when not applicable: no futures leg, or an on-screen trade."},"hedge_is_buy_side":{"type":["boolean","null"],"description":"Whether the futures leg was a buy, as the venue reported the block. `null` when not applicable, or when the venue reported no side."},"hedge_price":{"type":["number","null"],"format":"double","description":"Price of the futures leg, in USD. `null` when not applicable."},"hedge_volume":{"type":["number","null"],"format":"double","description":"Size of the futures leg in the venue's own unit: USD on Deribit's inverse futures. `null` when not applicable."}}},"TradeDirection":{"type":"string","enum":["buy","sell","unknown"],"description":"Side of the aggressor (taker) of the trade. `exchange_direction` is the side the venue reported; `kaiko_direction` is Kaiko's verdict from the top of book, IVs and size around the trade, falling back to the venue's side when the heuristics are undecided. Never `null`: `unknown` when the source holds a value that is neither buy nor sell (none does today)."},"Meta":{"type":"object","description":"Metadata of a collection response.","required":["api_version","url","count","next_url"],"properties":{"api_version":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(-preview)?$","description":"Version this endpoint served: its version released on or before the requested `api_version`, or its oldest version still served when the request omitted it. Suffixed `-preview` when a preview version served it."},"url":{"type":"string","format":"uri","description":"Absolute URL of the request that produced this response, as received: path and query string unchanged, defaults not filled in, except `api_version`, which is always present (the version served when the request omitted it). Lets a stored response say what it answers, in the shape it was answered."},"count":{"type":"integer","minimum":0,"description":"Number of items in `data` on this page."},"next_url":{"type":["string","null"],"format":"uri","description":"Absolute URL of the next page, `null` on the last page. It holds only public parameters: the original query with every default made explicit (`api_version` included) and the time bound moved past the last row, plus the dataset's tie-breaker (`after_<key>`) where timestamps can tie. An operation that pages on another keyset (a block position, a snapshot) says so in its description, and its `next_url` carries that keyset's parameters instead."}}},"Problem":{"type":"object","description":"RFC 9457 problem details. Served as application/problem+json.","required":["type","title","status","code"],"properties":{"type":{"type":"string","format":"uri-reference","const":"about:blank","description":"Always `about:blank`; the reason is carried by `code`."},"title":{"type":"string","description":"HTTP reason phrase."},"status":{"type":"integer","minimum":400,"maximum":599,"description":"HTTP status code, repeated for clients that lose the status line."},"detail":{"type":"string","description":"Human-readable explanation specific to this occurrence. Do not parse it."},"instance":{"type":"string","format":"uri-reference","description":"Request path and request id, to quote to support."},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]*$","description":"Stable machine-readable reason. Clients branch on this. New values are additive; renaming one is breaking. Values in use: invalid_parameter, unsupported_api_version, missing_api_key, invalid_api_key, not_entitled, history_out_of_entitlement, unknown_instrument, pair_not_covered, unknown_asset, unknown_index, unsupported_blockchain, chain_capability_unsupported, token_not_found, unknown_contract, unknown_protocol, unknown_pool, query_too_large, snapshot_expired, resource_not_found, method_not_allowed, not_acceptable, rate_limited, internal_error, service_unavailable."},"errors":{"type":"array","description":"On 400, one entry per invalid parameter.","items":{"$ref":"#/components/schemas/ParameterError"}}}},"ParameterError":{"type":"object","description":"One invalid parameter in a 400 response.","required":["parameter","detail"],"properties":{"parameter":{"type":"string","description":"Name of the offending parameter."},"detail":{"type":"string","description":"What is wrong with it."}}}},"responses":{"BadRequest":{"description":"Invalid parameter, window or API version.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unauthorized":{"description":"Missing or unknown X-Api-Key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Forbidden":{"description":"The key is valid but not entitled to this product, instrument or history depth.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"NotAcceptable":{"description":"The Accept header excludes application/json.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"TooManyRequests":{"description":"Rate limited. Retry after the delay in Retry-After.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"InternalError":{"description":"Unexpected server failure.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"ServiceUnavailable":{"description":"A dependency is down or the data is not available yet.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":0}}}},"paths":{"/analytics/trades-flow/top-trades-by-unique-trade":{"get":{"operationId":"ListTradesFlowTopTradesByUniqueTrade","tags":["Trades flow"],"summary":"What is this endpoint for?","description":"The option trades of one underlying that match one trade structure, a set of directed legs.\nOne row per option trade, or block leg, on the options of one underlying (`exchange`, `base_asset`, `quote_asset`) belonging to a trade whose structure is exactly `unique_trade`: a set of legs, each a direction and an instrument (`buy:btc27jun25108000c`). A block trade matches when the set of its legs' (Kaiko direction, instrument) equals the requested set; an on-screen trade matches when the set is that one leg. The row is the one of `top-trades`, futures hedge included. A row is unique on (`exchange`, `instrument`, `timestamp`, `block_trade_id`, `hedge_instrument`).\n\n**Unlike `top-trades`, no size threshold.** Every matching trade is returned, whatever its size. `block_amount` is the block's total size and `null` for an on-screen trade.\n\n**Underlying.** `quote_asset` is the currency the options are quoted and settled in, `usd` by default: `usd` selects the inverse options and `usdc` or `usdt` the linear ones.\n\n**Time window.** `[start_time, end_time)`, millisecond precision: a parameter with finer digits is a 400. `end_time` defaults to now and `start_time` to 1,830 days before `end_time`. The maximum window is 1,830 days: a wider one returns 400 naming the cap, never a narrowed window.\n\n**Filters.** `expiry_after` keeps only the options still live at that instant and defaults to now, so by default only structures on unexpired options are returned; pass an earlier instant to include expired ones. `is_block_trade` and `block_trade_id` work as on `top-trades`.\n\n**Order.** Fixed, as on the endpoint this replaces: newest first, then the larger `trade_amount`, then the higher `price_usd`, then `instrument`. There is no `sort`.\n\n**No pagination (a deliberate exception to the paging rule).** Like the Amberdata endpoint it replaces, every response holds the whole window: there is no `page_size`, and `meta.next_url` is always `null`. A window holding 100,000 matching rows or more returns 400 asking for a narrower window, never a truncated 200.\n\n**Identity: an underlying `exchange` has never held is 404 `unknown_instrument`.** The markets held are the currencies of the decorated trades, history included, refreshed from the tables, so a newly listed underlying needs no release. A held underlying with no data in the window is 200 with `data: []`; a malformed `base_asset` or `quote_asset`, or an `exchange` outside the enum, is 400. An instrument in `unique_trade` that never traded is 200 with `data: []`; a malformed one is 400.\n\n**No history gate.** Any key holding the access type reads the whole retained history.\n\n**Units and nulls.** As on `top-trades`: `trade_iv` is nominal, prices are in the option's quote currency except `price_usd` and `size_usd`, and a value the venue did not report is `null`, never `0`.","parameters":[{"$ref":"#/components/parameters/OptionExchangeQuery"},{"$ref":"#/components/parameters/BaseAssetQuery"},{"$ref":"#/components/parameters/InverseDefaultQuoteAssetQuery"},{"$ref":"#/components/parameters/UniqueTradeQuery"},{"$ref":"#/components/parameters/ExpiryAfterNowQuery"},{"$ref":"#/components/parameters/IsBlockTradeQuery"},{"$ref":"#/components/parameters/BlockTradeIdQuery"},{"$ref":"#/components/parameters/StartTimeQuery"},{"$ref":"#/components/parameters/EndTimeQuery"},{"$ref":"#/components/parameters/ApiVersionQuery"}],"responses":{"200":{"description":"The trades matching the structure, newest first, or an empty `data` when there is none; `meta.next_url` is always `null`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTradesFlowTopTradesResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"The underlying (`base_asset`, `quote_asset`) was never held on `exchange`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"406":{"$ref":"#/components/responses/NotAcceptable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kaiko.com/rest-api/cefi-derivatives-markets/market-data/top-trades-by-unique-trade.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
