How wisespace-io/binance-rs works
Component Details
a) Spot Trading API Section:
• Market Data Module (src/market.rs)
• Account Operations Module (src/account.rs)
• User Stream Module (src/userstream.rs)
• General Operations Module (src/general.rs)
b) Futures Trading API Section (src/futures/):
• Futures Market Module
• Futures Account Module
• Futures User Stream Module
• Futures WebSocket Module
c) WebSocket Streams Section:
• Real-time Market Data Streams
• User Data Streams
• Multiple Stream Support
• Connection Management
Interaction Flows
• Client authentication flow
• REST API request/response paths
• WebSocket connection establishment
• Data streaming directions
• Error handling paths
Implementation Details
Notes showing:
• Supported API endpoints
• Authentication methods
• Rate limiting
• Market data types
• Order types
• WebSocket event types
Technical Notes
Annotations for:
• Async operations
• Thread safety considerations
• Memory management
• Connection pooling
• Rate limiting
The various types of market data and trading operations supported
Keep the abstraction level focused on the architectural components while providing enough detail to understand the interaction patterns and data flows. This will help developers understand both the high-level structure and the specific implementation details of the library.
Remember to indicate that this is a client library, so all external connections are to Binance's APIs, and show how the library handles both REST and WebSocket connections in a unified way while maintaining separate concerns for different trading types (spot vs. futures).