Skip to content

Convert Lighter to a ticker module - #181

Merged
hacheigriega merged 4 commits into
mainfrom
refactor/lighter
Sep 28, 2026
Merged

hacheigriega merged 4 commits into
mainfrom
refactor/lighter

Conversation

@hacheigriega

@hacheigriega hacheigriega commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Incorporate Lighter module as a ticker module to reduce duplicate code.
Add support for stream types beyond just the ticker type for Lighter module. While we will probably have to add support for multiple stream types (channels) per module, this is a start.

Explanation of Changes

Commits in order:

  1. Converts Lighter into a ticker module.
  2. Refactor parsing of websocket inbound messages (frames) across ticker modules.
  3. Add support for additional stream types for Lighter module.

Includes backward incompatible changes.

Related Issues

Closes: #149

@hacheigriega
hacheigriega force-pushed the refactor/lighter branch 6 times, most recently from 741b324 to dc93026 Compare September 26, 2026 01:19
@hacheigriega
hacheigriega marked this pull request as ready for review September 26, 2026 01:24
Comment thread workspace/data-proxy/src/modules/ticker-module/lighter.ts Outdated
Comment thread workspace/data-proxy/src/modules/ticker-module/lighter.ts Outdated
To accommodate Lighter's numeric market IDs, (un)subscribe keys and cache
keys have been made generic. VenueWS also now takes `pongFrame` as an
optional input since Lighter requires that client replies to periodic
pings with pongs. Lighter module config now uses the shared ticker module
fields (breaking change).
Parse inbound frames directly into `VenueParsedInbound`. Extract shared
JSON record parsing and data-item mapping.
Add `streamType` to Lighter module config and add support for stream
types `order_book` and `trade`.
@hacheigriega
hacheigriega merged commit 598bbdc into main Sep 28, 2026
2 checks passed
@hacheigriega
hacheigriega deleted the refactor/lighter branch September 28, 2026 15: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.

♻️ Shared WebSocket client

2 participants