Skip to content

docs(api-reference): activity as per-batch entries, orders without fills - #323

Merged
majesticwizardcat merged 2 commits into
mainfrom
giannis/activity-api-docs
Oct 23, 2026
Merged

majesticwizardcat merged 2 commits into
mainfrom
giannis/activity-api-docs

Conversation

@majesticwizardcat

@majesticwizardcat majesticwizardcat commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

The API reference for what the node serves since https://code.pod.network/pod/pod/pulls/170 (merged). Docs only, split out of #318 so they can go in ahead of the SDK code.

REST (doc/api-reference/rest/openapi.yaml, README.md)

  • GET /clob/activity/{account}: activity is an ActivityFrame, a map from batch deadline to its entry list, instead of an array tagged by activity_type with ts. next_cursor becomes next, the to for the older page (nullable digit string); cursor is gone. from/to are inclusive timestamp strings, from > to is a 422; limit counts entries, default 500, max 2000, pages hold whole batches. activity_types takes the nine kinds.
  • New schemas: ActivityEntry as a oneOf on k with ActivityOrder, ActivityFill, ActivityModify, ActivityTermination, ActivityBackstop, ActivityBridgeTransfer, ActivityTransfer, ActivityModifyReject, ActivityCancelReject, with the wire's short names (tok, amt, err, cp, sz, eq).
  • GET /clob/orders/{account}: Order.fills stays, the nested PartialFill list that https://code.pod.network/pod/pod/pulls/203 keeps on every order surface; /clob/fills/{account} and the activity fill entries are the per-fill record with fee and running totals.
  • README: activity is cacheable once to ≤ solution_now; batch keys, next and end are decimal strings.

JSON-RPC (doc/api-reference/json-rpc/openapi.yaml)

  • pod_activity: each notification is the same single-key map, so ActivityFrame replaces {batch, orders, events} and ActivityEntry replaces ActivityEvent/ActivityMoneyEvent.
  • pod_orders_v2: the fill event carries f, this fill's fee, next to the running total tf.

Everything described is served by the node's main plus https://code.pod.network/pod/pod/pulls/203; nothing depends on https://code.pod.network/pod/pod/pulls/177.

🤖 Generated with Claude Code

…lls, fill fee on pod_orders_v2

Split out of #318 so the reference for what the node serves since pod#170 can land before the SDK code.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
majesticwizardcat added a commit that referenced this pull request Oct 22, 2026
The doc/api-reference changes are now #323, so this PR is the SDK code alone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
majesticwizardcat added a commit that referenced this pull request Oct 22, 2026
* feat(ts-sdk): activity as per-batch entries, one feed per account

Reads pod#170's wire: GET /clob/activity serves {"<batch>": [{k, …}]}
newest first with a type filter and `next` passed back as `to`, and
pod_activity sends the same map one tick at a time. ActivityEntry rows
keep activityType and timeMs and gain fill, modify, termination and the
stream-only refusals; the order row is the order as /clob/orders serves
it (current state on REST, admission state on the stream), so pre-upgrade
orders read correctly without folding, and live entries update the held
order. One ActivityHistory per account holds the one subscription and
the paging state; views filter it by types and window. Order.fills is
gone, on /clob/orders too: fills are the fill rows and /clob/fills.
drainFlows filters by type again. Version 0.13.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* revert(ts-sdk): Order keeps initialSize as its only size

The node will not serve placed terms for now, so Order drops size and
initialPrice and modify updates initialSize again.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* docs: the API reference moves to #323

The doc/api-reference changes are now #323, so this PR is the SDK code alone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
- Order (REST, ob_getOrders) nests fills again: PartialFill restored, ADL price noted, with_fills default empty list
- ActivityOrder and the activity route say the order entry carries fills (empty on pod_activity)
- REST activity: ActivityFrame example uses tok/amt/err/cp, route lists the 422 for from > to
- README: order end is a JSON number; pod_activity example order entry uses the real Order fields

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@majesticwizardcat
majesticwizardcat marked this pull request as ready for review October 23, 2026 09:44
@majesticwizardcat
majesticwizardcat merged commit 7b5ca38 into main Oct 23, 2026
10 checks passed
@majesticwizardcat
majesticwizardcat deleted the giannis/activity-api-docs branch October 23, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants