The resource loading... loading...

exchange.GetHistoryOrders

The exchange.GetHistoryOrders() function is used to obtain the current trading pair, the historical orders for contracts; it supports the specification of specific trading varieties.

The exchange.GetHistoryOrders() function returns an array of {@struct/Order Order} structures if the request for data succeeds, and null if the request fails. {@struct/Order Order} arrays, null values

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

The symbol parameter is used to specify the trade symbol. In the case of the BTC_USDT trading pair, for example, when the exchange is a spot exchange object, the parameter format for symbol is BTC_USDT; if it’s a futures exchange object, taking perpetual contract as an example, the parameter format for symbol is: BTC_USDT.swap. If you are querying the order data of option contracts, set the parameter symbol to "BTC_USDT.BTC-240108-40000-C" (taking Binance Option BTC-240108-40000-C as an example). The format is a combination of the trading pair defined by the FMZ platform and the specific option contract code defined by the exchange, separated by the character “.”. If this parameter is not passed, the order data of the currently set trading pair and contract code will be requested by default.

symbol false string The since parameter is used to specify the starting timestamp of the query in milliseconds. since false number The limit parameter is used to specify the number of orders to query. limit false number

function main() {
    var historyOrders = exchange.GetHistoryOrders()
    Log(historyOrders)
}
def main():
    historyOrders = exchange.GetHistoryOrders()
    Log(historyOrders)
void main() {
    auto historyOrders = exchange.GetHistoryOrders();
    Log(historyOrders);
}
  • When symbol, since, limit parameters are not specified, the default query is the current trading pair, the historical orders of contract. Queries the historical orders within a certain range nearest to the current time, the query range depends on the single query range of the exchange interface.
  • When the symbol parameter is specified, query the history of orders for the set trade type.
  • When the since parameter is specified, query in the direction of the current time using the since timestamp as the start time.
  • If the limit parameter is specified, the query is returned after a sufficient number of entries.
  • This function is only supported for exchanges that provide a historical order query interface.

Exchanges that do not support the exchange.GetHistoryOrders() function:

Function Name Unsupported Spot Exchanges Unsupported Futures Exchanges
GetHistoryOrders Zaif / Upbit / Coincheck / Bitstamp / Bithumb / BitFlyer / BigONE Futures_dYdX / Futures_Bibox / Futures_ApolloX

{@struct/Order Order}, {@fun/Trade/exchange.GetOrder exchange.GetOrder}, {@fun/Trade/exchange.GetOrders exchange.GetOrders}

exchange.GetOrders exchange.SetPrecision