Skip to content

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

Merged
0xFantomMenace merged 5 commits into
masterfrom
release/1.12.0
Sep 28, 2026
Merged

0xFantomMenace merged 5 commits into
masterfrom
release/1.12.0

Conversation

@0xFantomMenace

@0xFantomMenace 0xFantomMenace commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

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

Lighter on Robinhood Chain

  • client.rh_lighter (RhLighterClient) under /v1/rh-lighter. It has the same resources as client.lighter except the L3 order book and the L1 account resolver: instruments, orderbook, trades, candles, open_interest, funding, liquidations, positions, get_freshness(), get_summary() and get_price_history().
  • Markets are quoted in USDG: uppercase perps (BTC) and dashed spot markets (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 they are enabled for this deployment.
  • Trades follow the mainnet Lighter finalization contract: trades.list() is canonical up to meta.finalized_through, and trades.recent() is the preliminary tier.
  • WebSocket: live and replay on rh_lighter_orderbook (with interval_ms 100 to 5000), rh_lighter_trades, rh_lighter_open_interest and rh_lighter_funding, with the mainnet Lighter message shapes, on wss://api.0xarchive.io/ws. rh_lighter_candles is replay-only. New subscribe_rh_lighter_* helpers and on_rh_lighter_* handlers.

Lighter liquidations

  • client.lighter.liquidations and client.rh_lighter.liquidations with history() and volume(), typed as LighterLiquidation and LighterLiquidationVolume.
  • 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.

Account positions

  • positions on client.hyperliquid, client.hyperliquid.hip3, client.lighter and client.rh_lighter: get (now, or as of any instant), history, changes, market, market_summary and all; Hyperliquid and HIP-3 add account and account_history. HIP-3 takes an optional dex; Lighter market methods take include_system.
  • The key is a 0x address on Hyperliquid and HIP-3 and an integer account index on Lighter. client.lighter.accounts.by_l1() resolves an L1 address to account indices (mainnet only).
  • Cursor-following iterate_* helpers and a-prefixed async versions of every method.
  • Typed models Position, PositionChange, AccountSummary, MarketPosition, MarketPositionsSummary, WalletPositions and LighterL1Accounts, and ResponseMeta on CursorResponse.meta (as_of, snapshot_ts, source, quality, stale, built_through, finalized_through, requested_end, clamped_to, totals, notice, coverage_from).

Order flow and intervals (from #13)

  • orders.flow() and aflow() send cursor. The API does not return next_cursor on order flow yet.
  • client.hyperliquid.hip3.breadth.history() accepts interval="1m"; docstrings and README list 1m and the order flow buckets (1m, 5m, 15m, 1h).

Verification

  • Every positions and Robinhood Chain method was called against the production API with small limits, and every response parsed into its model. No response field is missing from the models.
  • Docstrings now list every liquidation_price_status value the API returns (exact, not_published_cross, changed_since_snapshot, unavailable) and unknown as a leverage type.
  • pytest: 153 passed on Python 3.12.
  • ruff and mypy --strict: no new findings compared with master.
  • Package build: the sdist and wheel contain only tracked package files and build metadata.

Version 1.12.0 in pyproject.toml and oxarchive/__init__.py.

…itions

- client.rh_lighter: the Robinhood Chain deployment of Lighter under
  /v1/rh-lighter, with the same resources as client.lighter minus the L3
  order book and the L1 account resolver.
- Lighter liquidations (history and volume) on both Lighter deployments.
- Account positions on client.hyperliquid, client.hyperliquid.hip3,
  client.lighter and client.rh_lighter: current and as-of positions, hourly
  history, change log, account summaries (Hyperliquid and HIP-3), market
  listings, market summaries and bulk listings, with typed models,
  cursor-following iterators and async versions. client.lighter.accounts
  resolves an L1 address to account indices.
- ResponseMeta on CursorResponse.meta (positions, trades.list and Lighter
  liquidations).
- Live and replay WebSocket support for the rh_lighter_* channels
  (rh_lighter_candles is replay-only).
- Version 1.12.0.
…ary docs

- Robinhood Chain liquidations are served from 2026-08-22 18:43 UTC, not the
  venue launch; trades still start 2026-06-26 20:10:26 UTC. Docstrings,
  README (table, section, example) and CHANGELOG now say so, and the README
  example uses a window the API serves.
- positions.get() on Lighter and Robinhood Chain carries an account summary
  of position aggregates on the first page of a snapshot without a symbol
  filter. WalletPositions.account and AccountSummary now describe it, and the
  test mocks return it as the API does.
- ResponseMeta.preliminary_row_count no longer points at trades.recent(),
  which returns a plain list without the meta.
- .gitignore: the tests header now says which test files are published.
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, Robinhood Chain section and liquidation example,
  CHANGELOG, and the client, exchange and resource docstrings say so.
- LighterLiquidation.source and raw_json document both values.
- Tests: the history request starts at the floor, the fixture pairs a
  backfilled row with a live one, and a copy guard keeps the old floor out
  of the public text.
- Position.liquidation_price_status names all four values the API serves:
  exact, not_published_cross, changed_since_snapshot and unavailable.
- PositionLeverage.type and MarketPosition.leverage_type include unknown,
  which Hyperliquid snapshot rows can carry as well as reconstructed ones.
- WalletPositions.account on Hyperliquid core is set when the wallet has an
  account in the snapshot, not on every first page.
- CHANGELOG: 1.12.0 is dated 2026-09-28 and includes the order flow cursor
  and 1-minute interval changes.
@0xFantomMenace
0xFantomMenace merged commit ee4e52a into master Sep 28, 2026
1 check passed
@0xFantomMenace
0xFantomMenace deleted the release/1.12.0 branch September 28, 2026 22:00
0xFantomMenace added a commit that referenced this pull request Sep 29, 2026
…itions (#12)

- client.rh_lighter: Lighter on Robinhood Chain under /v1/rh-lighter, with
  the same resources as client.lighter except the L3 order book and the L1
  account resolver, and live and replay rh_lighter_* WebSocket channels
  (rh_lighter_candles is replay-only).
- Lighter liquidations (history and volume) on both Lighter deployments.
- Account positions on Hyperliquid, HIP-3, Lighter and Robinhood Chain:
  current and as-of positions, hourly history, change log, market listings,
  market summaries, bulk listings, account summaries (Hyperliquid and HIP-3)
  and the Lighter L1 account resolver, with typed models, cursor iterators
  and async versions. ResponseMeta on CursorResponse.meta.
- orders.flow() sends cursor; HIP-3 breadth history accepts interval="1m".
- Version 1.12.0.
0xFantomMenace added a commit that referenced this pull request Sep 29, 2026
…itions (#12)

- client.rh_lighter: Lighter on Robinhood Chain under /v1/rh-lighter, with
  the same resources as client.lighter except the L3 order book and the L1
  account resolver, and live and replay rh_lighter_* WebSocket channels
  (rh_lighter_candles is replay-only).
- Lighter liquidations (history and volume) on both Lighter deployments.
- Account positions on Hyperliquid, HIP-3, Lighter and Robinhood Chain:
  current and as-of positions, hourly history, change log, market listings,
  market summaries, bulk listings, account summaries (Hyperliquid and HIP-3)
  and the Lighter L1 account resolver, with typed models, cursor iterators
  and async versions. ResponseMeta on CursorResponse.meta.
- orders.flow() sends cursor; HIP-3 breadth history accepts interval="1m".
- 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