Skip to content

fix: update instrument models to match API response#4

Open
marselsol wants to merge 1 commit intobybit-exchange:mainfrom
marselsol:feature/instrument-models
Open

fix: update instrument models to match API response#4
marselsol wants to merge 1 commit intobybit-exchange:mainfrom
marselsol:feature/instrument-models

Conversation

@marselsol
Copy link

fix(market): align instrument models with API response and add missing fields

PR Description:

🚨 Critical Fixes:

Added missing fields to InstrumentInfoResult, InstrumentEntry, and LotSizeFilter to match the official API documentation:

nextPageCursor (pagination)

upperFundingRate, lowerFundingRate, isPreListing, preListingInfo, riskParameters

maxMktOrderQty and minNotionalValue in LotSizeFilter

🆕 New Models:

PreListingInfo, PhaseInfo and AuctionFeeInfo

RiskParameters for limit order validation

🔍 Why This Matters:
The current implementation fails to parse.

🔄 Backward Compatible:
New fields are nullable if absent in API responses.

🔗 References:

API docs: https://bybit-exchange.github.io/docs/v5/market/instrument

This PR ensures reliable parsing of /v5/market/instruments-info across all instrument types.

Copy link

@Sunantha29 Sunantha29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢😢

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.

2 participants