fix: update instrument models to match API response#4
Open
marselsol wants to merge 1 commit intobybit-exchange:mainfrom
Open
fix: update instrument models to match API response#4marselsol wants to merge 1 commit intobybit-exchange:mainfrom
marselsol wants to merge 1 commit intobybit-exchange:mainfrom
Conversation
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.
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.