Submit a new order
Submit a new order
curl --request POST \
--url https://api-oms.verolabs.co/api/v1/orders/new \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"symbol": "<string>",
"side": "<string>",
"qty": 123,
"order_type": "<string>",
"ref_order_id": "<string>",
"price": "<string>",
"algo_id": "<string>",
"position_id": "<string>",
"persis_state": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: '<string>',
symbol: '<string>',
side: '<string>',
qty: 123,
order_type: '<string>',
ref_order_id: '<string>',
price: '<string>',
algo_id: '<string>',
position_id: '<string>',
persis_state: '<string>'
})
};
fetch('https://api-oms.verolabs.co/api/v1/orders/new', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-oms.verolabs.co/api/v1/orders/new"
payload = {
"account_id": "<string>",
"symbol": "<string>",
"side": "<string>",
"qty": 123,
"order_type": "<string>",
"ref_order_id": "<string>",
"price": "<string>",
"algo_id": "<string>",
"position_id": "<string>",
"persis_state": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-oms.verolabs.co/api/v1/orders/new"
payload := strings.NewReader("{\n \"account_id\": \"<string>\",\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"qty\": 123,\n \"order_type\": \"<string>\",\n \"ref_order_id\": \"<string>\",\n \"price\": \"<string>\",\n \"algo_id\": \"<string>\",\n \"position_id\": \"<string>\",\n \"persis_state\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://api-oms.verolabs.co/api/v1/orders/new");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"account_id\": \"<string>\",\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"qty\": 123,\n \"order_type\": \"<string>\",\n \"ref_order_id\": \"<string>\",\n \"price\": \"<string>\",\n \"algo_id\": \"<string>\",\n \"position_id\": \"<string>\",\n \"persis_state\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
falseCURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-oms.verolabs.co/api/v1/orders/new");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account_id\": \"<string>\",\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"qty\": 123,\n \"order_type\": \"<string>\",\n \"ref_order_id\": \"<string>\",\n \"price\": \"<string>\",\n \"algo_id\": \"<string>\",\n \"position_id\": \"<string>\",\n \"persis_state\": \"<string>\"\n}");
CURLcode ret = curl_easy_perform(hnd);{
"isSuccess": true,
"detail": "<string>",
"data": {
"msg_type": "<string>",
"request_id": "<string>",
"orig_request_id": "<string>",
"client_id": "<string>",
"hft_gateway": "<string>",
"source_service": "<string>",
"source_sequence": 123
}
}{
"isSuccess": false,
"detail": "<string>"
}{
"isSuccess": false,
"detail": "<string>"
}Ủy quyền
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Nội dung
New order request fields.
NewOrderRequest schema.
Trading account. Required.
Ticker. Required; rewritten to ISIN by risk routing.
B or S. Required.
Order quantity. Must be > 0.
LO, PLO, ATO, ATC, MTL, MOK, MAK, or BUYIN.
Client ClOrdID. Empty or - lets the API generate one.
Raw decimal price. No-price types ignore price and go out at 0.
Algorithm identifier for the request.
Position identifier for the request.
Requested order state.
Phản hồi
Accepted
AckResponse schema.
Indicates whether the operation completed successfully.
true
Detailed information for the record.
Ack schema.
Hide child attributes
Hide child attributes
Msg type value for Ack.
Request identifier.
Original request identifier when the operation references a prior request.
Client identifier reported by the record.
Routing identifier reported in the payload.
Source identifier reported by the payload.
Source sequence number for ordering updates.
curl --request POST \
--url https://api-oms.verolabs.co/api/v1/orders/new \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"symbol": "<string>",
"side": "<string>",
"qty": 123,
"order_type": "<string>",
"ref_order_id": "<string>",
"price": "<string>",
"algo_id": "<string>",
"position_id": "<string>",
"persis_state": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: '<string>',
symbol: '<string>',
side: '<string>',
qty: 123,
order_type: '<string>',
ref_order_id: '<string>',
price: '<string>',
algo_id: '<string>',
position_id: '<string>',
persis_state: '<string>'
})
};
fetch('https://api-oms.verolabs.co/api/v1/orders/new', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-oms.verolabs.co/api/v1/orders/new"
payload = {
"account_id": "<string>",
"symbol": "<string>",
"side": "<string>",
"qty": 123,
"order_type": "<string>",
"ref_order_id": "<string>",
"price": "<string>",
"algo_id": "<string>",
"position_id": "<string>",
"persis_state": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-oms.verolabs.co/api/v1/orders/new"
payload := strings.NewReader("{\n \"account_id\": \"<string>\",\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"qty\": 123,\n \"order_type\": \"<string>\",\n \"ref_order_id\": \"<string>\",\n \"price\": \"<string>\",\n \"algo_id\": \"<string>\",\n \"position_id\": \"<string>\",\n \"persis_state\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://api-oms.verolabs.co/api/v1/orders/new");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"account_id\": \"<string>\",\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"qty\": 123,\n \"order_type\": \"<string>\",\n \"ref_order_id\": \"<string>\",\n \"price\": \"<string>\",\n \"algo_id\": \"<string>\",\n \"position_id\": \"<string>\",\n \"persis_state\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
falseCURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-oms.verolabs.co/api/v1/orders/new");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account_id\": \"<string>\",\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"qty\": 123,\n \"order_type\": \"<string>\",\n \"ref_order_id\": \"<string>\",\n \"price\": \"<string>\",\n \"algo_id\": \"<string>\",\n \"position_id\": \"<string>\",\n \"persis_state\": \"<string>\"\n}");
CURLcode ret = curl_easy_perform(hnd);{
"isSuccess": true,
"detail": "<string>",
"data": {
"msg_type": "<string>",
"request_id": "<string>",
"orig_request_id": "<string>",
"client_id": "<string>",
"hft_gateway": "<string>",
"source_service": "<string>",
"source_sequence": 123
}
}{
"isSuccess": false,
"detail": "<string>"
}{
"isSuccess": false,
"detail": "<string>"
}
