List Orders
Retrieves the order book (list of buy and sell orders) for a specific trading pair on Gate.io. Essential for analyzing market depth, liquidity, and finding the best execution prices.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Currency Pair - The trading pair to get order book for (e.g.,
BTC_USDT,ETH_USDT). - Limit - Maximum number of orders to return (default: 10). Controls depth of order book.
Options
- Order Type - Type of orders to retrieve:
buy- List buy orders (bids)sell- List sell orders (asks)
Output
- Result - An array of price levels, where each element is an array containing:
[0]- Price as string[1]- Amount available at this price as string
Example output:
[
["50000.5", "0.5"], // 0.5 BTC available at $50,000.5
["50000.0", "1.2"], // 1.2 BTC available at $50,000.0
["49999.5", "0.8"] // 0.8 BTC available at $49,999.5
]
How It Works
The List Orders node executes the following steps:
- Validates that Currency Pair is not empty
- Sets default limit to 10 if not specified or invalid
- Creates a new Gate.io client (no authentication required for public data)
- Fetches the order book for the specified trading pair
- Filters for either buy (bids) or sell (asks) orders based on Order Type option
- Returns the specified number of price levels
Requirements
- Valid trading pair that exists on Gate.io
- No authentication required (this is public market data)
- Limit should be a positive number (1-100 recommended)
Error Handling
The node will return specific errors in the following cases:
- ErrInvalidArg - Currency Pair is empty
- ErrListOrderBook - Failed to fetch order book from Gate.io
- ErrInvalidOrderType - Order Type option is not set
Usage Notes
- This retrieves public order book data (doesn't require authentication)
- Buy orders (bids) are sorted from highest to lowest price
- Sell orders (asks) are sorted from lowest to highest price
- Data is real-time snapshot of the order book
- Each price level shows total amount available at that price
- Order book data changes rapidly in active markets
- No Client Id required - this is public market data
Best Practices
- Use reasonable limits (10-50) to get meaningful depth without excessive data
- Check both buy and sell orders to understand market spread
- Monitor order book depth to assess market liquidity
- Use for identifying support/resistance levels
- Implement caching for high-frequency access
- Combine with Get Price for comprehensive market analysis
- Use larger limits for low-liquidity pairs