-
Notifications
You must be signed in to change notification settings - Fork 2
api placeorder
ntwerd edited this page Apr 12, 2023
·
3 revisions
Send place order to backend broker
http://122.8.148.106/robot/api/v1/placeOrder/<brokerCode>
POST
Header : X-API-KEY: <XXXXXX> , Content-Type: application/json
-
accountNo: your account number -
symbol: product symbol -
position: For stock product Buy > O, Sell > C -
side: Buy > B, Sell > S -
volume: trade volume -
price: trade price -
priceType:- ATO
- ATC
- LIMIT
- MP
- MP-MKT
- MP-MTL
-
validityType:- GTA
- DAY
- AUTO-M
- GTC
- FOK
- IOC
- GTS
- GTT
-
pbVolume: Iceburg volume -
takeProfitPrice -
stopLossPrice -
note -
ttf
{
"accountNo":"1234567-8",
"symbol":"PTT",
"position":"O",
"side":"B",
"volume":100,
"price":52.75,
"priceType":"LIMIT",
"validityType":"DAY",
"takeProfitPrice":0,
"stopLossPrice":0,
"note":"",
"pbVolume":"",
"ttf":"NORMAL"
}
-
Code: 200
Content:
{
"status": "T",
"message": "Success",
"data": {
"orderNo": "4823"
}
}
-
Code: 200
Content:
{
"status": "F",
"message": "Account not found",
"data": {}
}
OR
- Code: 200 Content:
{
"status": "F",
"message": "QWERD is unavailable to trade with this account type.",
"data": {}
}