Get order by ID
curl --request GET \
--url https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID} \
--header 'Authorization: Bearer <token>'import requests
url = "https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "<string>",
"pageSize": 123,
"pageIndex": 123,
"totalCount": 123,
"data[].orderID": "<string>",
"data[].accountNo": "<string>",
"data[].symbol": "<string>",
"data[].execType": "<string>",
"data[].orderQtty": 123,
"data[].execQtty": 123,
"data[].priceType": "<string>",
"data[].limitPrice": 123,
"data[].matchPrice": 123,
"data[].orStatus": "0",
"data[].txdate": "<string>",
"data[].txtime": "<string>"
}API Reference
Get order by ID
Get a single order by Order ID for a sub-account.
GET
/
aion
/
v1
/
accounts
/
{accountNo}
/
orders
/
{orderID}
Get order by ID
curl --request GET \
--url https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID} \
--header 'Authorization: Bearer <token>'import requests
url = "https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.tcbs.com.vn/aion/v1/accounts/{accountNo}/orders/{orderID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "<string>",
"pageSize": 123,
"pageIndex": 123,
"totalCount": 123,
"data[].orderID": "<string>",
"data[].accountNo": "<string>",
"data[].symbol": "<string>",
"data[].execType": "<string>",
"data[].orderQtty": 123,
"data[].execQtty": 123,
"data[].priceType": "<string>",
"data[].limitPrice": 123,
"data[].matchPrice": 123,
"data[].orStatus": "0",
"data[].txdate": "<string>",
"data[].txtime": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200 - application/json
Successful response
Default = 'List'.
Page size.
Page index.
Total number of records.
Order ID.
Account number.
Stock symbol.
Order type (NB/NS).
Order quantity.
Matched quantity.
Price type.
Order price.
Average match price.
Order status: 0 = Rejected, 2 = Sent, 3 = Canceled, 4 = Matched, 5 = Expired, 8 = Waiting, 10 = Modified, 11 = Sending, 12 = Matched all, A = Modifying, C = Canceling, S = Completed.
Available options:
0, 2, 3, 4, 5, 8, 10, 11, 12, A, C, S Order date (RFC 3339).
Order time.