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.
TradeType
Enum defining the types of trades. Source:hummingbot/core/data_type/common.py:62
Buy trade - purchasing the base asset with the quote asset
Sell trade - selling the base asset for the quote asset
Range trade - used for liquidity provision in a specific price range
LPType
Enum defining liquidity provider operation types. Source:hummingbot/core/data_type/common.py:68
Add liquidity to a pool
Remove liquidity from a pool
Collect fees from a liquidity position
Trade
NamedTuple representing an executed trade. Source:hummingbot/core/data_type/trade.py:13
Trading pair for the trade (e.g., “BTC-USDT”)
Side of the trade (BUY or SELL)
Execution price of the trade
Amount traded
Type of order that generated the trade
Exchange/market where the trade was executed
Trade execution timestamp
Fee associated with the trade
Properties
Returns the trade side name (“BUY” or “SELL”)
Methods
Converts a list of Trade objects to a pandas DataFrame with columns:
- trading_pair
- price
- quantity
- order_type
- trade_side
- market
- timestamp
- fee_percent
- flat_fee / gas
TradeUpdate
NamedTuple representing an update for a trade execution. Source:hummingbot/core/data_type/in_flight_order.py:48
Unique identifier for the trade
Client-assigned order identifier
Exchange-assigned order identifier
Trading pair for the trade
Timestamp when the trade was filled (in seconds)
Price at which the trade was filled
Amount of base asset filled
Amount of quote asset filled
Fee paid for the trade
Whether the trade was executed as a taker (CEXs deliver trade events from the taker’s perspective)
Properties
The asset in which the fee was paid
Methods
Creates a TradeUpdate instance from a JSON dictionary
Converts the TradeUpdate to a JSON-serializable dictionary
InFlightOrder
Class representing an order that is currently being tracked by the system. Source:hummingbot/core/data_type/in_flight_order.py:91
Constructor Parameters
Client-assigned unique identifier for the order
Trading pair for the order
Type of the order
Trade type (BUY or SELL)
Order amount
Timestamp when the order was created
Order price (for limit orders)
Exchange-assigned order identifier
Initial state of the order
Leverage for the order (for derivatives)
Position action (for derivatives)
Properties
Base asset of the trading pair
Quote asset of the trading pair
True if the order is pending creationTrue if the order is pending cancellationTrue if the order is open (PENDING_CREATE, OPEN, PARTIALLY_FILLED, or PENDING_CANCEL)True if the order is done (CANCELED, FILLED, FAILED, or fully executed)True if the order is completely filledTrue if the order failedTrue if the order was canceledAverage price of all partial fills
Methods
Initializes an InFlightOrder from a JSON object
Returns the InFlightOrder as a JSON object
Converts the InFlightOrder to a LimitOrder object
Updates the exchange order ID
Asynchronously waits for and returns the exchange order ID (with 10 second timeout)
Returns the total fee paid for all trade updates, expressed in the specified token
Updates the order with an OrderUpdate (from REST or WebSocket API). Returns
True if updated.Updates the order with a TradeUpdate (from REST or WebSocket API). Returns
True if updated.Waits asynchronously until the order is completely filled
Waits asynchronously until the order is processed by the exchange
Builds a human-readable message for when the order is created
PerpetualDerivativeInFlightOrder
Extends InFlightOrder for perpetual derivative orders. Source:hummingbot/core/data_type/in_flight_order.py:398
Methods
Builds a human-readable message for when the perpetual derivative order is created, including position information