exchange.GetHistoryOrders
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
| Type | Description |
|
|
Arguments
| Name | Type | Required | Description |
symbol | string | No | Instrument code, for example |
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, andlimitparameters 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
symbolparameter is specified, the historical orders of the set trading instrument are queried. -
When the
sinceparameter is specified, the query starts from thesincetimestamp and proceeds toward the current time. -
When the
limitparameter 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.