Skip to content

[Kolya] Version update to v1.2.1#42

Merged
VictorFrWu merged 9 commits intomainfrom
kolya-branch
Nov 10, 2025
Merged

[Kolya] Version update to v1.2.1#42
VictorFrWu merged 9 commits intomainfrom
kolya-branch

Conversation

@kolya5544
Copy link
Collaborator

No description provided.

@kolya5544 kolya5544 requested a review from Copilot October 23, 2025 14:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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)
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

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)

Copilot uses AI. Check for mistakes.
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)
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

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)

Copilot uses AI. Check for mistakes.
- 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");
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'pingIntevral' to 'pingInterval'.

Copilot uses AI. Check for mistakes.
@VictorFrWu VictorFrWu merged commit 1e43602 into main Nov 10, 2025
1 check failed
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