binance-connector-node
binance-connector-node copied to clipboard
Add AllOrder Method to query orders
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
allOrdersto theTradeclass. - The
allOrdersmethod makes a GET request to/api/v3/allOrdersendpoint. - The method takes a
symbolparameter and optionaloptionsparameter 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 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?