Trading

trade-orderBook

Retrieve order book history by account and filter.

GET
/api/v3/trading/orderBook

Authorization

Bearer
AuthorizationBearer <token>

Enter the JWT token in the format Bearer <token>.

In: header

Header Parameters

Content-Typestringrequired

The format of the request body content. Primarily application/json.

User-Agentstringoptional

Information about the client sending the request.

Accept-Languagestringoptional

The desired response language. If this header is absent, the system will default to en

Query Parameters

accountNostringrequired

The trading account for which to retrieve the order book history.

fromstringrequired

The start time to filter the order book history, in ISO 8601 format (e.g. 2024-01-01T00:00:00Z).

tostringrequired

The end time to filter the order book history, in ISO 8601 format (e.g. 2024-01-01T00:00:00Z).

symbolstringoptional

The securities symbol to filter the order book history.

orderStatusstringoptional

The order status to filter by. Refer to the list of statuses in the Order Statuses & Status Flow appendix.

pageSizeintegeroptional

The number of records per page when paginating results. If not provided, the system will use the default value (e.g. 20). This value helps customers control the amount of data returned in each response, especially when the order book history contains many records.

pageIndexintegeroptional

The page index when paginating results, starting from 1. If not provided, the system will use the default value of 1. This value, combined with `pageSize`, helps customers retrieve different portions of the order book history data when there are many records.

Response Headers

X-RATELIMIT-LIMITstringoptional

The request limit within the cycle.

X-RATELIMIT-REMAININGstringoptional

The number of requests remaining in the current cycle.

X-RATELIMIT-RESETstringoptional

The time at which the request limit resets.

Response Body

application/json

application/json

curl -X GET "https://api.ssi.com.vn/api/v3/trading/orderBook?accountNo=string&from=string&to=string" \  -H "Content-Type: application/json"

Success

{
  "data": {
    "accountNo": "string",
    "totalRecord": 0,
    "orderList": [
      {
        "clientRequestId": "string",
        "orderId": "string",
        "symbol": "string",
        "side": "B",
        "orderType": "LO",
        "quantity": "string",
        "price": "string",
        "filledQty": "string",
        "cancelQty": "string",
        "avgPrice": "string",
        "inputTime": "string",
        "modifiedTime": "string",
        "orderStatus": "PD",
        "message": "string"
      }
    ]
  }
}

Invalid request.

{
  "code": "400",
  "msg": "Invalid request"
}