Skip to content

HELD until the API returns next_cursor on order flow: document order-flow paging - #14

Closed
0xFantomMenace wants to merge 1 commit into
masterfrom
docs/order-flow-paging
Closed

0xFantomMenace wants to merge 1 commit into
masterfrom
docs/order-flow-paging

Conversation

@0xFantomMenace

@0xFantomMenace 0xFantomMenace commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Held. Do not merge until the API returns next_cursor on order flow. The API already buckets order flow at 1m, 5m, 15m and 1h and reads a sent cursor, but it does not return next_cursor on order flow yet. That arrives with an API switch, which is turned on after SDK releases that forward the cursor are published. Merge this once the switch is on and verified.

#13, which keeps OrderFlowParams.cursor and drops the paging docs, is merged, and this PR now targets master. Its diff is only the paging docs.

Changes

  • OrderFlowParams.cursor JSDoc: the previous response's nextCursor, sent with the same start, end and interval. limit reads as buckets per page (default 1000, max 10000).
  • flow() JSDoc: a page holds the oldest limit buckets of the window; while nextCursor is set, pass it back as cursor, and stop when it is undefined.
  • README: the order-flow example follows nextCursor with the same window.
  • CHANGELOG: the Unreleased entry describes order-flow paging.

No code change: the type and the request path are already in #13.

Before merging

  1. The API returns next_cursor on order flow: a full day at 1m on BTC gives 1000 buckets plus a cursor, then the other 440.
  2. Accept 1-minute aggregation buckets, and type the order flow cursor #13 is merged and this PR targets master (both done).

Test plan

  • vitest run: 73 passed.
  • tsc --noEmit: clean.
  • eslint src/: 0 errors (36 existing warnings).

Restores the order-flow paging docs for when the API returns
next_cursor on order flow. Hold until then.

- `OrderFlowParams.cursor` JSDoc: the previous response's nextCursor,
  sent with the same start, end and interval; `limit` is buckets per
  page.
- The `flow()` JSDoc says a page holds the oldest `limit` buckets and
  how to follow nextCursor.
- The README order-flow example follows nextCursor.
- CHANGELOG: order flow pages with nextCursor.
@0xFantomMenace

Copy link
Copy Markdown
Member Author

Included in #19 (order flow paging docs and cursor forwarding).

@0xFantomMenace
0xFantomMenace deleted the docs/order-flow-paging branch September 29, 2026 03:13
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.

1 participant