Skip to content

History Orders ​

GET /api/v1.0/sim-trade/{acc_id}/history-orders

Get historical orders (supports time range + pagination).

Parameters ​

ParameterTypeLocationRequiredDescription
acc_idstringpathYesBusiness account ID
marketintqueryYesAccount market ID (the account's market_id from the account list, e.g. 1=HK stocks 100=US margin); must match the account of acc_id
time_beginint64queryNoStart time (Unix microseconds)
time_endint64queryNoEnd time (Unix microseconds)
page_sizeintqueryNoPage size (default 50)
next_keystringqueryNoPagination cursor

Request Example ​

bash
curl -s "https://webapi.moomoo.com/api/v1.0/sim-trade/80306537/history-orders?market=100&page_size=10" -H "Authorization: Bearer <AccessToken>" | jq

Response Fields ​

Order fields are the same as Today's Orders, with additional pagination info: pagination.has_more (bool), pagination.next_key (string).

Response Example ​

json
{
  "ret_code": 0,
  "ret_msg": "success",
  "data": {
    "orders": [
      {
        "order_id": "1294505",
        "side": 1,
        "market": 2,
        "symbol": "AAPL",
        "stock_name": "Apple",
        "order_type": 1,
        "status": 5,
        "qty": "1",
        "cum_qty": "0",
        "price": "1",
        "avg_fill_price": "0",
        "aux_price": null,
        "time_in_force": 0,
        "order_trade_time_type": 1,
        "create_time": "1794192328000000",
        "update_time": "1794192328000000",
        "text": ""
      }
    ]
  },
  "pagination": {
    "next_key": "0",
    "has_more": false
  }
}

Error response ​

HTTP status remains 200. A failed request returns ret_code != 0 and an error object.

json
{
  "ret_code": -3,
  "ret_msg": "invalid request",
  "error": {"code": "invalid_parameter", "message": "invalid request"}
}