-
Notifications
You must be signed in to change notification settings - Fork 74
Fix connection issues #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…lient and AsyncWebSocketClient; add tests for connection fixes
…ection management; add balance retrieval tests
… adding a comprehensive test for order tracking
… order placement, duplication prevention, event-driven completion monitoring, and fallback handling for timeouts.
…ieval and testing
|
Caution Review failedThe pull request is closed. WalkthroughThis update introduces major enhancements to the PocketOption Async API client and its documentation. The README is fully rewritten, providing comprehensive usage, architecture, and testing details. The core client is refactored for robust asynchronous order and candle tracking, persistent and multi-region connections, improved logging, and error handling. Numerous new and updated test scripts validate connection, order, and candle functionality, as well as recent bug fixes. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant AsyncPocketOptionClient
participant WebSocketClient
participant PocketOptionServer
User->>AsyncPocketOptionClient: connect(regions, persistent)
AsyncPocketOptionClient->>WebSocketClient: initiate connection
WebSocketClient->>PocketOptionServer: handshake & authenticate
PocketOptionServer-->>WebSocketClient: handshake response
WebSocketClient-->>AsyncPocketOptionClient: emit 'authenticated'
AsyncPocketOptionClient->>WebSocketClient: subscribe/init data
User->>AsyncPocketOptionClient: place_order(asset, amount, direction, duration)
AsyncPocketOptionClient->>WebSocketClient: send order
PocketOptionServer-->>WebSocketClient: order confirmation/result
WebSocketClient-->>AsyncPocketOptionClient: emit 'order_opened'/'order_closed'
AsyncPocketOptionClient-->>User: return OrderResult
User->>AsyncPocketOptionClient: get_candles(asset, timeframe, count)
AsyncPocketOptionClient->>WebSocketClient: request candles
PocketOptionServer-->>WebSocketClient: candles data
WebSocketClient-->>AsyncPocketOptionClient: emit 'candles_received'
AsyncPocketOptionClient-->>User: return candles
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (18)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests
Refactor