Skip to content

1.12.0: Lighter on Robinhood Chain, account positions, Lighter liquidations - #12

Merged
0xFantomMenace merged 5 commits into
mainfrom
feat/rh-lighter-and-positions
Sep 28, 2026
Merged

0xFantomMenace merged 5 commits into
mainfrom
feat/rh-lighter-and-positions

Conversation

@0xFantomMenace

@0xFantomMenace 0xFantomMenace commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Release 1.12.0 of the Rust SDK: Lighter on Robinhood Chain, account positions and Lighter liquidations. It also releases the order flow cursor and 1-minute interval changes from #13, and fixes freshness().

Lighter on Robinhood Chain

  • client.rh_lighter covers /v1/rh-lighter, the second Lighter deployment. It has the same resources as client.lighter except the L3 order book: orderbook, trades, instruments, funding, open_interest, candles, liquidations, positions, freshness(), summary() and price_history().
  • Markets are quoted in USDG: uppercase perps (BTC) and dashed spot pairs (AAPL-USDG).
  • Coverage: trades and liquidations from 2026-06-26 20:10:26 UTC (venue launch); order book, open interest and funding from 2026-08-22 18:43 UTC; candles from 2026-06-26 once candle history is enabled.
  • WebSocket: live and replay on rh_lighter_orderbook, rh_lighter_trades, rh_lighter_open_interest and rh_lighter_funding; rh_lighter_candles is replay-only. subscribe_with_interval() accepts rh_lighter_orderbook (100 to 5000 ms). Live payloads decode with ServerMsg::lighter_live_data().

Lighter liquidations

  • liquidations.history() and liquidations.volume() on both Lighter clients, typed as LighterLiquidation and LighterLiquidationVolume. Mainnet history starts on 2026-06-10; Robinhood Chain at the venue launch.
  • On Robinhood Chain, rows from before live capture were backfilled from the venue's finalized export and have source "bucket" and an empty raw_json; rows captured live have source "ws" and the venue's raw JSON.

Lighter trades meta

  • trades.list_with_meta() and trades.recent_with_meta() return the same rows as list() and recent() with the full meta: finalized_through, requested_end, clamped_to and preliminary_row_count. list() and recent() are unchanged.

Account positions

  • positions on client.hyperliquid and client.hyperliquid.hip3 (keyed by 0x address) and on client.lighter and client.rh_lighter (keyed by account index): get, history, changes, market, market_summary and all; Hyperliquid and HIP-3 add account and account_history. client.lighter.accounts.by_l1() finds the account indices of an L1 address (mainnet only).
  • Typed models Position, MarketPosition, PositionChange, AccountSummary, MarketPositionsSummary, WalletPositions and LighterL1Accounts, and MetaResponse<T> / ResponseMeta with the full response meta. ResponseMeta::position_totals() decodes the totals of a market listing.
  • Lighter market symbols are sent uppercase, since the Lighter positions routes accept uppercase symbols only.

