Complete JSON-RPC types and enums against backend#216
Merged
Conversation
Cross-checked the ob_/eth_/pod_ schemas in the JSON-RPC OpenAPI spec
against the pod backend (node/src/rpc, trading crate) and verified
response shapes live on staging.
Enum/correctness fixes:
- OrderKind: was [user_signed, liquidation, adl, backstop_transfer];
actual enum is [user_signed, liquidation, triggered]
- Side: lowercase [buy, sell] (was capitalized)
- FillResponse: returns order_id, not tx_hash
- Market.auction_interval is a number, not a string
- Market: add mark_price (perp-only, was missing)
- Order/TriggerOrderResponse deadline,end are numeric Timestamps
- OrderbookSnapshot: response field is orderbook_id (clob_id is an
input alias only); TickSnapshot.volume and grouping_precision are hex
- ob_getOrders next_cursor wire format is "{ts}:{nonce}:{order_id_hex}"
Add missing enums: TriggerType, TriggerGrouping.
Complete types: Order.grouping/trigger_type; PositionsResponse
perps_equity/account_value/cash/withdrawable_cash; OrderbookSnapshot
perp oracle/funding fields; OrdersQuery.with_fills.
Document four undocumented endpoints: ob_getTriggers,
ob_getRankedPositions, ob_getOraclePrices, ob_getFundingRates.
Make request params render as structured objects: give each ob_
params array `items` referencing the query schemas (Address/Bytes32 +
OrdersQuery/CandlesQuery/FillsQuery/TriggersQuery); add TriggersQuery.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
anlithov
approved these changes
Jun 2, 2026
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.
Cross-checked the ob_/eth_/pod_ schemas in the JSON-RPC OpenAPI spec against the pod backend (node/src/rpc, trading crate) and verified response shapes live on staging.
Enum/correctness fixes:
Add missing enums: TriggerType, TriggerGrouping.
Complete types: Order.grouping/trigger_type; PositionsResponse perps_equity/account_value/cash/withdrawable_cash; OrderbookSnapshot perp oracle/funding fields; OrdersQuery.with_fills.
Document four undocumented endpoints: ob_getTriggers, ob_getRankedPositions, ob_getOraclePrices, ob_getFundingRates.
Make request params render as structured objects: give each ob_ params array
itemsreferencing the query schemas (Address/Bytes32 + OrdersQuery/CandlesQuery/FillsQuery/TriggersQuery); add TriggersQuery.