Merged
Conversation
…th docs specifications
There was a problem hiding this comment.
Pull Request Overview
This PR updates the library to version 1.2.1, introducing support for Spread Trading and RFQ (Request for Quote) functionality, along with API rate limit management and manual borrow/repay account features.
Key changes:
- Added comprehensive Spread Trading service with order management and market data endpoints
- Introduced RFQ service for quote-based trading workflows
- Added API rate limit configuration and monitoring capabilities
Reviewed Changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Src/Common/bybit.net.api.csproj | Updated version numbers from 1.2.0 to 1.2.1 |
| Src/Common/Utils/VersionInfo.cs | Updated internal version string to 1.2.1 |
| Src/Common/Utils/BybitConstants.cs | Added WebSocket URL constants for Spread Trading |
| Src/Common/WebSocketStream/BybitSpreadTradingWebSocket.cs | New WebSocket implementation for Spread Trading channels |
| Src/Common/ApiServiceImp/BybitSpreadTradingService.cs | New service implementing Spread Trading REST API endpoints |
| Src/Common/ApiServiceImp/BybitRateLimitService.cs | New service for API rate limit management |
| Src/Common/ApiServiceImp/BybitRFQService.cs | New service implementing RFQ trading functionality |
| Src/Common/ApiServiceImp/BybitAccountService.cs | Added manual borrow and repay methods |
| Src/Common/ApiServiceImp/BybitP2PService.cs | Changed visibility from internal to public |
| Src/Common/ApiServiceImp/BybitNewCryptoLoanService.cs | Changed visibility from internal to public |
| Src/Common/ApiServiceImp/BybitEarnService.cs | Changed visibility from internal to public |
| Src/Common/Models/SpreadTrading/*.cs | New model classes for Spread Trading responses |
| Src/Common/Models/RateLimit/*.cs | New model classes for rate limit responses |
| Src/Common/Models/RFQ/*.cs | New model classes for RFQ responses |
| Tests/bybit.api.test/SpreadTradingServiceTest.cs | New test class for Spread Trading service |
| README.md | Fixed typos, updated contributor information, and corrected WebSocket examples |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Comment on lines
+13
to
+19
| public BybitSpreadTradingWebSocket(bool useTestNet = false, int pingIntevral = 20, int receiveBufferSize = 8192, string? apiKey = null, string? apiSecret = null, bool debugMode = false) | ||
| : base(new BybitWebSocketHandler(new ClientWebSocket()), GetStreamUrl(useTestNet), pingIntevral, receiveBufferSize, apiKey, apiSecret, debugMode) | ||
| { | ||
| } | ||
|
|
||
| public BybitSpreadTradingWebSocket(IBybitWebSocketHandler handler, bool useTestNet = false, int pingIntevral = 20, int receiveBufferSize = 8192, string? apiKey = null, string? apiSecret = null, bool debugMode = false) | ||
| : base(handler, GetStreamUrl(useTestNet), pingIntevral, receiveBufferSize, apiKey, apiSecret, debugMode) |
There was a problem hiding this comment.
Corrected spelling of 'pingIntevral' to 'pingInterval'.
Suggested change
| public BybitSpreadTradingWebSocket(bool useTestNet = false, int pingIntevral = 20, int receiveBufferSize = 8192, string? apiKey = null, string? apiSecret = null, bool debugMode = false) | |
| : base(new BybitWebSocketHandler(new ClientWebSocket()), GetStreamUrl(useTestNet), pingIntevral, receiveBufferSize, apiKey, apiSecret, debugMode) | |
| { | |
| } | |
| public BybitSpreadTradingWebSocket(IBybitWebSocketHandler handler, bool useTestNet = false, int pingIntevral = 20, int receiveBufferSize = 8192, string? apiKey = null, string? apiSecret = null, bool debugMode = false) | |
| : base(handler, GetStreamUrl(useTestNet), pingIntevral, receiveBufferSize, apiKey, apiSecret, debugMode) | |
| public BybitSpreadTradingWebSocket(bool useTestNet = false, int pingInterval = 20, int receiveBufferSize = 8192, string? apiKey = null, string? apiSecret = null, bool debugMode = false) | |
| : base(new BybitWebSocketHandler(new ClientWebSocket()), GetStreamUrl(useTestNet), pingInterval, receiveBufferSize, apiKey, apiSecret, debugMode) | |
| { | |
| } | |
| public BybitSpreadTradingWebSocket(IBybitWebSocketHandler handler, bool useTestNet = false, int pingInterval = 20, int receiveBufferSize = 8192, string? apiKey = null, string? apiSecret = null, bool debugMode = false) | |
| : base(handler, GetStreamUrl(useTestNet), pingInterval, receiveBufferSize, apiKey, apiSecret, debugMode) |
Comment on lines
+13
to
+19
| public BybitSpreadTradingWebSocket(bool useTestNet = false, int pingIntevral = 20, int receiveBufferSize = 8192, string? apiKey = null, string? apiSecret = null, bool debugMode = false) | ||
| : base(new BybitWebSocketHandler(new ClientWebSocket()), GetStreamUrl(useTestNet), pingIntevral, receiveBufferSize, apiKey, apiSecret, debugMode) | ||
| { | ||
| } | ||
|
|
||
| public BybitSpreadTradingWebSocket(IBybitWebSocketHandler handler, bool useTestNet = false, int pingIntevral = 20, int receiveBufferSize = 8192, string? apiKey = null, string? apiSecret = null, bool debugMode = false) | ||
| : base(handler, GetStreamUrl(useTestNet), pingIntevral, receiveBufferSize, apiKey, apiSecret, debugMode) |
There was a problem hiding this comment.
Corrected spelling of 'pingIntevral' to 'pingInterval'.
Suggested change
| public BybitSpreadTradingWebSocket(bool useTestNet = false, int pingIntevral = 20, int receiveBufferSize = 8192, string? apiKey = null, string? apiSecret = null, bool debugMode = false) | |
| : base(new BybitWebSocketHandler(new ClientWebSocket()), GetStreamUrl(useTestNet), pingIntevral, receiveBufferSize, apiKey, apiSecret, debugMode) | |
| { | |
| } | |
| public BybitSpreadTradingWebSocket(IBybitWebSocketHandler handler, bool useTestNet = false, int pingIntevral = 20, int receiveBufferSize = 8192, string? apiKey = null, string? apiSecret = null, bool debugMode = false) | |
| : base(handler, GetStreamUrl(useTestNet), pingIntevral, receiveBufferSize, apiKey, apiSecret, debugMode) | |
| public BybitSpreadTradingWebSocket(bool useTestNet = false, int pingInterval = 20, int receiveBufferSize = 8192, string? apiKey = null, string? apiSecret = null, bool debugMode = false) | |
| : base(new BybitWebSocketHandler(new ClientWebSocket()), GetStreamUrl(useTestNet), pingInterval, receiveBufferSize, apiKey, apiSecret, debugMode) | |
| { | |
| } | |
| public BybitSpreadTradingWebSocket(IBybitWebSocketHandler handler, bool useTestNet = false, int pingInterval = 20, int receiveBufferSize = 8192, string? apiKey = null, string? apiSecret = null, bool debugMode = false) | |
| : base(handler, GetStreamUrl(useTestNet), pingInterval, receiveBufferSize, apiKey, apiSecret, debugMode) |
| - Order Subscribe | ||
| ```DotNet | ||
| var privateWebsocket = new(apiKey: "xxxxxxxxxxx", apiSecret: "xxxxxxxxxxxxxxx", useTestNet: true, pingIntevral: 5, maxAliveTime:"120s"); | ||
| var privateWebsocket = new BybitPrivateWebsocket(apiKey: "xxxxxxxxxxx", apiSecret: "xxxxxxxxxxxxxxx", useTestNet: true, pingIntevral: 5, maxAliveTime:"120s"); |
There was a problem hiding this comment.
Corrected spelling of 'pingIntevral' to 'pingInterval'.
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.
No description provided.