Order flow and intervals (from #13)

  • OiFundingInterval::OneMinute ("1m").
  • cursor on OrderFlowParams and Hip4OrderFlowParams. The API does not return next_cursor on order flow yet.

Fixed

  • freshness() failed on every client with a deserialization error, because the response carries a symbol string next to the per-data-type entries. CoinFreshness has a symbol field now.

Verification

  • Every positions and Robinhood Chain method was called against the production API with small limits; every response decoded.
  • cargo test --all-features: 89 passed (lib 32, coverage_contract 16, rh_lighter_and_positions 15, websocket_capability 17, doctests 9). cargo test without features passes.
  • cargo clippy --all-features --all-targets -- -D warnings and RUSTDOCFLAGS="-D warnings" cargo doc are clean.
  • Builds on Rust 1.75 with a lockfile resolved for 1.75.
  • The README snippets for the new APIs compile.
  • cargo package --list holds only tracked files and cargo metadata.

Version 1.12.0 in Cargo.toml; README and rustdoc install pins read 1.12.

…tions (1.12.0)

- client.rh_lighter: the Robinhood Chain Lighter deployment (/v1/rh-lighter),
  with the mainnet Lighter resources except the L3 order book.
- liquidations on both Lighter clients (history and volume), with typed
  LighterLiquidation and LighterLiquidationVolume rows.
- positions on the Hyperliquid, HIP-3, Lighter and Robinhood Chain clients:
  current and as-of positions, hourly history, the change log, market
  listings and summaries, and the bulk hourly listing; account summaries on
  Hyperliquid and HIP-3; Lighter account lookup by L1 address.
- MetaResponse and ResponseMeta expose the full response meta (snapshot
  context, build and finality boundaries, totals, notices).
- WebSocket: rh_lighter_* live and replay channels, interval_ms on
  rh_lighter_orderbook, and live payload decoding for both deployments.
- Version 1.12.0; README, rustdoc pins and CHANGELOG updated.
…ts, account docs

- Robinhood Chain liquidations are served from 2026-08-22 18:43 UTC, like
  the order book, open interest and funding. The README, rustdoc and
  CHANGELOG said 2026-06-26 20:10:26 UTC, which the API refuses.
- TradesResource::list_with_meta() and recent_with_meta() return the same
  rows as list() and recent() with the full response meta, so Lighter
  callers can read finalized_through, requested_end, clamped_to and
  preliminary_row_count. list() and recent() are unchanged.
- Instants: meta instants carry milliseconds; row instants carry a fraction
  only when it is not zero. The docs said every instant has milliseconds,
  and the test mocks now use the whole-second form for row instants.
- WalletPositions.account documents when a summary is present on each
  venue, and the reconstructed-row docs name the exact field values.
Liquidations on Lighter on Robinhood Chain now share the trades floor,
2026-06-26 20:10:26 UTC. Rows from before live capture were backfilled from
the venue's finalized export and have source "bucket" and an empty raw_json;
rows captured live have source "ws" and the venue's raw JSON. Order book,
open interest and funding still start 2026-08-22 18:43 UTC.

- README coverage table, Lighter Liquidations section and Robinhood Chain
  coverage, CHANGELOG, RhLighterClient, LighterLiquidationsResource and
  LighterLiquidation docs say so.
- Tests: the history request starts at the floor and returns the first
  backfilled liquidation next to a live row; the copy guard now pins the
  venue-launch floor and rejects the live-capture floor for liquidations.
- freshness() failed on every client: the response carries a symbol string
  next to the per-data-type entries, and the flattened data_types map tried
  to decode it as one. CoinFreshness has a symbol field now, and the test
  mock uses the response shape the API returns.
- The Lighter positions routes accept uppercase market symbols only.
  LighterPositionsResource sends the market path and the symbol filter
  uppercase, as the Python and TypeScript SDKs do.
- Leverage docs include unknown, which Hyperliquid snapshot rows can carry.
- rustfmt on the files this release adds or rewrites.
- CHANGELOG: 1.12.0 is dated 2026-09-28, with the order flow cursor,
  1-minute interval and freshness changes.
@0xFantomMenace 0xFantomMenace changed the title Add Lighter on Robinhood Chain, account positions and Lighter liquidations (1.12.0) 1.12.0: Lighter on Robinhood Chain, account positions, Lighter liquidations Sep 28, 2026
@0xFantomMenace
0xFantomMenace merged commit a1b4f35 into main Sep 28, 2026
1 check passed
@0xFantomMenace
0xFantomMenace deleted the feat/rh-lighter-and-positions branch September 28, 2026 22:00
0xFantomMenace added a commit that referenced this pull request Sep 29, 2026
…ations (#12)

- client.rh_lighter: Lighter on Robinhood Chain under /v1/rh-lighter, with
  the mainnet Lighter resources except the L3 order book, and live and
  replay rh_lighter_* WebSocket channels (rh_lighter_candles is
  replay-only).
- Lighter liquidations (history and volume) on both Lighter clients, and
  trades.list_with_meta() / recent_with_meta().
- Account positions on Hyperliquid, HIP-3, Lighter and Robinhood Chain:
  get, history, changes, market, market_summary, all, account and
  account_history (Hyperliquid and HIP-3), and lighter.accounts.by_l1(),
  with typed models and MetaResponse / ResponseMeta.
- OiFundingInterval::OneMinute; cursor on the order flow params.
- Fixed: freshness() decodes the response's symbol field.
- Version 1.12.0.
0xFantomMenace added a commit that referenced this pull request Sep 29, 2026
…ations (#12)

- client.rh_lighter: Lighter on Robinhood Chain under /v1/rh-lighter, with
  the mainnet Lighter resources except the L3 order book, and live and
  replay rh_lighter_* WebSocket channels (rh_lighter_candles is
  replay-only).
- Lighter liquidations (history and volume) on both Lighter clients, and
  trades.list_with_meta() / recent_with_meta().
- Account positions on Hyperliquid, HIP-3, Lighter and Robinhood Chain:
  get, history, changes, market, market_summary, all, account and
  account_history (Hyperliquid and HIP-3), and lighter.accounts.by_l1(),
  with typed models and MetaResponse / ResponseMeta.
- OiFundingInterval::OneMinute; cursor on the order flow params.
- Fixed: freshness() decodes the response's symbol field.
- Version 1.12.0.
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