Skip to content

Get Historical Deals ​

GET /api/v1.0/accounts/{acc_id}/fills_history

Query the historical transaction list of the specified trading business account.

Note

Querying historical deals for forex orders is not supported.

Path Parameters ​

ParameterTypeRequiredDescription
acc_idstringYesTrading business account ID.

Request Parameters ​

ParameterTypePositionRequiredDescription
trd_marketstringQueryYesTrading market. See Naming Dictionary
codestringQueryNoCode filtering. Return the data of the specified code. By default, return all data.
startuint64QueryNoStart time of update time. Timestamp, in microseconds.
enduint64QueryNoEnd time of update time, which should be after start time. Timestamp, in microseconds.
page_flagstringQueryNoOptional on the first request. Omit it (or send an empty string) to start from the beginning; afterwards pass the page_flag returned by the server.
page_sizeuint32QueryNoPage size. Defaults to 50 if omitted; when set, must not exceed 50.

The combination of start and end:

startendDescription
>0>0start and end are microsecond timestamps, not calendar dates.
0>0start is 90 days before end.
>00end is 90 days after start.
00start is 90 days before the current time, and end is the current time.

Response Parameters ​

FieldTypeDescription
order_fillslist[order_fill]By default, 50 deals are returned every time, with the latest deal first.
page_flagstringPage flag for the next request.
completedboolTrue means that all deals have been returned, and client should stop the request for this batch.

Response Example ​

json
{
  "s": "ok",
  "d": {
    "order_fills": [
      {
        "trd_side": "BUY",
        "deal_id": "F2024030100000001",
        "order_id": "2024030100000001",
        "code": "US.AAPL",
        "stock_name": "Apple Inc.",
        "qty": "100",
        "price": "180.000",
        "create_time": 1709251210000000,
        "update_time": 1709251210000000,
        "counter_broker_id": "9999",
        "counter_broker_name": "Goldman Sachs",
        "status": "OK"
      }
    ],
    "page_flag": "",
    "completed": true
  }
}