Skip to content

Conversation

@pcriadoperez
Copy link
Contributor

No description provided.

@carlosmiei
Copy link
Contributor

@pcriadoperez can you fix the linting here plz? 😅

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 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 OrderStatus enum with algo-specific statuses (ACCEPTED, TRIGGERING, TRIGGERED, FINISHED)
  • Implements six new dedicated algo order methods (futuresCreateAlgoOrder, futuresCancelAlgoOrder, futuresGetAlgoOrder, etc.)
  • Enhances existing order methods with conditional parameter 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.

@pcriadoperez pcriadoperez marked this pull request as ready for review December 7, 2025 10:54
@carlosmiei carlosmiei self-assigned this Dec 8, 2025
@carlosmiei carlosmiei merged commit 4dbb67c into ccxt:master Dec 8, 2025
1 check 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