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
marketintqueryYesMarket (from market_id in the account list)
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/80303779/history-orders?market=1&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": []
  },
  "pagination": {
    "has_more": false,
    "next_key": ""
  }
}

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"}
}