binance-connector-node icon indicating copy to clipboard operation
binance-connector-node copied to clipboard

Add AllOrder Method to query orders

Open maikonweber opened this issue 1 year ago • 1 comments

Pull Request Description

Summary

This pull request adds a new method allOrders to the Trade class in order to retrieve all orders for a specific symbol using the Binance API.

Changes

  • Added a new method allOrders to the Trade class.
  • The allOrders method makes a GET request to /api/v3/allOrders endpoint.
  • The method takes a symbol parameter and optional options parameter to specify additional query parameters.
  • The method returns the data received from the Binance API for all orders.

Usage Example

// Assuming you have an instance of the Trade class
const tradeInstance = new Trade();

// Specify the symbol and options (if needed)
const symbol = 'BNBUSDT';
const options = {
  // Add any additional options if required
};

// Call the allOrders method
try {
  const allOrders = await tradeInstance.allOrders(symbol, options);
  console.log('All orders:', allOrders);
} catch (error) {
  console.error('Error retrieving all orders:', error);
}

maikonweber avatar Mar 09 '24 21:03 maikonweber

@maikonweber The endpoint you are adding already exists in the connector: allOrders

Could you please clarify if there is any issue with the existing implementation that prompted the addition of this endpoint?

alplabin avatar Apr 01 '24 05:04 alplabin