Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hummingbot/hummingbot/llms.txt
Use this file to discover all available pages before exploring further.
OrderType
Enum defining the types of orders supported by Hummingbot. Source:hummingbot/core/data_type/common.py:8
Market order - executed immediately at the current market price
Limit order - executed only at the specified price or better
Limit maker order - ensures the order is posted to the order book and not immediately filled
AMM swap order - swap tokens through an automated market maker
Add liquidity to AMM/CLMM pool
Remove liquidity from AMM/CLMM pool
Methods
Returns
True if the order type is LIMIT or LIMIT_MAKEROrderState
Enum representing the lifecycle states of an order. Source:hummingbot/core/data_type/in_flight_order.py:25
Order creation is pending
Order is open and active on the exchange
Order cancellation is pending
Order has been canceled
Order has been partially filled
Order has been completely filled
Order has failed
Order is pending approval (e.g., for DEX transactions)
Order has been approved
Order has been created
Order has been completed
OpenOrder
NamedTuple representing an open order on an exchange. Source:hummingbot/core/data_type/common.py:20
Client-assigned unique identifier for the order
Trading pair for the order (e.g., “BTC-USDT”)
Order price
Order amount
Amount already executed
Order status
Type of the order
True if the order is a buy order, False if sellOrder creation timestamp
Exchange-assigned order identifier
MarketOrder
NamedTuple representing a market order. Source:hummingbot/core/data_type/market_order.py:8
Unique identifier for the order
Trading pair for the order
True for buy orders, False for sell ordersBase asset of the trading pair
Quote asset of the trading pair
Order amount
Order creation timestamp
Position action (for derivatives)
Methods
Converts a list of MarketOrder objects to a pandas DataFrame
Returns
OrderType.MARKETCreates a copy of the order with a new client order ID
OrderCandidate
Dataclass containing a complete picture of the impact of a potential order on the user account. Source:hummingbot/core/data_type/order_candidate.py:17
WARNING: Do not use this class for sizing. Instead, use the
BudgetChecker.Trading pair for the order
Whether the order is a maker order
Type of the order
Side of the order (BUY or SELL)
Order amount
Order price
Base collateral required for the order
Percentage-fee collateral
Percentage fee value
Fixed-fee collaterals
Potential return of the order
Whether the order has been resized
Whether the order is from total balances
Properties
Dictionary mapping tokens to their required collateral amounts
True if the order amount is zeroMethods
Returns the size token and order size
Sets the order amount to zero
Populates all collateral entries based on the exchange
Adjusts the order based on available balances
PerpetualOrderCandidate
Extends OrderCandidate for perpetual derivative orders. Source:hummingbot/core/data_type/order_candidate.py:271
Leverage for the order
Whether this order closes a position