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
mainfrom
docs/order-flow-paging
Closed

0xFantomMenace wants to merge 1 commit into
mainfrom
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 the cursor field and drops the paging docs, is merged, and this PR now targets main. Its diff is only the paging docs.

Changes

  • OrderFlowParams and Hip4OrderFlowParams rustdoc: a page holds the oldest limit buckets of the window; while next_cursor is set, pass it back as cursor with the same start, end and interval, and stop when it is None. cursor is the previous response's next_cursor; limit is buckets per page (default 1000, max 10000).
  • orders.flow() and hip4.get_order_flow() docs point at the params for paging.
  • README: the order-flow example pages a full day at 1m.
  • CHANGELOG: the Unreleased entry describes order-flow paging.

No code change: the field 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. Add OiFundingInterval::OneMinute, and a cursor for order flow #13 is merged and this PR targets main (both done).

Test plan

  • cargo test --all-targets: pass (coverage_contract 16 of 16).
  • cargo test --doc: 8 passed.

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

- `OrderFlowParams` and `Hip4OrderFlowParams` docs: a page holds the
  oldest `limit` buckets; follow next_cursor with the same start, end
  and interval. `cursor` is the previous response's next_cursor and
  `limit` is buckets per page.
- The README order-flow example pages a full day at 1m.
- CHANGELOG: order flow pages with next_cursor.
@0xFantomMenace

Copy link
Copy Markdown
Member Author

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

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