Skip to content

Lighter order book support - #186

Merged
hacheigriega merged 2 commits into
mainfrom
feat/order-books
Oct 8, 2026
Merged

hacheigriega merged 2 commits into
mainfrom
feat/order-books

Conversation

@hacheigriega

@hacheigriega hacheigriega commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Lighter order book support with

  • initial snapshot seeding and delta (diff update) processing
  • resubscribe if continuity of the stream breaks

Explanation of Changes

Lighter's order book channel (doc) requires verifying continuity of the stream by checking that begin_nonce on the current update matches the nonce of the previous update. We support this by adding an optional field to the output type of VenueWS's parseInboundFrame, where the module can specify whether to "write", "ignore", or "resubscribe".

Testing

Added test cases

Related PRs and Issues

Related: #183

Apply incremental Lighter order-book deltas when begin_nonce matches the
cached nonce. Drop the book and resubscribe when the sequence breaks or
the update is unusable.
Base automatically changed from feat/trades to main October 8, 2026 15:57
@hacheigriega
hacheigriega merged commit c3a463d into main Oct 8, 2026
2 checks passed
@hacheigriega
hacheigriega deleted the feat/order-books branch October 8, 2026 15:58
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