WebSocket stream of live trades, activities and conversions
A WebSocket channel, not a request/response endpoint. Connect, and the
server pushes rows as they are decoded — confirmed on-chain trades,
activities and conversions, plus unconfirmed mempool trades if you ask
for them.
The 101 below is the handshake and carries no HTTP body. Everything
the server says afterwards is a WebSocket text frame holding one JSON
object. Your WebSocket client performs the upgrade, so Upgrade,
Connection and the Sec-WebSocket-* headers are never yours to set,
and the query parameters are read once, at connect time.
Browsers cannot set request headers on a handshake, so authenticate
there with ?api_key=<your-api-key> and with the Authorization
header everywhere else.
const socket = new WebSocket( "wss://data.gravia.trade/api/v1/streams/transactions" + "?streams=trades&api_key=" + apiKey,);socket.addEventListener("message", (frame) => { const message = JSON.parse(frame.data); switch (message.type) { case "trade": // status is "confirmed", or "pending" for a mempool trade break; case "retraction": // drop whatever you hold for message.tx_hash on message.stream break; }});// Filters are managed in band, once the socket is open.socket.send(JSON.stringify({action: "filter.add", wallets: [wallet]}));
Concurrent connections are limited per API key. The service default is
one, but a key may be assigned a different allowance. Exceeding it
returns 429 with the stream_limit_reached code, which is distinct
from ordinary rate limiting: close an existing stream rather than
backing off.
Fixed at connect.streams and mempool cannot be changed in
band. wallet and market only seed the filters, which are then
managed with the client messages below, so a caller holding
thousands of selectors is not limited by URL length.
Filters. Both sets are optional; omitting them streams
everything. They are ANDed, and selectors within each are ORed.
wallet matches the row subject (user_address) only — the
counterparty of a fill appears as the subject of its own row, so
matching taker_address as well would deliver the same fill
several times. A filter change is not retroactive.
Liveness. The server sends a protocol ping every 20 seconds,
and a heartbeat frame on any tick where it wrote nothing else, so
a quiet stream stays visibly alive to application code that cannot
observe protocol pings. A connection that sends nothing at all for
60 seconds is closed; the automatic pong your client already sends
is enough to hold it open.
Delivery is at-most-once with no replay.sequence is a
server-global ordinal, so a filtered client sees gaps by design; it
is not a gap detector, and it is absent from a control frame sent
before the server has decoded anything. source.dropped_total in
each heartbeat counts rows the server discarded because it was
behind, which is the only loss a client cannot otherwise detect.
Read the REST endpoints when completeness matters.
Retractions ignore the wallet and market filters, because a reorg
retraction carries no rows and therefore no wallet or market;
stream selection still applies. Ignore one for a tx_hash you hold
no state for. Pending trades are never retracted, and a pending
trade may never land — time out your own pending state. With
mempool=true a landed trade is delivered twice, once pending and
once confirmed; deduplicate on (tx_hash, order_hash).
Close codes.1008 with client is too slow means the server
gave up writing to you and dropped the connection rather than
waiting; reconnect with tighter filters or a faster reader. 1001
with server is shutting down is a deploy — reconnect. Anything
that fails before the upgrade is ordinary HTTP, listed under
Responses below.
Client messages
One JSON object per text frame, discriminated by action. Unknown
keys are rejected, and every frame — ping included — is counted
against a budget of 20 commands per second with a burst of 40.
wallets entries are 0x-prefixed 20-byte addresses; usernames are
rejected. markets entries are classified by shape: 0x followed
by 64 hex is a condition id, a decimal string is a CLOB token id.
Market slugs and category: selectors are not accepted here.
target is wallets, markets or all, and defaults to all. A
batch applies atomically: one malformed entry rejects the whole
message and leaves the filter set untouched. At most 5,000 entries
per message; welcome reports the standing caps in limits.
Server messages
Every frame carries a type, and type is the only field to
dispatch on.
type
Sent when
Structure
welcome
Once, immediately after the handshake.
TransactionStreamWelcome
trade
A trade was decoded. status is confirmed, or pending for a mempool trade.
TransactionStreamTrade
activity
A split, merge or redemption was decoded.
TransactionStreamActivity
conversion
A NegRisk conversion was decoded.
TransactionStreamConversion
retraction
A transaction was reorged out.
TransactionStreamRetraction
heartbeat
A ping tick passed with nothing else to write.
TransactionStreamHeartbeat
filter.updated
A filter command was applied.
TransactionStreamFilterUpdated
filter.rejected
A filter command was refused and nothing changed.
TransactionStreamFilterRejected
filter.snapshot
Reply to filter.list.
TransactionStreamFilterSnapshot
error
A frame could not be handled. The socket stays open.
TransactionStreamError
pong
Reply to {"action": "ping"}.
TransactionStreamPong
A trade, activity or conversion frame is the decoded upstream
row forwarded whole, with type and sequence added in front, so
treat unrecognized fields as forward-compatible additions rather
than errors. v is the upstream row schema version, currently 2.
Money, size and price fields cross as decimal strings, and so do
token ids: they are 256-bit, and a JSON number would silently lose
precision. partial marks a row where the fields named in
missing read as unknown rather than zero.
A pending mempool trade is the same frame with status: "pending".
It has no block yet, so block_number and log_index are 0,
block_hash and block_timestamp are null, and
canonical_token_id is null; order_hash_alt may carry the
NegRisk candidate order hash, so match a pending trade against its
confirmation on either hash.
filter.updated — the command was applied. added and removed
are net count deltas, not the values applied, so a filter.set that
swaps one wallet for another reports zero of each:
filter.rejected — nothing was applied. A validation failure names
every entry it refused; a cap failure carries only code and
message:
{ "type": "filter.rejected", "code": "invalid_filter", "message": "no changes were applied", "rejected": [ {"value": "polymarket-btc-up-or-down", "reason": "market slugs are not supported; use a condition id or CLOB token id"}, {"value": "@trader", "reason": "usernames are not supported; use a 0x-prefixed 20-byte address"} ]}
{ "type": "filter.rejected", "code": "filter_limit_reached", "message": "txstream: filter limit reached: at most 25000 wallets"}
filter.snapshot — the reply to filter.list. values is present
only when the request set include_values: true, each list is
capped at 1,000 entries, and truncated says whether any list was
cut short:
Up to 100 comma-separated condition ids (0x + 64 hex) or
decimal CLOB token ids. Market slugs and category: selectors
are not supported. A condition id selects both outcomes; a
token id selects one.
API key, for clients that cannot set request headers on a
WebSocket handshake. The Authorization header takes
precedence and should be preferred; this value is redacted from
access logs and usage records.
Response
The handshake succeeded and the socket is open; the server sends
welcome first. There is no HTTP response body — the schema
below is the union of the JSON frames the server then pushes,
discriminated by type.
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Option 8
Option 9
Option 10
Option 11
One frame the transaction stream sends. These are WebSocket text
frames on an open socket, not HTTP response bodies. type is the
discriminator and the only field a client dispatches on.
Sizes of a connection's filter sets. Counts rather than values: a client may hold tens of thousands of entries, and an acknowledgement should not echo them all back.
The server-global ordinal at connect time. Absent when the server has not decoded any upstream message yet.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Gravia Data API","colors":{"primary":"#9FFBFE","light":"#B8F7F8","dark":"#52CCD0"},"logo":{"light":"https://mintcdn.com/gravia-trade/q65mj9SyvyR5CJGQ/images/Gravia-black-logo.svg?fit=max\u0026auto=format\u0026n=q65mj9SyvyR5CJGQ\u0026q=85\u0026s=d20027ef4daf7f22158c1c43c271a664","dark":"https://mintcdn.com/gravia-trade/q65mj9SyvyR5CJGQ/images/Gravia-White-logo.svg?fit=max\u0026auto=format\u0026n=q65mj9SyvyR5CJGQ\u0026q=85\u0026s=ea11483c2fba835a236dce5eaafc0971"},"favicon":{"light":"https://mintcdn.com/gravia-trade/q65mj9SyvyR5CJGQ/images/Favicon-black.svg?fit=max\u0026auto=format\u0026n=q65mj9SyvyR5CJGQ\u0026q=85\u0026s=7592a349f8a038bd79006469a83390b7","dark":"https://mintcdn.com/gravia-trade/q65mj9SyvyR5CJGQ/images/Favicon-black.svg?fit=max\u0026auto=format\u0026n=q65mj9SyvyR5CJGQ\u0026q=85\u0026s=7592a349f8a038bd79006469a83390b7"},"background":{"color":{"light":"#ffffff","dark":"#09090B"}},"navbar":{"links":[{"href":"mailto:[email protected]","label":"Support"},{"href":"https://discord.gg/REeFwe5HyN","label":"Discord"}]},"footer":{"socials":{"x":"https://x.com/graviahq","discord":"https://discord.gg/REeFwe5HyN"}},"fonts":{"family":"DM Sans"},"styling":{"codeblocks":"system","latex":false},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"markdown":{"schema":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gravia-trade","hasAudioNarration":false,"actualSubdomain":"gravia-trade","customDomains":["docs.gravia.trade"],"gitSource":{"type":"github","owner":"mintlify-community","repo":"docs-gravia-trade-52698928","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"collectionId":"5160409f-d378-44bb-8ff7-93078be2816f","liveDeploymentHistoryId":"6abcdb7489c801142748f92e","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6abcdb7489c801142748f92e"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6abcdb7489c801142748f92e","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"API Reference","count":22},{"language":"default","tag":"Webhooks","count":9},{"language":"default","tag":"Users","count":7},{"language":"default","tag":"Documentation","count":5},{"language":"default","tag":"Getting Started","count":5},{"language":"default","tag":"Markets","count":3},{"language":"default","tag":"Streams","count":2},{"language":"default","tag":"Operational","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions","slug":"/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions","pageMetadata":{"title":"WebSocket stream of live trades, activities and conversions","description":"A WebSocket channel, not a request/response endpoint. Connect, and the\nserver pushes rows as they are decoded — confirmed on-chain trades,\nactivities and conversions, plus unconfirmed mempool trades if you ask\nfor them.\n\n```\nwss://data.gravia.trade/api/v1/streams/transactions?streams=trades,activities,conversions\u0026mempool=false\n```\n\nThe `101` below is the handshake and carries no HTTP body. Everything\nthe server says afterwards is a WebSocket text frame holding one JSON\nobject. Your WebSocket client performs the upgrade, so `Upgrade`,\n`Connection` and the `Sec-WebSocket-*` headers are never yours to set,\nand the query parameters are read once, at connect time.\n\nBrowsers cannot set request headers on a handshake, so authenticate\nthere with `?api_key=\u003cyour-api-key>` and with the `Authorization`\nheader everywhere else.\n\n```js\nconst socket = new WebSocket(\n \"wss://data.gravia.trade/api/v1/streams/transactions\" +\n \"?streams=trades\u0026api_key=\" + apiKey,\n);\n\nsocket.addEventListener(\"message\", (frame) => {\n const message = JSON.parse(frame.data);\n switch (message.type) {\n case \"trade\":\n // status is \"confirmed\", or \"pending\" for a mempool trade\n break;\n case \"retraction\":\n // drop whatever you hold for message.tx_hash on message.stream\n break;\n }\n});\n\n// Filters are managed in band, once the socket is open.\nsocket.send(JSON.stringify({action: \"filter.add\", wallets: [wallet]}));\n```\n\n**Concurrent connections are limited per API key.** The service default is\none, but a key may be assigned a different allowance. Exceeding it\nreturns `429` with the `stream_limit_reached` code, which is distinct\nfrom ordinary rate limiting: close an existing stream rather than\nbacking off.\n\n**Fixed at connect.** `streams` and `mempool` cannot be changed in\nband. `wallet` and `market` only seed the filters, which are then\nmanaged with the client messages below, so a caller holding\nthousands of selectors is not limited by URL length.\n\n**Filters.** Both sets are optional; omitting them streams\neverything. They are ANDed, and selectors within each are ORed.\n`wallet` matches the row subject (`user_address`) only — the\ncounterparty of a fill appears as the subject of its own row, so\nmatching `taker_address` as well would deliver the same fill\nseveral times. A filter change is not retroactive.\n\n**Liveness.** The server sends a protocol ping every 20 seconds,\nand a `heartbeat` frame on any tick where it wrote nothing else, so\na quiet stream stays visibly alive to application code that cannot\nobserve protocol pings. A connection that sends nothing at all for\n60 seconds is closed; the automatic pong your client already sends\nis enough to hold it open.\n\n**Delivery is at-most-once with no replay.** `sequence` is a\nserver-global ordinal, so a filtered client sees gaps by design; it\nis not a gap detector, and it is absent from a control frame sent\nbefore the server has decoded anything. `source.dropped_total` in\neach heartbeat counts rows the server discarded because it was\nbehind, which is the only loss a client cannot otherwise detect.\nRead the REST endpoints when completeness matters.\n\nRetractions ignore the wallet and market filters, because a reorg\nretraction carries no rows and therefore no wallet or market;\nstream selection still applies. Ignore one for a `tx_hash` you hold\nno state for. Pending trades are never retracted, and a pending\ntrade may never land — time out your own pending state. With\n`mempool=true` a landed trade is delivered twice, once pending and\nonce confirmed; deduplicate on `(tx_hash, order_hash)`.\n\n**Close codes.** `1008` with `client is too slow` means the server\ngave up writing to you and dropped the connection rather than\nwaiting; reconnect with tighter filters or a faster reader. `1001`\nwith `server is shutting down` is a deploy — reconnect. Anything\nthat fails before the upgrade is ordinary HTTP, listed under\nResponses below.\n\n### Client messages\n\nOne JSON object per text frame, discriminated by `action`. Unknown\nkeys are rejected, and every frame — `ping` included — is counted\nagainst a budget of 20 commands per second with a burst of 40.\n\n```json\n{\"action\": \"filter.add\", \"wallets\": [\"0x674887d1ac838099a48b629dff53f25b7b87ee08\"]}\n{\"action\": \"filter.remove\", \"markets\": [\"67568438763601610729831023256910933987242052537121118642143709840881218761985\"]}\n{\"action\": \"filter.set\", \"markets\": [\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\"]}\n{\"action\": \"filter.clear\", \"target\": \"wallets\"}\n{\"action\": \"filter.list\", \"include_values\": true}\n{\"action\": \"ping\"}\n```\n\n`wallets` entries are `0x`-prefixed 20-byte addresses; usernames are\nrejected. `markets` entries are classified by shape: `0x` followed\nby 64 hex is a condition id, a decimal string is a CLOB token id.\nMarket slugs and `category:` selectors are not accepted here.\n`target` is `wallets`, `markets` or `all`, and defaults to `all`. A\nbatch applies atomically: one malformed entry rejects the whole\nmessage and leaves the filter set untouched. At most 5,000 entries\nper message; `welcome` reports the standing caps in `limits`.\n\n### Server messages\n\nEvery frame carries a `type`, and `type` is the only field to\ndispatch on.\n\n| `type` | Sent when | Structure |\n| --- | --- | --- |\n| `welcome` | Once, immediately after the handshake. | `TransactionStreamWelcome` |\n| `trade` | A trade was decoded. `status` is `confirmed`, or `pending` for a mempool trade. | `TransactionStreamTrade` |\n| `activity` | A split, merge or redemption was decoded. | `TransactionStreamActivity` |\n| `conversion` | A NegRisk conversion was decoded. | `TransactionStreamConversion` |\n| `retraction` | A transaction was reorged out. | `TransactionStreamRetraction` |\n| `heartbeat` | A ping tick passed with nothing else to write. | `TransactionStreamHeartbeat` |\n| `filter.updated` | A filter command was applied. | `TransactionStreamFilterUpdated` |\n| `filter.rejected` | A filter command was refused and nothing changed. | `TransactionStreamFilterRejected` |\n| `filter.snapshot` | Reply to `filter.list`. | `TransactionStreamFilterSnapshot` |\n| `error` | A frame could not be handled. The socket stays open. | `TransactionStreamError` |\n| `pong` | Reply to `{\"action\": \"ping\"}`. | `TransactionStreamPong` |\n\nA `trade`, `activity` or `conversion` frame is the decoded upstream\nrow forwarded whole, with `type` and `sequence` added in front, so\ntreat unrecognized fields as forward-compatible additions rather\nthan errors. `v` is the upstream row schema version, currently `2`.\nMoney, size and price fields cross as decimal **strings**, and so do\ntoken ids: they are 256-bit, and a JSON number would silently lose\nprecision. `partial` marks a row where the fields named in\n`missing` read as unknown rather than zero.\n\n`welcome` — once, immediately after the handshake:\n\n```json\n{\n \"type\": \"welcome\",\n \"server_time\": \"2026-08-17T12:00:00.123456789Z\",\n \"sequence\": 918473,\n \"streams\": [\"trades\", \"activities\", \"conversions\"],\n \"mempool\": false,\n \"filters\": {\"wallets\": 1, \"condition_ids\": 0, \"token_ids\": 0},\n \"limits\": {\"max_wallets\": 25000, \"max_markets\": 25000, \"max_filter_batch\": 5000},\n \"source\": {\n \"connected\": true,\n \"last_message_at\": \"2026-08-17T12:00:00.031000000Z\",\n \"dropped_total\": 0\n }\n}\n```\n\n`trade` — a confirmed fill:\n\n```json\n{\n \"type\": \"trade\",\n \"sequence\": 918501,\n \"v\": 2,\n \"stream\": \"trades\",\n \"status\": \"confirmed\",\n \"block_number\": 91937590,\n \"block_hash\": \"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\",\n \"block_timestamp\": 1786924800,\n \"tx_hash\": \"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\",\n \"tx_row_index\": 1,\n \"tx_row_count\": 3,\n \"partial\": false,\n \"missing\": [],\n \"published_at\": 1786924801.312,\n \"log_index\": 42,\n \"order_hash\": \"0x5e4d3c2b1a09f8e7d6c5b4a3928170615f4e3d2c1b0a9f8e7d6c5b4a39281706\",\n \"order_hash_alt\": null,\n \"user_address\": \"0x674887d1ac838099a48b629dff53f25b7b87ee08\",\n \"taker_address\": \"0x9c1a5f3b2d8e4c6b7a0f9e8d7c6b5a4938271605\",\n \"side\": \"BUY\",\n \"token_id\": \"67568438763601610729831023256910933987242052537121118642143709840881218761985\",\n \"canonical_token_id\": \"67568438763601610729831023256910933987242052537121118642143709840881218761985\",\n \"condition_id\": \"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\",\n \"shares\": \"20000\",\n \"usdc_amount\": \"9800.5\",\n \"share_price\": \"0.49\",\n \"fee_amount\": \"0\",\n \"fee_refund_amount\": \"0\",\n \"trade_timestamp\": 1786924800,\n \"contract_version\": 2,\n \"is_taker_order\": true,\n \"builder\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"metadata\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n}\n```\n\nA pending mempool trade is the same frame with `status: \"pending\"`.\nIt has no block yet, so `block_number` and `log_index` are `0`,\n`block_hash` and `block_timestamp` are `null`, and\n`canonical_token_id` is `null`; `order_hash_alt` may carry the\nNegRisk candidate order hash, so match a pending trade against its\nconfirmation on either hash.\n\n`activity` — a split, merge or redemption:\n\n```json\n{\n \"type\": \"activity\",\n \"sequence\": 918502,\n \"v\": 2,\n \"stream\": \"activities\",\n \"status\": \"confirmed\",\n \"block_number\": 91937590,\n \"block_hash\": \"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\",\n \"block_timestamp\": 1786924800,\n \"tx_hash\": \"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\",\n \"tx_row_index\": 2,\n \"tx_row_count\": 3,\n \"partial\": false,\n \"missing\": [],\n \"published_at\": 1786924801.312,\n \"event_type\": \"RedeemPosition\",\n \"log_index\": 7,\n \"user_address\": \"0x674887d1ac838099a48b629dff53f25b7b87ee08\",\n \"token_id\": \"67568438763601610729831023256910933987242052537121118642143709840881218761985\",\n \"canonical_token_id\": \"34460519301295595556376203968565021162434252843477398085423120621766516073216\",\n \"condition_id\": \"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\",\n \"price\": \"1\",\n \"amount\": \"20000\",\n \"collateral_token\": \"0x2791bca1f2de4661ed88a30c99a7a9449aa84174\",\n \"parent_collection_id\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"activity_timestamp\": 1786924800,\n \"is_neg_ctf\": false,\n \"contract_version\": 2,\n \"auto_redeem\": false\n}\n```\n\n`conversion` — a NegRisk conversion leg:\n\n```json\n{\n \"type\": \"conversion\",\n \"sequence\": 918503,\n \"v\": 2,\n \"stream\": \"conversions\",\n \"status\": \"confirmed\",\n \"block_number\": 91937590,\n \"block_hash\": \"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\",\n \"block_timestamp\": 1786924800,\n \"tx_hash\": \"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\",\n \"tx_row_index\": 3,\n \"tx_row_count\": 3,\n \"partial\": false,\n \"missing\": [],\n \"published_at\": 1786924801.312,\n \"log_index\": 3,\n \"user_address\": \"0x674887d1ac838099a48b629dff53f25b7b87ee08\",\n \"token_id\": \"67568438763601610729831023256910933987242052537121118642143709840881218761985\",\n \"canonical_token_id\": \"34460519301295595556376203968565021162434252843477398085423120621766516073216\",\n \"condition_id\": \"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\",\n \"negrisk_market_id\": \"0x0b8f7e6d5c4b3a29180706f5e4d3c2b1a0f9e8d7c6b5a4938271605f4e3d2c1b\",\n \"amount\": \"250\",\n \"conversion_timestamp\": 1786924800,\n \"contract_version\": 2\n}\n```\n\n`retraction` — the transaction was reorged out. It carries no row\nfields at all, so undo state by `tx_hash` and `stream`:\n\n```json\n{\n \"type\": \"retraction\",\n \"sequence\": 918504,\n \"v\": 2,\n \"stream\": \"trades\",\n \"status\": \"retracted\",\n \"tx_hash\": \"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\",\n \"block_number\": 91937590,\n \"block_hash\": \"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\",\n \"published_at\": 1786924802.881\n}\n```\n\n`heartbeat` — nothing else was written on this tick:\n\n```json\n{\n \"type\": \"heartbeat\",\n \"server_time\": \"2026-08-17T12:00:20.001002003Z\",\n \"sequence\": 918504,\n \"source\": {\n \"connected\": true,\n \"last_message_at\": \"2026-08-17T12:00:19.900000000Z\",\n \"dropped_total\": 12\n }\n}\n```\n\n`filter.updated` — the command was applied. `added` and `removed`\nare net count deltas, not the values applied, so a `filter.set` that\nswaps one wallet for another reports zero of each:\n\n```json\n{\n \"type\": \"filter.updated\",\n \"filters\": {\"wallets\": 2, \"condition_ids\": 0, \"token_ids\": 1},\n \"added\": {\"wallets\": 1, \"condition_ids\": 0, \"token_ids\": 1},\n \"removed\": {\"wallets\": 0, \"condition_ids\": 0, \"token_ids\": 0}\n}\n```\n\n`filter.rejected` — nothing was applied. A validation failure names\nevery entry it refused; a cap failure carries only `code` and\n`message`:\n\n```json\n{\n \"type\": \"filter.rejected\",\n \"code\": \"invalid_filter\",\n \"message\": \"no changes were applied\",\n \"rejected\": [\n {\"value\": \"polymarket-btc-up-or-down\", \"reason\": \"market slugs are not supported; use a condition id or CLOB token id\"},\n {\"value\": \"@trader\", \"reason\": \"usernames are not supported; use a 0x-prefixed 20-byte address\"}\n ]\n}\n```\n\n```json\n{\n \"type\": \"filter.rejected\",\n \"code\": \"filter_limit_reached\",\n \"message\": \"txstream: filter limit reached: at most 25000 wallets\"\n}\n```\n\n`filter.snapshot` — the reply to `filter.list`. `values` is present\nonly when the request set `include_values: true`, each list is\ncapped at 1,000 entries, and `truncated` says whether any list was\ncut short:\n\n```json\n{\n \"type\": \"filter.snapshot\",\n \"sequence\": 918505,\n \"filters\": {\"wallets\": 1, \"condition_ids\": 1, \"token_ids\": 0},\n \"values\": {\n \"wallets\": [\"0x674887d1ac838099a48b629dff53f25b7b87ee08\"],\n \"condition_ids\": [\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\"],\n \"token_ids\": [],\n \"truncated\": false\n }\n}\n```\n\n`error` — the frame could not be handled. Non-fatal: the socket\nstays open and the filters are untouched:\n\n```json\n{\n \"type\": \"error\",\n \"code\": \"unsupported_message\",\n \"message\": \"action must be filter.add, filter.remove, filter.set, filter.clear, filter.list or ping\"\n}\n```\n\n`pong` — the reply to `{\"action\": \"ping\"}`, and nothing more:\n\n```json\n{\"type\": \"pong\"}\n```\n","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/streams/transactions","href":"/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n h3: \"h3\",\n p: \"p\",\n pre: \"pre\",\n span: \"span\",\n strong: \"strong\",\n table: \"table\",\n tbody: \"tbody\",\n td: \"td\",\n th: \"th\",\n thead: \"thead\",\n tr: \"tr\",\n ..._provideComponents(),\n ...props.components\n }, {CodeBlock} = _components;\n if (!CodeBlock) _missingMdxReference(\"CodeBlock\", true);\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"A WebSocket channel, not a request/response endpoint. Connect, and the\\nserver pushes rows as they are decoded — confirmed on-chain trades,\\nactivities and conversions, plus unconfirmed mempool trades if you ask\\nfor them.\"\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"2\",\n language: \"text\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"text\",\n children: _jsxs(_components.code, {\n language: \"text\",\n numberOfLines: \"2\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n children: \"wss://data.gravia.trade/api/v1/streams/transactions?streams=trades,activities,conversions\u0026mempool=false\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {})\n })]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The \", _jsx(_components.code, {\n children: \"101\"\n }), \" below is the handshake and carries no HTTP body. Everything\\nthe server says afterwards is a WebSocket text frame holding one JSON\\nobject. Your WebSocket client performs the upgrade, so \", _jsx(_components.code, {\n children: \"Upgrade\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"Connection\"\n }), \" and the \", _jsx(_components.code, {\n children: \"Sec-WebSocket-*\"\n }), \" headers are never yours to set,\\nand the query parameters are read once, at connect time.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Browsers cannot set request headers on a handshake, so authenticate\\nthere with \", _jsx(_components.code, {\n children: \"?api_key=\u003cyour-api-key>\"\n }), \" and with the \", _jsx(_components.code, {\n children: \"Authorization\"\n }), \"\\nheader everywhere else.\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"19\",\n language: \"javascript\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"javascript\",\n children: _jsxs(_components.code, {\n language: \"javascript\",\n numberOfLines: \"19\",\n children: [_jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"const\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#4FC1FF\"\n },\n children: \" socket\"\n }), _jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \" new\"\n }), _jsx(_components.span, {\n style: {\n color: \"#8250DF\",\n \"--shiki-dark\": \"#DCDCAA\"\n },\n children: \" WebSocket\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \" \\\"wss://data.gravia.trade/api/v1/streams/transactions\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" +\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \" \\\"?streams=trades\u0026api_key=\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" +\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" apiKey\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \");\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\"\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"socket\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \".\"\n }), _jsx(_components.span, {\n style: {\n color: \"#8250DF\",\n \"--shiki-dark\": \"#DCDCAA\"\n },\n children: \"addEventListener\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"(\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"message\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", (\"\n }), _jsx(_components.span, {\n style: {\n color: \"#953800\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"frame\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \") \"\n }), _jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"=>\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \" const\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#4FC1FF\"\n },\n children: \" message\"\n }), _jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" =\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#4FC1FF\"\n },\n children: \" JSON\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \".\"\n }), _jsx(_components.span, {\n style: {\n color: \"#8250DF\",\n \"--shiki-dark\": \"#DCDCAA\"\n },\n children: \"parse\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"(\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"frame\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \".\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"data\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \");\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#C586C0\"\n },\n children: \" switch\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" (\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"message\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \".\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"type\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \") {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#C586C0\"\n },\n children: \" case\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \" \\\"trade\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#6E7781\",\n \"--shiki-dark\": \"#6A9955\"\n },\n children: \" // status is \\\"confirmed\\\", or \\\"pending\\\" for a mempool trade\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#C586C0\"\n },\n children: \" break\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#C586C0\"\n },\n children: \" case\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \" \\\"retraction\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \":\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#6E7781\",\n \"--shiki-dark\": \"#6A9955\"\n },\n children: \" // drop whatever you hold for message.tx_hash on message.stream\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#CF222E\",\n \"--shiki-dark\": \"#C586C0\"\n },\n children: \" break\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \";\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"});\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\"\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#6E7781\",\n \"--shiki-dark\": \"#6A9955\"\n },\n children: \"// Filters are managed in band, once the socket is open.\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"socket\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \".\"\n }), _jsx(_components.span, {\n style: {\n color: \"#8250DF\",\n \"--shiki-dark\": \"#DCDCAA\"\n },\n children: \"send\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"(\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#4FC1FF\"\n },\n children: \"JSON\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \".\"\n }), _jsx(_components.span, {\n style: {\n color: \"#8250DF\",\n \"--shiki-dark\": \"#DCDCAA\"\n },\n children: \"stringify\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"({\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"action:\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \" \\\"filter.add\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"wallets:\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" [\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"wallet\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"]}));\"\n })]\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Concurrent connections are limited per API key.\"\n }), \" The service default is\\none, but a key may be assigned a different allowance. Exceeding it\\nreturns \", _jsx(_components.code, {\n children: \"429\"\n }), \" with the \", _jsx(_components.code, {\n children: \"stream_limit_reached\"\n }), \" code, which is distinct\\nfrom ordinary rate limiting: close an existing stream rather than\\nbacking off.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Fixed at connect.\"\n }), \" \", _jsx(_components.code, {\n children: \"streams\"\n }), \" and \", _jsx(_components.code, {\n children: \"mempool\"\n }), \" cannot be changed in\\nband. \", _jsx(_components.code, {\n children: \"wallet\"\n }), \" and \", _jsx(_components.code, {\n children: \"market\"\n }), \" only seed the filters, which are then\\nmanaged with the client messages below, so a caller holding\\nthousands of selectors is not limited by URL length.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Filters.\"\n }), \" Both sets are optional; omitting them streams\\neverything. They are ANDed, and selectors within each are ORed.\\n\", _jsx(_components.code, {\n children: \"wallet\"\n }), \" matches the row subject (\", _jsx(_components.code, {\n children: \"user_address\"\n }), \") only — the\\ncounterparty of a fill appears as the subject of its own row, so\\nmatching \", _jsx(_components.code, {\n children: \"taker_address\"\n }), \" as well would deliver the same fill\\nseveral times. A filter change is not retroactive.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Liveness.\"\n }), \" The server sends a protocol ping every 20 seconds,\\nand a \", _jsx(_components.code, {\n children: \"heartbeat\"\n }), \" frame on any tick where it wrote nothing else, so\\na quiet stream stays visibly alive to application code that cannot\\nobserve protocol pings. A connection that sends nothing at all for\\n60 seconds is closed; the automatic pong your client already sends\\nis enough to hold it open.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Delivery is at-most-once with no replay.\"\n }), \" \", _jsx(_components.code, {\n children: \"sequence\"\n }), \" is a\\nserver-global ordinal, so a filtered client sees gaps by design; it\\nis not a gap detector, and it is absent from a control frame sent\\nbefore the server has decoded anything. \", _jsx(_components.code, {\n children: \"source.dropped_total\"\n }), \" in\\neach heartbeat counts rows the server discarded because it was\\nbehind, which is the only loss a client cannot otherwise detect.\\nRead the REST endpoints when completeness matters.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Retractions ignore the wallet and market filters, because a reorg\\nretraction carries no rows and therefore no wallet or market;\\nstream selection still applies. Ignore one for a \", _jsx(_components.code, {\n children: \"tx_hash\"\n }), \" you hold\\nno state for. Pending trades are never retracted, and a pending\\ntrade may never land — time out your own pending state. With\\n\", _jsx(_components.code, {\n children: \"mempool=true\"\n }), \" a landed trade is delivered twice, once pending and\\nonce confirmed; deduplicate on \", _jsx(_components.code, {\n children: \"(tx_hash, order_hash)\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Close codes.\"\n }), \" \", _jsx(_components.code, {\n children: \"1008\"\n }), \" with \", _jsx(_components.code, {\n children: \"client is too slow\"\n }), \" means the server\\ngave up writing to you and dropped the connection rather than\\nwaiting; reconnect with tighter filters or a faster reader. \", _jsx(_components.code, {\n children: \"1001\"\n }), \"\\nwith \", _jsx(_components.code, {\n children: \"server is shutting down\"\n }), \" is a deploy — reconnect. Anything\\nthat fails before the upgrade is ordinary HTTP, listed under\\nResponses below.\"]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Client messages\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"One JSON object per text frame, discriminated by \", _jsx(_components.code, {\n children: \"action\"\n }), \". Unknown\\nkeys are rejected, and every frame — \", _jsx(_components.code, {\n children: \"ping\"\n }), \" included — is counted\\nagainst a budget of 20 commands per second with a burst of 40.\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"6\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"6\",\n children: [_jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"action\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"filter.add\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"wallets\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"]}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"action\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"filter.remove\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"markets\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"]}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"action\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"filter.set\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"markets\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"]}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"action\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"filter.clear\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"target\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"wallets\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"action\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"filter.list\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"include_values\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"action\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"ping\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })]\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"wallets\"\n }), \" entries are \", _jsx(_components.code, {\n children: \"0x\"\n }), \"-prefixed 20-byte addresses; usernames are\\nrejected. \", _jsx(_components.code, {\n children: \"markets\"\n }), \" entries are classified by shape: \", _jsx(_components.code, {\n children: \"0x\"\n }), \" followed\\nby 64 hex is a condition id, a decimal string is a CLOB token id.\\nMarket slugs and \", _jsx(_components.code, {\n children: \"category:\"\n }), \" selectors are not accepted here.\\n\", _jsx(_components.code, {\n children: \"target\"\n }), \" is \", _jsx(_components.code, {\n children: \"wallets\"\n }), \", \", _jsx(_components.code, {\n children: \"markets\"\n }), \" or \", _jsx(_components.code, {\n children: \"all\"\n }), \", and defaults to \", _jsx(_components.code, {\n children: \"all\"\n }), \". A\\nbatch applies atomically: one malformed entry rejects the whole\\nmessage and leaves the filter set untouched. At most 5,000 entries\\nper message; \", _jsx(_components.code, {\n children: \"welcome\"\n }), \" reports the standing caps in \", _jsx(_components.code, {\n children: \"limits\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Server messages\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Every frame carries a \", _jsx(_components.code, {\n children: \"type\"\n }), \", and \", _jsx(_components.code, {\n children: \"type\"\n }), \" is the only field to\\ndispatch on.\"]\n }), \"\\n\", _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.th, {\n children: _jsx(_components.code, {\n children: \"type\"\n })\n }), _jsx(_components.th, {\n children: \"Sent when\"\n }), _jsx(_components.th, {\n children: \"Structure\"\n })]\n })\n }), _jsxs(_components.tbody, {\n children: [_jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"welcome\"\n })\n }), _jsx(_components.td, {\n children: \"Once, immediately after the handshake.\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"TransactionStreamWelcome\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"trade\"\n })\n }), _jsxs(_components.td, {\n children: [\"A trade was decoded. \", _jsx(_components.code, {\n children: \"status\"\n }), \" is \", _jsx(_components.code, {\n children: \"confirmed\"\n }), \", or \", _jsx(_components.code, {\n children: \"pending\"\n }), \" for a mempool trade.\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"TransactionStreamTrade\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"activity\"\n })\n }), _jsx(_components.td, {\n children: \"A split, merge or redemption was decoded.\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"TransactionStreamActivity\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"conversion\"\n })\n }), _jsx(_components.td, {\n children: \"A NegRisk conversion was decoded.\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"TransactionStreamConversion\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"retraction\"\n })\n }), _jsx(_components.td, {\n children: \"A transaction was reorged out.\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"TransactionStreamRetraction\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"heartbeat\"\n })\n }), _jsx(_components.td, {\n children: \"A ping tick passed with nothing else to write.\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"TransactionStreamHeartbeat\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"filter.updated\"\n })\n }), _jsx(_components.td, {\n children: \"A filter command was applied.\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"TransactionStreamFilterUpdated\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"filter.rejected\"\n })\n }), _jsx(_components.td, {\n children: \"A filter command was refused and nothing changed.\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"TransactionStreamFilterRejected\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"filter.snapshot\"\n })\n }), _jsxs(_components.td, {\n children: [\"Reply to \", _jsx(_components.code, {\n children: \"filter.list\"\n }), \".\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"TransactionStreamFilterSnapshot\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"error\"\n })\n }), _jsx(_components.td, {\n children: \"A frame could not be handled. The socket stays open.\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"TransactionStreamError\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"pong\"\n })\n }), _jsxs(_components.td, {\n children: [\"Reply to \", _jsx(_components.code, {\n children: \"{\\\"action\\\": \\\"ping\\\"}\"\n }), \".\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"TransactionStreamPong\"\n })\n })]\n })]\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"A \", _jsx(_components.code, {\n children: \"trade\"\n }), \", \", _jsx(_components.code, {\n children: \"activity\"\n }), \" or \", _jsx(_components.code, {\n children: \"conversion\"\n }), \" frame is the decoded upstream\\nrow forwarded whole, with \", _jsx(_components.code, {\n children: \"type\"\n }), \" and \", _jsx(_components.code, {\n children: \"sequence\"\n }), \" added in front, so\\ntreat unrecognized fields as forward-compatible additions rather\\nthan errors. \", _jsx(_components.code, {\n children: \"v\"\n }), \" is the upstream row schema version, currently \", _jsx(_components.code, {\n children: \"2\"\n }), \".\\nMoney, size and price fields cross as decimal \", _jsx(_components.strong, {\n children: \"strings\"\n }), \", and so do\\ntoken ids: they are 256-bit, and a JSON number would silently lose\\nprecision. \", _jsx(_components.code, {\n children: \"partial\"\n }), \" marks a row where the fields named in\\n\", _jsx(_components.code, {\n children: \"missing\"\n }), \" read as unknown rather than zero.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"welcome\"\n }), \" — once, immediately after the handshake:\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"14\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"14\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"welcome\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"server_time\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"2026-08-17T12:00:00.123456789Z\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"sequence\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"918473\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"streams\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"trades\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"activities\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"conversions\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"mempool\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"false\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"filters\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"wallets\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"condition_ids\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"0\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"token_ids\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"0\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"},\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"limits\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"max_wallets\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"25000\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"max_markets\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"25000\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"max_filter_batch\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"5000\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"},\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"source\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"connected\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"last_message_at\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"2026-08-17T12:00:00.031000000Z\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"dropped_total\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"0\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"trade\"\n }), \" — a confirmed fill:\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"35\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"35\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"trade\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"sequence\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"918501\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"v\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"stream\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"trades\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"status\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"confirmed\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"block_number\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"91937590\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"block_hash\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"block_timestamp\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1786924800\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"tx_hash\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"tx_row_index\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"tx_row_count\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"3\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"partial\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"false\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"missing\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [],\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"published_at\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1786924801.312\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"log_index\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"42\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"order_hash\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x5e4d3c2b1a09f8e7d6c5b4a3928170615f4e3d2c1b0a9f8e7d6c5b4a39281706\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"order_hash_alt\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"null\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"user_address\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"taker_address\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x9c1a5f3b2d8e4c6b7a0f9e8d7c6b5a4938271605\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"side\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"BUY\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"token_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"canonical_token_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"condition_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"shares\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"20000\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"usdc_amount\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"9800.5\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"share_price\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0.49\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"fee_amount\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"fee_refund_amount\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"trade_timestamp\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1786924800\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"contract_version\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"is_taker_order\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"builder\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x0000000000000000000000000000000000000000000000000000000000000000\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"metadata\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x0000000000000000000000000000000000000000000000000000000000000000\\\"\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"A pending mempool trade is the same frame with \", _jsx(_components.code, {\n children: \"status: \\\"pending\\\"\"\n }), \".\\nIt has no block yet, so \", _jsx(_components.code, {\n children: \"block_number\"\n }), \" and \", _jsx(_components.code, {\n children: \"log_index\"\n }), \" are \", _jsx(_components.code, {\n children: \"0\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"block_hash\"\n }), \" and \", _jsx(_components.code, {\n children: \"block_timestamp\"\n }), \" are \", _jsx(_components.code, {\n children: \"null\"\n }), \", and\\n\", _jsx(_components.code, {\n children: \"canonical_token_id\"\n }), \" is \", _jsx(_components.code, {\n children: \"null\"\n }), \"; \", _jsx(_components.code, {\n children: \"order_hash_alt\"\n }), \" may carry the\\nNegRisk candidate order hash, so match a pending trade against its\\nconfirmation on either hash.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"activity\"\n }), \" — a split, merge or redemption:\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"30\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"30\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"activity\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"sequence\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"918502\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"v\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"stream\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"activities\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"status\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"confirmed\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"block_number\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"91937590\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"block_hash\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"block_timestamp\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1786924800\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"tx_hash\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"tx_row_index\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"tx_row_count\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"3\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"partial\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"false\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"missing\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [],\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"published_at\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1786924801.312\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"event_type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"RedeemPosition\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"log_index\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"7\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"user_address\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"token_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"canonical_token_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"34460519301295595556376203968565021162434252843477398085423120621766516073216\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"condition_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"price\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"1\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"amount\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"20000\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"collateral_token\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x2791bca1f2de4661ed88a30c99a7a9449aa84174\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"parent_collection_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x0000000000000000000000000000000000000000000000000000000000000000\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"activity_timestamp\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1786924800\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"is_neg_ctf\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"false\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"contract_version\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"auto_redeem\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"false\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"conversion\"\n }), \" — a NegRisk conversion leg:\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"25\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"25\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"conversion\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"sequence\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"918503\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"v\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"stream\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"conversions\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"status\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"confirmed\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"block_number\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"91937590\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"block_hash\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"block_timestamp\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1786924800\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"tx_hash\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"tx_row_index\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"3\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"tx_row_count\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"3\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"partial\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"false\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"missing\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [],\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"published_at\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1786924801.312\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"log_index\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"3\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"user_address\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"token_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"canonical_token_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"34460519301295595556376203968565021162434252843477398085423120621766516073216\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"condition_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"negrisk_market_id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x0b8f7e6d5c4b3a29180706f5e4d3c2b1a0f9e8d7c6b5a4938271605f4e3d2c1b\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"amount\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"250\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"conversion_timestamp\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1786924800\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"contract_version\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"retraction\"\n }), \" — the transaction was reorged out. It carries no row\\nfields at all, so undo state by \", _jsx(_components.code, {\n children: \"tx_hash\"\n }), \" and \", _jsx(_components.code, {\n children: \"stream\"\n }), \":\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"11\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"11\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"retraction\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"sequence\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"918504\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"v\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"stream\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"trades\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"status\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"retracted\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"tx_hash\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"block_number\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"91937590\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"block_hash\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"published_at\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1786924802.881\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"heartbeat\"\n }), \" — nothing else was written on this tick:\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"10\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"10\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"heartbeat\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"server_time\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"2026-08-17T12:00:20.001002003Z\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"sequence\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"918504\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"source\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"connected\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"true\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"last_message_at\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"2026-08-17T12:00:19.900000000Z\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"dropped_total\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"12\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"filter.updated\"\n }), \" — the command was applied. \", _jsx(_components.code, {\n children: \"added\"\n }), \" and \", _jsx(_components.code, {\n children: \"removed\"\n }), \"\\nare net count deltas, not the values applied, so a \", _jsx(_components.code, {\n children: \"filter.set\"\n }), \" that\\nswaps one wallet for another reports zero of each:\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"6\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"6\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"filter.updated\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"filters\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"wallets\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"2\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"condition_ids\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"0\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"token_ids\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"},\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"added\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"wallets\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"condition_ids\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"0\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"token_ids\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"},\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"removed\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"wallets\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"0\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"condition_ids\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"0\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"token_ids\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"0\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"filter.rejected\"\n }), \" — nothing was applied. A validation failure names\\nevery entry it refused; a cap failure carries only \", _jsx(_components.code, {\n children: \"code\"\n }), \" and\\n\", _jsx(_components.code, {\n children: \"message\"\n }), \":\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"9\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"9\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"filter.rejected\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"code\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"invalid_filter\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"message\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"no changes were applied\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"rejected\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" {\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"value\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"polymarket-btc-up-or-down\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"reason\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"market slugs are not supported; use a condition id or CLOB token id\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"},\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" {\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"value\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"@trader\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"reason\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"usernames are not supported; use a 0x-prefixed 20-byte address\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" ]\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"5\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"5\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"filter.rejected\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"code\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"filter_limit_reached\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"message\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"txstream: filter limit reached: at most 25000 wallets\\\"\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"filter.snapshot\"\n }), \" — the reply to \", _jsx(_components.code, {\n children: \"filter.list\"\n }), \". \", _jsx(_components.code, {\n children: \"values\"\n }), \" is present\\nonly when the request set \", _jsx(_components.code, {\n children: \"include_values: true\"\n }), \", each list is\\ncapped at 1,000 entries, and \", _jsx(_components.code, {\n children: \"truncated\"\n }), \" says whether any list was\\ncut short:\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"11\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"11\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"filter.snapshot\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"sequence\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"918505\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"filters\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"wallets\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"condition_ids\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"1\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"token_ids\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#B5CEA8\"\n },\n children: \"0\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"},\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"values\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"wallets\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"condition_ids\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [\"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"],\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"token_ids\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": [],\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"truncated\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0550AE\",\n \"--shiki-dark\": \"#569CD6\"\n },\n children: \"false\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \" }\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"error\"\n }), \" — the frame could not be handled. Non-fatal: the socket\\nstays open and the filters are untouched:\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"5\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"5\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"error\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"code\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"unsupported_message\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"message\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"action must be filter.add, filter.remove, filter.set, filter.clear, filter.list or ping\\\"\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"pong\"\n }), \" — the reply to \", _jsx(_components.code, {\n children: \"{\\\"action\\\": \\\"ping\\\"}\"\n }), \", and nothing more:\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"1\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"1\",\n children: [_jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"pong\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })]\n }), \"\\n\"]\n })\n })\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\nfunction _missingMdxReference(id, component) {\n throw new Error(\"Expected \" + (component ? \"component\" : \"object\") + \" `\" + id + \"` to be defined: you likely forgot to import, pass, or provide it.\");\n}\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"WebSocket stream of live trades, activities and conversions","description":"A WebSocket channel, not a request/response endpoint. Connect, and the\nserver pushes rows as they are decoded — confirmed on-chain trades,\nactivities and conversions, plus unconfirmed mempool trades if you ask\nfor them.\n\n```\nwss://data.gravia.trade/api/v1/streams/transactions?streams=trades,activities,conversions\u0026mempool=false\n```\n\nThe `101` below is the handshake and carries no HTTP body. Everything\nthe server says afterwards is a WebSocket text frame holding one JSON\nobject. Your WebSocket client performs the upgrade, so `Upgrade`,\n`Connection` and the `Sec-WebSocket-*` headers are never yours to set,\nand the query parameters are read once, at connect time.\n\nBrowsers cannot set request headers on a handshake, so authenticate\nthere with `?api_key=\u003cyour-api-key>` and with the `Authorization`\nheader everywhere else.\n\n```js\nconst socket = new WebSocket(\n \"wss://data.gravia.trade/api/v1/streams/transactions\" +\n \"?streams=trades\u0026api_key=\" + apiKey,\n);\n\nsocket.addEventListener(\"message\", (frame) => {\n const message = JSON.parse(frame.data);\n switch (message.type) {\n case \"trade\":\n // status is \"confirmed\", or \"pending\" for a mempool trade\n break;\n case \"retraction\":\n // drop whatever you hold for message.tx_hash on message.stream\n break;\n }\n});\n\n// Filters are managed in band, once the socket is open.\nsocket.send(JSON.stringify({action: \"filter.add\", wallets: [wallet]}));\n```\n\n**Concurrent connections are limited per API key.** The service default is\none, but a key may be assigned a different allowance. Exceeding it\nreturns `429` with the `stream_limit_reached` code, which is distinct\nfrom ordinary rate limiting: close an existing stream rather than\nbacking off.\n\n**Fixed at connect.** `streams` and `mempool` cannot be changed in\nband. `wallet` and `market` only seed the filters, which are then\nmanaged with the client messages below, so a caller holding\nthousands of selectors is not limited by URL length.\n\n**Filters.** Both sets are optional; omitting them streams\neverything. They are ANDed, and selectors within each are ORed.\n`wallet` matches the row subject (`user_address`) only — the\ncounterparty of a fill appears as the subject of its own row, so\nmatching `taker_address` as well would deliver the same fill\nseveral times. A filter change is not retroactive.\n\n**Liveness.** The server sends a protocol ping every 20 seconds,\nand a `heartbeat` frame on any tick where it wrote nothing else, so\na quiet stream stays visibly alive to application code that cannot\nobserve protocol pings. A connection that sends nothing at all for\n60 seconds is closed; the automatic pong your client already sends\nis enough to hold it open.\n\n**Delivery is at-most-once with no replay.** `sequence` is a\nserver-global ordinal, so a filtered client sees gaps by design; it\nis not a gap detector, and it is absent from a control frame sent\nbefore the server has decoded anything. `source.dropped_total` in\neach heartbeat counts rows the server discarded because it was\nbehind, which is the only loss a client cannot otherwise detect.\nRead the REST endpoints when completeness matters.\n\nRetractions ignore the wallet and market filters, because a reorg\nretraction carries no rows and therefore no wallet or market;\nstream selection still applies. Ignore one for a `tx_hash` you hold\nno state for. Pending trades are never retracted, and a pending\ntrade may never land — time out your own pending state. With\n`mempool=true` a landed trade is delivered twice, once pending and\nonce confirmed; deduplicate on `(tx_hash, order_hash)`.\n\n**Close codes.** `1008` with `client is too slow` means the server\ngave up writing to you and dropped the connection rather than\nwaiting; reconnect with tighter filters or a faster reader. `1001`\nwith `server is shutting down` is a deploy — reconnect. Anything\nthat fails before the upgrade is ordinary HTTP, listed under\nResponses below.\n\n### Client messages\n\nOne JSON object per text frame, discriminated by `action`. Unknown\nkeys are rejected, and every frame — `ping` included — is counted\nagainst a budget of 20 commands per second with a burst of 40.\n\n```json\n{\"action\": \"filter.add\", \"wallets\": [\"0x674887d1ac838099a48b629dff53f25b7b87ee08\"]}\n{\"action\": \"filter.remove\", \"markets\": [\"67568438763601610729831023256910933987242052537121118642143709840881218761985\"]}\n{\"action\": \"filter.set\", \"markets\": [\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\"]}\n{\"action\": \"filter.clear\", \"target\": \"wallets\"}\n{\"action\": \"filter.list\", \"include_values\": true}\n{\"action\": \"ping\"}\n```\n\n`wallets` entries are `0x`-prefixed 20-byte addresses; usernames are\nrejected. `markets` entries are classified by shape: `0x` followed\nby 64 hex is a condition id, a decimal string is a CLOB token id.\nMarket slugs and `category:` selectors are not accepted here.\n`target` is `wallets`, `markets` or `all`, and defaults to `all`. A\nbatch applies atomically: one malformed entry rejects the whole\nmessage and leaves the filter set untouched. At most 5,000 entries\nper message; `welcome` reports the standing caps in `limits`.\n\n### Server messages\n\nEvery frame carries a `type`, and `type` is the only field to\ndispatch on.\n\n| `type` | Sent when | Structure |\n| --- | --- | --- |\n| `welcome` | Once, immediately after the handshake. | `TransactionStreamWelcome` |\n| `trade` | A trade was decoded. `status` is `confirmed`, or `pending` for a mempool trade. | `TransactionStreamTrade` |\n| `activity` | A split, merge or redemption was decoded. | `TransactionStreamActivity` |\n| `conversion` | A NegRisk conversion was decoded. | `TransactionStreamConversion` |\n| `retraction` | A transaction was reorged out. | `TransactionStreamRetraction` |\n| `heartbeat` | A ping tick passed with nothing else to write. | `TransactionStreamHeartbeat` |\n| `filter.updated` | A filter command was applied. | `TransactionStreamFilterUpdated` |\n| `filter.rejected` | A filter command was refused and nothing changed. | `TransactionStreamFilterRejected` |\n| `filter.snapshot` | Reply to `filter.list`. | `TransactionStreamFilterSnapshot` |\n| `error` | A frame could not be handled. The socket stays open. | `TransactionStreamError` |\n| `pong` | Reply to `{\"action\": \"ping\"}`. | `TransactionStreamPong` |\n\nA `trade`, `activity` or `conversion` frame is the decoded upstream\nrow forwarded whole, with `type` and `sequence` added in front, so\ntreat unrecognized fields as forward-compatible additions rather\nthan errors. `v` is the upstream row schema version, currently `2`.\nMoney, size and price fields cross as decimal **strings**, and so do\ntoken ids: they are 256-bit, and a JSON number would silently lose\nprecision. `partial` marks a row where the fields named in\n`missing` read as unknown rather than zero.\n\n`welcome` — once, immediately after the handshake:\n\n```json\n{\n \"type\": \"welcome\",\n \"server_time\": \"2026-08-17T12:00:00.123456789Z\",\n \"sequence\": 918473,\n \"streams\": [\"trades\", \"activities\", \"conversions\"],\n \"mempool\": false,\n \"filters\": {\"wallets\": 1, \"condition_ids\": 0, \"token_ids\": 0},\n \"limits\": {\"max_wallets\": 25000, \"max_markets\": 25000, \"max_filter_batch\": 5000},\n \"source\": {\n \"connected\": true,\n \"last_message_at\": \"2026-08-17T12:00:00.031000000Z\",\n \"dropped_total\": 0\n }\n}\n```\n\n`trade` — a confirmed fill:\n\n```json\n{\n \"type\": \"trade\",\n \"sequence\": 918501,\n \"v\": 2,\n \"stream\": \"trades\",\n \"status\": \"confirmed\",\n \"block_number\": 91937590,\n \"block_hash\": \"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\",\n \"block_timestamp\": 1786924800,\n \"tx_hash\": \"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\",\n \"tx_row_index\": 1,\n \"tx_row_count\": 3,\n \"partial\": false,\n \"missing\": [],\n \"published_at\": 1786924801.312,\n \"log_index\": 42,\n \"order_hash\": \"0x5e4d3c2b1a09f8e7d6c5b4a3928170615f4e3d2c1b0a9f8e7d6c5b4a39281706\",\n \"order_hash_alt\": null,\n \"user_address\": \"0x674887d1ac838099a48b629dff53f25b7b87ee08\",\n \"taker_address\": \"0x9c1a5f3b2d8e4c6b7a0f9e8d7c6b5a4938271605\",\n \"side\": \"BUY\",\n \"token_id\": \"67568438763601610729831023256910933987242052537121118642143709840881218761985\",\n \"canonical_token_id\": \"67568438763601610729831023256910933987242052537121118642143709840881218761985\",\n \"condition_id\": \"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\",\n \"shares\": \"20000\",\n \"usdc_amount\": \"9800.5\",\n \"share_price\": \"0.49\",\n \"fee_amount\": \"0\",\n \"fee_refund_amount\": \"0\",\n \"trade_timestamp\": 1786924800,\n \"contract_version\": 2,\n \"is_taker_order\": true,\n \"builder\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"metadata\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n}\n```\n\nA pending mempool trade is the same frame with `status: \"pending\"`.\nIt has no block yet, so `block_number` and `log_index` are `0`,\n`block_hash` and `block_timestamp` are `null`, and\n`canonical_token_id` is `null`; `order_hash_alt` may carry the\nNegRisk candidate order hash, so match a pending trade against its\nconfirmation on either hash.\n\n`activity` — a split, merge or redemption:\n\n```json\n{\n \"type\": \"activity\",\n \"sequence\": 918502,\n \"v\": 2,\n \"stream\": \"activities\",\n \"status\": \"confirmed\",\n \"block_number\": 91937590,\n \"block_hash\": \"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\",\n \"block_timestamp\": 1786924800,\n \"tx_hash\": \"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\",\n \"tx_row_index\": 2,\n \"tx_row_count\": 3,\n \"partial\": false,\n \"missing\": [],\n \"published_at\": 1786924801.312,\n \"event_type\": \"RedeemPosition\",\n \"log_index\": 7,\n \"user_address\": \"0x674887d1ac838099a48b629dff53f25b7b87ee08\",\n \"token_id\": \"67568438763601610729831023256910933987242052537121118642143709840881218761985\",\n \"canonical_token_id\": \"34460519301295595556376203968565021162434252843477398085423120621766516073216\",\n \"condition_id\": \"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\",\n \"price\": \"1\",\n \"amount\": \"20000\",\n \"collateral_token\": \"0x2791bca1f2de4661ed88a30c99a7a9449aa84174\",\n \"parent_collection_id\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"activity_timestamp\": 1786924800,\n \"is_neg_ctf\": false,\n \"contract_version\": 2,\n \"auto_redeem\": false\n}\n```\n\n`conversion` — a NegRisk conversion leg:\n\n```json\n{\n \"type\": \"conversion\",\n \"sequence\": 918503,\n \"v\": 2,\n \"stream\": \"conversions\",\n \"status\": \"confirmed\",\n \"block_number\": 91937590,\n \"block_hash\": \"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\",\n \"block_timestamp\": 1786924800,\n \"tx_hash\": \"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\",\n \"tx_row_index\": 3,\n \"tx_row_count\": 3,\n \"partial\": false,\n \"missing\": [],\n \"published_at\": 1786924801.312,\n \"log_index\": 3,\n \"user_address\": \"0x674887d1ac838099a48b629dff53f25b7b87ee08\",\n \"token_id\": \"67568438763601610729831023256910933987242052537121118642143709840881218761985\",\n \"canonical_token_id\": \"34460519301295595556376203968565021162434252843477398085423120621766516073216\",\n \"condition_id\": \"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\",\n \"negrisk_market_id\": \"0x0b8f7e6d5c4b3a29180706f5e4d3c2b1a0f9e8d7c6b5a4938271605f4e3d2c1b\",\n \"amount\": \"250\",\n \"conversion_timestamp\": 1786924800,\n \"contract_version\": 2\n}\n```\n\n`retraction` — the transaction was reorged out. It carries no row\nfields at all, so undo state by `tx_hash` and `stream`:\n\n```json\n{\n \"type\": \"retraction\",\n \"sequence\": 918504,\n \"v\": 2,\n \"stream\": \"trades\",\n \"status\": \"retracted\",\n \"tx_hash\": \"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\",\n \"block_number\": 91937590,\n \"block_hash\": \"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\",\n \"published_at\": 1786924802.881\n}\n```\n\n`heartbeat` — nothing else was written on this tick:\n\n```json\n{\n \"type\": \"heartbeat\",\n \"server_time\": \"2026-08-17T12:00:20.001002003Z\",\n \"sequence\": 918504,\n \"source\": {\n \"connected\": true,\n \"last_message_at\": \"2026-08-17T12:00:19.900000000Z\",\n \"dropped_total\": 12\n }\n}\n```\n\n`filter.updated` — the command was applied. `added` and `removed`\nare net count deltas, not the values applied, so a `filter.set` that\nswaps one wallet for another reports zero of each:\n\n```json\n{\n \"type\": \"filter.updated\",\n \"filters\": {\"wallets\": 2, \"condition_ids\": 0, \"token_ids\": 1},\n \"added\": {\"wallets\": 1, \"condition_ids\": 0, \"token_ids\": 1},\n \"removed\": {\"wallets\": 0, \"condition_ids\": 0, \"token_ids\": 0}\n}\n```\n\n`filter.rejected` — nothing was applied. A validation failure names\nevery entry it refused; a cap failure carries only `code` and\n`message`:\n\n```json\n{\n \"type\": \"filter.rejected\",\n \"code\": \"invalid_filter\",\n \"message\": \"no changes were applied\",\n \"rejected\": [\n {\"value\": \"polymarket-btc-up-or-down\", \"reason\": \"market slugs are not supported; use a condition id or CLOB token id\"},\n {\"value\": \"@trader\", \"reason\": \"usernames are not supported; use a 0x-prefixed 20-byte address\"}\n ]\n}\n```\n\n```json\n{\n \"type\": \"filter.rejected\",\n \"code\": \"filter_limit_reached\",\n \"message\": \"txstream: filter limit reached: at most 25000 wallets\"\n}\n```\n\n`filter.snapshot` — the reply to `filter.list`. `values` is present\nonly when the request set `include_values: true`, each list is\ncapped at 1,000 entries, and `truncated` says whether any list was\ncut short:\n\n```json\n{\n \"type\": \"filter.snapshot\",\n \"sequence\": 918505,\n \"filters\": {\"wallets\": 1, \"condition_ids\": 1, \"token_ids\": 0},\n \"values\": {\n \"wallets\": [\"0x674887d1ac838099a48b629dff53f25b7b87ee08\"],\n \"condition_ids\": [\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\"],\n \"token_ids\": [],\n \"truncated\": false\n }\n}\n```\n\n`error` — the frame could not be handled. Non-fatal: the socket\nstays open and the filters are untouched:\n\n```json\n{\n \"type\": \"error\",\n \"code\": \"unsupported_message\",\n \"message\": \"action must be filter.add, filter.remove, filter.set, filter.clear, filter.list or ping\"\n}\n```\n\n`pong` — the reply to `{\"action\": \"ping\"}`, and nothing more:\n\n```json\n{\"type\": \"pong\"}\n```\n","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/streams/transactions","href":"/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"WebSocket stream of live trades, activities and conversions","description":"A WebSocket channel, not a request/response endpoint. Connect, and the\nserver pushes rows as they are decoded — confirmed on-chain trades,\nactivities and conversions, plus unconfirmed mempool trades if you ask\nfor them.\n\n```\nwss://data.gravia.trade/api/v1/streams/transactions?streams=trades,activities,conversions\u0026mempool=false\n```\n\nThe `101` below is the handshake and carries no HTTP body. Everything\nthe server says afterwards is a WebSocket text frame holding one JSON\nobject. Your WebSocket client performs the upgrade, so `Upgrade`,\n`Connection` and the `Sec-WebSocket-*` headers are never yours to set,\nand the query parameters are read once, at connect time.\n\nBrowsers cannot set request headers on a handshake, so authenticate\nthere with `?api_key=\u003cyour-api-key>` and with the `Authorization`\nheader everywhere else.\n\n```js\nconst socket = new WebSocket(\n \"wss://data.gravia.trade/api/v1/streams/transactions\" +\n \"?streams=trades\u0026api_key=\" + apiKey,\n);\n\nsocket.addEventListener(\"message\", (frame) => {\n const message = JSON.parse(frame.data);\n switch (message.type) {\n case \"trade\":\n // status is \"confirmed\", or \"pending\" for a mempool trade\n break;\n case \"retraction\":\n // drop whatever you hold for message.tx_hash on message.stream\n break;\n }\n});\n\n// Filters are managed in band, once the socket is open.\nsocket.send(JSON.stringify({action: \"filter.add\", wallets: [wallet]}));\n```\n\n**Concurrent connections are limited per API key.** The service default is\none, but a key may be assigned a different allowance. Exceeding it\nreturns `429` with the `stream_limit_reached` code, which is distinct\nfrom ordinary rate limiting: close an existing stream rather than\nbacking off.\n\n**Fixed at connect.** `streams` and `mempool` cannot be changed in\nband. `wallet` and `market` only seed the filters, which are then\nmanaged with the client messages below, so a caller holding\nthousands of selectors is not limited by URL length.\n\n**Filters.** Both sets are optional; omitting them streams\neverything. They are ANDed, and selectors within each are ORed.\n`wallet` matches the row subject (`user_address`) only — the\ncounterparty of a fill appears as the subject of its own row, so\nmatching `taker_address` as well would deliver the same fill\nseveral times. A filter change is not retroactive.\n\n**Liveness.** The server sends a protocol ping every 20 seconds,\nand a `heartbeat` frame on any tick where it wrote nothing else, so\na quiet stream stays visibly alive to application code that cannot\nobserve protocol pings. A connection that sends nothing at all for\n60 seconds is closed; the automatic pong your client already sends\nis enough to hold it open.\n\n**Delivery is at-most-once with no replay.** `sequence` is a\nserver-global ordinal, so a filtered client sees gaps by design; it\nis not a gap detector, and it is absent from a control frame sent\nbefore the server has decoded anything. `source.dropped_total` in\neach heartbeat counts rows the server discarded because it was\nbehind, which is the only loss a client cannot otherwise detect.\nRead the REST endpoints when completeness matters.\n\nRetractions ignore the wallet and market filters, because a reorg\nretraction carries no rows and therefore no wallet or market;\nstream selection still applies. Ignore one for a `tx_hash` you hold\nno state for. Pending trades are never retracted, and a pending\ntrade may never land — time out your own pending state. With\n`mempool=true` a landed trade is delivered twice, once pending and\nonce confirmed; deduplicate on `(tx_hash, order_hash)`.\n\n**Close codes.** `1008` with `client is too slow` means the server\ngave up writing to you and dropped the connection rather than\nwaiting; reconnect with tighter filters or a faster reader. `1001`\nwith `server is shutting down` is a deploy — reconnect. Anything\nthat fails before the upgrade is ordinary HTTP, listed under\nResponses below.\n\n### Client messages\n\nOne JSON object per text frame, discriminated by `action`. Unknown\nkeys are rejected, and every frame — `ping` included — is counted\nagainst a budget of 20 commands per second with a burst of 40.\n\n```json\n{\"action\": \"filter.add\", \"wallets\": [\"0x674887d1ac838099a48b629dff53f25b7b87ee08\"]}\n{\"action\": \"filter.remove\", \"markets\": [\"67568438763601610729831023256910933987242052537121118642143709840881218761985\"]}\n{\"action\": \"filter.set\", \"markets\": [\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\"]}\n{\"action\": \"filter.clear\", \"target\": \"wallets\"}\n{\"action\": \"filter.list\", \"include_values\": true}\n{\"action\": \"ping\"}\n```\n\n`wallets` entries are `0x`-prefixed 20-byte addresses; usernames are\nrejected. `markets` entries are classified by shape: `0x` followed\nby 64 hex is a condition id, a decimal string is a CLOB token id.\nMarket slugs and `category:` selectors are not accepted here.\n`target` is `wallets`, `markets` or `all`, and defaults to `all`. A\nbatch applies atomically: one malformed entry rejects the whole\nmessage and leaves the filter set untouched. At most 5,000 entries\nper message; `welcome` reports the standing caps in `limits`.\n\n### Server messages\n\nEvery frame carries a `type`, and `type` is the only field to\ndispatch on.\n\n| `type` | Sent when | Structure |\n| --- | --- | --- |\n| `welcome` | Once, immediately after the handshake. | `TransactionStreamWelcome` |\n| `trade` | A trade was decoded. `status` is `confirmed`, or `pending` for a mempool trade. | `TransactionStreamTrade` |\n| `activity` | A split, merge or redemption was decoded. | `TransactionStreamActivity` |\n| `conversion` | A NegRisk conversion was decoded. | `TransactionStreamConversion` |\n| `retraction` | A transaction was reorged out. | `TransactionStreamRetraction` |\n| `heartbeat` | A ping tick passed with nothing else to write. | `TransactionStreamHeartbeat` |\n| `filter.updated` | A filter command was applied. | `TransactionStreamFilterUpdated` |\n| `filter.rejected` | A filter command was refused and nothing changed. | `TransactionStreamFilterRejected` |\n| `filter.snapshot` | Reply to `filter.list`. | `TransactionStreamFilterSnapshot` |\n| `error` | A frame could not be handled. The socket stays open. | `TransactionStreamError` |\n| `pong` | Reply to `{\"action\": \"ping\"}`. | `TransactionStreamPong` |\n\nA `trade`, `activity` or `conversion` frame is the decoded upstream\nrow forwarded whole, with `type` and `sequence` added in front, so\ntreat unrecognized fields as forward-compatible additions rather\nthan errors. `v` is the upstream row schema version, currently `2`.\nMoney, size and price fields cross as decimal **strings**, and so do\ntoken ids: they are 256-bit, and a JSON number would silently lose\nprecision. `partial` marks a row where the fields named in\n`missing` read as unknown rather than zero.\n\n`welcome` — once, immediately after the handshake:\n\n```json\n{\n \"type\": \"welcome\",\n \"server_time\": \"2026-08-17T12:00:00.123456789Z\",\n \"sequence\": 918473,\n \"streams\": [\"trades\", \"activities\", \"conversions\"],\n \"mempool\": false,\n \"filters\": {\"wallets\": 1, \"condition_ids\": 0, \"token_ids\": 0},\n \"limits\": {\"max_wallets\": 25000, \"max_markets\": 25000, \"max_filter_batch\": 5000},\n \"source\": {\n \"connected\": true,\n \"last_message_at\": \"2026-08-17T12:00:00.031000000Z\",\n \"dropped_total\": 0\n }\n}\n```\n\n`trade` — a confirmed fill:\n\n```json\n{\n \"type\": \"trade\",\n \"sequence\": 918501,\n \"v\": 2,\n \"stream\": \"trades\",\n \"status\": \"confirmed\",\n \"block_number\": 91937590,\n \"block_hash\": \"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\",\n \"block_timestamp\": 1786924800,\n \"tx_hash\": \"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\",\n \"tx_row_index\": 1,\n \"tx_row_count\": 3,\n \"partial\": false,\n \"missing\": [],\n \"published_at\": 1786924801.312,\n \"log_index\": 42,\n \"order_hash\": \"0x5e4d3c2b1a09f8e7d6c5b4a3928170615f4e3d2c1b0a9f8e7d6c5b4a39281706\",\n \"order_hash_alt\": null,\n \"user_address\": \"0x674887d1ac838099a48b629dff53f25b7b87ee08\",\n \"taker_address\": \"0x9c1a5f3b2d8e4c6b7a0f9e8d7c6b5a4938271605\",\n \"side\": \"BUY\",\n \"token_id\": \"67568438763601610729831023256910933987242052537121118642143709840881218761985\",\n \"canonical_token_id\": \"67568438763601610729831023256910933987242052537121118642143709840881218761985\",\n \"condition_id\": \"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\",\n \"shares\": \"20000\",\n \"usdc_amount\": \"9800.5\",\n \"share_price\": \"0.49\",\n \"fee_amount\": \"0\",\n \"fee_refund_amount\": \"0\",\n \"trade_timestamp\": 1786924800,\n \"contract_version\": 2,\n \"is_taker_order\": true,\n \"builder\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"metadata\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n}\n```\n\nA pending mempool trade is the same frame with `status: \"pending\"`.\nIt has no block yet, so `block_number` and `log_index` are `0`,\n`block_hash` and `block_timestamp` are `null`, and\n`canonical_token_id` is `null`; `order_hash_alt` may carry the\nNegRisk candidate order hash, so match a pending trade against its\nconfirmation on either hash.\n\n`activity` — a split, merge or redemption:\n\n```json\n{\n \"type\": \"activity\",\n \"sequence\": 918502,\n \"v\": 2,\n \"stream\": \"activities\",\n \"status\": \"confirmed\",\n \"block_number\": 91937590,\n \"block_hash\": \"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\",\n \"block_timestamp\": 1786924800,\n \"tx_hash\": \"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\",\n \"tx_row_index\": 2,\n \"tx_row_count\": 3,\n \"partial\": false,\n \"missing\": [],\n \"published_at\": 1786924801.312,\n \"event_type\": \"RedeemPosition\",\n \"log_index\": 7,\n \"user_address\": \"0x674887d1ac838099a48b629dff53f25b7b87ee08\",\n \"token_id\": \"67568438763601610729831023256910933987242052537121118642143709840881218761985\",\n \"canonical_token_id\": \"34460519301295595556376203968565021162434252843477398085423120621766516073216\",\n \"condition_id\": \"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\",\n \"price\": \"1\",\n \"amount\": \"20000\",\n \"collateral_token\": \"0x2791bca1f2de4661ed88a30c99a7a9449aa84174\",\n \"parent_collection_id\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n \"activity_timestamp\": 1786924800,\n \"is_neg_ctf\": false,\n \"contract_version\": 2,\n \"auto_redeem\": false\n}\n```\n\n`conversion` — a NegRisk conversion leg:\n\n```json\n{\n \"type\": \"conversion\",\n \"sequence\": 918503,\n \"v\": 2,\n \"stream\": \"conversions\",\n \"status\": \"confirmed\",\n \"block_number\": 91937590,\n \"block_hash\": \"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\",\n \"block_timestamp\": 1786924800,\n \"tx_hash\": \"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\",\n \"tx_row_index\": 3,\n \"tx_row_count\": 3,\n \"partial\": false,\n \"missing\": [],\n \"published_at\": 1786924801.312,\n \"log_index\": 3,\n \"user_address\": \"0x674887d1ac838099a48b629dff53f25b7b87ee08\",\n \"token_id\": \"67568438763601610729831023256910933987242052537121118642143709840881218761985\",\n \"canonical_token_id\": \"34460519301295595556376203968565021162434252843477398085423120621766516073216\",\n \"condition_id\": \"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\",\n \"negrisk_market_id\": \"0x0b8f7e6d5c4b3a29180706f5e4d3c2b1a0f9e8d7c6b5a4938271605f4e3d2c1b\",\n \"amount\": \"250\",\n \"conversion_timestamp\": 1786924800,\n \"contract_version\": 2\n}\n```\n\n`retraction` — the transaction was reorged out. It carries no row\nfields at all, so undo state by `tx_hash` and `stream`:\n\n```json\n{\n \"type\": \"retraction\",\n \"sequence\": 918504,\n \"v\": 2,\n \"stream\": \"trades\",\n \"status\": \"retracted\",\n \"tx_hash\": \"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\",\n \"block_number\": 91937590,\n \"block_hash\": \"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\",\n \"published_at\": 1786924802.881\n}\n```\n\n`heartbeat` — nothing else was written on this tick:\n\n```json\n{\n \"type\": \"heartbeat\",\n \"server_time\": \"2026-08-17T12:00:20.001002003Z\",\n \"sequence\": 918504,\n \"source\": {\n \"connected\": true,\n \"last_message_at\": \"2026-08-17T12:00:19.900000000Z\",\n \"dropped_total\": 12\n }\n}\n```\n\n`filter.updated` — the command was applied. `added` and `removed`\nare net count deltas, not the values applied, so a `filter.set` that\nswaps one wallet for another reports zero of each:\n\n```json\n{\n \"type\": \"filter.updated\",\n \"filters\": {\"wallets\": 2, \"condition_ids\": 0, \"token_ids\": 1},\n \"added\": {\"wallets\": 1, \"condition_ids\": 0, \"token_ids\": 1},\n \"removed\": {\"wallets\": 0, \"condition_ids\": 0, \"token_ids\": 0}\n}\n```\n\n`filter.rejected` — nothing was applied. A validation failure names\nevery entry it refused; a cap failure carries only `code` and\n`message`:\n\n```json\n{\n \"type\": \"filter.rejected\",\n \"code\": \"invalid_filter\",\n \"message\": \"no changes were applied\",\n \"rejected\": [\n {\"value\": \"polymarket-btc-up-or-down\", \"reason\": \"market slugs are not supported; use a condition id or CLOB token id\"},\n {\"value\": \"@trader\", \"reason\": \"usernames are not supported; use a 0x-prefixed 20-byte address\"}\n ]\n}\n```\n\n```json\n{\n \"type\": \"filter.rejected\",\n \"code\": \"filter_limit_reached\",\n \"message\": \"txstream: filter limit reached: at most 25000 wallets\"\n}\n```\n\n`filter.snapshot` — the reply to `filter.list`. `values` is present\nonly when the request set `include_values: true`, each list is\ncapped at 1,000 entries, and `truncated` says whether any list was\ncut short:\n\n```json\n{\n \"type\": \"filter.snapshot\",\n \"sequence\": 918505,\n \"filters\": {\"wallets\": 1, \"condition_ids\": 1, \"token_ids\": 0},\n \"values\": {\n \"wallets\": [\"0x674887d1ac838099a48b629dff53f25b7b87ee08\"],\n \"condition_ids\": [\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\"],\n \"token_ids\": [],\n \"truncated\": false\n }\n}\n```\n\n`error` — the frame could not be handled. Non-fatal: the socket\nstays open and the filters are untouched:\n\n```json\n{\n \"type\": \"error\",\n \"code\": \"unsupported_message\",\n \"message\": \"action must be filter.add, filter.remove, filter.set, filter.clear, filter.list or ping\"\n}\n```\n\n`pong` — the reply to `{\"action\": \"ping\"}`, and nothing more:\n\n```json\n{\"type\": \"pong\"}\n```\n","operationId":"subscribeTransactionStream","x-feature-stage":"stable","tags":["Streams"],"security":["01822649-f37c-4a65-8ca7-7c3b13d7d121","1acff61d-61d3-4e82-9d71-3db3c2c3d3a8"],"x-websocket":{"connect":"wss://data.gravia.trade/api/v1/streams/transactions","encoding":"json","discriminator":"type","clientActions":["filter.add","filter.remove","filter.set","filter.clear","filter.list","ping"],"serverMessages":{"welcome":"#/components/schemas/TransactionStreamWelcome","trade":"#/components/schemas/TransactionStreamTrade","activity":"#/components/schemas/TransactionStreamActivity","conversion":"#/components/schemas/TransactionStreamConversion","retraction":"#/components/schemas/TransactionStreamRetraction","heartbeat":"#/components/schemas/TransactionStreamHeartbeat","filter.updated":"#/components/schemas/TransactionStreamFilterUpdated","filter.rejected":"#/components/schemas/TransactionStreamFilterRejected","filter.snapshot":"#/components/schemas/TransactionStreamFilterSnapshot","error":"#/components/schemas/TransactionStreamError","pong":"#/components/schemas/TransactionStreamPong"}},"parameters":["121965c5-82aa-417a-b013-135ba552a324","15e57211-23d7-4153-81de-428cf4f9a1bb","7d028160-5e4c-4924-9f4b-f1d41c060772","ddd085a0-badd-4a38-b246-5eb5df1ffd1a","c0e231b3-d21e-43db-a7d8-9e501e5255e0"],"responses":{"101":"de3c0590-55f7-49a4-bfaf-7ac6deacf980","400":"ef6f6bf9-8075-4b73-bef8-1cff0ad9df7d","401":"21b84f70-6ac5-42c5-ae78-1f62c617fd42","404":"6710a522-c6d7-49d2-b005-cd8bf16463c1","429":"4eec56e2-0793-4a89-b3d2-9bfb1c01d154","503":"c33f0cc9-a784-4b7f-83aa-7f8c751c4901"},"method":"get","type":"path","servers":["95aa4c4e-3c2a-41df-afae-71836d5c0fa7"],"path":"/api/v1/streams/transactions","baseUrlOptions":["https://data.gravia.trade"],"title":"WebSocket stream of live trades, activities and conversions","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"121965c5-82aa-417a-b013-135ba552a324":{"name":"wallet","in":"query","required":false,"description":"Up to 100 comma-separated 0x-prefixed 20-byte addresses to seed\nthe wallet filter. Usernames are not accepted. Use `filter.add`\nfor larger sets.\n","schema":{"type":"string","isRequired":false,"description":"Up to 100 comma-separated 0x-prefixed 20-byte addresses to seed\nthe wallet filter. Usernames are not accepted. Use `filter.add`\nfor larger sets.\n","uniqueKey":"","typeLabel":"string"},"example":"0x674887d1ac838099a48b629dff53f25b7b87ee08"},"15e57211-23d7-4153-81de-428cf4f9a1bb":{"name":"market","in":"query","required":false,"description":"Up to 100 comma-separated condition ids (`0x` + 64 hex) or\ndecimal CLOB token ids. Market slugs and `category:` selectors\nare not supported. A condition id selects both outcomes; a\ntoken id selects one.\n","schema":{"type":"string","isRequired":false,"description":"Up to 100 comma-separated condition ids (`0x` + 64 hex) or\ndecimal CLOB token ids. Market slugs and `category:` selectors\nare not supported. A condition id selects both outcomes; a\ntoken id selects one.\n","uniqueKey":"","typeLabel":"string"},"example":"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7"},"7d028160-5e4c-4924-9f4b-f1d41c060772":{"name":"streams","in":"query","required":false,"description":"Comma-separated subset of `trades`, `activities`, `conversions`.\nDefaults to all three. Fixed for the life of the connection.\n","schema":{"type":"string","isRequired":false,"description":"Comma-separated subset of `trades`, `activities`, `conversions`.\nDefaults to all three. Fixed for the life of the connection.\n","uniqueKey":"","typeLabel":"string"},"example":"trades,conversions"},"ddd085a0-badd-4a38-b246-5eb5df1ffd1a":{"name":"mempool","in":"query","required":false,"description":"Opt in to unconfirmed mempool trades in addition to confirmed\nones. Requires the `trades` stream.\n","schema":{"type":"boolean","isRequired":false,"description":"Opt in to unconfirmed mempool trades in addition to confirmed\nones. Requires the `trades` stream.\n","uniqueKey":"","typeLabel":"boolean"},"example":true},"c0e231b3-d21e-43db-a7d8-9e501e5255e0":{"name":"api_key","in":"query","required":false,"description":"API key, for clients that cannot set request headers on a\nWebSocket handshake. The `Authorization` header takes\nprecedence and should be preferred; this value is redacted from\naccess logs and usage records.\n","schema":{"type":"string","isRequired":false,"description":"API key, for clients that cannot set request headers on a\nWebSocket handshake. The `Authorization` header takes\nprecedence and should be preferred; this value is redacted from\naccess logs and usage records.\n","uniqueKey":"","typeLabel":"string"}}},"responses":{"de3c0590-55f7-49a4-bfaf-7ac6deacf980":{"description":"The handshake succeeded and the socket is open; the server sends\n`welcome` first. There is no HTTP response body — the schema\nbelow is the union of the JSON frames the server then pushes,\ndiscriminated by `type`.\n","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"One frame the transaction stream sends. These are WebSocket text\nframes on an open socket, not HTTP response bodies. `type` is the\ndiscriminator and the only field a client dispatches on.\n","required":["type","server_time","streams","mempool","filters","limits","source"],"example":{"type":"welcome","server_time":"2026-08-17T12:00:00.123456789Z","sequence":918473,"streams":["trades","activities","conversions"],"mempool":false,"filters":{"wallets":1,"condition_ids":0,"token_ids":0},"limits":{"max_wallets":25000,"max_markets":25000,"max_filter_batch":5000},"source":{"connected":true,"last_message_at":"2026-08-17T12:00:00.031000000Z","dropped_total":0}},"properties":{"type":{"type":"string","enum":["welcome"],"isRequired":true,"uniqueKey":"oneOf.0.type","typeLabel":"enum\u003cstring>"},"server_time":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.0.server_time","typeLabel":"string\u003cdate-time>"},"streams":{"type":"array","description":"The streams this connection will receive, in a fixed order. Reflects `?streams=`, which defaults to all three.\n","items":{"type":"string","enum":["trades","activities","conversions"],"uniqueKey":"oneOf.0.streams.items.[INDEX]","typeLabel":"enum\u003cstring>"},"isRequired":true,"uniqueKey":"oneOf.0.streams","typeLabel":"enum\u003cstring>[]"},"mempool":{"type":"boolean","description":"Whether unconfirmed mempool trades are included.","isRequired":true,"uniqueKey":"oneOf.0.mempool","typeLabel":"boolean"},"filters":{"type":"object","description":"Sizes of a connection's filter sets. Counts rather than values: a client may hold tens of thousands of entries, and an acknowledgement should not echo them all back.\n","required":["wallets","condition_ids","token_ids"],"properties":{"wallets":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.0.filters.wallets","typeLabel":"integer"},"condition_ids":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.0.filters.condition_ids","typeLabel":"integer"},"token_ids":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.0.filters.token_ids","typeLabel":"integer"}},"example":{"wallets":2,"condition_ids":0,"token_ids":1},"isRequired":true,"uniqueKey":"oneOf.0.filters","typeLabel":"object"},"limits":{"type":"object","description":"The caps this connection works within, reported on `welcome` so a client can batch correctly instead of discovering them by rejection.\n","required":["max_wallets","max_markets","max_filter_batch"],"properties":{"max_wallets":{"type":"integer","description":"Wallet selectors this connection may hold in total.","isRequired":true,"uniqueKey":"oneOf.0.limits.max_wallets","typeLabel":"integer"},"max_markets":{"type":"integer","description":"Market selectors this connection may hold in total, counting condition ids and token ids together.\n","isRequired":true,"uniqueKey":"oneOf.0.limits.max_markets","typeLabel":"integer"},"max_filter_batch":{"type":"integer","description":"Entries accepted in one filter command.","isRequired":true,"uniqueKey":"oneOf.0.limits.max_filter_batch","typeLabel":"integer"}},"example":{"max_wallets":25000,"max_markets":25000,"max_filter_batch":5000},"isRequired":true,"uniqueKey":"oneOf.0.limits","typeLabel":"object"},"source":{"type":"object","description":"Upstream feed health, on welcome and heartbeat frames.","required":["connected","dropped_total"],"properties":{"connected":{"type":"boolean","description":"False when the upstream publisher has gone quiet for longer than the staleness window, even if Redis itself is reachable.\n","isRequired":true,"uniqueKey":"oneOf.0.source.connected","typeLabel":"boolean"},"dropped_total":{"type":"integer","format":"int64","description":"Rows the server received and discarded because it was behind. This is loss no filter caused and no client can otherwise detect.\n","isRequired":true,"uniqueKey":"oneOf.0.source.dropped_total","typeLabel":"integer\u003cint64>"},"last_message_at":{"type":"string","format":"date-time","description":"When the last upstream message arrived. Absent if none has arrived since the server started.\n","uniqueKey":"oneOf.0.source.last_message_at","typeLabel":"string\u003cdate-time>"}},"example":{"connected":true,"last_message_at":"2026-08-17T12:00:00.031000000Z","dropped_total":0},"isRequired":true,"uniqueKey":"oneOf.0.source","typeLabel":"object"},"sequence":{"type":"integer","format":"int64","description":"The server-global ordinal at connect time. Absent when the server has not decoded any upstream message yet.\n","uniqueKey":"oneOf.0.sequence","typeLabel":"integer\u003cint64>"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"One frame the transaction stream sends. These are WebSocket text\nframes on an open socket, not HTTP response bodies. `type` is the\ndiscriminator and the only field a client dispatches on.\n","required":["type","order_hash","side","shares","usdc_amount","share_price","fee_amount","fee_refund_amount","trade_timestamp","is_taker_order","sequence","v","stream","status","tx_hash","tx_row_index","tx_row_count","partial","missing","published_at","log_index","user_address","contract_version"],"example":{"type":"trade","sequence":918501,"v":2,"stream":"trades","status":"confirmed","block_number":91937590,"block_hash":"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3","block_timestamp":1786924800,"tx_hash":"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6","tx_row_index":1,"tx_row_count":3,"partial":false,"missing":[],"published_at":1786924801.312,"log_index":42,"order_hash":"0x5e4d3c2b1a09f8e7d6c5b4a3928170615f4e3d2c1b0a9f8e7d6c5b4a39281706","order_hash_alt":null,"user_address":"0x674887d1ac838099a48b629dff53f25b7b87ee08","taker_address":"0x9c1a5f3b2d8e4c6b7a0f9e8d7c6b5a4938271605","side":"BUY","token_id":"67568438763601610729831023256910933987242052537121118642143709840881218761985","canonical_token_id":"67568438763601610729831023256910933987242052537121118642143709840881218761985","condition_id":"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7","shares":"20000","usdc_amount":"9800.5","share_price":"0.49","fee_amount":"0","fee_refund_amount":"0","trade_timestamp":1786924800,"contract_version":2,"is_taker_order":true,"builder":"0x0000000000000000000000000000000000000000000000000000000000000000","metadata":"0x0000000000000000000000000000000000000000000000000000000000000000"},"properties":{"sequence":{"type":"integer","format":"int64","description":"Server-global ordinal over every decoded row, assigned before filtering. Useful for ordering, not for gap detection.\n","isRequired":true,"uniqueKey":"oneOf.1.sequence","typeLabel":"integer\u003cint64>"},"v":{"type":"integer","description":"Upstream row schema version, currently `2`. A frame with an unrecognized version is never forwarded.\n","example":2,"isRequired":true,"uniqueKey":"oneOf.1.v","typeLabel":"integer"},"stream":{"type":"string","enum":["trades","activities","conversions"],"isRequired":true,"uniqueKey":"oneOf.1.stream","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["confirmed","pending"],"description":"The only field a client must branch on. A pending trade has no block yet: `block_number` and `log_index` are `0`, `block_hash` and `block_timestamp` are `null`, and it may never land.\n","isRequired":true,"uniqueKey":"oneOf.1.status","typeLabel":"enum\u003cstring>"},"tx_hash":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.tx_hash","typeLabel":"string"},"tx_row_index":{"type":"integer","description":"1-based position of this row within its transaction.","isRequired":true,"uniqueKey":"oneOf.1.tx_row_index","typeLabel":"integer"},"tx_row_count":{"type":"integer","description":"Rows in the transaction before filtering, so a filtered client legitimately sees row 2 of 13.\n","isRequired":true,"uniqueKey":"oneOf.1.tx_row_count","typeLabel":"integer"},"partial":{"type":"boolean","description":"True when `missing` is non-empty.","isRequired":true,"uniqueKey":"oneOf.1.partial","typeLabel":"boolean"},"missing":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.1.missing.items.[INDEX]","typeLabel":"string"},"description":"Names of fields that read as unknown rather than zero. `token_id` appears here when the market has not been ingested yet.\n","isRequired":true,"uniqueKey":"oneOf.1.missing","typeLabel":"string[]"},"published_at":{"type":"number","format":"double","description":"Publisher wall clock at send, in Unix seconds with a fractional part. Useful for measuring feed latency, not for ordering.\n","isRequired":true,"uniqueKey":"oneOf.1.published_at","typeLabel":"number\u003cdouble>"},"log_index":{"type":"integer","description":"Zero on a pending trade, which has no log position.","isRequired":true,"uniqueKey":"oneOf.1.log_index","typeLabel":"integer"},"user_address":{"type":"string","description":"The row subject, lowercased. This is the address the `wallet` filter matches.\n","isRequired":true,"uniqueKey":"oneOf.1.user_address","typeLabel":"string"},"contract_version":{"type":"integer","description":"On-chain contract generation the row was decoded from.","isRequired":true,"uniqueKey":"oneOf.1.contract_version","typeLabel":"integer"},"type":{"type":"string","enum":["trade"],"isRequired":true,"uniqueKey":"oneOf.1.type","typeLabel":"enum\u003cstring>"},"order_hash":{"type":"string","description":"EIP-712 hash of the filled order.","isRequired":true,"uniqueKey":"oneOf.1.order_hash","typeLabel":"string"},"side":{"type":"string","enum":["BUY","SELL"],"isRequired":true,"uniqueKey":"oneOf.1.side","typeLabel":"enum\u003cstring>"},"shares":{"type":"string","description":"Outcome shares filled, as a decimal string.","isRequired":true,"uniqueKey":"oneOf.1.shares","typeLabel":"string"},"usdc_amount":{"type":"string","description":"USDC value of the fill, as a decimal string.","isRequired":true,"uniqueKey":"oneOf.1.usdc_amount","typeLabel":"string"},"share_price":{"type":"string","description":"Price per share, as a decimal string.","isRequired":true,"uniqueKey":"oneOf.1.share_price","typeLabel":"string"},"fee_amount":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.fee_amount","typeLabel":"string"},"fee_refund_amount":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.fee_refund_amount","typeLabel":"string"},"trade_timestamp":{"type":"integer","format":"int64","description":"Whole Unix seconds.","isRequired":true,"uniqueKey":"oneOf.1.trade_timestamp","typeLabel":"integer\u003cint64>"},"is_taker_order":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.1.is_taker_order","typeLabel":"boolean"},"block_number":{"type":"integer","format":"int64","description":"Zero on a pending trade, which has no block.","uniqueKey":"oneOf.1.block_number","typeLabel":"integer\u003cint64>"},"block_hash":{"oneOf":[{"type":"string","uniqueKey":"oneOf.1.block_hash.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.1.block_hash.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.block_hash","typeLabel":"string | null"},"block_timestamp":{"oneOf":[{"type":"integer","format":"int64","description":"Block time in whole Unix seconds. Null on a pending trade.","uniqueKey":"oneOf.1.block_timestamp.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Block time in whole Unix seconds. Null on a pending trade.","uniqueKey":"oneOf.1.block_timestamp.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.block_timestamp","typeLabel":"integer\u003cint64> | null"},"token_id":{"oneOf":[{"type":"string","description":"CLOB token id, as a decimal string — the id the Polymarket API returns. Null, with `token_id` listed in `missing`, when the market has not been ingested yet.\n","uniqueKey":"oneOf.1.token_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"CLOB token id, as a decimal string — the id the Polymarket API returns. Null, with `token_id` listed in `missing`, when the market has not been ingested yet.\n","uniqueKey":"oneOf.1.token_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.token_id","typeLabel":"string | null"},"canonical_token_id":{"oneOf":[{"type":"string","description":"Internal USDC.e position id the warehouse aggregates on. Equal to `token_id` on a binary market, different on a neg-risk one. Null on a pending trade, and `\"0\"` on a conversion's USDC leg.\n","uniqueKey":"oneOf.1.canonical_token_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Internal USDC.e position id the warehouse aggregates on. Equal to `token_id` on a binary market, different on a neg-risk one. Null on a pending trade, and `\"0\"` on a conversion's USDC leg.\n","uniqueKey":"oneOf.1.canonical_token_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.canonical_token_id","typeLabel":"string | null"},"condition_id":{"oneOf":[{"type":"string","description":"Null when the market has not been ingested yet.","uniqueKey":"oneOf.1.condition_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Null when the market has not been ingested yet.","uniqueKey":"oneOf.1.condition_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.condition_id","typeLabel":"string | null"},"order_hash_alt":{"oneOf":[{"type":"string","description":"NegRisk-exchange candidate hash, set only on pending trades where calldata does not say which exchange the fee module routed to. Match a pending trade to its confirmation on either hash.\n","uniqueKey":"oneOf.1.order_hash_alt.oneOf.0","typeLabel":"string"},{"type":"null","description":"NegRisk-exchange candidate hash, set only on pending trades where calldata does not say which exchange the fee module routed to. Match a pending trade to its confirmation on either hash.\n","uniqueKey":"oneOf.1.order_hash_alt.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.order_hash_alt","typeLabel":"string | null"},"taker_address":{"type":"string","description":"Counterparty of the fill. It is not matched by the `wallet` filter: the counterparty receives its own row.\n","uniqueKey":"oneOf.1.taker_address","typeLabel":"string"},"builder":{"oneOf":[{"type":"string","description":"Order builder tag as decoded from the fill. The zero hash means the fill carried none, which is the common case.\n","uniqueKey":"oneOf.1.builder.oneOf.0","typeLabel":"string"},{"type":"null","description":"Order builder tag as decoded from the fill. The zero hash means the fill carried none, which is the common case.\n","uniqueKey":"oneOf.1.builder.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.builder","typeLabel":"string | null"},"metadata":{"oneOf":[{"type":"string","description":"Opaque order metadata as decoded from the fill. The zero hash means the fill carried none.\n","uniqueKey":"oneOf.1.metadata.oneOf.0","typeLabel":"string"},{"type":"null","description":"Opaque order metadata as decoded from the fill. The zero hash means the fill carried none.\n","uniqueKey":"oneOf.1.metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.metadata","typeLabel":"string | null"}},"uniqueKey":"oneOf.1","typeLabel":"object"},{"type":"object","description":"One frame the transaction stream sends. These are WebSocket text\nframes on an open socket, not HTTP response bodies. `type` is the\ndiscriminator and the only field a client dispatches on.\n","required":["type","event_type","price","amount","collateral_token","activity_timestamp","is_neg_ctf","auto_redeem","sequence","v","stream","status","tx_hash","tx_row_index","tx_row_count","partial","missing","published_at","log_index","user_address","contract_version"],"example":{"type":"activity","sequence":918502,"v":2,"stream":"activities","status":"confirmed","block_number":91937590,"block_hash":"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3","block_timestamp":1786924800,"tx_hash":"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6","tx_row_index":2,"tx_row_count":3,"partial":false,"missing":[],"published_at":1786924801.312,"event_type":"RedeemPosition","log_index":7,"user_address":"0x674887d1ac838099a48b629dff53f25b7b87ee08","token_id":"67568438763601610729831023256910933987242052537121118642143709840881218761985","canonical_token_id":"34460519301295595556376203968565021162434252843477398085423120621766516073216","condition_id":"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7","price":"1","amount":"20000","collateral_token":"0x2791bca1f2de4661ed88a30c99a7a9449aa84174","parent_collection_id":"0x0000000000000000000000000000000000000000000000000000000000000000","activity_timestamp":1786924800,"is_neg_ctf":false,"contract_version":2,"auto_redeem":false},"properties":{"sequence":{"type":"integer","format":"int64","description":"Server-global ordinal over every decoded row, assigned before filtering. Useful for ordering, not for gap detection.\n","isRequired":true,"uniqueKey":"oneOf.2.sequence","typeLabel":"integer\u003cint64>"},"v":{"type":"integer","description":"Upstream row schema version, currently `2`. A frame with an unrecognized version is never forwarded.\n","example":2,"isRequired":true,"uniqueKey":"oneOf.2.v","typeLabel":"integer"},"stream":{"type":"string","enum":["trades","activities","conversions"],"isRequired":true,"uniqueKey":"oneOf.2.stream","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["confirmed","pending"],"description":"The only field a client must branch on. A pending trade has no block yet: `block_number` and `log_index` are `0`, `block_hash` and `block_timestamp` are `null`, and it may never land.\n","isRequired":true,"uniqueKey":"oneOf.2.status","typeLabel":"enum\u003cstring>"},"tx_hash":{"type":"string","isRequired":true,"uniqueKey":"oneOf.2.tx_hash","typeLabel":"string"},"tx_row_index":{"type":"integer","description":"1-based position of this row within its transaction.","isRequired":true,"uniqueKey":"oneOf.2.tx_row_index","typeLabel":"integer"},"tx_row_count":{"type":"integer","description":"Rows in the transaction before filtering, so a filtered client legitimately sees row 2 of 13.\n","isRequired":true,"uniqueKey":"oneOf.2.tx_row_count","typeLabel":"integer"},"partial":{"type":"boolean","description":"True when `missing` is non-empty.","isRequired":true,"uniqueKey":"oneOf.2.partial","typeLabel":"boolean"},"missing":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.2.missing.items.[INDEX]","typeLabel":"string"},"description":"Names of fields that read as unknown rather than zero. `token_id` appears here when the market has not been ingested yet.\n","isRequired":true,"uniqueKey":"oneOf.2.missing","typeLabel":"string[]"},"published_at":{"type":"number","format":"double","description":"Publisher wall clock at send, in Unix seconds with a fractional part. Useful for measuring feed latency, not for ordering.\n","isRequired":true,"uniqueKey":"oneOf.2.published_at","typeLabel":"number\u003cdouble>"},"log_index":{"type":"integer","description":"Zero on a pending trade, which has no log position.","isRequired":true,"uniqueKey":"oneOf.2.log_index","typeLabel":"integer"},"user_address":{"type":"string","description":"The row subject, lowercased. This is the address the `wallet` filter matches.\n","isRequired":true,"uniqueKey":"oneOf.2.user_address","typeLabel":"string"},"contract_version":{"type":"integer","description":"On-chain contract generation the row was decoded from.","isRequired":true,"uniqueKey":"oneOf.2.contract_version","typeLabel":"integer"},"type":{"type":"string","enum":["activity"],"isRequired":true,"uniqueKey":"oneOf.2.type","typeLabel":"enum\u003cstring>"},"event_type":{"type":"string","description":"On-chain event name as the decoder emits it, such as `SplitPosition`, `MergePosition` or `RedeemPosition`. Owned by the upstream decoder, so treat the set as open.\n","example":"RedeemPosition","isRequired":true,"uniqueKey":"oneOf.2.event_type","typeLabel":"string"},"price":{"type":"string","description":"Price per share for the position, as a decimal string.","isRequired":true,"uniqueKey":"oneOf.2.price","typeLabel":"string"},"amount":{"type":"string","description":"Shares affected, as a decimal string.","isRequired":true,"uniqueKey":"oneOf.2.amount","typeLabel":"string"},"collateral_token":{"type":"string","description":"Collateral token contract the position settles in.","isRequired":true,"uniqueKey":"oneOf.2.collateral_token","typeLabel":"string"},"activity_timestamp":{"type":"integer","format":"int64","description":"Whole Unix seconds.","isRequired":true,"uniqueKey":"oneOf.2.activity_timestamp","typeLabel":"integer\u003cint64>"},"is_neg_ctf":{"type":"boolean","description":"Whether the event came from the neg-risk adapter.","isRequired":true,"uniqueKey":"oneOf.2.is_neg_ctf","typeLabel":"boolean"},"auto_redeem":{"type":"boolean","description":"True when the redemption was performed automatically on the user's behalf rather than by their own transaction.\n","isRequired":true,"uniqueKey":"oneOf.2.auto_redeem","typeLabel":"boolean"},"block_number":{"type":"integer","format":"int64","description":"Zero on a pending trade, which has no block.","uniqueKey":"oneOf.2.block_number","typeLabel":"integer\u003cint64>"},"block_hash":{"oneOf":[{"type":"string","uniqueKey":"oneOf.2.block_hash.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.2.block_hash.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.block_hash","typeLabel":"string | null"},"block_timestamp":{"oneOf":[{"type":"integer","format":"int64","description":"Block time in whole Unix seconds. Null on a pending trade.","uniqueKey":"oneOf.2.block_timestamp.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Block time in whole Unix seconds. Null on a pending trade.","uniqueKey":"oneOf.2.block_timestamp.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.block_timestamp","typeLabel":"integer\u003cint64> | null"},"token_id":{"oneOf":[{"type":"string","description":"CLOB token id, as a decimal string — the id the Polymarket API returns. Null, with `token_id` listed in `missing`, when the market has not been ingested yet.\n","uniqueKey":"oneOf.2.token_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"CLOB token id, as a decimal string — the id the Polymarket API returns. Null, with `token_id` listed in `missing`, when the market has not been ingested yet.\n","uniqueKey":"oneOf.2.token_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.token_id","typeLabel":"string | null"},"canonical_token_id":{"oneOf":[{"type":"string","description":"Internal USDC.e position id the warehouse aggregates on. Equal to `token_id` on a binary market, different on a neg-risk one. Null on a pending trade, and `\"0\"` on a conversion's USDC leg.\n","uniqueKey":"oneOf.2.canonical_token_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Internal USDC.e position id the warehouse aggregates on. Equal to `token_id` on a binary market, different on a neg-risk one. Null on a pending trade, and `\"0\"` on a conversion's USDC leg.\n","uniqueKey":"oneOf.2.canonical_token_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.canonical_token_id","typeLabel":"string | null"},"condition_id":{"oneOf":[{"type":"string","description":"Null when the market has not been ingested yet.","uniqueKey":"oneOf.2.condition_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Null when the market has not been ingested yet.","uniqueKey":"oneOf.2.condition_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.condition_id","typeLabel":"string | null"},"parent_collection_id":{"oneOf":[{"type":"string","description":"Parent collection for a nested split or merge; the zero hash at the top level.\n","uniqueKey":"oneOf.2.parent_collection_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Parent collection for a nested split or merge; the zero hash at the top level.\n","uniqueKey":"oneOf.2.parent_collection_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.parent_collection_id","typeLabel":"string | null"}},"uniqueKey":"oneOf.2","typeLabel":"object"},{"type":"object","description":"One frame the transaction stream sends. These are WebSocket text\nframes on an open socket, not HTTP response bodies. `type` is the\ndiscriminator and the only field a client dispatches on.\n","required":["type","negrisk_market_id","amount","conversion_timestamp","sequence","v","stream","status","tx_hash","tx_row_index","tx_row_count","partial","missing","published_at","log_index","user_address","contract_version"],"example":{"type":"conversion","sequence":918503,"v":2,"stream":"conversions","status":"confirmed","block_number":91937590,"block_hash":"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3","block_timestamp":1786924800,"tx_hash":"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6","tx_row_index":3,"tx_row_count":3,"partial":false,"missing":[],"published_at":1786924801.312,"log_index":3,"user_address":"0x674887d1ac838099a48b629dff53f25b7b87ee08","token_id":"67568438763601610729831023256910933987242052537121118642143709840881218761985","canonical_token_id":"34460519301295595556376203968565021162434252843477398085423120621766516073216","condition_id":"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7","negrisk_market_id":"0x0b8f7e6d5c4b3a29180706f5e4d3c2b1a0f9e8d7c6b5a4938271605f4e3d2c1b","amount":"250","conversion_timestamp":1786924800,"contract_version":2},"properties":{"sequence":{"type":"integer","format":"int64","description":"Server-global ordinal over every decoded row, assigned before filtering. Useful for ordering, not for gap detection.\n","isRequired":true,"uniqueKey":"oneOf.3.sequence","typeLabel":"integer\u003cint64>"},"v":{"type":"integer","description":"Upstream row schema version, currently `2`. A frame with an unrecognized version is never forwarded.\n","example":2,"isRequired":true,"uniqueKey":"oneOf.3.v","typeLabel":"integer"},"stream":{"type":"string","enum":["trades","activities","conversions"],"isRequired":true,"uniqueKey":"oneOf.3.stream","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["confirmed","pending"],"description":"The only field a client must branch on. A pending trade has no block yet: `block_number` and `log_index` are `0`, `block_hash` and `block_timestamp` are `null`, and it may never land.\n","isRequired":true,"uniqueKey":"oneOf.3.status","typeLabel":"enum\u003cstring>"},"tx_hash":{"type":"string","isRequired":true,"uniqueKey":"oneOf.3.tx_hash","typeLabel":"string"},"tx_row_index":{"type":"integer","description":"1-based position of this row within its transaction.","isRequired":true,"uniqueKey":"oneOf.3.tx_row_index","typeLabel":"integer"},"tx_row_count":{"type":"integer","description":"Rows in the transaction before filtering, so a filtered client legitimately sees row 2 of 13.\n","isRequired":true,"uniqueKey":"oneOf.3.tx_row_count","typeLabel":"integer"},"partial":{"type":"boolean","description":"True when `missing` is non-empty.","isRequired":true,"uniqueKey":"oneOf.3.partial","typeLabel":"boolean"},"missing":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.3.missing.items.[INDEX]","typeLabel":"string"},"description":"Names of fields that read as unknown rather than zero. `token_id` appears here when the market has not been ingested yet.\n","isRequired":true,"uniqueKey":"oneOf.3.missing","typeLabel":"string[]"},"published_at":{"type":"number","format":"double","description":"Publisher wall clock at send, in Unix seconds with a fractional part. Useful for measuring feed latency, not for ordering.\n","isRequired":true,"uniqueKey":"oneOf.3.published_at","typeLabel":"number\u003cdouble>"},"log_index":{"type":"integer","description":"Zero on a pending trade, which has no log position.","isRequired":true,"uniqueKey":"oneOf.3.log_index","typeLabel":"integer"},"user_address":{"type":"string","description":"The row subject, lowercased. This is the address the `wallet` filter matches.\n","isRequired":true,"uniqueKey":"oneOf.3.user_address","typeLabel":"string"},"contract_version":{"type":"integer","description":"On-chain contract generation the row was decoded from.","isRequired":true,"uniqueKey":"oneOf.3.contract_version","typeLabel":"integer"},"type":{"type":"string","enum":["conversion"],"isRequired":true,"uniqueKey":"oneOf.3.type","typeLabel":"enum\u003cstring>"},"negrisk_market_id":{"type":"string","description":"NegRisk market group the conversion belongs to.","isRequired":true,"uniqueKey":"oneOf.3.negrisk_market_id","typeLabel":"string"},"amount":{"type":"string","description":"Position size converted, as a decimal string.","isRequired":true,"uniqueKey":"oneOf.3.amount","typeLabel":"string"},"conversion_timestamp":{"type":"integer","format":"int64","description":"Whole Unix seconds.","isRequired":true,"uniqueKey":"oneOf.3.conversion_timestamp","typeLabel":"integer\u003cint64>"},"block_number":{"type":"integer","format":"int64","description":"Zero on a pending trade, which has no block.","uniqueKey":"oneOf.3.block_number","typeLabel":"integer\u003cint64>"},"block_hash":{"oneOf":[{"type":"string","uniqueKey":"oneOf.3.block_hash.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.3.block_hash.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.3.block_hash","typeLabel":"string | null"},"block_timestamp":{"oneOf":[{"type":"integer","format":"int64","description":"Block time in whole Unix seconds. Null on a pending trade.","uniqueKey":"oneOf.3.block_timestamp.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","format":"int64","description":"Block time in whole Unix seconds. Null on a pending trade.","uniqueKey":"oneOf.3.block_timestamp.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.3.block_timestamp","typeLabel":"integer\u003cint64> | null"},"token_id":{"oneOf":[{"type":"string","description":"CLOB token id, as a decimal string — the id the Polymarket API returns. Null, with `token_id` listed in `missing`, when the market has not been ingested yet.\n","uniqueKey":"oneOf.3.token_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"CLOB token id, as a decimal string — the id the Polymarket API returns. Null, with `token_id` listed in `missing`, when the market has not been ingested yet.\n","uniqueKey":"oneOf.3.token_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.3.token_id","typeLabel":"string | null"},"canonical_token_id":{"oneOf":[{"type":"string","description":"Internal USDC.e position id the warehouse aggregates on. Equal to `token_id` on a binary market, different on a neg-risk one. Null on a pending trade, and `\"0\"` on a conversion's USDC leg.\n","uniqueKey":"oneOf.3.canonical_token_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Internal USDC.e position id the warehouse aggregates on. Equal to `token_id` on a binary market, different on a neg-risk one. Null on a pending trade, and `\"0\"` on a conversion's USDC leg.\n","uniqueKey":"oneOf.3.canonical_token_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.3.canonical_token_id","typeLabel":"string | null"},"condition_id":{"oneOf":[{"type":"string","description":"Null when the market has not been ingested yet.","uniqueKey":"oneOf.3.condition_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Null when the market has not been ingested yet.","uniqueKey":"oneOf.3.condition_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.3.condition_id","typeLabel":"string | null"}},"uniqueKey":"oneOf.3","typeLabel":"object"},{"type":"object","description":"One frame the transaction stream sends. These are WebSocket text\nframes on an open socket, not HTTP response bodies. `type` is the\ndiscriminator and the only field a client dispatches on.\n","required":["type","sequence","v","stream","status","tx_hash","block_number","published_at"],"example":{"type":"retraction","sequence":918504,"v":2,"stream":"trades","status":"retracted","tx_hash":"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6","block_number":91937590,"block_hash":"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3","published_at":1786924802.881},"properties":{"type":{"type":"string","enum":["retraction"],"isRequired":true,"uniqueKey":"oneOf.4.type","typeLabel":"enum\u003cstring>"},"sequence":{"type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.4.sequence","typeLabel":"integer\u003cint64>"},"v":{"type":"integer","example":2,"isRequired":true,"uniqueKey":"oneOf.4.v","typeLabel":"integer"},"stream":{"type":"string","enum":["trades","activities","conversions"],"isRequired":true,"uniqueKey":"oneOf.4.stream","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["retracted"],"isRequired":true,"uniqueKey":"oneOf.4.status","typeLabel":"enum\u003cstring>"},"tx_hash":{"type":"string","isRequired":true,"uniqueKey":"oneOf.4.tx_hash","typeLabel":"string"},"block_number":{"type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.4.block_number","typeLabel":"integer\u003cint64>"},"published_at":{"type":"number","format":"double","isRequired":true,"uniqueKey":"oneOf.4.published_at","typeLabel":"number\u003cdouble>"},"block_hash":{"oneOf":[{"type":"string","uniqueKey":"oneOf.4.block_hash.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.4.block_hash.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.4.block_hash","typeLabel":"string | null"}},"uniqueKey":"oneOf.4","typeLabel":"object"},{"type":"object","description":"One frame the transaction stream sends. These are WebSocket text\nframes on an open socket, not HTTP response bodies. `type` is the\ndiscriminator and the only field a client dispatches on.\n","required":["type","server_time","source"],"example":{"type":"heartbeat","server_time":"2026-08-17T12:00:20.001002003Z","sequence":918504,"source":{"connected":true,"last_message_at":"2026-08-17T12:00:19.900000000Z","dropped_total":12}},"properties":{"type":{"type":"string","enum":["heartbeat"],"isRequired":true,"uniqueKey":"oneOf.5.type","typeLabel":"enum\u003cstring>"},"server_time":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.5.server_time","typeLabel":"string\u003cdate-time>"},"source":{"type":"object","description":"Upstream feed health, on welcome and heartbeat frames.","required":["connected","dropped_total"],"properties":{"connected":{"type":"boolean","description":"False when the upstream publisher has gone quiet for longer than the staleness window, even if Redis itself is reachable.\n","isRequired":true,"uniqueKey":"oneOf.5.source.connected","typeLabel":"boolean"},"dropped_total":{"type":"integer","format":"int64","description":"Rows the server received and discarded because it was behind. This is loss no filter caused and no client can otherwise detect.\n","isRequired":true,"uniqueKey":"oneOf.5.source.dropped_total","typeLabel":"integer\u003cint64>"},"last_message_at":{"type":"string","format":"date-time","description":"When the last upstream message arrived. Absent if none has arrived since the server started.\n","uniqueKey":"oneOf.5.source.last_message_at","typeLabel":"string\u003cdate-time>"}},"example":{"connected":true,"last_message_at":"2026-08-17T12:00:00.031000000Z","dropped_total":0},"isRequired":true,"uniqueKey":"oneOf.5.source","typeLabel":"object"},"sequence":{"type":"integer","format":"int64","description":"Absent when the server has not decoded any upstream message yet.\n","uniqueKey":"oneOf.5.sequence","typeLabel":"integer\u003cint64>"}},"uniqueKey":"oneOf.5","typeLabel":"object"},{"type":"object","description":"One frame the transaction stream sends. These are WebSocket text\nframes on an open socket, not HTTP response bodies. `type` is the\ndiscriminator and the only field a client dispatches on.\n","required":["type","filters","added","removed"],"example":{"type":"filter.updated","filters":{"wallets":2,"condition_ids":0,"token_ids":1},"added":{"wallets":1,"condition_ids":0,"token_ids":1},"removed":{"wallets":0,"condition_ids":0,"token_ids":0}},"properties":{"type":{"type":"string","enum":["filter.updated"],"isRequired":true,"uniqueKey":"oneOf.6.type","typeLabel":"enum\u003cstring>"},"filters":{"type":"object","description":"Sizes of a connection's filter sets. Counts rather than values: a client may hold tens of thousands of entries, and an acknowledgement should not echo them all back.\n","required":["wallets","condition_ids","token_ids"],"properties":{"wallets":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.6.filters.wallets","typeLabel":"integer"},"condition_ids":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.6.filters.condition_ids","typeLabel":"integer"},"token_ids":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.6.filters.token_ids","typeLabel":"integer"}},"example":{"wallets":2,"condition_ids":0,"token_ids":1},"isRequired":true,"uniqueKey":"oneOf.6.filters","typeLabel":"object"},"added":{"type":"object","description":"Net growth of each set, never negative. A `filter.set` that swaps one wallet for another reports zero added and zero removed, so this is not a list of the values applied.\n","required":["wallets","condition_ids","token_ids"],"example":{"wallets":2,"condition_ids":0,"token_ids":1},"properties":{"wallets":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.6.added.wallets","typeLabel":"integer"},"condition_ids":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.6.added.condition_ids","typeLabel":"integer"},"token_ids":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.6.added.token_ids","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"oneOf.6.added","typeLabel":"object"},"removed":{"type":"object","description":"Net shrinkage of each set, never negative.","required":["wallets","condition_ids","token_ids"],"example":{"wallets":2,"condition_ids":0,"token_ids":1},"properties":{"wallets":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.6.removed.wallets","typeLabel":"integer"},"condition_ids":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.6.removed.condition_ids","typeLabel":"integer"},"token_ids":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.6.removed.token_ids","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"oneOf.6.removed","typeLabel":"object"}},"uniqueKey":"oneOf.6","typeLabel":"object"},{"type":"object","description":"One frame the transaction stream sends. These are WebSocket text\nframes on an open socket, not HTTP response bodies. `type` is the\ndiscriminator and the only field a client dispatches on.\n","required":["type","code","message"],"example":{"type":"filter.rejected","code":"invalid_filter","message":"no changes were applied","rejected":[{"value":"polymarket-btc-up-or-down","reason":"market slugs are not supported; use a condition id or CLOB token id"}]},"properties":{"type":{"type":"string","enum":["filter.rejected"],"isRequired":true,"uniqueKey":"oneOf.7.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["invalid_filter","filter_limit_reached"],"description":"`invalid_filter` means one or more entries were malformed, or a\n`filter.clear` named an unknown `target`. `filter_limit_reached`\nmeans the command would have exceeded this connection's standing\ncap, reported as `limits` on `welcome`.\n","isRequired":true,"uniqueKey":"oneOf.7.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation. Not a stable contract.","isRequired":true,"uniqueKey":"oneOf.7.message","typeLabel":"string"},"rejected":{"type":"array","description":"The offending entries, present on a validation failure and absent when the whole command was refused for exceeding a cap.\n","items":{"type":"object","description":"One entry a filter command refused, and why.","required":["value","reason"],"properties":{"value":{"type":"string","description":"The offending entry, verbatim. Empty when the whole batch was rejected for its size rather than for one entry.\n","isRequired":true,"uniqueKey":"oneOf.7.rejected.items.[INDEX].value","typeLabel":"string"},"reason":{"type":"string","description":"Human-readable explanation. Not a stable contract; branch on the frame's `code` instead.\n","isRequired":true,"uniqueKey":"oneOf.7.rejected.items.[INDEX].reason","typeLabel":"string"}},"example":{"value":"polymarket-btc-up-or-down","reason":"market slugs are not supported; use a condition id or CLOB token id"},"uniqueKey":"oneOf.7.rejected.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.7.rejected","typeLabel":"object[]"}},"uniqueKey":"oneOf.7","typeLabel":"object"},{"type":"object","description":"One frame the transaction stream sends. These are WebSocket text\nframes on an open socket, not HTTP response bodies. `type` is the\ndiscriminator and the only field a client dispatches on.\n","required":["type","filters"],"example":{"type":"filter.snapshot","sequence":918505,"filters":{"wallets":1,"condition_ids":1,"token_ids":0},"values":{"wallets":["0x674887d1ac838099a48b629dff53f25b7b87ee08"],"condition_ids":["0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7"],"token_ids":[],"truncated":false}},"properties":{"type":{"type":"string","enum":["filter.snapshot"],"isRequired":true,"uniqueKey":"oneOf.8.type","typeLabel":"enum\u003cstring>"},"filters":{"type":"object","description":"Sizes of a connection's filter sets. Counts rather than values: a client may hold tens of thousands of entries, and an acknowledgement should not echo them all back.\n","required":["wallets","condition_ids","token_ids"],"properties":{"wallets":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.8.filters.wallets","typeLabel":"integer"},"condition_ids":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.8.filters.condition_ids","typeLabel":"integer"},"token_ids":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.8.filters.token_ids","typeLabel":"integer"}},"example":{"wallets":2,"condition_ids":0,"token_ids":1},"isRequired":true,"uniqueKey":"oneOf.8.filters","typeLabel":"object"},"sequence":{"type":"integer","format":"int64","description":"Absent when the server has not decoded any upstream message yet.\n","uniqueKey":"oneOf.8.sequence","typeLabel":"integer\u003cint64>"},"values":{"type":"object","description":"The filter set's contents, returned only when `filter.list` asked for them with `include_values: true`. Each list is sorted and capped at 1,000 entries.\n","required":["wallets","condition_ids","token_ids","truncated"],"properties":{"wallets":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.8.values.wallets.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.8.values.wallets","typeLabel":"string[]"},"condition_ids":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.8.values.condition_ids.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.8.values.condition_ids","typeLabel":"string[]"},"token_ids":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.8.values.token_ids.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.8.values.token_ids","typeLabel":"string[]"},"truncated":{"type":"boolean","description":"True when any of the three lists was cut short by the cap.","isRequired":true,"uniqueKey":"oneOf.8.values.truncated","typeLabel":"boolean"}},"uniqueKey":"oneOf.8.values","typeLabel":"object"}},"uniqueKey":"oneOf.8","typeLabel":"object"},{"type":"object","description":"One frame the transaction stream sends. These are WebSocket text\nframes on an open socket, not HTTP response bodies. `type` is the\ndiscriminator and the only field a client dispatches on.\n","required":["type","code","message"],"example":{"type":"error","code":"unsupported_message","message":"action must be filter.add, filter.remove, filter.set, filter.clear, filter.list or ping"},"properties":{"type":{"type":"string","enum":["error"],"isRequired":true,"uniqueKey":"oneOf.9.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["invalid_message","unsupported_message","too_many_filter_commands"],"description":"`invalid_message` means the frame was not a single text-frame\nJSON object, or carried a key this endpoint does not accept.\n`unsupported_message` means `action` was not one of the six\ndocumented commands. `too_many_filter_commands` means the\n20-per-second command budget was exceeded; the frame was\ndiscarded, so send it again after slowing down.\n","isRequired":true,"uniqueKey":"oneOf.9.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation. Not a stable contract.","isRequired":true,"uniqueKey":"oneOf.9.message","typeLabel":"string"}},"uniqueKey":"oneOf.9","typeLabel":"object"},{"type":"object","description":"One frame the transaction stream sends. These are WebSocket text\nframes on an open socket, not HTTP response bodies. `type` is the\ndiscriminator and the only field a client dispatches on.\n","required":["type"],"example":{"type":"pong"},"properties":{"type":{"type":"string","enum":["pong"],"isRequired":true,"uniqueKey":"oneOf.10.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.10","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"welcome","server_time":"2026-08-17T12:00:00.123456789Z","sequence":918473,"streams":["trades","activities","conversions"],"mempool":false,"filters":{"wallets":1,"condition_ids":0,"token_ids":0},"limits":{"max_wallets":25000,"max_markets":25000,"max_filter_batch":5000},"source":{"connected":true,"last_message_at":"2026-08-17T12:00:00.031000000Z","dropped_total":0}}}},"exampleType":"generated"}},"headers":{"X-Request-ID":{"description":"Correlation ID supplied by the client or generated by the server.","schema":{"type":"string"}},"X-API-Version":{"description":"API version that handled this request.","schema":{"type":"string","enum":["v1"]}},"RateLimit-Limit":{"description":"Request limit for the currently most restrictive policy tier.","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"Requests remaining in the currently most restrictive policy tier.","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"Whole seconds until capacity returns in the reported policy tier.","schema":{"type":"integer","minimum":0}}},"exampleType":"generated"},"ef6f6bf9-8075-4b73-bef8-1cff0ad9df7d":{"description":"The request could not be completed.","headers":{"X-Request-ID":{"description":"Correlation ID supplied by the client or generated by the server.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code. Branch on this rather than on\n`message`, which may be reworded at any time.\n\n| Code | Status | Meaning |\n| --- | --- | --- |\n| `invalid_request` | 400 | A parameter is missing, malformed, or out of range. |\n| `unauthorized` | 401 | The API key is missing, unknown, or revoked. |\n| `cors_origin_denied` | 403 | The browser origin is not on the deployment's allowlist. |\n| `not_found` | 404 | The requested resource does not exist. |\n| `profile_not_found` | 404 | The `user` value did not resolve to a known profile. |\n| `method_not_allowed` | 405 | The path exists but not for this HTTP method. |\n| `rate_limit_exceeded` | 429 | A sliding-window rate limit was exceeded; honor `Retry-After`. |\n| `stream_limit_reached` | 429 | This API key reached its concurrent allowance for the stream; close an existing connection instead of retrying. |\n| `internal_error` | 500 | Unexpected server-side failure. |\n| `service_unavailable` | 503 | A required backend is not configured or reachable. |\n| `temporarily_unavailable` | 503 | A backend is briefly degraded; retry after a short pause. |\n","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description. Not a stable contract.","example":"user is required","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Correlation ID for support and log lookup, mirroring the\n`X-Request-ID` response header.\n","example":"01f6c90f31d24db3a25c7dba6ca071ee","uniqueKey":"error.request_id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"invalid_request","message":"user is required","request_id":"01f6c90f31d24db3a25c7dba6ca071ee"}}}},"exampleType":"generated"}},"exampleType":"generated"},"21b84f70-6ac5-42c5-ae78-1f62c617fd42":{"description":"The request could not be completed.","headers":{"X-Request-ID":{"description":"Correlation ID supplied by the client or generated by the server.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code. Branch on this rather than on\n`message`, which may be reworded at any time.\n\n| Code | Status | Meaning |\n| --- | --- | --- |\n| `invalid_request` | 400 | A parameter is missing, malformed, or out of range. |\n| `unauthorized` | 401 | The API key is missing, unknown, or revoked. |\n| `cors_origin_denied` | 403 | The browser origin is not on the deployment's allowlist. |\n| `not_found` | 404 | The requested resource does not exist. |\n| `profile_not_found` | 404 | The `user` value did not resolve to a known profile. |\n| `method_not_allowed` | 405 | The path exists but not for this HTTP method. |\n| `rate_limit_exceeded` | 429 | A sliding-window rate limit was exceeded; honor `Retry-After`. |\n| `stream_limit_reached` | 429 | This API key reached its concurrent allowance for the stream; close an existing connection instead of retrying. |\n| `internal_error` | 500 | Unexpected server-side failure. |\n| `service_unavailable` | 503 | A required backend is not configured or reachable. |\n| `temporarily_unavailable` | 503 | A backend is briefly degraded; retry after a short pause. |\n","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description. Not a stable contract.","example":"user is required","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Correlation ID for support and log lookup, mirroring the\n`X-Request-ID` response header.\n","example":"01f6c90f31d24db3a25c7dba6ca071ee","uniqueKey":"error.request_id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"invalid_request","message":"user is required","request_id":"01f6c90f31d24db3a25c7dba6ca071ee"}}}},"exampleType":"generated"}},"exampleType":"generated"},"6710a522-c6d7-49d2-b005-cd8bf16463c1":{"description":"The request could not be completed.","headers":{"X-Request-ID":{"description":"Correlation ID supplied by the client or generated by the server.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code. Branch on this rather than on\n`message`, which may be reworded at any time.\n\n| Code | Status | Meaning |\n| --- | --- | --- |\n| `invalid_request` | 400 | A parameter is missing, malformed, or out of range. |\n| `unauthorized` | 401 | The API key is missing, unknown, or revoked. |\n| `cors_origin_denied` | 403 | The browser origin is not on the deployment's allowlist. |\n| `not_found` | 404 | The requested resource does not exist. |\n| `profile_not_found` | 404 | The `user` value did not resolve to a known profile. |\n| `method_not_allowed` | 405 | The path exists but not for this HTTP method. |\n| `rate_limit_exceeded` | 429 | A sliding-window rate limit was exceeded; honor `Retry-After`. |\n| `stream_limit_reached` | 429 | This API key reached its concurrent allowance for the stream; close an existing connection instead of retrying. |\n| `internal_error` | 500 | Unexpected server-side failure. |\n| `service_unavailable` | 503 | A required backend is not configured or reachable. |\n| `temporarily_unavailable` | 503 | A backend is briefly degraded; retry after a short pause. |\n","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description. Not a stable contract.","example":"user is required","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Correlation ID for support and log lookup, mirroring the\n`X-Request-ID` response header.\n","example":"01f6c90f31d24db3a25c7dba6ca071ee","uniqueKey":"error.request_id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"invalid_request","message":"user is required","request_id":"01f6c90f31d24db3a25c7dba6ca071ee"}}}},"exampleType":"generated"}},"exampleType":"generated"},"4eec56e2-0793-4a89-b3d2-9bfb1c01d154":{"description":"Either `stream_limit_reached`, meaning this API key has reached\nits assigned concurrent allowance for this stream, or\n`rate_limit_exceeded` for handshake rate limiting.\n","headers":{"X-Request-ID":{"description":"Correlation ID supplied by the client or generated by the server.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Request limit for the currently most restrictive policy tier.","schema":{"type":"integer","minimum":1}},"RateLimit-Remaining":{"description":"Requests remaining in the currently most restrictive policy tier.","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"Whole seconds until capacity returns in the reported policy tier.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code. Branch on this rather than on\n`message`, which may be reworded at any time.\n\n| Code | Status | Meaning |\n| --- | --- | --- |\n| `invalid_request` | 400 | A parameter is missing, malformed, or out of range. |\n| `unauthorized` | 401 | The API key is missing, unknown, or revoked. |\n| `cors_origin_denied` | 403 | The browser origin is not on the deployment's allowlist. |\n| `not_found` | 404 | The requested resource does not exist. |\n| `profile_not_found` | 404 | The `user` value did not resolve to a known profile. |\n| `method_not_allowed` | 405 | The path exists but not for this HTTP method. |\n| `rate_limit_exceeded` | 429 | A sliding-window rate limit was exceeded; honor `Retry-After`. |\n| `stream_limit_reached` | 429 | This API key reached its concurrent allowance for the stream; close an existing connection instead of retrying. |\n| `internal_error` | 500 | Unexpected server-side failure. |\n| `service_unavailable` | 503 | A required backend is not configured or reachable. |\n| `temporarily_unavailable` | 503 | A backend is briefly degraded; retry after a short pause. |\n","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description. Not a stable contract.","example":"user is required","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Correlation ID for support and log lookup, mirroring the\n`X-Request-ID` response header.\n","example":"01f6c90f31d24db3a25c7dba6ca071ee","uniqueKey":"error.request_id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"invalid_request","message":"user is required","request_id":"01f6c90f31d24db3a25c7dba6ca071ee"}}}},"exampleType":"generated"}},"exampleType":"generated"},"c33f0cc9-a784-4b7f-83aa-7f8c751c4901":{"description":"The request could not be completed.","headers":{"X-Request-ID":{"description":"Correlation ID supplied by the client or generated by the server.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code. Branch on this rather than on\n`message`, which may be reworded at any time.\n\n| Code | Status | Meaning |\n| --- | --- | --- |\n| `invalid_request` | 400 | A parameter is missing, malformed, or out of range. |\n| `unauthorized` | 401 | The API key is missing, unknown, or revoked. |\n| `cors_origin_denied` | 403 | The browser origin is not on the deployment's allowlist. |\n| `not_found` | 404 | The requested resource does not exist. |\n| `profile_not_found` | 404 | The `user` value did not resolve to a known profile. |\n| `method_not_allowed` | 405 | The path exists but not for this HTTP method. |\n| `rate_limit_exceeded` | 429 | A sliding-window rate limit was exceeded; honor `Retry-After`. |\n| `stream_limit_reached` | 429 | This API key reached its concurrent allowance for the stream; close an existing connection instead of retrying. |\n| `internal_error` | 500 | Unexpected server-side failure. |\n| `service_unavailable` | 503 | A required backend is not configured or reachable. |\n| `temporarily_unavailable` | 503 | A backend is briefly degraded; retry after a short pause. |\n","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description. Not a stable contract.","example":"user is required","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"type":"string","description":"Correlation ID for support and log lookup, mirroring the\n`X-Request-ID` response header.\n","example":"01f6c90f31d24db3a25c7dba6ca071ee","uniqueKey":"error.request_id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"invalid_request","message":"user is required","request_id":"01f6c90f31d24db3a25c7dba6ca071ee"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"01822649-f37c-4a65-8ca7-7c3b13d7d121":{"APIKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Raw database-backed API key.","scopes":[]}},"1acff61d-61d3-4e82-9d71-3db3c2c3d3a8":{"APIKeyQuery":{"type":"apiKey","in":"query","name":"api_key","description":"Raw API key supplied as a query parameter. Accepted only on stream endpoints, because browsers cannot set request headers on a WebSocket handshake. The value is redacted from access logs and usage records. Prefer the Authorization header wherever headers can be set.\n","scopes":[]}}},"servers":{"95aa4c4e-3c2a-41df-afae-71836d5c0fa7":{"url":"https://data.gravia.trade","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"Authorization","description":"Raw database-backed API key.","scopes":[]},"schema":{"title":"Authorization","type":"string","description":"Raw database-backed API key.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"APIKey","name":"Authorization"}],"title":"APIKey"},{"schemes":[{"scheme":{"type":"apiKey","in":"query","name":"api_key","description":"Raw API key supplied as a query parameter. Accepted only on stream endpoints, because browsers cannot set request headers on a WebSocket handshake. The value is redacted from access logs and usage records. Prefer the Authorization header wherever headers can be set.\n","scopes":[]},"schema":{"title":"api_key","type":"string","description":"Raw API key supplied as a query parameter. Accepted only on stream endpoints, because browsers cannot set request headers on a WebSocket handshake. The value is redacted from access logs and usage records. Prefer the Authorization header wherever headers can be set.\n","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"APIKeyQuery","name":"api_key"}],"title":"APIKeyQuery"}]},"originalFileLocation":"https://data.gravia.trade/"},"subdomain":"gravia-trade","siteName":"Gravia Data API","title":"WebSocket stream of live trades, activities and conversions - Gravia Data API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-27T11:39:29.578Z","originalFileLocation":"api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"A WebSocket channel, not a request/response endpoint. Connect, and the server pushes rows as they are decoded — confirmed on-chain trades, activities and conversions, plus unconfirmed mempool trades if you ask for them. wss://data.gravia.trade/api/v1/streams/transactions?streams=trades,activities,conversions\u0026amp;mempool=false The 101 below is the handshake and carries no HTTP body. Everything the server says afterwards is a WebSocket text frame holding one JSON object. Your WebSocket client performs the upgrade, so Upgrade, Connection and the Sec-WebSocket-* headers are never yours to set, and the query parameters are read once, at connect time. Browsers cannot set request headers on a handshake, so authenticate there with ?api_key= and with the Authorization header everywhere else. js const socket = new WebSocket( \u0026quot;wss://data.gravia.trade/api/v1/streams/transactions\u0026quot; + \u0026quot;?streams=trades\u0026amp;api_key=\u0026quot; + apiKey, ); socket.addEventListener(\u0026quot;message\u0026quot;, (frame) =\u0026gt; { const message = JSON.parse(frame.data); switch (message.type) { case \u0026quot;trade\u0026quot;: // status is \u0026quot;confirmed\u0026quot;, or \u0026quot;pending\u0026quot; for a mempool trade break; case \u0026quot;retraction\u0026quot;: // drop whatever you hold for message.tx_hash on message.stream break; } }); // Filters are managed in band, once the socket is open. socket.send(JSON.stringify({action: \u0026quot;filter.add\u0026quot;, wallets: [wallet]})); Concurrent connections are limited per API key. The service default is one, but a key may be assigned a different allowance. Exceeding it returns 429 with the stream_limit_reached code, which is distinct from ordinary rate limiting: close an existing stream rather than backing off. Fixed at connect. streams and mempool cannot be changed in band. wallet and market only seed the filters, which are then managed with the client messages below, so a caller holding thousands of selectors is not limited by URL length. Filters. Both sets are optional; omitting them streams everything. They are ANDed, and selectors within each are ORed. wallet matches the row subject (user_address) only — the counterparty of a fill appears as the subject of its own row, so matching taker_address as well would deliver the same fill several times. A filter change is not retroactive. Liveness. The server sends a protocol ping every 20 seconds, and a heartbeat frame on any tick where it wrote nothing else, so a quiet stream stays visibly alive to application code that cannot observe protocol pings. A connection that sends nothing at all for 60 seconds is closed; the automatic pong your client already sends is enough to hold it open. Delivery is at-most-once with no replay. sequence is a server-global ordinal, so a filtered client sees gaps by design; it is not a gap detector, and it is absent from a control frame sent before the server has decoded anything. source.dropped_total in each heartbeat counts rows the server discarded because it was behind, which is the only loss a client cannot otherwise detect. Read the REST endpoints when completeness matters. Retractions ignore the wallet and market filters, because a reorg retraction carries no rows and therefore no wallet or market; stream selection still applies. Ignore one for a tx_hash you hold no state for. Pending trades are never retracted, and a pending trade may never land — time out your own pending state. With mempool=true a landed trade is delivered twice, once pending and once confirmed; deduplicate on (tx_hash, order_hash). Close codes. 1008 with client is too slow means the server gave up writing to you and dropped the connection rather than waiting; reconnect with tighter filters or a faster reader. 1001 with server is shutting down is a deploy — reconnect. Anything that fails before the upgrade is ordinary HTTP, listed under Responses below. ### Client messages One JSON object per text frame, discriminated by action. Unknown keys are rejected, and every frame — ping included — is counted against a budget of 20 commands per second with a burst of 40. json {\u0026quot;action\u0026quot;: \u0026quot;filter.add\u0026quot;, \u0026quot;wallets\u0026quot;: [\u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;]} {\u0026quot;action\u0026quot;: \u0026quot;filter.remove\u0026quot;, \u0026quot;markets\u0026quot;: [\u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;]} {\u0026quot;action\u0026quot;: \u0026quot;filter.set\u0026quot;, \u0026quot;markets\u0026quot;: [\u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;]} {\u0026quot;action\u0026quot;: \u0026quot;filter.clear\u0026quot;, \u0026quot;target\u0026quot;: \u0026quot;wallets\u0026quot;} {\u0026quot;action\u0026quot;: \u0026quot;filter.list\u0026quot;, \u0026quot;include_values\u0026quot;: true} {\u0026quot;action\u0026quot;: \u0026quot;ping\u0026quot;} wallets entries are 0x-prefixed 20-byte addresses; usernames are rejected. markets entries are classified by shape: 0x followed by 64 hex is a condition id, a decimal string is a CLOB token id. Market slugs and category: selectors are not accepted here. target is wallets, markets or all, and defaults to all. A batch applies atomically: one malformed entry rejects the whole message and leaves the filter set untouched. At most 5,000 entries per message; welcome reports the standing caps in limits. ### Server messages Every frame carries a type, and type is the only field to dispatch on. | type | Sent when | Structure | | --- | --- | --- | | welcome | Once, immediately after the handshake. | TransactionStreamWelcome | | trade | A trade was decoded. status is confirmed, or pending for a mempool trade. | TransactionStreamTrade | | activity | A split, merge or redemption was decoded. | TransactionStreamActivity | | conversion | A NegRisk conversion was decoded. | TransactionStreamConversion | | retraction | A transaction was reorged out. | TransactionStreamRetraction | | heartbeat | A ping tick passed with nothing else to write. | TransactionStreamHeartbeat | | filter.updated | A filter command was applied. | TransactionStreamFilterUpdated | | filter.rejected | A filter command was refused and nothing changed. | TransactionStreamFilterRejected | | filter.snapshot | Reply to filter.list. | TransactionStreamFilterSnapshot | | error | A frame could not be handled. The socket stays open. | TransactionStreamError | | pong | Reply to {\u0026quot;action\u0026quot;: \u0026quot;ping\u0026quot;}. | TransactionStreamPong | A trade, activity or conversion frame is the decoded upstream row forwarded whole, with type and sequence added in front, so treat unrecognized fields as forward-compatible additions rather than errors. v is the upstream row schema version, currently 2. Money, size and price fields cross as decimal strings, and so do token ids: they are 256-bit, and a JSON number would silently lose precision. partial marks a row where the fields named in missing read as unknown rather than zero. welcome — once, immediately after the handshake: json { \u0026quot;type\u0026quot;: \u0026quot;welcome\u0026quot;, \u0026quot;server_time\u0026quot;: \u0026quot;2026-08-17T12:00:00.123456789Z\u0026quot;, \u0026quot;sequence\u0026quot;: 918473, \u0026quot;streams\u0026quot;: [\u0026quot;trades\u0026quot;, \u0026quot;activities\u0026quot;, \u0026quot;conversions\u0026quot;], \u0026quot;mempool\u0026quot;: false, \u0026quot;filters\u0026quot;: {\u0026quot;wallets\u0026quot;: 1, \u0026quot;condition_ids\u0026quot;: 0, \u0026quot;token_ids\u0026quot;: 0}, \u0026quot;limits\u0026quot;: {\u0026quot;max_wallets\u0026quot;: 25000, \u0026quot;max_markets\u0026quot;: 25000, \u0026quot;max_filter_batch\u0026quot;: 5000}, \u0026quot;source\u0026quot;: { \u0026quot;connected\u0026quot;: true, \u0026quot;last_message_at\u0026quot;: \u0026quot;2026-08-17T12:00:00.031000000Z\u0026quot;, \u0026quot;dropped_total\u0026quot;: 0 } } trade — a confirmed fill: json { \u0026quot;type\u0026quot;: \u0026quot;trade\u0026quot;, \u0026quot;sequence\u0026quot;: 918501, \u0026quot;v\u0026quot;: 2, \u0026quot;stream\u0026quot;: \u0026quot;trades\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;confirmed\u0026quot;, \u0026quot;block_number\u0026quot;: 91937590, \u0026quot;block_hash\u0026quot;: \u0026quot;0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\u0026quot;, \u0026quot;block_timestamp\u0026quot;: 1786924800, \u0026quot;tx_hash\u0026quot;: \u0026quot;0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\u0026quot;, \u0026quot;tx_row_index\u0026quot;: 1, \u0026quot;tx_row_count\u0026quot;: 3, \u0026quot;partial\u0026quot;: false, \u0026quot;missing\u0026quot;: [], \u0026quot;published_at\u0026quot;: 1786924801.312, \u0026quot;log_index\u0026quot;: 42, \u0026quot;order_hash\u0026quot;: \u0026quot;0x5e4d3c2b1a09f8e7d6c5b4a3928170615f4e3d2c1b0a9f8e7d6c5b4a39281706\u0026quot;, \u0026quot;order_hash_alt\u0026quot;: null, \u0026quot;user_address\u0026quot;: \u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;, \u0026quot;taker_address\u0026quot;: \u0026quot;0x9c1a5f3b2d8e4c6b7a0f9e8d7c6b5a4938271605\u0026quot;, \u0026quot;side\u0026quot;: \u0026quot;BUY\u0026quot;, \u0026quot;token_id\u0026quot;: \u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;, \u0026quot;canonical_token_id\u0026quot;: \u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;, \u0026quot;condition_id\u0026quot;: \u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;, \u0026quot;shares\u0026quot;: \u0026quot;20000\u0026quot;, \u0026quot;usdc_amount\u0026quot;: \u0026quot;9800.5\u0026quot;, \u0026quot;share_price\u0026quot;: \u0026quot;0.49\u0026quot;, \u0026quot;fee_amount\u0026quot;: \u0026quot;0\u0026quot;, \u0026quot;fee_refund_amount\u0026quot;: \u0026quot;0\u0026quot;, \u0026quot;trade_timestamp\u0026quot;: 1786924800, \u0026quot;contract_version\u0026quot;: 2, \u0026quot;is_taker_order\u0026quot;: true, \u0026quot;builder\u0026quot;: \u0026quot;0x0000000000000000000000000000000000000000000000000000000000000000\u0026quot;, \u0026quot;metadata\u0026quot;: \u0026quot;0x0000000000000000000000000000000000000000000000000000000000000000\u0026quot; } A pending mempool trade is the same frame with status: \u0026quot;pending\u0026quot;. It has no block yet, so block_number and log_index are 0, block_hash and block_timestamp are null, and canonical_token_id is null; order_hash_alt may carry the NegRisk candidate order hash, so match a pending trade against its confirmation on either hash. activity — a split, merge or redemption: json { \u0026quot;type\u0026quot;: \u0026quot;activity\u0026quot;, \u0026quot;sequence\u0026quot;: 918502, \u0026quot;v\u0026quot;: 2, \u0026quot;stream\u0026quot;: \u0026quot;activities\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;confirmed\u0026quot;, \u0026quot;block_number\u0026quot;: 91937590, \u0026quot;block_hash\u0026quot;: \u0026quot;0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\u0026quot;, \u0026quot;block_timestamp\u0026quot;: 1786924800, \u0026quot;tx_hash\u0026quot;: \u0026quot;0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\u0026quot;, \u0026quot;tx_row_index\u0026quot;: 2, \u0026quot;tx_row_count\u0026quot;: 3, \u0026quot;partial\u0026quot;: false, \u0026quot;missing\u0026quot;: [], \u0026quot;published_at\u0026quot;: 1786924801.312, \u0026quot;event_type\u0026quot;: \u0026quot;RedeemPosition\u0026quot;, \u0026quot;log_index\u0026quot;: 7, \u0026quot;user_address\u0026quot;: \u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;, \u0026quot;token_id\u0026quot;: \u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;, \u0026quot;canonical_token_id\u0026quot;: \u0026quot;34460519301295595556376203968565021162434252843477398085423120621766516073216\u0026quot;, \u0026quot;condition_id\u0026quot;: \u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;, \u0026quot;price\u0026quot;: \u0026quot;1\u0026quot;, \u0026quot;amount\u0026quot;: \u0026quot;20000\u0026quot;, \u0026quot;collateral_token\u0026quot;: \u0026quot;0x2791bca1f2de4661ed88a30c99a7a9449aa84174\u0026quot;, \u0026quot;parent_collection_id\u0026quot;: \u0026quot;0x0000000000000000000000000000000000000000000000000000000000000000\u0026quot;, \u0026quot;activity_timestamp\u0026quot;: 1786924800, \u0026quot;is_neg_ctf\u0026quot;: false, \u0026quot;contract_version\u0026quot;: 2, \u0026quot;auto_redeem\u0026quot;: false } conversion — a NegRisk conversion leg: json { \u0026quot;type\u0026quot;: \u0026quot;conversion\u0026quot;, \u0026quot;sequence\u0026quot;: 918503, \u0026quot;v\u0026quot;: 2, \u0026quot;stream\u0026quot;: \u0026quot;conversions\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;confirmed\u0026quot;, \u0026quot;block_number\u0026quot;: 91937590, \u0026quot;block_hash\u0026quot;: \u0026quot;0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\u0026quot;, \u0026quot;block_timestamp\u0026quot;: 1786924800, \u0026quot;tx_hash\u0026quot;: \u0026quot;0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\u0026quot;, \u0026quot;tx_row_index\u0026quot;: 3, \u0026quot;tx_row_count\u0026quot;: 3, \u0026quot;partial\u0026quot;: false, \u0026quot;missing\u0026quot;: [], \u0026quot;published_at\u0026quot;: 1786924801.312, \u0026quot;log_index\u0026quot;: 3, \u0026quot;user_address\u0026quot;: \u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;, \u0026quot;token_id\u0026quot;: \u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;, \u0026quot;canonical_token_id\u0026quot;: \u0026quot;34460519301295595556376203968565021162434252843477398085423120621766516073216\u0026quot;, \u0026quot;condition_id\u0026quot;: \u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;, \u0026quot;negrisk_market_id\u0026quot;: \u0026quot;0x0b8f7e6d5c4b3a29180706f5e4d3c2b1a0f9e8d7c6b5a4938271605f4e3d2c1b\u0026quot;, \u0026quot;amount\u0026quot;: \u0026quot;250\u0026quot;, \u0026quot;conversion_timestamp\u0026quot;: 1786924800, \u0026quot;contract_version\u0026quot;: 2 } retraction — the transaction was reorged out. It carries no row fields at all, so undo state by tx_hash and stream: json { \u0026quot;type\u0026quot;: \u0026quot;retraction\u0026quot;, \u0026quot;sequence\u0026quot;: 918504, \u0026quot;v\u0026quot;: 2, \u0026quot;stream\u0026quot;: \u0026quot;trades\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;retracted\u0026quot;, \u0026quot;tx_hash\u0026quot;: \u0026quot;0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\u0026quot;, \u0026quot;block_number\u0026quot;: 91937590, \u0026quot;block_hash\u0026quot;: \u0026quot;0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\u0026quot;, \u0026quot;published_at\u0026quot;: 1786924802.881 } heartbeat — nothing else was written on this tick: json { \u0026quot;type\u0026quot;: \u0026quot;heartbeat\u0026quot;, \u0026quot;server_time\u0026quot;: \u0026quot;2026-08-17T12:00:20.001002003Z\u0026quot;, \u0026quot;sequence\u0026quot;: 918504, \u0026quot;source\u0026quot;: { \u0026quot;connected\u0026quot;: true, \u0026quot;last_message_at\u0026quot;: \u0026quot;2026-08-17T12:00:19.900000000Z\u0026quot;, \u0026quot;dropped_total\u0026quot;: 12 } } filter.updated — the command was applied. added and removed are net count deltas, not the values applied, so a filter.set that swaps one wallet for another reports zero of each: json { \u0026quot;type\u0026quot;: \u0026quot;filter.updated\u0026quot;, \u0026quot;filters\u0026quot;: {\u0026quot;wallets\u0026quot;: 2, \u0026quot;condition_ids\u0026quot;: 0, \u0026quot;token_ids\u0026quot;: 1}, \u0026quot;added\u0026quot;: {\u0026quot;wallets\u0026quot;: 1, \u0026quot;condition_ids\u0026quot;: 0, \u0026quot;token_ids\u0026quot;: 1}, \u0026quot;removed\u0026quot;: {\u0026quot;wallets\u0026quot;: 0, \u0026quot;condition_ids\u0026quot;: 0, \u0026quot;token_ids\u0026quot;: 0} } filter.rejected — nothing was applied. A validation failure names every entry it refused; a cap failure carries only code and message: json { \u0026quot;type\u0026quot;: \u0026quot;filter.rejected\u0026quot;, \u0026quot;code\u0026quot;: \u0026quot;invalid_filter\u0026quot;, \u0026quot;message\u0026quot;: \u0026quot;no changes were applied\u0026quot;, \u0026quot;rejected\u0026quot;: [ {\u0026quot;value\u0026quot;: \u0026quot;polymarket-btc-up-or-down\u0026quot;, \u0026quot;reason\u0026quot;: \u0026quot;market slugs are not supported; use a condition id or CLOB token id\u0026quot;}, {\u0026quot;value\u0026quot;: \u0026quot;@trader\u0026quot;, \u0026quot;reason\u0026quot;: \u0026quot;usernames are not supported; use a 0x-prefixed 20-byte address\u0026quot;} ] } json { \u0026quot;type\u0026quot;: \u0026quot;filter.rejected\u0026quot;, \u0026quot;code\u0026quot;: \u0026quot;filter_limit_reached\u0026quot;, \u0026quot;message\u0026quot;: \u0026quot;txstream: filter limit reached: at most 25000 wallets\u0026quot; } filter.snapshot — the reply to filter.list. values is present only when the request set include_values: true, each list is capped at 1,000 entries, and truncated says whether any list was cut short: json { \u0026quot;type\u0026quot;: \u0026quot;filter.snapshot\u0026quot;, \u0026quot;sequence\u0026quot;: 918505, \u0026quot;filters\u0026quot;: {\u0026quot;wallets\u0026quot;: 1, \u0026quot;condition_ids\u0026quot;: 1, \u0026quot;token_ids\u0026quot;: 0}, \u0026quot;values\u0026quot;: { \u0026quot;wallets\u0026quot;: [\u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;], \u0026quot;condition_ids\u0026quot;: [\u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;], \u0026quot;token_ids\u0026quot;: [], \u0026quot;truncated\u0026quot;: false } } error — the frame could not be handled. Non-fatal: the socket stays open and the filters are untouched: json { \u0026quot;type\u0026quot;: \u0026quot;error\u0026quot;, \u0026quot;code\u0026quot;: \u0026quot;unsupported_message\u0026quot;, \u0026quot;message\u0026quot;: \u0026quot;action must be filter.add, filter.remove, filter.set, filter.clear, filter.list or ping\u0026quot; } pong — the reply to {\u0026quot;action\u0026quot;: \u0026quot;ping\u0026quot;}, and nothing more: json {\u0026quot;type\u0026quot;: \u0026quot;pong\u0026quot;}\">\u003cmeta data-mint-head name=\"application-name\" content=\"Gravia Data API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gravia-trade/UCUg-2SVPMUpHKiA/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/gravia-trade/UCUg-2SVPMUpHKiA/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gravia-trade/UCUg-2SVPMUpHKiA/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gravia-trade/UCUg-2SVPMUpHKiA/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gravia-trade/UCUg-2SVPMUpHKiA/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gravia-trade/UCUg-2SVPMUpHKiA/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gravia-trade/UCUg-2SVPMUpHKiA/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gravia-trade/UCUg-2SVPMUpHKiA/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gravia-trade/UCUg-2SVPMUpHKiA/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"WebSocket stream of live trades, activities and conversions - Gravia Data API\">\u003cmeta data-mint-head property=\"og:description\" content=\"A WebSocket channel, not a request/response endpoint. Connect, and the server pushes rows as they are decoded — confirmed on-chain trades, activities and conversions, plus unconfirmed mempool trades if you ask for them. wss://data.gravia.trade/api/v1/streams/transactions?streams=trades,activities,conversions\u0026amp;mempool=false The 101 below is the handshake and carries no HTTP body. Everything the server says afterwards is a WebSocket text frame holding one JSON object. Your WebSocket client performs the upgrade, so Upgrade, Connection and the Sec-WebSocket-* headers are never yours to set, and the query parameters are read once, at connect time. Browsers cannot set request headers on a handshake, so authenticate there with ?api_key= and with the Authorization header everywhere else. js const socket = new WebSocket( \u0026quot;wss://data.gravia.trade/api/v1/streams/transactions\u0026quot; + \u0026quot;?streams=trades\u0026amp;api_key=\u0026quot; + apiKey, ); socket.addEventListener(\u0026quot;message\u0026quot;, (frame) =\u0026gt; { const message = JSON.parse(frame.data); switch (message.type) { case \u0026quot;trade\u0026quot;: // status is \u0026quot;confirmed\u0026quot;, or \u0026quot;pending\u0026quot; for a mempool trade break; case \u0026quot;retraction\u0026quot;: // drop whatever you hold for message.tx_hash on message.stream break; } }); // Filters are managed in band, once the socket is open. socket.send(JSON.stringify({action: \u0026quot;filter.add\u0026quot;, wallets: [wallet]})); Concurrent connections are limited per API key. The service default is one, but a key may be assigned a different allowance. Exceeding it returns 429 with the stream_limit_reached code, which is distinct from ordinary rate limiting: close an existing stream rather than backing off. Fixed at connect. streams and mempool cannot be changed in band. wallet and market only seed the filters, which are then managed with the client messages below, so a caller holding thousands of selectors is not limited by URL length. Filters. Both sets are optional; omitting them streams everything. They are ANDed, and selectors within each are ORed. wallet matches the row subject (user_address) only — the counterparty of a fill appears as the subject of its own row, so matching taker_address as well would deliver the same fill several times. A filter change is not retroactive. Liveness. The server sends a protocol ping every 20 seconds, and a heartbeat frame on any tick where it wrote nothing else, so a quiet stream stays visibly alive to application code that cannot observe protocol pings. A connection that sends nothing at all for 60 seconds is closed; the automatic pong your client already sends is enough to hold it open. Delivery is at-most-once with no replay. sequence is a server-global ordinal, so a filtered client sees gaps by design; it is not a gap detector, and it is absent from a control frame sent before the server has decoded anything. source.dropped_total in each heartbeat counts rows the server discarded because it was behind, which is the only loss a client cannot otherwise detect. Read the REST endpoints when completeness matters. Retractions ignore the wallet and market filters, because a reorg retraction carries no rows and therefore no wallet or market; stream selection still applies. Ignore one for a tx_hash you hold no state for. Pending trades are never retracted, and a pending trade may never land — time out your own pending state. With mempool=true a landed trade is delivered twice, once pending and once confirmed; deduplicate on (tx_hash, order_hash). Close codes. 1008 with client is too slow means the server gave up writing to you and dropped the connection rather than waiting; reconnect with tighter filters or a faster reader. 1001 with server is shutting down is a deploy — reconnect. Anything that fails before the upgrade is ordinary HTTP, listed under Responses below. ### Client messages One JSON object per text frame, discriminated by action. Unknown keys are rejected, and every frame — ping included — is counted against a budget of 20 commands per second with a burst of 40. json {\u0026quot;action\u0026quot;: \u0026quot;filter.add\u0026quot;, \u0026quot;wallets\u0026quot;: [\u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;]} {\u0026quot;action\u0026quot;: \u0026quot;filter.remove\u0026quot;, \u0026quot;markets\u0026quot;: [\u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;]} {\u0026quot;action\u0026quot;: \u0026quot;filter.set\u0026quot;, \u0026quot;markets\u0026quot;: [\u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;]} {\u0026quot;action\u0026quot;: \u0026quot;filter.clear\u0026quot;, \u0026quot;target\u0026quot;: \u0026quot;wallets\u0026quot;} {\u0026quot;action\u0026quot;: \u0026quot;filter.list\u0026quot;, \u0026quot;include_values\u0026quot;: true} {\u0026quot;action\u0026quot;: \u0026quot;ping\u0026quot;} wallets entries are 0x-prefixed 20-byte addresses; usernames are rejected. markets entries are classified by shape: 0x followed by 64 hex is a condition id, a decimal string is a CLOB token id. Market slugs and category: selectors are not accepted here. target is wallets, markets or all, and defaults to all. A batch applies atomically: one malformed entry rejects the whole message and leaves the filter set untouched. At most 5,000 entries per message; welcome reports the standing caps in limits. ### Server messages Every frame carries a type, and type is the only field to dispatch on. | type | Sent when | Structure | | --- | --- | --- | | welcome | Once, immediately after the handshake. | TransactionStreamWelcome | | trade | A trade was decoded. status is confirmed, or pending for a mempool trade. | TransactionStreamTrade | | activity | A split, merge or redemption was decoded. | TransactionStreamActivity | | conversion | A NegRisk conversion was decoded. | TransactionStreamConversion | | retraction | A transaction was reorged out. | TransactionStreamRetraction | | heartbeat | A ping tick passed with nothing else to write. | TransactionStreamHeartbeat | | filter.updated | A filter command was applied. | TransactionStreamFilterUpdated | | filter.rejected | A filter command was refused and nothing changed. | TransactionStreamFilterRejected | | filter.snapshot | Reply to filter.list. | TransactionStreamFilterSnapshot | | error | A frame could not be handled. The socket stays open. | TransactionStreamError | | pong | Reply to {\u0026quot;action\u0026quot;: \u0026quot;ping\u0026quot;}. | TransactionStreamPong | A trade, activity or conversion frame is the decoded upstream row forwarded whole, with type and sequence added in front, so treat unrecognized fields as forward-compatible additions rather than errors. v is the upstream row schema version, currently 2. Money, size and price fields cross as decimal strings, and so do token ids: they are 256-bit, and a JSON number would silently lose precision. partial marks a row where the fields named in missing read as unknown rather than zero. welcome — once, immediately after the handshake: json { \u0026quot;type\u0026quot;: \u0026quot;welcome\u0026quot;, \u0026quot;server_time\u0026quot;: \u0026quot;2026-08-17T12:00:00.123456789Z\u0026quot;, \u0026quot;sequence\u0026quot;: 918473, \u0026quot;streams\u0026quot;: [\u0026quot;trades\u0026quot;, \u0026quot;activities\u0026quot;, \u0026quot;conversions\u0026quot;], \u0026quot;mempool\u0026quot;: false, \u0026quot;filters\u0026quot;: {\u0026quot;wallets\u0026quot;: 1, \u0026quot;condition_ids\u0026quot;: 0, \u0026quot;token_ids\u0026quot;: 0}, \u0026quot;limits\u0026quot;: {\u0026quot;max_wallets\u0026quot;: 25000, \u0026quot;max_markets\u0026quot;: 25000, \u0026quot;max_filter_batch\u0026quot;: 5000}, \u0026quot;source\u0026quot;: { \u0026quot;connected\u0026quot;: true, \u0026quot;last_message_at\u0026quot;: \u0026quot;2026-08-17T12:00:00.031000000Z\u0026quot;, \u0026quot;dropped_total\u0026quot;: 0 } } trade — a confirmed fill: json { \u0026quot;type\u0026quot;: \u0026quot;trade\u0026quot;, \u0026quot;sequence\u0026quot;: 918501, \u0026quot;v\u0026quot;: 2, \u0026quot;stream\u0026quot;: \u0026quot;trades\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;confirmed\u0026quot;, \u0026quot;block_number\u0026quot;: 91937590, \u0026quot;block_hash\u0026quot;: \u0026quot;0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\u0026quot;, \u0026quot;block_timestamp\u0026quot;: 1786924800, \u0026quot;tx_hash\u0026quot;: \u0026quot;0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\u0026quot;, \u0026quot;tx_row_index\u0026quot;: 1, \u0026quot;tx_row_count\u0026quot;: 3, \u0026quot;partial\u0026quot;: false, \u0026quot;missing\u0026quot;: [], \u0026quot;published_at\u0026quot;: 1786924801.312, \u0026quot;log_index\u0026quot;: 42, \u0026quot;order_hash\u0026quot;: \u0026quot;0x5e4d3c2b1a09f8e7d6c5b4a3928170615f4e3d2c1b0a9f8e7d6c5b4a39281706\u0026quot;, \u0026quot;order_hash_alt\u0026quot;: null, \u0026quot;user_address\u0026quot;: \u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;, \u0026quot;taker_address\u0026quot;: \u0026quot;0x9c1a5f3b2d8e4c6b7a0f9e8d7c6b5a4938271605\u0026quot;, \u0026quot;side\u0026quot;: \u0026quot;BUY\u0026quot;, \u0026quot;token_id\u0026quot;: \u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;, \u0026quot;canonical_token_id\u0026quot;: \u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;, \u0026quot;condition_id\u0026quot;: \u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;, \u0026quot;shares\u0026quot;: \u0026quot;20000\u0026quot;, \u0026quot;usdc_amount\u0026quot;: \u0026quot;9800.5\u0026quot;, \u0026quot;share_price\u0026quot;: \u0026quot;0.49\u0026quot;, \u0026quot;fee_amount\u0026quot;: \u0026quot;0\u0026quot;, \u0026quot;fee_refund_amount\u0026quot;: \u0026quot;0\u0026quot;, \u0026quot;trade_timestamp\u0026quot;: 1786924800, \u0026quot;contract_version\u0026quot;: 2, \u0026quot;is_taker_order\u0026quot;: true, \u0026quot;builder\u0026quot;: \u0026quot;0x0000000000000000000000000000000000000000000000000000000000000000\u0026quot;, \u0026quot;metadata\u0026quot;: \u0026quot;0x0000000000000000000000000000000000000000000000000000000000000000\u0026quot; } A pending mempool trade is the same frame with status: \u0026quot;pending\u0026quot;. It has no block yet, so block_number and log_index are 0, block_hash and block_timestamp are null, and canonical_token_id is null; order_hash_alt may carry the NegRisk candidate order hash, so match a pending trade against its confirmation on either hash. activity — a split, merge or redemption: json { \u0026quot;type\u0026quot;: \u0026quot;activity\u0026quot;, \u0026quot;sequence\u0026quot;: 918502, \u0026quot;v\u0026quot;: 2, \u0026quot;stream\u0026quot;: \u0026quot;activities\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;confirmed\u0026quot;, \u0026quot;block_number\u0026quot;: 91937590, \u0026quot;block_hash\u0026quot;: \u0026quot;0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\u0026quot;, \u0026quot;block_timestamp\u0026quot;: 1786924800, \u0026quot;tx_hash\u0026quot;: \u0026quot;0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\u0026quot;, \u0026quot;tx_row_index\u0026quot;: 2, \u0026quot;tx_row_count\u0026quot;: 3, \u0026quot;partial\u0026quot;: false, \u0026quot;missing\u0026quot;: [], \u0026quot;published_at\u0026quot;: 1786924801.312, \u0026quot;event_type\u0026quot;: \u0026quot;RedeemPosition\u0026quot;, \u0026quot;log_index\u0026quot;: 7, \u0026quot;user_address\u0026quot;: \u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;, \u0026quot;token_id\u0026quot;: \u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;, \u0026quot;canonical_token_id\u0026quot;: \u0026quot;34460519301295595556376203968565021162434252843477398085423120621766516073216\u0026quot;, \u0026quot;condition_id\u0026quot;: \u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;, \u0026quot;price\u0026quot;: \u0026quot;1\u0026quot;, \u0026quot;amount\u0026quot;: \u0026quot;20000\u0026quot;, \u0026quot;collateral_token\u0026quot;: \u0026quot;0x2791bca1f2de4661ed88a30c99a7a9449aa84174\u0026quot;, \u0026quot;parent_collection_id\u0026quot;: \u0026quot;0x0000000000000000000000000000000000000000000000000000000000000000\u0026quot;, \u0026quot;activity_timestamp\u0026quot;: 1786924800, \u0026quot;is_neg_ctf\u0026quot;: false, \u0026quot;contract_version\u0026quot;: 2, \u0026quot;auto_redeem\u0026quot;: false } conversion — a NegRisk conversion leg: json { \u0026quot;type\u0026quot;: \u0026quot;conversion\u0026quot;, \u0026quot;sequence\u0026quot;: 918503, \u0026quot;v\u0026quot;: 2, \u0026quot;stream\u0026quot;: \u0026quot;conversions\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;confirmed\u0026quot;, \u0026quot;block_number\u0026quot;: 91937590, \u0026quot;block_hash\u0026quot;: \u0026quot;0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\u0026quot;, \u0026quot;block_timestamp\u0026quot;: 1786924800, \u0026quot;tx_hash\u0026quot;: \u0026quot;0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\u0026quot;, \u0026quot;tx_row_index\u0026quot;: 3, \u0026quot;tx_row_count\u0026quot;: 3, \u0026quot;partial\u0026quot;: false, \u0026quot;missing\u0026quot;: [], \u0026quot;published_at\u0026quot;: 1786924801.312, \u0026quot;log_index\u0026quot;: 3, \u0026quot;user_address\u0026quot;: \u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;, \u0026quot;token_id\u0026quot;: \u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;, \u0026quot;canonical_token_id\u0026quot;: \u0026quot;34460519301295595556376203968565021162434252843477398085423120621766516073216\u0026quot;, \u0026quot;condition_id\u0026quot;: \u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;, \u0026quot;negrisk_market_id\u0026quot;: \u0026quot;0x0b8f7e6d5c4b3a29180706f5e4d3c2b1a0f9e8d7c6b5a4938271605f4e3d2c1b\u0026quot;, \u0026quot;amount\u0026quot;: \u0026quot;250\u0026quot;, \u0026quot;conversion_timestamp\u0026quot;: 1786924800, \u0026quot;contract_version\u0026quot;: 2 } retraction — the transaction was reorged out. It carries no row fields at all, so undo state by tx_hash and stream: json { \u0026quot;type\u0026quot;: \u0026quot;retraction\u0026quot;, \u0026quot;sequence\u0026quot;: 918504, \u0026quot;v\u0026quot;: 2, \u0026quot;stream\u0026quot;: \u0026quot;trades\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;retracted\u0026quot;, \u0026quot;tx_hash\u0026quot;: \u0026quot;0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\u0026quot;, \u0026quot;block_number\u0026quot;: 91937590, \u0026quot;block_hash\u0026quot;: \u0026quot;0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\u0026quot;, \u0026quot;published_at\u0026quot;: 1786924802.881 } heartbeat — nothing else was written on this tick: json { \u0026quot;type\u0026quot;: \u0026quot;heartbeat\u0026quot;, \u0026quot;server_time\u0026quot;: \u0026quot;2026-08-17T12:00:20.001002003Z\u0026quot;, \u0026quot;sequence\u0026quot;: 918504, \u0026quot;source\u0026quot;: { \u0026quot;connected\u0026quot;: true, \u0026quot;last_message_at\u0026quot;: \u0026quot;2026-08-17T12:00:19.900000000Z\u0026quot;, \u0026quot;dropped_total\u0026quot;: 12 } } filter.updated — the command was applied. added and removed are net count deltas, not the values applied, so a filter.set that swaps one wallet for another reports zero of each: json { \u0026quot;type\u0026quot;: \u0026quot;filter.updated\u0026quot;, \u0026quot;filters\u0026quot;: {\u0026quot;wallets\u0026quot;: 2, \u0026quot;condition_ids\u0026quot;: 0, \u0026quot;token_ids\u0026quot;: 1}, \u0026quot;added\u0026quot;: {\u0026quot;wallets\u0026quot;: 1, \u0026quot;condition_ids\u0026quot;: 0, \u0026quot;token_ids\u0026quot;: 1}, \u0026quot;removed\u0026quot;: {\u0026quot;wallets\u0026quot;: 0, \u0026quot;condition_ids\u0026quot;: 0, \u0026quot;token_ids\u0026quot;: 0} } filter.rejected — nothing was applied. A validation failure names every entry it refused; a cap failure carries only code and message: json { \u0026quot;type\u0026quot;: \u0026quot;filter.rejected\u0026quot;, \u0026quot;code\u0026quot;: \u0026quot;invalid_filter\u0026quot;, \u0026quot;message\u0026quot;: \u0026quot;no changes were applied\u0026quot;, \u0026quot;rejected\u0026quot;: [ {\u0026quot;value\u0026quot;: \u0026quot;polymarket-btc-up-or-down\u0026quot;, \u0026quot;reason\u0026quot;: \u0026quot;market slugs are not supported; use a condition id or CLOB token id\u0026quot;}, {\u0026quot;value\u0026quot;: \u0026quot;@trader\u0026quot;, \u0026quot;reason\u0026quot;: \u0026quot;usernames are not supported; use a 0x-prefixed 20-byte address\u0026quot;} ] } json { \u0026quot;type\u0026quot;: \u0026quot;filter.rejected\u0026quot;, \u0026quot;code\u0026quot;: \u0026quot;filter_limit_reached\u0026quot;, \u0026quot;message\u0026quot;: \u0026quot;txstream: filter limit reached: at most 25000 wallets\u0026quot; } filter.snapshot — the reply to filter.list. values is present only when the request set include_values: true, each list is capped at 1,000 entries, and truncated says whether any list was cut short: json { \u0026quot;type\u0026quot;: \u0026quot;filter.snapshot\u0026quot;, \u0026quot;sequence\u0026quot;: 918505, \u0026quot;filters\u0026quot;: {\u0026quot;wallets\u0026quot;: 1, \u0026quot;condition_ids\u0026quot;: 1, \u0026quot;token_ids\u0026quot;: 0}, \u0026quot;values\u0026quot;: { \u0026quot;wallets\u0026quot;: [\u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;], \u0026quot;condition_ids\u0026quot;: [\u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;], \u0026quot;token_ids\u0026quot;: [], \u0026quot;truncated\u0026quot;: false } } error — the frame could not be handled. Non-fatal: the socket stays open and the filters are untouched: json { \u0026quot;type\u0026quot;: \u0026quot;error\u0026quot;, \u0026quot;code\u0026quot;: \u0026quot;unsupported_message\u0026quot;, \u0026quot;message\u0026quot;: \u0026quot;action must be filter.add, filter.remove, filter.set, filter.clear, filter.list or ping\u0026quot; } pong — the reply to {\u0026quot;action\u0026quot;: \u0026quot;ping\u0026quot;}, and nothing more: json {\u0026quot;type\u0026quot;: \u0026quot;pong\u0026quot;}\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Gravia Data API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gravia.trade/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gravia-trade.mintlify.app/_mintlify/api/og/v2?division=Streams\u0026amp;title=WebSocket+stream+of+live+trades%2C+activities+and+conversions\u0026amp;description=A+WebSocket+channel%2C+not+a+request%2Fresponse+endpoint.+Connect%2C+and+the%0Aserver+pushes+rows+as+they+are+decoded+%E2%80%94+confirmed+on-chain+trades%2C%0Aactivities+and+conver\u0026amp;theme=8c421f2e72c1c7001e92ec31\u0026amp;signature=540e74f3972d339fef02c4fbd029698195311cce08ac940be0ce9e65ae98c083\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"WebSocket stream of live trades, activities and conversions - Gravia Data API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"A WebSocket channel, not a request/response endpoint. Connect, and the server pushes rows as they are decoded — confirmed on-chain trades, activities and conversions, plus unconfirmed mempool trades if you ask for them. wss://data.gravia.trade/api/v1/streams/transactions?streams=trades,activities,conversions\u0026amp;mempool=false The 101 below is the handshake and carries no HTTP body. Everything the server says afterwards is a WebSocket text frame holding one JSON object. Your WebSocket client performs the upgrade, so Upgrade, Connection and the Sec-WebSocket-* headers are never yours to set, and the query parameters are read once, at connect time. Browsers cannot set request headers on a handshake, so authenticate there with ?api_key= and with the Authorization header everywhere else. js const socket = new WebSocket( \u0026quot;wss://data.gravia.trade/api/v1/streams/transactions\u0026quot; + \u0026quot;?streams=trades\u0026amp;api_key=\u0026quot; + apiKey, ); socket.addEventListener(\u0026quot;message\u0026quot;, (frame) =\u0026gt; { const message = JSON.parse(frame.data); switch (message.type) { case \u0026quot;trade\u0026quot;: // status is \u0026quot;confirmed\u0026quot;, or \u0026quot;pending\u0026quot; for a mempool trade break; case \u0026quot;retraction\u0026quot;: // drop whatever you hold for message.tx_hash on message.stream break; } }); // Filters are managed in band, once the socket is open. socket.send(JSON.stringify({action: \u0026quot;filter.add\u0026quot;, wallets: [wallet]})); Concurrent connections are limited per API key. The service default is one, but a key may be assigned a different allowance. Exceeding it returns 429 with the stream_limit_reached code, which is distinct from ordinary rate limiting: close an existing stream rather than backing off. Fixed at connect. streams and mempool cannot be changed in band. wallet and market only seed the filters, which are then managed with the client messages below, so a caller holding thousands of selectors is not limited by URL length. Filters. Both sets are optional; omitting them streams everything. They are ANDed, and selectors within each are ORed. wallet matches the row subject (user_address) only — the counterparty of a fill appears as the subject of its own row, so matching taker_address as well would deliver the same fill several times. A filter change is not retroactive. Liveness. The server sends a protocol ping every 20 seconds, and a heartbeat frame on any tick where it wrote nothing else, so a quiet stream stays visibly alive to application code that cannot observe protocol pings. A connection that sends nothing at all for 60 seconds is closed; the automatic pong your client already sends is enough to hold it open. Delivery is at-most-once with no replay. sequence is a server-global ordinal, so a filtered client sees gaps by design; it is not a gap detector, and it is absent from a control frame sent before the server has decoded anything. source.dropped_total in each heartbeat counts rows the server discarded because it was behind, which is the only loss a client cannot otherwise detect. Read the REST endpoints when completeness matters. Retractions ignore the wallet and market filters, because a reorg retraction carries no rows and therefore no wallet or market; stream selection still applies. Ignore one for a tx_hash you hold no state for. Pending trades are never retracted, and a pending trade may never land — time out your own pending state. With mempool=true a landed trade is delivered twice, once pending and once confirmed; deduplicate on (tx_hash, order_hash). Close codes. 1008 with client is too slow means the server gave up writing to you and dropped the connection rather than waiting; reconnect with tighter filters or a faster reader. 1001 with server is shutting down is a deploy — reconnect. Anything that fails before the upgrade is ordinary HTTP, listed under Responses below. ### Client messages One JSON object per text frame, discriminated by action. Unknown keys are rejected, and every frame — ping included — is counted against a budget of 20 commands per second with a burst of 40. json {\u0026quot;action\u0026quot;: \u0026quot;filter.add\u0026quot;, \u0026quot;wallets\u0026quot;: [\u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;]} {\u0026quot;action\u0026quot;: \u0026quot;filter.remove\u0026quot;, \u0026quot;markets\u0026quot;: [\u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;]} {\u0026quot;action\u0026quot;: \u0026quot;filter.set\u0026quot;, \u0026quot;markets\u0026quot;: [\u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;]} {\u0026quot;action\u0026quot;: \u0026quot;filter.clear\u0026quot;, \u0026quot;target\u0026quot;: \u0026quot;wallets\u0026quot;} {\u0026quot;action\u0026quot;: \u0026quot;filter.list\u0026quot;, \u0026quot;include_values\u0026quot;: true} {\u0026quot;action\u0026quot;: \u0026quot;ping\u0026quot;} wallets entries are 0x-prefixed 20-byte addresses; usernames are rejected. markets entries are classified by shape: 0x followed by 64 hex is a condition id, a decimal string is a CLOB token id. Market slugs and category: selectors are not accepted here. target is wallets, markets or all, and defaults to all. A batch applies atomically: one malformed entry rejects the whole message and leaves the filter set untouched. At most 5,000 entries per message; welcome reports the standing caps in limits. ### Server messages Every frame carries a type, and type is the only field to dispatch on. | type | Sent when | Structure | | --- | --- | --- | | welcome | Once, immediately after the handshake. | TransactionStreamWelcome | | trade | A trade was decoded. status is confirmed, or pending for a mempool trade. | TransactionStreamTrade | | activity | A split, merge or redemption was decoded. | TransactionStreamActivity | | conversion | A NegRisk conversion was decoded. | TransactionStreamConversion | | retraction | A transaction was reorged out. | TransactionStreamRetraction | | heartbeat | A ping tick passed with nothing else to write. | TransactionStreamHeartbeat | | filter.updated | A filter command was applied. | TransactionStreamFilterUpdated | | filter.rejected | A filter command was refused and nothing changed. | TransactionStreamFilterRejected | | filter.snapshot | Reply to filter.list. | TransactionStreamFilterSnapshot | | error | A frame could not be handled. The socket stays open. | TransactionStreamError | | pong | Reply to {\u0026quot;action\u0026quot;: \u0026quot;ping\u0026quot;}. | TransactionStreamPong | A trade, activity or conversion frame is the decoded upstream row forwarded whole, with type and sequence added in front, so treat unrecognized fields as forward-compatible additions rather than errors. v is the upstream row schema version, currently 2. Money, size and price fields cross as decimal strings, and so do token ids: they are 256-bit, and a JSON number would silently lose precision. partial marks a row where the fields named in missing read as unknown rather than zero. welcome — once, immediately after the handshake: json { \u0026quot;type\u0026quot;: \u0026quot;welcome\u0026quot;, \u0026quot;server_time\u0026quot;: \u0026quot;2026-08-17T12:00:00.123456789Z\u0026quot;, \u0026quot;sequence\u0026quot;: 918473, \u0026quot;streams\u0026quot;: [\u0026quot;trades\u0026quot;, \u0026quot;activities\u0026quot;, \u0026quot;conversions\u0026quot;], \u0026quot;mempool\u0026quot;: false, \u0026quot;filters\u0026quot;: {\u0026quot;wallets\u0026quot;: 1, \u0026quot;condition_ids\u0026quot;: 0, \u0026quot;token_ids\u0026quot;: 0}, \u0026quot;limits\u0026quot;: {\u0026quot;max_wallets\u0026quot;: 25000, \u0026quot;max_markets\u0026quot;: 25000, \u0026quot;max_filter_batch\u0026quot;: 5000}, \u0026quot;source\u0026quot;: { \u0026quot;connected\u0026quot;: true, \u0026quot;last_message_at\u0026quot;: \u0026quot;2026-08-17T12:00:00.031000000Z\u0026quot;, \u0026quot;dropped_total\u0026quot;: 0 } } trade — a confirmed fill: json { \u0026quot;type\u0026quot;: \u0026quot;trade\u0026quot;, \u0026quot;sequence\u0026quot;: 918501, \u0026quot;v\u0026quot;: 2, \u0026quot;stream\u0026quot;: \u0026quot;trades\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;confirmed\u0026quot;, \u0026quot;block_number\u0026quot;: 91937590, \u0026quot;block_hash\u0026quot;: \u0026quot;0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\u0026quot;, \u0026quot;block_timestamp\u0026quot;: 1786924800, \u0026quot;tx_hash\u0026quot;: \u0026quot;0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\u0026quot;, \u0026quot;tx_row_index\u0026quot;: 1, \u0026quot;tx_row_count\u0026quot;: 3, \u0026quot;partial\u0026quot;: false, \u0026quot;missing\u0026quot;: [], \u0026quot;published_at\u0026quot;: 1786924801.312, \u0026quot;log_index\u0026quot;: 42, \u0026quot;order_hash\u0026quot;: \u0026quot;0x5e4d3c2b1a09f8e7d6c5b4a3928170615f4e3d2c1b0a9f8e7d6c5b4a39281706\u0026quot;, \u0026quot;order_hash_alt\u0026quot;: null, \u0026quot;user_address\u0026quot;: \u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;, \u0026quot;taker_address\u0026quot;: \u0026quot;0x9c1a5f3b2d8e4c6b7a0f9e8d7c6b5a4938271605\u0026quot;, \u0026quot;side\u0026quot;: \u0026quot;BUY\u0026quot;, \u0026quot;token_id\u0026quot;: \u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;, \u0026quot;canonical_token_id\u0026quot;: \u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;, \u0026quot;condition_id\u0026quot;: \u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;, \u0026quot;shares\u0026quot;: \u0026quot;20000\u0026quot;, \u0026quot;usdc_amount\u0026quot;: \u0026quot;9800.5\u0026quot;, \u0026quot;share_price\u0026quot;: \u0026quot;0.49\u0026quot;, \u0026quot;fee_amount\u0026quot;: \u0026quot;0\u0026quot;, \u0026quot;fee_refund_amount\u0026quot;: \u0026quot;0\u0026quot;, \u0026quot;trade_timestamp\u0026quot;: 1786924800, \u0026quot;contract_version\u0026quot;: 2, \u0026quot;is_taker_order\u0026quot;: true, \u0026quot;builder\u0026quot;: \u0026quot;0x0000000000000000000000000000000000000000000000000000000000000000\u0026quot;, \u0026quot;metadata\u0026quot;: \u0026quot;0x0000000000000000000000000000000000000000000000000000000000000000\u0026quot; } A pending mempool trade is the same frame with status: \u0026quot;pending\u0026quot;. It has no block yet, so block_number and log_index are 0, block_hash and block_timestamp are null, and canonical_token_id is null; order_hash_alt may carry the NegRisk candidate order hash, so match a pending trade against its confirmation on either hash. activity — a split, merge or redemption: json { \u0026quot;type\u0026quot;: \u0026quot;activity\u0026quot;, \u0026quot;sequence\u0026quot;: 918502, \u0026quot;v\u0026quot;: 2, \u0026quot;stream\u0026quot;: \u0026quot;activities\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;confirmed\u0026quot;, \u0026quot;block_number\u0026quot;: 91937590, \u0026quot;block_hash\u0026quot;: \u0026quot;0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\u0026quot;, \u0026quot;block_timestamp\u0026quot;: 1786924800, \u0026quot;tx_hash\u0026quot;: \u0026quot;0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\u0026quot;, \u0026quot;tx_row_index\u0026quot;: 2, \u0026quot;tx_row_count\u0026quot;: 3, \u0026quot;partial\u0026quot;: false, \u0026quot;missing\u0026quot;: [], \u0026quot;published_at\u0026quot;: 1786924801.312, \u0026quot;event_type\u0026quot;: \u0026quot;RedeemPosition\u0026quot;, \u0026quot;log_index\u0026quot;: 7, \u0026quot;user_address\u0026quot;: \u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;, \u0026quot;token_id\u0026quot;: \u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;, \u0026quot;canonical_token_id\u0026quot;: \u0026quot;34460519301295595556376203968565021162434252843477398085423120621766516073216\u0026quot;, \u0026quot;condition_id\u0026quot;: \u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;, \u0026quot;price\u0026quot;: \u0026quot;1\u0026quot;, \u0026quot;amount\u0026quot;: \u0026quot;20000\u0026quot;, \u0026quot;collateral_token\u0026quot;: \u0026quot;0x2791bca1f2de4661ed88a30c99a7a9449aa84174\u0026quot;, \u0026quot;parent_collection_id\u0026quot;: \u0026quot;0x0000000000000000000000000000000000000000000000000000000000000000\u0026quot;, \u0026quot;activity_timestamp\u0026quot;: 1786924800, \u0026quot;is_neg_ctf\u0026quot;: false, \u0026quot;contract_version\u0026quot;: 2, \u0026quot;auto_redeem\u0026quot;: false } conversion — a NegRisk conversion leg: json { \u0026quot;type\u0026quot;: \u0026quot;conversion\u0026quot;, \u0026quot;sequence\u0026quot;: 918503, \u0026quot;v\u0026quot;: 2, \u0026quot;stream\u0026quot;: \u0026quot;conversions\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;confirmed\u0026quot;, \u0026quot;block_number\u0026quot;: 91937590, \u0026quot;block_hash\u0026quot;: \u0026quot;0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\u0026quot;, \u0026quot;block_timestamp\u0026quot;: 1786924800, \u0026quot;tx_hash\u0026quot;: \u0026quot;0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\u0026quot;, \u0026quot;tx_row_index\u0026quot;: 3, \u0026quot;tx_row_count\u0026quot;: 3, \u0026quot;partial\u0026quot;: false, \u0026quot;missing\u0026quot;: [], \u0026quot;published_at\u0026quot;: 1786924801.312, \u0026quot;log_index\u0026quot;: 3, \u0026quot;user_address\u0026quot;: \u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;, \u0026quot;token_id\u0026quot;: \u0026quot;67568438763601610729831023256910933987242052537121118642143709840881218761985\u0026quot;, \u0026quot;canonical_token_id\u0026quot;: \u0026quot;34460519301295595556376203968565021162434252843477398085423120621766516073216\u0026quot;, \u0026quot;condition_id\u0026quot;: \u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;, \u0026quot;negrisk_market_id\u0026quot;: \u0026quot;0x0b8f7e6d5c4b3a29180706f5e4d3c2b1a0f9e8d7c6b5a4938271605f4e3d2c1b\u0026quot;, \u0026quot;amount\u0026quot;: \u0026quot;250\u0026quot;, \u0026quot;conversion_timestamp\u0026quot;: 1786924800, \u0026quot;contract_version\u0026quot;: 2 } retraction — the transaction was reorged out. It carries no row fields at all, so undo state by tx_hash and stream: json { \u0026quot;type\u0026quot;: \u0026quot;retraction\u0026quot;, \u0026quot;sequence\u0026quot;: 918504, \u0026quot;v\u0026quot;: 2, \u0026quot;stream\u0026quot;: \u0026quot;trades\u0026quot;, \u0026quot;status\u0026quot;: \u0026quot;retracted\u0026quot;, \u0026quot;tx_hash\u0026quot;: \u0026quot;0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\u0026quot;, \u0026quot;block_number\u0026quot;: 91937590, \u0026quot;block_hash\u0026quot;: \u0026quot;0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\u0026quot;, \u0026quot;published_at\u0026quot;: 1786924802.881 } heartbeat — nothing else was written on this tick: json { \u0026quot;type\u0026quot;: \u0026quot;heartbeat\u0026quot;, \u0026quot;server_time\u0026quot;: \u0026quot;2026-08-17T12:00:20.001002003Z\u0026quot;, \u0026quot;sequence\u0026quot;: 918504, \u0026quot;source\u0026quot;: { \u0026quot;connected\u0026quot;: true, \u0026quot;last_message_at\u0026quot;: \u0026quot;2026-08-17T12:00:19.900000000Z\u0026quot;, \u0026quot;dropped_total\u0026quot;: 12 } } filter.updated — the command was applied. added and removed are net count deltas, not the values applied, so a filter.set that swaps one wallet for another reports zero of each: json { \u0026quot;type\u0026quot;: \u0026quot;filter.updated\u0026quot;, \u0026quot;filters\u0026quot;: {\u0026quot;wallets\u0026quot;: 2, \u0026quot;condition_ids\u0026quot;: 0, \u0026quot;token_ids\u0026quot;: 1}, \u0026quot;added\u0026quot;: {\u0026quot;wallets\u0026quot;: 1, \u0026quot;condition_ids\u0026quot;: 0, \u0026quot;token_ids\u0026quot;: 1}, \u0026quot;removed\u0026quot;: {\u0026quot;wallets\u0026quot;: 0, \u0026quot;condition_ids\u0026quot;: 0, \u0026quot;token_ids\u0026quot;: 0} } filter.rejected — nothing was applied. A validation failure names every entry it refused; a cap failure carries only code and message: json { \u0026quot;type\u0026quot;: \u0026quot;filter.rejected\u0026quot;, \u0026quot;code\u0026quot;: \u0026quot;invalid_filter\u0026quot;, \u0026quot;message\u0026quot;: \u0026quot;no changes were applied\u0026quot;, \u0026quot;rejected\u0026quot;: [ {\u0026quot;value\u0026quot;: \u0026quot;polymarket-btc-up-or-down\u0026quot;, \u0026quot;reason\u0026quot;: \u0026quot;market slugs are not supported; use a condition id or CLOB token id\u0026quot;}, {\u0026quot;value\u0026quot;: \u0026quot;@trader\u0026quot;, \u0026quot;reason\u0026quot;: \u0026quot;usernames are not supported; use a 0x-prefixed 20-byte address\u0026quot;} ] } json { \u0026quot;type\u0026quot;: \u0026quot;filter.rejected\u0026quot;, \u0026quot;code\u0026quot;: \u0026quot;filter_limit_reached\u0026quot;, \u0026quot;message\u0026quot;: \u0026quot;txstream: filter limit reached: at most 25000 wallets\u0026quot; } filter.snapshot — the reply to filter.list. values is present only when the request set include_values: true, each list is capped at 1,000 entries, and truncated says whether any list was cut short: json { \u0026quot;type\u0026quot;: \u0026quot;filter.snapshot\u0026quot;, \u0026quot;sequence\u0026quot;: 918505, \u0026quot;filters\u0026quot;: {\u0026quot;wallets\u0026quot;: 1, \u0026quot;condition_ids\u0026quot;: 1, \u0026quot;token_ids\u0026quot;: 0}, \u0026quot;values\u0026quot;: { \u0026quot;wallets\u0026quot;: [\u0026quot;0x674887d1ac838099a48b629dff53f25b7b87ee08\u0026quot;], \u0026quot;condition_ids\u0026quot;: [\u0026quot;0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\u0026quot;], \u0026quot;token_ids\u0026quot;: [], \u0026quot;truncated\u0026quot;: false } } error — the frame could not be handled. Non-fatal: the socket stays open and the filters are untouched: json { \u0026quot;type\u0026quot;: \u0026quot;error\u0026quot;, \u0026quot;code\u0026quot;: \u0026quot;unsupported_message\u0026quot;, \u0026quot;message\u0026quot;: \u0026quot;action must be filter.add, filter.remove, filter.set, filter.clear, filter.list or ping\u0026quot; } pong — the reply to {\u0026quot;action\u0026quot;: \u0026quot;ping\u0026quot;}, and nothing more: json {\u0026quot;type\u0026quot;: \u0026quot;pong\u0026quot;}\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gravia-trade.mintlify.app/_mintlify/api/og/v2?division=Streams\u0026amp;title=WebSocket+stream+of+live+trades%2C+activities+and+conversions\u0026amp;description=A+WebSocket+channel%2C+not+a+request%2Fresponse+endpoint.+Connect%2C+and+the%0Aserver+pushes+rows+as+they+are+decoded+%E2%80%94+confirmed+on-chain+trades%2C%0Aactivities+and+conver\u0026amp;theme=8c421f2e72c1c7001e92ec31\u0026amp;signature=540e74f3972d339fef02c4fbd029698195311cce08ac940be0ce9e65ae98c083\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/gravia-trade/UCUg-2SVPMUpHKiA/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Gravia Data API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9FFBFE\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gravia.trade/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.gravia.trade/#organization\",\"name\":\"Gravia Data API\",\"url\":\"https://docs.gravia.trade\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gravia-trade/q65mj9SyvyR5CJGQ/images/Gravia-black-logo.svg?fit=max\u0026auto=format\u0026n=q65mj9SyvyR5CJGQ\u0026q=85\u0026s=d20027ef4daf7f22158c1c43c271a664\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gravia.trade#website\",\"name\":\"Gravia Data API\",\"url\":\"https://docs.gravia.trade\",\"publisher\":{\"@id\":\"https://docs.gravia.trade/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gravia.trade/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions#webpage\",\"url\":\"https://docs.gravia.trade/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions\",\"name\":\"WebSocket stream of live trades, activities and conversions\",\"description\":\"A WebSocket channel, not a request/response endpoint. Connect, and the server pushes rows as they are decoded — confirmed on-chain trades, activities and conversions, plus unconfirmed mempool trades if you ask for them. wss://data.gravia.trade/api/v1/streams/transactions?streams=trades,activities,conversions\u0026mempool=false The 101 below is the handshake and carries no HTTP body. Everything the server says afterwards is a WebSocket text frame holding one JSON object. Your WebSocket client performs the upgrade, so Upgrade, Connection and the Sec-WebSocket-* headers are never yours to set, and the query parameters are read once, at connect time. Browsers cannot set request headers on a handshake, so authenticate there with ?api_key= and with the Authorization header everywhere else. js const socket = new WebSocket( \\\"wss://data.gravia.trade/api/v1/streams/transactions\\\" + \\\"?streams=trades\u0026api_key=\\\" + apiKey, ); socket.addEventListener(\\\"message\\\", (frame) => { const message = JSON.parse(frame.data); switch (message.type) { case \\\"trade\\\": // status is \\\"confirmed\\\", or \\\"pending\\\" for a mempool trade break; case \\\"retraction\\\": // drop whatever you hold for message.tx_hash on message.stream break; } }); // Filters are managed in band, once the socket is open. socket.send(JSON.stringify({action: \\\"filter.add\\\", wallets: [wallet]})); Concurrent connections are limited per API key. The service default is one, but a key may be assigned a different allowance. Exceeding it returns 429 with the stream_limit_reached code, which is distinct from ordinary rate limiting: close an existing stream rather than backing off. Fixed at connect. streams and mempool cannot be changed in band. wallet and market only seed the filters, which are then managed with the client messages below, so a caller holding thousands of selectors is not limited by URL length. Filters. Both sets are optional; omitting them streams everything. They are ANDed, and selectors within each are ORed. wallet matches the row subject (user_address) only — the counterparty of a fill appears as the subject of its own row, so matching taker_address as well would deliver the same fill several times. A filter change is not retroactive. Liveness. The server sends a protocol ping every 20 seconds, and a heartbeat frame on any tick where it wrote nothing else, so a quiet stream stays visibly alive to application code that cannot observe protocol pings. A connection that sends nothing at all for 60 seconds is closed; the automatic pong your client already sends is enough to hold it open. Delivery is at-most-once with no replay. sequence is a server-global ordinal, so a filtered client sees gaps by design; it is not a gap detector, and it is absent from a control frame sent before the server has decoded anything. source.dropped_total in each heartbeat counts rows the server discarded because it was behind, which is the only loss a client cannot otherwise detect. Read the REST endpoints when completeness matters. Retractions ignore the wallet and market filters, because a reorg retraction carries no rows and therefore no wallet or market; stream selection still applies. Ignore one for a tx_hash you hold no state for. Pending trades are never retracted, and a pending trade may never land — time out your own pending state. With mempool=true a landed trade is delivered twice, once pending and once confirmed; deduplicate on (tx_hash, order_hash). Close codes. 1008 with client is too slow means the server gave up writing to you and dropped the connection rather than waiting; reconnect with tighter filters or a faster reader. 1001 with server is shutting down is a deploy — reconnect. Anything that fails before the upgrade is ordinary HTTP, listed under Responses below. ### Client messages One JSON object per text frame, discriminated by action. Unknown keys are rejected, and every frame — ping included — is counted against a budget of 20 commands per second with a burst of 40. json {\\\"action\\\": \\\"filter.add\\\", \\\"wallets\\\": [\\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\"]} {\\\"action\\\": \\\"filter.remove\\\", \\\"markets\\\": [\\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\"]} {\\\"action\\\": \\\"filter.set\\\", \\\"markets\\\": [\\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\"]} {\\\"action\\\": \\\"filter.clear\\\", \\\"target\\\": \\\"wallets\\\"} {\\\"action\\\": \\\"filter.list\\\", \\\"include_values\\\": true} {\\\"action\\\": \\\"ping\\\"} wallets entries are 0x-prefixed 20-byte addresses; usernames are rejected. markets entries are classified by shape: 0x followed by 64 hex is a condition id, a decimal string is a CLOB token id. Market slugs and category: selectors are not accepted here. target is wallets, markets or all, and defaults to all. A batch applies atomically: one malformed entry rejects the whole message and leaves the filter set untouched. At most 5,000 entries per message; welcome reports the standing caps in limits. ### Server messages Every frame carries a type, and type is the only field to dispatch on. | type | Sent when | Structure | | --- | --- | --- | | welcome | Once, immediately after the handshake. | TransactionStreamWelcome | | trade | A trade was decoded. status is confirmed, or pending for a mempool trade. | TransactionStreamTrade | | activity | A split, merge or redemption was decoded. | TransactionStreamActivity | | conversion | A NegRisk conversion was decoded. | TransactionStreamConversion | | retraction | A transaction was reorged out. | TransactionStreamRetraction | | heartbeat | A ping tick passed with nothing else to write. | TransactionStreamHeartbeat | | filter.updated | A filter command was applied. | TransactionStreamFilterUpdated | | filter.rejected | A filter command was refused and nothing changed. | TransactionStreamFilterRejected | | filter.snapshot | Reply to filter.list. | TransactionStreamFilterSnapshot | | error | A frame could not be handled. The socket stays open. | TransactionStreamError | | pong | Reply to {\\\"action\\\": \\\"ping\\\"}. | TransactionStreamPong | A trade, activity or conversion frame is the decoded upstream row forwarded whole, with type and sequence added in front, so treat unrecognized fields as forward-compatible additions rather than errors. v is the upstream row schema version, currently 2. Money, size and price fields cross as decimal strings, and so do token ids: they are 256-bit, and a JSON number would silently lose precision. partial marks a row where the fields named in missing read as unknown rather than zero. welcome — once, immediately after the handshake: json { \\\"type\\\": \\\"welcome\\\", \\\"server_time\\\": \\\"2026-08-17T12:00:00.123456789Z\\\", \\\"sequence\\\": 918473, \\\"streams\\\": [\\\"trades\\\", \\\"activities\\\", \\\"conversions\\\"], \\\"mempool\\\": false, \\\"filters\\\": {\\\"wallets\\\": 1, \\\"condition_ids\\\": 0, \\\"token_ids\\\": 0}, \\\"limits\\\": {\\\"max_wallets\\\": 25000, \\\"max_markets\\\": 25000, \\\"max_filter_batch\\\": 5000}, \\\"source\\\": { \\\"connected\\\": true, \\\"last_message_at\\\": \\\"2026-08-17T12:00:00.031000000Z\\\", \\\"dropped_total\\\": 0 } } trade — a confirmed fill: json { \\\"type\\\": \\\"trade\\\", \\\"sequence\\\": 918501, \\\"v\\\": 2, \\\"stream\\\": \\\"trades\\\", \\\"status\\\": \\\"confirmed\\\", \\\"block_number\\\": 91937590, \\\"block_hash\\\": \\\"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\\\", \\\"block_timestamp\\\": 1786924800, \\\"tx_hash\\\": \\\"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\\\", \\\"tx_row_index\\\": 1, \\\"tx_row_count\\\": 3, \\\"partial\\\": false, \\\"missing\\\": [], \\\"published_at\\\": 1786924801.312, \\\"log_index\\\": 42, \\\"order_hash\\\": \\\"0x5e4d3c2b1a09f8e7d6c5b4a3928170615f4e3d2c1b0a9f8e7d6c5b4a39281706\\\", \\\"order_hash_alt\\\": null, \\\"user_address\\\": \\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\", \\\"taker_address\\\": \\\"0x9c1a5f3b2d8e4c6b7a0f9e8d7c6b5a4938271605\\\", \\\"side\\\": \\\"BUY\\\", \\\"token_id\\\": \\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\", \\\"canonical_token_id\\\": \\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\", \\\"condition_id\\\": \\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\", \\\"shares\\\": \\\"20000\\\", \\\"usdc_amount\\\": \\\"9800.5\\\", \\\"share_price\\\": \\\"0.49\\\", \\\"fee_amount\\\": \\\"0\\\", \\\"fee_refund_amount\\\": \\\"0\\\", \\\"trade_timestamp\\\": 1786924800, \\\"contract_version\\\": 2, \\\"is_taker_order\\\": true, \\\"builder\\\": \\\"0x0000000000000000000000000000000000000000000000000000000000000000\\\", \\\"metadata\\\": \\\"0x0000000000000000000000000000000000000000000000000000000000000000\\\" } A pending mempool trade is the same frame with status: \\\"pending\\\". It has no block yet, so block_number and log_index are 0, block_hash and block_timestamp are null, and canonical_token_id is null; order_hash_alt may carry the NegRisk candidate order hash, so match a pending trade against its confirmation on either hash. activity — a split, merge or redemption: json { \\\"type\\\": \\\"activity\\\", \\\"sequence\\\": 918502, \\\"v\\\": 2, \\\"stream\\\": \\\"activities\\\", \\\"status\\\": \\\"confirmed\\\", \\\"block_number\\\": 91937590, \\\"block_hash\\\": \\\"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\\\", \\\"block_timestamp\\\": 1786924800, \\\"tx_hash\\\": \\\"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\\\", \\\"tx_row_index\\\": 2, \\\"tx_row_count\\\": 3, \\\"partial\\\": false, \\\"missing\\\": [], \\\"published_at\\\": 1786924801.312, \\\"event_type\\\": \\\"RedeemPosition\\\", \\\"log_index\\\": 7, \\\"user_address\\\": \\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\", \\\"token_id\\\": \\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\", \\\"canonical_token_id\\\": \\\"34460519301295595556376203968565021162434252843477398085423120621766516073216\\\", \\\"condition_id\\\": \\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\", \\\"price\\\": \\\"1\\\", \\\"amount\\\": \\\"20000\\\", \\\"collateral_token\\\": \\\"0x2791bca1f2de4661ed88a30c99a7a9449aa84174\\\", \\\"parent_collection_id\\\": \\\"0x0000000000000000000000000000000000000000000000000000000000000000\\\", \\\"activity_timestamp\\\": 1786924800, \\\"is_neg_ctf\\\": false, \\\"contract_version\\\": 2, \\\"auto_redeem\\\": false } conversion — a NegRisk conversion leg: json { \\\"type\\\": \\\"conversion\\\", \\\"sequence\\\": 918503, \\\"v\\\": 2, \\\"stream\\\": \\\"conversions\\\", \\\"status\\\": \\\"confirmed\\\", \\\"block_number\\\": 91937590, \\\"block_hash\\\": \\\"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\\\", \\\"block_timestamp\\\": 1786924800, \\\"tx_hash\\\": \\\"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\\\", \\\"tx_row_index\\\": 3, \\\"tx_row_count\\\": 3, \\\"partial\\\": false, \\\"missing\\\": [], \\\"published_at\\\": 1786924801.312, \\\"log_index\\\": 3, \\\"user_address\\\": \\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\", \\\"token_id\\\": \\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\", \\\"canonical_token_id\\\": \\\"34460519301295595556376203968565021162434252843477398085423120621766516073216\\\", \\\"condition_id\\\": \\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\", \\\"negrisk_market_id\\\": \\\"0x0b8f7e6d5c4b3a29180706f5e4d3c2b1a0f9e8d7c6b5a4938271605f4e3d2c1b\\\", \\\"amount\\\": \\\"250\\\", \\\"conversion_timestamp\\\": 1786924800, \\\"contract_version\\\": 2 } retraction — the transaction was reorged out. It carries no row fields at all, so undo state by tx_hash and stream: json { \\\"type\\\": \\\"retraction\\\", \\\"sequence\\\": 918504, \\\"v\\\": 2, \\\"stream\\\": \\\"trades\\\", \\\"status\\\": \\\"retracted\\\", \\\"tx_hash\\\": \\\"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\\\", \\\"block_number\\\": 91937590, \\\"block_hash\\\": \\\"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\\\", \\\"published_at\\\": 1786924802.881 } heartbeat — nothing else was written on this tick: json { \\\"type\\\": \\\"heartbeat\\\", \\\"server_time\\\": \\\"2026-08-17T12:00:20.001002003Z\\\", \\\"sequence\\\": 918504, \\\"source\\\": { \\\"connected\\\": true, \\\"last_message_at\\\": \\\"2026-08-17T12:00:19.900000000Z\\\", \\\"dropped_total\\\": 12 } } filter.updated — the command was applied. added and removed are net count deltas, not the values applied, so a filter.set that swaps one wallet for another reports zero of each: json { \\\"type\\\": \\\"filter.updated\\\", \\\"filters\\\": {\\\"wallets\\\": 2, \\\"condition_ids\\\": 0, \\\"token_ids\\\": 1}, \\\"added\\\": {\\\"wallets\\\": 1, \\\"condition_ids\\\": 0, \\\"token_ids\\\": 1}, \\\"removed\\\": {\\\"wallets\\\": 0, \\\"condition_ids\\\": 0, \\\"token_ids\\\": 0} } filter.rejected — nothing was applied. A validation failure names every entry it refused; a cap failure carries only code and message: json { \\\"type\\\": \\\"filter.rejected\\\", \\\"code\\\": \\\"invalid_filter\\\", \\\"message\\\": \\\"no changes were applied\\\", \\\"rejected\\\": [ {\\\"value\\\": \\\"polymarket-btc-up-or-down\\\", \\\"reason\\\": \\\"market slugs are not supported; use a condition id or CLOB token id\\\"}, {\\\"value\\\": \\\"@trader\\\", \\\"reason\\\": \\\"usernames are not supported; use a 0x-prefixed 20-byte address\\\"} ] } json { \\\"type\\\": \\\"filter.rejected\\\", \\\"code\\\": \\\"filter_limit_reached\\\", \\\"message\\\": \\\"txstream: filter limit reached: at most 25000 wallets\\\" } filter.snapshot — the reply to filter.list. values is present only when the request set include_values: true, each list is capped at 1,000 entries, and truncated says whether any list was cut short: json { \\\"type\\\": \\\"filter.snapshot\\\", \\\"sequence\\\": 918505, \\\"filters\\\": {\\\"wallets\\\": 1, \\\"condition_ids\\\": 1, \\\"token_ids\\\": 0}, \\\"values\\\": { \\\"wallets\\\": [\\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\"], \\\"condition_ids\\\": [\\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\"], \\\"token_ids\\\": [], \\\"truncated\\\": false } } error — the frame could not be handled. Non-fatal: the socket stays open and the filters are untouched: json { \\\"type\\\": \\\"error\\\", \\\"code\\\": \\\"unsupported_message\\\", \\\"message\\\": \\\"action must be filter.add, filter.remove, filter.set, filter.clear, filter.list or ping\\\" } pong — the reply to {\\\"action\\\": \\\"ping\\\"}, and nothing more: json {\\\"type\\\": \\\"pong\\\"}\",\"dateModified\":\"2026-09-27T11:39:29.578Z\",\"isPartOf\":{\"@id\":\"https://docs.gravia.trade#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gravia.trade/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gravia.trade/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Streams\",\"item\":\"https://docs.gravia.trade/api-reference/streams/websocket-stream-of-chainlink-crypto-prices\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WebSocket stream of live trades, activities and conversions\",\"item\":\"https://docs.gravia.trade/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.gravia.trade/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions#apireference\",\"headline\":\"WebSocket stream of live trades, activities and conversions\",\"name\":\"WebSocket stream of live trades, activities and conversions\",\"description\":\"A WebSocket channel, not a request/response endpoint. Connect, and the server pushes rows as they are decoded — confirmed on-chain trades, activities and conversions, plus unconfirmed mempool trades if you ask for them. wss://data.gravia.trade/api/v1/streams/transactions?streams=trades,activities,conversions\u0026mempool=false The 101 below is the handshake and carries no HTTP body. Everything the server says afterwards is a WebSocket text frame holding one JSON object. Your WebSocket client performs the upgrade, so Upgrade, Connection and the Sec-WebSocket-* headers are never yours to set, and the query parameters are read once, at connect time. Browsers cannot set request headers on a handshake, so authenticate there with ?api_key= and with the Authorization header everywhere else. js const socket = new WebSocket( \\\"wss://data.gravia.trade/api/v1/streams/transactions\\\" + \\\"?streams=trades\u0026api_key=\\\" + apiKey, ); socket.addEventListener(\\\"message\\\", (frame) => { const message = JSON.parse(frame.data); switch (message.type) { case \\\"trade\\\": // status is \\\"confirmed\\\", or \\\"pending\\\" for a mempool trade break; case \\\"retraction\\\": // drop whatever you hold for message.tx_hash on message.stream break; } }); // Filters are managed in band, once the socket is open. socket.send(JSON.stringify({action: \\\"filter.add\\\", wallets: [wallet]})); Concurrent connections are limited per API key. The service default is one, but a key may be assigned a different allowance. Exceeding it returns 429 with the stream_limit_reached code, which is distinct from ordinary rate limiting: close an existing stream rather than backing off. Fixed at connect. streams and mempool cannot be changed in band. wallet and market only seed the filters, which are then managed with the client messages below, so a caller holding thousands of selectors is not limited by URL length. Filters. Both sets are optional; omitting them streams everything. They are ANDed, and selectors within each are ORed. wallet matches the row subject (user_address) only — the counterparty of a fill appears as the subject of its own row, so matching taker_address as well would deliver the same fill several times. A filter change is not retroactive. Liveness. The server sends a protocol ping every 20 seconds, and a heartbeat frame on any tick where it wrote nothing else, so a quiet stream stays visibly alive to application code that cannot observe protocol pings. A connection that sends nothing at all for 60 seconds is closed; the automatic pong your client already sends is enough to hold it open. Delivery is at-most-once with no replay. sequence is a server-global ordinal, so a filtered client sees gaps by design; it is not a gap detector, and it is absent from a control frame sent before the server has decoded anything. source.dropped_total in each heartbeat counts rows the server discarded because it was behind, which is the only loss a client cannot otherwise detect. Read the REST endpoints when completeness matters. Retractions ignore the wallet and market filters, because a reorg retraction carries no rows and therefore no wallet or market; stream selection still applies. Ignore one for a tx_hash you hold no state for. Pending trades are never retracted, and a pending trade may never land — time out your own pending state. With mempool=true a landed trade is delivered twice, once pending and once confirmed; deduplicate on (tx_hash, order_hash). Close codes. 1008 with client is too slow means the server gave up writing to you and dropped the connection rather than waiting; reconnect with tighter filters or a faster reader. 1001 with server is shutting down is a deploy — reconnect. Anything that fails before the upgrade is ordinary HTTP, listed under Responses below. ### Client messages One JSON object per text frame, discriminated by action. Unknown keys are rejected, and every frame — ping included — is counted against a budget of 20 commands per second with a burst of 40. json {\\\"action\\\": \\\"filter.add\\\", \\\"wallets\\\": [\\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\"]} {\\\"action\\\": \\\"filter.remove\\\", \\\"markets\\\": [\\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\"]} {\\\"action\\\": \\\"filter.set\\\", \\\"markets\\\": [\\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\"]} {\\\"action\\\": \\\"filter.clear\\\", \\\"target\\\": \\\"wallets\\\"} {\\\"action\\\": \\\"filter.list\\\", \\\"include_values\\\": true} {\\\"action\\\": \\\"ping\\\"} wallets entries are 0x-prefixed 20-byte addresses; usernames are rejected. markets entries are classified by shape: 0x followed by 64 hex is a condition id, a decimal string is a CLOB token id. Market slugs and category: selectors are not accepted here. target is wallets, markets or all, and defaults to all. A batch applies atomically: one malformed entry rejects the whole message and leaves the filter set untouched. At most 5,000 entries per message; welcome reports the standing caps in limits. ### Server messages Every frame carries a type, and type is the only field to dispatch on. | type | Sent when | Structure | | --- | --- | --- | | welcome | Once, immediately after the handshake. | TransactionStreamWelcome | | trade | A trade was decoded. status is confirmed, or pending for a mempool trade. | TransactionStreamTrade | | activity | A split, merge or redemption was decoded. | TransactionStreamActivity | | conversion | A NegRisk conversion was decoded. | TransactionStreamConversion | | retraction | A transaction was reorged out. | TransactionStreamRetraction | | heartbeat | A ping tick passed with nothing else to write. | TransactionStreamHeartbeat | | filter.updated | A filter command was applied. | TransactionStreamFilterUpdated | | filter.rejected | A filter command was refused and nothing changed. | TransactionStreamFilterRejected | | filter.snapshot | Reply to filter.list. | TransactionStreamFilterSnapshot | | error | A frame could not be handled. The socket stays open. | TransactionStreamError | | pong | Reply to {\\\"action\\\": \\\"ping\\\"}. | TransactionStreamPong | A trade, activity or conversion frame is the decoded upstream row forwarded whole, with type and sequence added in front, so treat unrecognized fields as forward-compatible additions rather than errors. v is the upstream row schema version, currently 2. Money, size and price fields cross as decimal strings, and so do token ids: they are 256-bit, and a JSON number would silently lose precision. partial marks a row where the fields named in missing read as unknown rather than zero. welcome — once, immediately after the handshake: json { \\\"type\\\": \\\"welcome\\\", \\\"server_time\\\": \\\"2026-08-17T12:00:00.123456789Z\\\", \\\"sequence\\\": 918473, \\\"streams\\\": [\\\"trades\\\", \\\"activities\\\", \\\"conversions\\\"], \\\"mempool\\\": false, \\\"filters\\\": {\\\"wallets\\\": 1, \\\"condition_ids\\\": 0, \\\"token_ids\\\": 0}, \\\"limits\\\": {\\\"max_wallets\\\": 25000, \\\"max_markets\\\": 25000, \\\"max_filter_batch\\\": 5000}, \\\"source\\\": { \\\"connected\\\": true, \\\"last_message_at\\\": \\\"2026-08-17T12:00:00.031000000Z\\\", \\\"dropped_total\\\": 0 } } trade — a confirmed fill: json { \\\"type\\\": \\\"trade\\\", \\\"sequence\\\": 918501, \\\"v\\\": 2, \\\"stream\\\": \\\"trades\\\", \\\"status\\\": \\\"confirmed\\\", \\\"block_number\\\": 91937590, \\\"block_hash\\\": \\\"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\\\", \\\"block_timestamp\\\": 1786924800, \\\"tx_hash\\\": \\\"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\\\", \\\"tx_row_index\\\": 1, \\\"tx_row_count\\\": 3, \\\"partial\\\": false, \\\"missing\\\": [], \\\"published_at\\\": 1786924801.312, \\\"log_index\\\": 42, \\\"order_hash\\\": \\\"0x5e4d3c2b1a09f8e7d6c5b4a3928170615f4e3d2c1b0a9f8e7d6c5b4a39281706\\\", \\\"order_hash_alt\\\": null, \\\"user_address\\\": \\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\", \\\"taker_address\\\": \\\"0x9c1a5f3b2d8e4c6b7a0f9e8d7c6b5a4938271605\\\", \\\"side\\\": \\\"BUY\\\", \\\"token_id\\\": \\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\", \\\"canonical_token_id\\\": \\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\", \\\"condition_id\\\": \\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\", \\\"shares\\\": \\\"20000\\\", \\\"usdc_amount\\\": \\\"9800.5\\\", \\\"share_price\\\": \\\"0.49\\\", \\\"fee_amount\\\": \\\"0\\\", \\\"fee_refund_amount\\\": \\\"0\\\", \\\"trade_timestamp\\\": 1786924800, \\\"contract_version\\\": 2, \\\"is_taker_order\\\": true, \\\"builder\\\": \\\"0x0000000000000000000000000000000000000000000000000000000000000000\\\", \\\"metadata\\\": \\\"0x0000000000000000000000000000000000000000000000000000000000000000\\\" } A pending mempool trade is the same frame with status: \\\"pending\\\". It has no block yet, so block_number and log_index are 0, block_hash and block_timestamp are null, and canonical_token_id is null; order_hash_alt may carry the NegRisk candidate order hash, so match a pending trade against its confirmation on either hash. activity — a split, merge or redemption: json { \\\"type\\\": \\\"activity\\\", \\\"sequence\\\": 918502, \\\"v\\\": 2, \\\"stream\\\": \\\"activities\\\", \\\"status\\\": \\\"confirmed\\\", \\\"block_number\\\": 91937590, \\\"block_hash\\\": \\\"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\\\", \\\"block_timestamp\\\": 1786924800, \\\"tx_hash\\\": \\\"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\\\", \\\"tx_row_index\\\": 2, \\\"tx_row_count\\\": 3, \\\"partial\\\": false, \\\"missing\\\": [], \\\"published_at\\\": 1786924801.312, \\\"event_type\\\": \\\"RedeemPosition\\\", \\\"log_index\\\": 7, \\\"user_address\\\": \\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\", \\\"token_id\\\": \\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\", \\\"canonical_token_id\\\": \\\"34460519301295595556376203968565021162434252843477398085423120621766516073216\\\", \\\"condition_id\\\": \\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\", \\\"price\\\": \\\"1\\\", \\\"amount\\\": \\\"20000\\\", \\\"collateral_token\\\": \\\"0x2791bca1f2de4661ed88a30c99a7a9449aa84174\\\", \\\"parent_collection_id\\\": \\\"0x0000000000000000000000000000000000000000000000000000000000000000\\\", \\\"activity_timestamp\\\": 1786924800, \\\"is_neg_ctf\\\": false, \\\"contract_version\\\": 2, \\\"auto_redeem\\\": false } conversion — a NegRisk conversion leg: json { \\\"type\\\": \\\"conversion\\\", \\\"sequence\\\": 918503, \\\"v\\\": 2, \\\"stream\\\": \\\"conversions\\\", \\\"status\\\": \\\"confirmed\\\", \\\"block_number\\\": 91937590, \\\"block_hash\\\": \\\"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\\\", \\\"block_timestamp\\\": 1786924800, \\\"tx_hash\\\": \\\"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\\\", \\\"tx_row_index\\\": 3, \\\"tx_row_count\\\": 3, \\\"partial\\\": false, \\\"missing\\\": [], \\\"published_at\\\": 1786924801.312, \\\"log_index\\\": 3, \\\"user_address\\\": \\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\", \\\"token_id\\\": \\\"67568438763601610729831023256910933987242052537121118642143709840881218761985\\\", \\\"canonical_token_id\\\": \\\"34460519301295595556376203968565021162434252843477398085423120621766516073216\\\", \\\"condition_id\\\": \\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\", \\\"negrisk_market_id\\\": \\\"0x0b8f7e6d5c4b3a29180706f5e4d3c2b1a0f9e8d7c6b5a4938271605f4e3d2c1b\\\", \\\"amount\\\": \\\"250\\\", \\\"conversion_timestamp\\\": 1786924800, \\\"contract_version\\\": 2 } retraction — the transaction was reorged out. It carries no row fields at all, so undo state by tx_hash and stream: json { \\\"type\\\": \\\"retraction\\\", \\\"sequence\\\": 918504, \\\"v\\\": 2, \\\"stream\\\": \\\"trades\\\", \\\"status\\\": \\\"retracted\\\", \\\"tx_hash\\\": \\\"0x3f8c1d9b7a5e4c2b0d9f8e7a6c5b4d3e2f1a09b8c7d6e5f4a3b2c1d0e9f8a7b6\\\", \\\"block_number\\\": 91937590, \\\"block_hash\\\": \\\"0x7c1b9f3a2d8e4c5b6a0f9e8d7c6b5a4938271605f4e3d2c1b0a9f8e7d6c5b4a3\\\", \\\"published_at\\\": 1786924802.881 } heartbeat — nothing else was written on this tick: json { \\\"type\\\": \\\"heartbeat\\\", \\\"server_time\\\": \\\"2026-08-17T12:00:20.001002003Z\\\", \\\"sequence\\\": 918504, \\\"source\\\": { \\\"connected\\\": true, \\\"last_message_at\\\": \\\"2026-08-17T12:00:19.900000000Z\\\", \\\"dropped_total\\\": 12 } } filter.updated — the command was applied. added and removed are net count deltas, not the values applied, so a filter.set that swaps one wallet for another reports zero of each: json { \\\"type\\\": \\\"filter.updated\\\", \\\"filters\\\": {\\\"wallets\\\": 2, \\\"condition_ids\\\": 0, \\\"token_ids\\\": 1}, \\\"added\\\": {\\\"wallets\\\": 1, \\\"condition_ids\\\": 0, \\\"token_ids\\\": 1}, \\\"removed\\\": {\\\"wallets\\\": 0, \\\"condition_ids\\\": 0, \\\"token_ids\\\": 0} } filter.rejected — nothing was applied. A validation failure names every entry it refused; a cap failure carries only code and message: json { \\\"type\\\": \\\"filter.rejected\\\", \\\"code\\\": \\\"invalid_filter\\\", \\\"message\\\": \\\"no changes were applied\\\", \\\"rejected\\\": [ {\\\"value\\\": \\\"polymarket-btc-up-or-down\\\", \\\"reason\\\": \\\"market slugs are not supported; use a condition id or CLOB token id\\\"}, {\\\"value\\\": \\\"@trader\\\", \\\"reason\\\": \\\"usernames are not supported; use a 0x-prefixed 20-byte address\\\"} ] } json { \\\"type\\\": \\\"filter.rejected\\\", \\\"code\\\": \\\"filter_limit_reached\\\", \\\"message\\\": \\\"txstream: filter limit reached: at most 25000 wallets\\\" } filter.snapshot — the reply to filter.list. values is present only when the request set include_values: true, each list is capped at 1,000 entries, and truncated says whether any list was cut short: json { \\\"type\\\": \\\"filter.snapshot\\\", \\\"sequence\\\": 918505, \\\"filters\\\": {\\\"wallets\\\": 1, \\\"condition_ids\\\": 1, \\\"token_ids\\\": 0}, \\\"values\\\": { \\\"wallets\\\": [\\\"0x674887d1ac838099a48b629dff53f25b7b87ee08\\\"], \\\"condition_ids\\\": [\\\"0xb4386b7dacda0f3148be799de8d992e1f3cb3646ecb42b6c09485ed7d6feffc7\\\"], \\\"token_ids\\\": [], \\\"truncated\\\": false } } error — the frame could not be handled. Non-fatal: the socket stays open and the filters are untouched: json { \\\"type\\\": \\\"error\\\", \\\"code\\\": \\\"unsupported_message\\\", \\\"message\\\": \\\"action must be filter.add, filter.remove, filter.set, filter.clear, filter.list or ping\\\" } pong — the reply to {\\\"action\\\": \\\"ping\\\"}, and nothing more: json {\\\"type\\\": \\\"pong\\\"}\",\"url\":\"https://docs.gravia.trade/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gravia.trade/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions#webpage\"},\"dateModified\":\"2026-09-27T11:39:29.578Z\",\"publisher\":{\"@id\":\"https://docs.gravia.trade/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gravia.trade#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Gravia Data API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Gravia Data API","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","icon":"code","groups":[{"group":"Webhooks","pages":[{"title":"List owned webhooks","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /v1/webhooks","href":"/api-reference/webhooks/list-owned-webhooks"},{"title":"Create a webhook","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ post /v1/webhooks","href":"/api-reference/webhooks/create-a-webhook"},{"title":"List supported webhook events","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /v1/webhooks/events","href":"/api-reference/webhooks/list-supported-webhook-events"},{"title":"Get an owned webhook","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /v1/webhooks/{id}","href":"/api-reference/webhooks/get-an-owned-webhook"},{"title":"Update a webhook","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ put /v1/webhooks/{id}","href":"/api-reference/webhooks/update-a-webhook"},{"title":"Delete a webhook","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ delete /v1/webhooks/{id}","href":"/api-reference/webhooks/delete-a-webhook"},{"title":"Rotate signing secret","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ post /v1/webhooks/{id}/rotate-secret","href":"/api-reference/webhooks/rotate-signing-secret"},{"title":"Send a test callback","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ post /v1/webhooks/{id}/test","href":"/api-reference/webhooks/send-a-test-callback"},{"title":"List terminal delivery logs","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /v1/webhooks/{id}/logs","href":"/api-reference/webhooks/list-terminal-delivery-logs"}]},{"group":"Operational","pages":[{"title":"Health check","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /health","href":"/api-reference/operational/health-check"}]},{"group":"Markets","pages":[{"title":"Get the current crypto up/down market","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/markets/crypto/current","href":"/api-reference/markets/get-the-current-crypto-updown-market"},{"title":"List market categories","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/markets/categories/list","href":"/api-reference/markets/list-market-categories"},{"title":"Get a market's price to beat","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/markets/crypto/price-to-beat","href":"/api-reference/markets/get-a-markets-price-to-beat"}]},{"group":"Users","pages":[{"title":"Get a user's trades and on-chain activities","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/users/activities","href":"/api-reference/users/get-a-users-trades-and-on-chain-activities"},{"title":"Get a user's trades with markouts","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/users/trades/markouts","href":"/api-reference/users/get-a-users-trades-with-markouts"},{"title":"Get markouts grouped by counterparty","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/users/trades/counterparties","href":"/api-reference/users/get-markouts-grouped-by-counterparty"},{"title":"Get one profile's category metrics","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/users/categories","href":"/api-reference/users/get-one-profiles-category-metrics"},{"title":"Get a user's positions","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/users/positions","href":"/api-reference/users/get-a-users-positions"},{"title":"Get a concise user profile","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/users/profile","href":"/api-reference/users/get-a-concise-user-profile"},{"title":"Get a user's taker tier","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/users/taker-tier","href":"/api-reference/users/get-a-users-taker-tier"}]},{"group":"Streams","pages":[{"title":"WebSocket stream of Chainlink crypto prices","description":"Opens one authenticated WebSocket that receives normalized Chainlink\nData Streams prices.\n\n`symbols` and `variants` select the initial feeds. Omit both for all\n18 feeds, or use `symbols=none` to start empty. Subscriptions can then\nbe changed atomically with text JSON frames:\n\n```json\n{\"action\":\"subscribe\",\"subscriptions\":[{\"symbol\":\"btc\",\"variant\":\"spot\"}]}\n{\"action\":\"unsubscribe\",\"subscriptions\":[{\"symbol\":\"btc\",\"variant\":\"spot\"}]}\n{\"action\":\"subscription.list\"}\n{\"action\":\"ping\"}\n```\n\nThe server sends `welcome`, an initial `snapshot`, live `price`\nupdates, and idle `heartbeat` frames. A successful subscribe is\nacknowledged before its snapshot and before any live update for the\nnewly added feed. No update for a removed feed is queued after the\n`unsubscribed` acknowledgement. Prices are exact decimal strings.\n\nChainlink's live stream can occasionally omit an event. This endpoint\nperforms no REST reconciliation or backfill, so events missing from the\nupstream stream or dropped from Edge's bounded source queue are not\nreplayed or forwarded later.\n\nThe number of concurrent connections is assigned per API key; the service\ndefault is one. Browser clients may authenticate\nwith `api_key`; other clients should use the `Authorization` header.\nNew handshakes receive `503` while the upstream feed is stale.\n","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/streams/crypto-prices","href":"/api-reference/streams/websocket-stream-of-chainlink-crypto-prices"},{"title":"WebSocket stream of live trades, activities and conversions","deprecated":null,"version":null,"openapi":"https://data.gravia.trade/ get /api/v1/streams/transactions","href":"/api-reference/streams/websocket-stream-of-live-trades-activities-and-conversions"}]}]}]},"basePath":"","title":"WebSocket stream of live trades, activities and conversions - Gravia Data API","buildId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","deploymentId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-B7XKH4J3.js","utils-lOYzL7z-.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DF6jUUIM.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dpsj5f7C.js","snippetPresets-CYeiDe8v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CUFz1YZ_.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-D8H_iLS4.js","shallow-DdluZBHX.js","getApiPlaygroundDisplay-B9922vev.js","CodeSnippet-CMoRNGYs.js","CodeSnippets-DwyrPHuw.js","Page-DSVu9Ucl.js","getPastedJson-G-zIvlHh.js","icon-B03fnEy0.js","MethodPill-CW7teklc.js","DuplicateIcon-CtO8eekd.js","createIcon-DZTKdM_A.js","DynamicMarkdown-D5M2At0B.js","SectionHeading-C_2NaA2U.js","axios-vUo_bRtp.js","Markdown-D7QRHV3m.js","clsx-D1Z-ELXV.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-lvhuD9Du.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CKfC4ywL.js"]}