Skip to content

Conversation

carlosmiei
Copy link
Collaborator

@carlosmiei carlosmiei commented Sep 23, 2025

  • Fixes proxy use for websockets
  • Adjusts mock tests for demo domain
  • Feat: allows running tests in parallel
  • Simplifies code by using tox instead of both tox and github action matrix strategy
  • Update github action verions

@carlosmiei carlosmiei requested a review from Copilot September 23, 2025 17:00
@carlosmiei carlosmiei self-assigned this Sep 23, 2025
Copy link

@Copilot 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 adds demo trading support to the Binance client library, providing an alternative to the existing testnet functionality. The change introduces a new demo parameter that can be used alongside or instead of the testnet parameter to connect to Binance's demo trading environment.

  • Adds demo URL constants for all trading endpoints (spot, futures, coin futures, websockets)
  • Introduces demo parameter to client constructors and base client initialization
  • Updates URL selection logic to prioritize testnet over demo when both are enabled
  • Updates documentation to reflect demo trading support and mark testnet as deprecated

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
binance/base_client.py Adds demo URL constants and demo parameter support with URL selection logic
binance/client.py Adds demo parameter to synchronous client constructor
binance/async_client.py Adds demo parameter to asynchronous client constructor and factory method
binance/ws/streams.py Implements demo websocket URL selection across all socket manager methods
README.rst Updates documentation to mention demo trading support and mark testnet as deprecated
Comments suppressed due to low confidence (1)

binance/client.py:8677

  • The URL field has been cleared to an empty string, which appears unrelated to the demo trading feature. This change should be reverted or explained in the commit message if intentional.
                "url": "",

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@carlosmiei carlosmiei requested a review from Copilot September 24, 2025 09:22
Copy link

@Copilot 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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

binance/client.py:8748

  • [nitpick] The URL field has been cleared to an empty string. This could cause issues for consumers expecting a valid URL. Consider using a placeholder URL or documenting this as intentional for demo purposes.
                "url": "",

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@carlosmiei carlosmiei merged commit 3ce7b9c into sammchardy:master Sep 30, 2025
8 checks passed
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