API Specs
API List
Token and Authentication code
AccessToken
POST
Trading/AccessToken
GetOTP
POST
Trading/GetOTP
Query cash and derivatives accounts
orderBook
GET
Trading/orderBook
auditOrderBook
GET
Trading/auditOrderBook
cashAcctBal
GET
Trading/cashAcctBal
derivAcctBal
GET
Trading/derivAcctBal
ppmmraccount
GET
Trading/ppmmraccount
stockPosition
GET
Trading/stockPosition
derivPosition
GET
Trading/derivPosition
maxBuyQty
GET
Trading/maxBuyQty
maxSellQty
GET
Trading/maxSellQty
orderHistory
GET
Trading/orderHistory
rateLimit
GET
Trading/rateLimit
Order placing
NewOrder
POST
Trading/NewOrder
CancelOrder
POST
Trading/CancelOrder
derNewOrder
POST
Trading/derNewOrder
ModifyOrder
POST
Trading/ModifyOrder
derCancelOrder
POST
Trading/derCancelOrder
derModifyOrder
POST
Trading/derModifyOrder
Cash
cashInAdvanceAmount
GET
cash/cashInAdvanceAmount
unsettleSoldTransaction
GET
cash/unsettleSoldTransaction
transferHistories
GET
cash/transferHistories
cashInAdvanceHistories
GET
cash/cashInAdvanceHistories
estCashInAdvanceFee
GET
cash/estCashInAdvanceFee
vsdCashDW
POST
cash/vsdCashDW
transferInternal
POST
cash/transferInternal
createCashInAdvance
POST
cash/createCashInAdvance
Stock
transferable
GET
stock/transferable
transferHistories
GET
stock/transferHistories
transfer
POST
stock/transfer
Online Right Subscription
dividend
GET
ors/dividend
exercisableQuantity
GET
ors/exercisableQuantity
histories
GET
ors/histories
create
POST
ors/create
Configuration
Post
Header (Authorization, Content-Type)
Body (json)
Get
Header (Authorization)
Params
Request access
POST AccessToken
To get token to access APIs.
Details
consumerID
string
Yes
Your consumerID
consumerSecret
string
Yes
Your consumerSecret
code
string
No
TwoFactorType
string
Yes
Your account's authentication type. Supported values: 0 (PIN), 1 (OTP)
isSave
boolean
Yes
If true: you will not have to fill in authentication code for each transaction. The code will be saved within the login sesion.
If false: you will have to fill in authentication code for each transaction.
Sample
Successfull request:
Error request:
POST GetOTP
To get OTP code if you registered SMS OTP/Email OTP.
If you get OTP code for 5 times without verification, your OTP service will be temporarily blocked and then automatically unlocked after sometimes.
Details
consumerID
string
Yes
You consumerID
consumerSecret
string
Yes
Your consumerSecret
Sample
Successfull request:
Error request:
GET auditOrderBook
To get the audit of the orders.
Details
account
string
Yes
Sample
POST OrderBook
To get latest orderbook, for both cash and derivatives accounts.
Details
account
string
Yes
Input the account to query. Accept both cash and derivatives accounts.
Sample
GET orderHistory
To get order history, for both cash and derivatives accounts.
Details
account
string
Yes
startDate
date
Yes
Format dd/mm/yyyy
endDate
date
Yes
Format dd/mm/yyyy
Sample
GET cashAccountBalance
To get cash account's balance.
Details
account
string
Yes
Sample
GET stockPosition
To query stock positions of cash accounts.
Details
account
string
Yes
Input account number
Sample
GET derivativeAccountBalance
To get derivatives account's balance.
Sample
account
string
Yes
Sample
GET derivativePosition
To get dervatives account's position. After getting the snapshot, you can subscribed streaming to get realtime update.
Details
account
string
Yes
querySummary
boolean
Yes
True: Netoff position
False: don't netoff position
Sample
GET maxBuyQty
To get max buy quantity. Applied for both cash and derivatives accounts.
Details
account
string
Yes
instrumentID
string
Yes
price
number
Yes
Sample
GET maxSellQty
To get max sell quantity. Applied for both cash and derivatives accounts.
Details
account
string
Yes
instrumentID
string
Yes
price
number
Yes
Sample
POST NewOrder
To place orders.
Details
instrumentID
string
Yes
market
string
Yes
VN: cash market
VNFE: derivatives market
buySell
string
Yes
buy (B): mua/Sell (S): bán đã đặt theo orderID của lệnh
B: Buy
S: Sell
orderType
string
Yes
channelID
string
Yes
price
number
Yes
Giá đặt lệnh:
- Nếu loại lệnh là LO -> Giá đặt > 0
- Nếu loại lệnh khác LO -> Giá đặt = 0
quantity
number
Yes
account
string
Yes
requestID
string
Yes
ID đặt lệnh trong ngày. Bắt buộc 8 số random
stopOrder
string
Yes
True: conditional orders. Only applied for derivatives market.
False: normal orders
stopPrice
number
Yes
If stopOrder = true -> stopPrice > 0
stopType
string
Yes
Required if stopType = true:
D: Down
U: Up
V: Trailling Up
E: Trailing Down
O: OCO
B: BullBear
stopStep
number
Yes
Stop loss amount, only applied for BullBear (stopType = B)
profitStep
number
Yes
Take profit amount, only applied for BullBear (stopType = B)
code
number
No
Authentication code: PIN/OTP (depending on your registered authentication type)
deviceID
string
Yes
userAgent
string
No
Sample
Successful request:
Error request:
POST ModifyOrder
To amend an order.
Details
orderID
string
Yes
instrumentID
string
Yes
instrument of the amended order
marketID
string
Yes
VN: cash market
VNFE: derivatives market
buySell
string
Yes
side of the amended order
orderType
string
Yes
channelID
string
Yes
price
number
Yes
New price
quantity
number
Yes
New quantity
account
string
Yes
requestID
string
Yes
Unique id of the request generated by client. Required 8 digits.
code
number
No
deviceID
string
Yes
userAgent
string
No
Sample
Successful request:
Error request:
POST CancelOrder
To cancel an order.
Details
orderID
string
Yes
instrumentID
string
Yes
market
string
Yes
buySell
string
Yes
orderType
string
Yes
channelID
string
Yes
price
number
Yes
quantity
number
Yes
account
string
Yes
requestID
string
Yes
code
number
No
deviceID
string
Yes
userAgent
string
No
Sample
Successful request:
Error request:
POST derNewOrder
To place derivatives orders.
Details
instrumentID
string
Yes
market
string
Yes
VNFE: derivatives market
buySell
string
Yes
B: Buy
S: Sell
orderType
string
Yes
channelID
string
Yes
price
number
Yes
quantity
number
Yes
account
string
Yes
requestID
string
Yes
stopOrder
string
Yes
True: conditional order, applied to derivatives market only.
False: normal order
stopPrice
number
Yes
If stopOrder = true -> stopPrice > 0
stopType
string
Yes
Required if stopType = true:
D: Down
U: Up
V: Trailling Up
E: Trailing Down
O: OCO
B: BullBear
stopStep
number
Yes
only applied for BullBear (stopType = B)
profitStep
number
Yes
Only applied for BullBear (stopType = B)
code
number
No
deviceID
string
Yes
userAgent
string
No
Sample
Successful request:
Error request:
POST derModifyOrder
To amend a derivatives order.
Details
orderID
string
Yes
instrumentID
string
Yes
marketID
string
Yes
buySell
string
Yes
orderType
string
Yes
channelID
string
Yes
price
number
Yes
quantity
number
Yes
account
string
Yes
requestID
string
Yes
uniqueid of the request
code
number
No
Authentication code: PIN, OTP (depending your registered authentication type)
deviceID
string
Yes
userAgent
string
No
Sample
Successful request:
Error request:
POST derCancelOrder
To cancel a derivatives order.
Details
orderID
string
Yes
instrumentID
string
Yes
market
string
Yes
VNFE
buySell
string
Yes
orderType
string
Yes
channelID
string
Yes
price
number
Yes
quantity
number
Yes
account
string
Yes
requestID
string
Yes
code
number
No
Authentication code: PIN/OTP depending on your registered authentication type
deviceID
string
Yes
userAgent
string
No
Sample
Successfull request:
Error request:
GET rateLimit
Get rate Limit
Details
message
string
status
number
data
list
List data
endpoint
string
The set rateLimit information includes one of the following cases: * -> All APIs post:* -> API method POST get:* -> API method GET *:*/api_name -> rateLimit API name
period
string
format: s,m,h,d
limit
number
Sample:
Cash
GET cashInAdvanceAmount
Query cash in advance available amount
Details
account
string
Yes
Sample:
GET unsettleSoldTransaction
Query unsettle sold transactions
Details
account
string
Yes
settleDate
string
No
Format: dd/mm/yyyy
Sample:
GET transferHistories
Query cash transfer histories
Details
account
string
Yes
fromDate
string
Yes
format: dd/mm/yyyy
toDate
string
Yes
format: dd/mm/yyyy
Sample:
GET cashInAdvanceHistories
Query cash in advance histories
Details
account
string
Yes
fromDate
string
Yes
Format: dd/mm/yyyy
toDate
string
Yes
Format: dd/mm/yyyy
Note:
fromDate - toDate not more than 1 month
The time for searching the past should not exceed 6 months
Sample:
GET estCashInAdvanceFee
Query estimate cash in advance fee
Details
account
string
Yes
ciaAmount
string
No
receiveAmount
string
No
Sample:
POST vsdCashDW
Tranfer cash with VSD (only support for derivatives account)
Details
account
string
Yes
amount
number
Yes
type
string
Yes
Include:
W = withdraw
D = deposit
remark
string
No
code
string
No
isSave = false -> Required PIN/ OTP isSave = true -> no required
Sample:
Successfull request:
Error request:
POST transferInternal
Transfer cash inside
Note:
The source account number and the receiving account number must have the same name and money can only be transferred between sub-accounts
Thông tin chi tiết
account
string
Yes
beneficiaryAccount
string
Yes
amount
number
Yes
type
string
Yes
Include:
W = withdraw
D = deposit
remark
string
No
code
string
No
isSave = false -> Required PIN/ OTP isSave = true -> no required
Ví dụ
Successfull request:
Error request:
POST createCashInAdvance
Create cash in advance transaction
Details
account
string
Yes
ciaAmount
string
No
receiveAmount
string
No
code
string
Yes
OTP/PIN
Sample
Successfull request:
Error request:
Online Right Subscription
GET dividend
Get history dividend
Details
account
string
Yes
Sample
GET exercisableQuantity
Query stock quantity can register subscription
Details
account
string
Yes
Sample:
GET histories
Get histories
Details
account
string
Yes
Số tài khoản nguồn truy vấn
startDate
string
Yes
Ngày bắt đầu tìm kiếm Định dạng: dd/mm/yyyy
endDate
string
Yes
Ngày kết thúc tìm kiếm Định dạng: dd/mm/yyyy
Note:
fromDate - toDate not more than 1 month
The time for searching the past should not exceed 1 year
Sample
POST create
Create online right subscription
Thông tin chi tiết
account
string
Yes
instrumentID
string
Yes
entitlementID
string
Yes
quantity
number
Yes
amount
number
Yes
code
string
No
PIN/ OTP
Sample
Successfull request:
Error request:
Stock
GET transferable
Get stock transferable
Details
account
string
Yes
Sample:
GET transferHistories
Get stock transfer history
Details
account
string
Yes
startDate
string
Yes
format: dd/mm/yyyy
endDate
string
Yes
format: dd/mm/yyyy
Note:
fromDate - toDate not more than 1 month
The time for searching the past should not exceed 6 months
Sample:
POST transfer
Transfer stock inside
Detail
account
string
Yes
beneficiaryAccount
string
Yes
exchangeID
string
Yes
instrumentID
string
Yes
quantity
number
Yes
code
string
No
isSave = false -> required PIN/ OTP isSave = true -> no required
Sample:
Successfull request:
Error request:
Last updated