Type/to search
Built-in Functions
Global
Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges

Retrieves the historical orders of the current trading pair or contract, and supports specifying a particular trading instrument.

exchange.GetHistoryOrders()
exchange.GetHistoryOrders(symbol)
exchange.GetHistoryOrders(symbol, since)
exchange.GetHistoryOrders(symbol, since, limit)
exchange.GetHistoryOrders(since)
exchange.GetHistoryOrders(since, limit)

Examples

Query historical orders of the current trading pair.

javascript
function main() { var historyOrders = exchange.GetHistoryOrders() Log(historyOrders) }
python
def main(): historyOrders = exchange.GetHistoryOrders() Log(historyOrders)
rust
fn main() { let historyOrders = exchange.GetHistoryOrders(None, None, None); Log!(historyOrders); }

Returns

TypeDescription

Order array / null value

Order structure array on success; null value on failure.

Arguments

NameTypeRequiredDescription

symbol

string

No

Instrument code, for example BTC_USDT on a spot exchange object or BTC_USDT.swap on a futures exchange object; the notation (including options) is described in Symbols. If omitted, the historical orders of the current trading pair and contract code are queried.

since

number

No

Starting timestamp of the query, in milliseconds.

limit

number

No

Number of orders to query.

See Also

Remarks

  • When the symbol, since, and limit parameters are not specified, the historical orders of the current trading pair or contract are queried by default, i.e., the historical orders within a certain range closest to the current time are queried. The specific query range depends on the single-query range of the exchange's interface.

  • When the symbol parameter is specified, the historical orders of the set trading instrument are queried.

  • When the since parameter is specified, the query starts from the since timestamp and proceeds toward the current time.

  • When the limit parameter is specified, the query returns once a sufficient number of records is reached.

  • This function is only supported by exchanges that provide a historical order query interface.

Exchanges that do not support this function: Bitstamp, Coincheck, Uniswap, PancakeSwap, Aerodrome, Velodrome, KyberSwap, OneInch, OKX_DEX, Futures_IB, Web3. The call fails with an error and returns null; for all exchanges see Capability Matrix.