-
Notifications
You must be signed in to change notification settings - Fork 516
feat: support algo trades #688
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
|
@pcriadoperez can you fix the linting here plz? 😅 |
There was a problem hiding this 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 pull request adds comprehensive support for algorithmic (conditional) orders to the Binance Futures API client. The implementation introduces new dedicated methods for algo orders while also providing transparent auto-routing from existing order methods to the appropriate endpoints based on order type.
Key Changes:
- Adds new
OrderStatusenum with algo-specific statuses (ACCEPTED, TRIGGERING, TRIGGERED, FINISHED) - Implements six new dedicated algo order methods (
futuresCreateAlgoOrder,futuresCancelAlgoOrder,futuresGetAlgoOrder, etc.) - Enhances existing order methods with
conditionalparameter to support routing to algo endpoints - Auto-routes STOP_MARKET, TAKE_PROFIT_MARKET, and TRAILING_STOP_MARKET orders to algo endpoints
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| types/base.d.ts | Adds OrderStatus enum with 11 status values including algo-specific states |
| types/futures.d.ts | Adds type definitions for 6 new algo order methods and extends 5 existing methods with conditional/algo parameters |
| src/http-client.js | Implements auto-routing logic in futuresOrder and conditional routing in 5 existing methods; adds 6 new algo order methods |
| test/static-tests.js | Adds 12 static tests covering auto-routing and conditional parameter behavior; increases timeout from 10s to 20s |
| test/futures-algo-orders.js | Adds comprehensive integration test suite with 14 tests covering all algo order operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.