Repository navigation
Drop methods and parameters the API does not serve; fix freshness types - #20
Merged
Merged
Conversation
Removed methods whose routes return 404: hip4.l2Orderbook (get, history, diffs), hip4.orders.triggerLevels and triggerLevelsHistory, spot.orders flow, tpsl, triggerLevels and triggerLevelsHistory, and hip3.liquidations.byUser. The shared resources are split so each family gets only the routes it serves: OrderHistoryResource (Spot), OrderFlowResource (HIP-4), OrdersResource (core, HIP-3), and MarketLiquidationsResource (HIP-3) under LiquidationsResource (core). Parameters the API ignores are no longer offered: side on trade history, user, status and order_type on Spot order history, and depth on full-depth L2 history. spot.freshness() returns SpotFreshness, matching the buckets Spot reports. CoinFreshness.funding is optional because HIP-4 has none; both failed with validate: true before. dataQuality.symbolCoverage() URL-encodes the symbol without changing its case, so HIP-4 #0 reaches the API. L3 get and history take an account filter.
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.
Follow-up to #19. Everything goes into the unreleased 1.12.0 section of the CHANGELOG.
Removed
These methods called routes the API does not serve (each returns 404), so they always failed:
hyperliquid.hip4.l2Orderbook.get()/history()/diffs()/v1/hyperliquid/hip4/orderbook/{c}/l2[/history|/diffs]hyperliquid.hip4.orders.triggerLevels()/triggerLevelsHistory()/v1/hyperliquid/hip4/orders/{c}/trigger-levels[/history]spot.orders.flow()/tpsl()/v1/hyperliquid/spot/orders/{s}/flow,/tpslspot.orders.triggerLevels()/triggerLevelsHistory()/v1/hyperliquid/spot/orders/{s}/trigger-levels[/history]hyperliquid.hip3.liquidations.byUser()/v1/hyperliquid/hip3/liquidations/user/{addr}The shared classes are split so each family exposes only what it serves:
OrderHistoryResource(Spot:history),OrderFlowResource(HIP-4: plusflow,tpsl),OrdersResource(core and HIP-3: plus trigger levels), andMarketLiquidationsResource(HIP-3) underLiquidationsResource(core: plusbyUser). With mocked fetch, every SDK method now calls a route that is in the OpenAPI spec.Changed
Parameters the API ignores are no longer offered. I checked each one live, and the rows were identical with and without it:
sideon trade history (GetTradesCursorParams; core, HIP-3, Spot and Lighter all return both sides).user,status,order_typeon Spot order history. Core, HIP-3 and HIP-4 order history keep them; core honorsstatus.depthon full-depth L2 history. L3 and L4 history never offered it.depthis still honored on snapshots and on native L2 history.Fixed
spot.freshness()returns a newSpotFreshnesstype with the buckets Spot reports: order book, trades, L4 checkpoints and diffs, orders, and TWAP. It used to be typed asCoinFreshnessand failed withvalidate: true.CoinFreshness.fundingis optional because HIP-4 has no funding.hip4.getFreshness()used to fail withvalidate: true.symbolis now typed.dataQuality.symbolCoverage()URL-encodes the symbol and keeps its case. Before, HIP-4#0was cut off at the#. Its examples now readdataTypes.openInterest, the key the SDK actually returns.Added
accountonlighter.l3Orderbook.get()andhistory().Verified, no change needed
1790575451682_379606340537712). The SDK passes them through unchanged, and following one live returns the next page.Checks
tsc --noEmitare clean, eslint reports 0 errors, the package contents check passes, andvitest runpasses 264 tests (16 new).validate: true.