Repository navigation
API version 2026-10-01: error codes, has_more, capabilities, working filters, L4 replay - #19
Merged
Merged
Conversation
… L4 replay Every request sends 0xArchive-Version: 2026-10-01 and the WebSocket connects with version=2026-10-01. The SDK reads the shapes that version selects: the standard envelope on data quality, /v1/status/coverage and /v1/symbols, RFC 3339 times with *_ms integers on L4 snapshot orders, CVD, the HIP-3 oracle, Lighter liquidations and levels, and Lighter replay rows in the live shapes. - Error::Api carries error_code (ErrorCode, with an Other fallback), param and valid_values; ServerMsg::Error carries error_code. - Paged responses expose has_more and the full meta block, including meta.symbol and meta.venue. Tick-level history pages by cursor until has_more is false. - client.capabilities() returns typed rows. - Trades side (every venue, recent included), order history triggered, and depth on full-depth L2 history and HIP-3, HIP-4 and Spot order book history. - WebSocket replay is no longer refused for HIP-3, Spot and HIP-4 L4 or for orderbook_full and hip3_orderbook_full; they replay one channel at a time. - Verb aliases: trades.history(), and list_instruments(), get_trades_history(), get_open_interest_history() and get_price_history() on HIP-4. - The venue is named Lighter.
Contributor
|
Target date: no date → 2026-10-08 Date status: Proposed. This is a proposed delivery target; owner confirmation is still required. Why: K requested a Target date on every active tracked item. This copies the already recorded planning/review date; it does not create owner agreement or change scope, status, priority, ownership, implementation/deployment/sending permission, or any release hold. |
The pairs routes send base_token_name, quote_token_name, name and pair_index, so SpotPair::base, quote, wire_symbol and spot_index were always None. Each field now also accepts the route's name, and the other registry fields (is_canonical, token ids and decimals, first_seen_at, last_updated_at) stay in extra. mark_price, mid_price, latest_timestamp and is_active are deprecated: the pairs routes never return them. examples/spot.rs prints the mapped fields and reads candles for the last hour, and a test covers both routes with the field names they send. replay() and replay_multi() sent "speed": null when speed was None, and the server gave no answer to that request, so an L4 replay without a speed waited forever. An unset speed or end is now left out of the request and the server applies its defaults.
…docs.rs The include list shipped every .rs file under src/, so an untracked file there would have been published. It now names each source file. The package-contents workflow also plants src/stray.rs and src/resources/stray.rs, and fails when a tracked source file is missing from the crate, so a new module cannot be left out. docs.rs builds with all features, and the ws module has its own documentation, so OxArchiveWs, WsOptions and ServerMsg appear there. The ignore rules no longer match every file under tests/, which hid tests/websocket_capability.rs; they name the two local-only files instead.
The README coverage table gives each dataset's first available instant as GET /v1/capabilities returns it, instead of months and fixed market counts, and Robinhood Chain candles are listed as served from 2026-06-26 20:10 UTC. README, rustdoc and example code read recent minutes, hours or days instead of fixed dates from 2024 to September 2026, so they work on a Free key's 30-day window, and they use markets that are trading: xyz:XYZ100 on HIP-3 and the open daily BTC outcome on HIP-4. The Robinhood Chain trades snippet and the HIP-3 instruments snippet now compile, replays run at 10x, and the Spot example comment no longer gives the wrong year. The WebSocket channel table matches GET /v1/capabilities: spot_twap is REST only, and hip4_orderbook and hip4_open_interest replay without a live subscription. Recent trades are listed for HIP-3, HIP-4, Spot, Lighter and Robinhood Chain, and the Enterprise replay speed is 1000x. CHANGELOG: an "Upgrading from 1.8" section lists the changes that need code changes for users coming from the last published release. No em dashes remain in the README, CHANGELOG, rustdoc or error messages, and examples/levels_smoke.rs describes what each call returns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adopts API version 2026-10-01 in the Rust SDK. Everything is folded into the unreleased
1.12.0entry of the CHANGELOG; the crate version is unchanged.What changes for users
Version selector. Every REST request sends
0xArchive-Version: 2026-10-01and the WebSocket connects withversion=2026-10-01(oxarchive::API_VERSION). The types read the shapes that version selects:{success, data, meta}envelope on the data quality routes,/v1/status/coverage(newdata_quality.status_coverage()) and/v1/symbols; the older bodies still decode;*_msfield on L4 snapshot resting orders (L4OrderEntry.timestamp/timestamp_ms), CVD buckets, the HIP-3 oracle, Lighter and Robinhood Chain liquidations and liquidation volume, andsnapshot_ts_mson liquidation and trigger levels;ServerMsg::lighter_live_data()now decodes forhistorical_dataandreplay_snapshottoo.Errors.
Error::Apigainserror_code(ErrorCode, withOther(String)for codes this release does not name),paramandvalid_values, next tocodeandrequest_id, pluserror_code(),status(),request_id(),param()andvalid_values()accessors. WebSocketServerMsg::Errorcarrieserror_code, includingslow_consumerandendpoint_unsupported.Paging.
CursorResponseis now the same type asMetaResponse:data,next_cursor,has_moreand the fullmeta, which includesmeta.symbolandmeta.venue.orderbook.collect_tick_history()now follows the tick cursor (cursor+cursor_seq) untilhas_moreis false; before, it returned only the first page.history_tick_page()exposes the same paging.Capabilities.
client.capabilities()returns typedCapabilityrows fromGET /v1/capabilities;Capability::for_channel()finds a WebSocket channel's row.Parameters the API now applies.
side(TradeSide::Buy/Sell) on trades for every venue, includingtrades.recent_with()andhip4.get_trades_recent_with();triggeredon order history (Hyperliquid, HIP-3, HIP-4);depthon full-depth L2 history and on HIP-3, HIP-4 (Hip4OrderBookHistoryParams) and Spot order book history.WebSocket replay.
replay()no longer refuses the HIP-3, Spot and HIP-4 L4 channels ororderbook_full/hip3_orderbook_full, which the API now replays in bulk.replay_multi()rejects only the channels that replay one at a time (every L4 and full-depth channel).LIVE_ONLY_L4_CHANNELSandis_live_only_l4_channel()are deprecated.Verbs. Aliases next to the existing names:
trades.history(); on HIP-4list_instruments(),get_trades_history(),get_open_interest_history()andget_price_history();client.list_symbols().Also. Triggered order-history rows (no
tif) and Spot TWAP rows with numeric sizes now decode. The venue is named "Lighter" throughout.Compatibility
Additive except where a struct or variant gains fields: a pattern or literal that names every field of
Error::Api,ServerMsg::Error,CursorResponse,GetTradesParams,Hip4TradesParamsorL2HistoryParamsneeds the new fields or...sideon the trades params isOption<TradeSide>;side: Nonecompiles unchanged.Checks
cargo test --all-features: 191 passed.cargo test(default features): 154 passed.cargo clippy --all-targets, with and without--all-features: no warnings.cargo doc --no-depswith-D warnings: clean.cargo package --list: no files outsidesrc/, the listed examples,README.md,CHANGELOG.md,LICENSEandCargo.toml.has_morepaging, capabilities,sideon Hyperliquid, HIP-3, Spot and HIP-4,triggered,depth, and replay of HIP-3, Spot and HIP-4 L4 and both full-depth channels.