Hủy lệnh điều kiện
curl --request DELETE \
--url https://services-staging.entrade.com.vn/papertrade-smart-order/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://services-staging.entrade.com.vn/papertrade-smart-order/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services-staging.entrade.com.vn/papertrade-smart-order/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://services-staging.entrade.com.vn/papertrade-smart-order/orders/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://services-staging.entrade.com.vn/papertrade-smart-order/orders/{orderId}"
req, _ := http.NewRequest("DELETE", 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.delete("https://services-staging.entrade.com.vn/papertrade-smart-order/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-staging.entrade.com.vn/papertrade-smart-order/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"investorId": "<string>",
"investorAccountId": 123,
"bankMarginPortfolioId": 123,
"symbol": "<string>",
"condition": "<string>",
"targetPrice": 123,
"targetSide": "<string>",
"targetQuantity": 123,
"type": "<string>",
"expiredTime": "<string>",
"createdDate": "<string>",
"modifiedDate": "<string>",
"metadata": {}
}{
"code": "<string>",
"message": "<string>",
"status": 123
}{
"code": "<string>",
"message": "<string>",
"status": 123
}Smart Order
Hủy lệnh điều kiện
Hủy lệnh điều kiện (Smart Order) theo order_id.
DELETE
/
orders
/
{orderId}
Hủy lệnh điều kiện
curl --request DELETE \
--url https://services-staging.entrade.com.vn/papertrade-smart-order/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://services-staging.entrade.com.vn/papertrade-smart-order/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services-staging.entrade.com.vn/papertrade-smart-order/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://services-staging.entrade.com.vn/papertrade-smart-order/orders/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://services-staging.entrade.com.vn/papertrade-smart-order/orders/{orderId}"
req, _ := http.NewRequest("DELETE", 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.delete("https://services-staging.entrade.com.vn/papertrade-smart-order/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-staging.entrade.com.vn/papertrade-smart-order/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"investorId": "<string>",
"investorAccountId": 123,
"bankMarginPortfolioId": 123,
"symbol": "<string>",
"condition": "<string>",
"targetPrice": 123,
"targetSide": "<string>",
"targetQuantity": 123,
"type": "<string>",
"expiredTime": "<string>",
"createdDate": "<string>",
"modifiedDate": "<string>",
"metadata": {}
}{
"code": "<string>",
"message": "<string>",
"status": 123
}{
"code": "<string>",
"message": "<string>",
"status": 123
}Ủy quyền
JWT token lấy từ API đăng nhập.
Tham số đường dẫn
Số hiệu lệnh
Phản hồi
Thành công
Số hiệu lệnh
“PendingTrigger”, “Canceled” hoặc “Triggered”
Mã khách hàng
Mã tài khoản
Mã gói vay
Mã phái sinh (ví dụ "VN30F2504")
Điều kiện đặt lệnh (ví dụ ">= 1369", "<= 1396")
Giá đặt
"NB" (Mua) hoặc "NS" (Bán)
Khối lượng đặt
Chỉ nhận giá trị "STOP"
Thời gian đóng lệnh
Thời điểm (ngày giờ) đặt lệnh, theo định dạng ISO UTC 8601 format datetime. Ví dụ: 2022-07-15T10:00:00.111+07:00
Thời điểm (ngày giờ) thay đổi cuối cùng của lệnh