Activity
An account’s trades, transfers and transactions as one list, in block order.
Params
Section titled “Params”Both methods take:
| Param | Description |
|---|---|
account |
Required. Its trades as trader, and the transfers and transactions it sent or received |
kinds |
Required. Any of trade, transfer and transaction |
fields |
Required. { "trade": [...], "transfer": [...], "transaction": [...] }, for the kinds in kinds. See trade fields and transfer and transaction fields |
token |
Only this token’s trades and transfers. Not with transaction |
side, min_usd, include_liquidity |
For trades, as for trades.query |
min_amount |
For transfers, with token |
activity.query
Section titled “activity.query”A page of activity, newest first, or oldest first with order. HTTP: /activity, with fields as fields.trade=...&fields.transfer=.... Takes limit, cursor, after_millis, before_millis and order, as trades.query does.
activity.subscribe
Section titled “activity.subscribe”History, then live activity. Takes one of:
| Param | Description |
|---|---|
history |
1 to 200, the newest rows, newest first, in the result |
after |
The last of a result or push: everything after it, oldest first |
| neither | Only activity from now on |
Results
Section titled “Results”The result has a set of columns per kind, and each row starts with its kind:
{ "columns": { "trade": ["id", "token", "side", "usd_value"], "transfer": ["id", "token", "amount"] }, "rows": [ ["trade", 6860368, "wrap.near", "buy", "191.54"], ["transfer", 9120443, "near", "1000000000000000000000000"] ], "last": "6860916:30209055", ...}Within a block, transfers and transactions come before trades. Instead of latest_id, results and pushes have last, where they leave off. Pass it as after to pick up after a reconnect.