Hủy lệnh điều kiện
curl --request DELETE \
--url https://api.ssi.com.vn/api/v3/trading/fco/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'X-Signature: <x-signature>' \
--data '
{
"fcoId": "<string>",
"code": "<string>",
"deviceId": "<string>",
"userAgent": "<string>"
}
'import requests
url = "https://api.ssi.com.vn/api/v3/trading/fco/order"
payload = {
"fcoId": "<string>",
"code": "<string>",
"deviceId": "<string>",
"userAgent": "<string>"
}
headers = {
"Content-Type": "<content-type>",
"X-Signature": "<x-signature>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'Content-Type': '<content-type>',
'X-Signature': '<x-signature>',
Authorization: 'Bearer <token>'
},
body: JSON.stringify({
fcoId: '<string>',
code: '<string>',
deviceId: '<string>',
userAgent: '<string>'
})
};
fetch('https://api.ssi.com.vn/api/v3/trading/fco/order', 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://api.ssi.com.vn/api/v3/trading/fco/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'fcoId' => '<string>',
'code' => '<string>',
'deviceId' => '<string>',
'userAgent' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>",
"X-Signature: <x-signature>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ssi.com.vn/api/v3/trading/fco/order"
payload := strings.NewReader("{\n \"fcoId\": \"<string>\",\n \"code\": \"<string>\",\n \"deviceId\": \"<string>\",\n \"userAgent\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Signature", "<x-signature>")
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://api.ssi.com.vn/api/v3/trading/fco/order")
.header("Content-Type", "<content-type>")
.header("X-Signature", "<x-signature>")
.header("Authorization", "Bearer <token>")
.body("{\n \"fcoId\": \"<string>\",\n \"code\": \"<string>\",\n \"deviceId\": \"<string>\",\n \"userAgent\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ssi.com.vn/api/v3/trading/fco/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = '<content-type>'
request["X-Signature"] = '<x-signature>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"fcoId\": \"<string>\",\n \"code\": \"<string>\",\n \"deviceId\": \"<string>\",\n \"userAgent\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"fcoId": "2e667ae3-934a-4548-be9a-de983a29fe5b",
"username": "Q12345"
}{
"code": "<string>",
"msg": "<string>"
}{
"code": "<string>",
"msg": "<string>"
}{
"code": "<string>",
"msg": "<string>"
}Lệnh điều kiện
Hủy lệnh điều kiện
Đặt lệnh điều kiện mới. Hỗ trợ các loại lệnh điều kiện bao gồm stop, stop_limit, gtd, bullbear, oco, trailing_stop, trailing_stop_limit.
DELETE
/
api
/
v3
/
trading
/
fco
/
order
Hủy lệnh điều kiện
curl --request DELETE \
--url https://api.ssi.com.vn/api/v3/trading/fco/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--header 'X-Signature: <x-signature>' \
--data '
{
"fcoId": "<string>",
"code": "<string>",
"deviceId": "<string>",
"userAgent": "<string>"
}
'import requests
url = "https://api.ssi.com.vn/api/v3/trading/fco/order"
payload = {
"fcoId": "<string>",
"code": "<string>",
"deviceId": "<string>",
"userAgent": "<string>"
}
headers = {
"Content-Type": "<content-type>",
"X-Signature": "<x-signature>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'Content-Type': '<content-type>',
'X-Signature': '<x-signature>',
Authorization: 'Bearer <token>'
},
body: JSON.stringify({
fcoId: '<string>',
code: '<string>',
deviceId: '<string>',
userAgent: '<string>'
})
};
fetch('https://api.ssi.com.vn/api/v3/trading/fco/order', 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://api.ssi.com.vn/api/v3/trading/fco/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'fcoId' => '<string>',
'code' => '<string>',
'deviceId' => '<string>',
'userAgent' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: <content-type>",
"X-Signature: <x-signature>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ssi.com.vn/api/v3/trading/fco/order"
payload := strings.NewReader("{\n \"fcoId\": \"<string>\",\n \"code\": \"<string>\",\n \"deviceId\": \"<string>\",\n \"userAgent\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Signature", "<x-signature>")
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://api.ssi.com.vn/api/v3/trading/fco/order")
.header("Content-Type", "<content-type>")
.header("X-Signature", "<x-signature>")
.header("Authorization", "Bearer <token>")
.body("{\n \"fcoId\": \"<string>\",\n \"code\": \"<string>\",\n \"deviceId\": \"<string>\",\n \"userAgent\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ssi.com.vn/api/v3/trading/fco/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = '<content-type>'
request["X-Signature"] = '<x-signature>'
request["Authorization"] = 'Bearer <token>'
request.body = "{\n \"fcoId\": \"<string>\",\n \"code\": \"<string>\",\n \"deviceId\": \"<string>\",\n \"userAgent\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"fcoId": "2e667ae3-934a-4548-be9a-de983a29fe5b",
"username": "Q12345"
}{
"code": "<string>",
"msg": "<string>"
}{
"code": "<string>",
"msg": "<string>"
}{
"code": "<string>",
"msg": "<string>"
}Ủy quyền
Access token lấy từ endpoint /api/v3/auth/token hoặc /api/v3/auth/refresh.
Tiêu đề
Định dạng nội dung request body. Chủ yếu là application/json.
Thông tin client gửi request.
Ngôn ngữ phản hồi mong muốn. Nếu không có header này, hệ thống sẽ mặc định là en
Chữ ký RSA + SHA256 để xác thực tính toàn vẹn của request. Input bao gồm SecretKey + JSON body.
Ví dụ:
"sha256=abc123..."
Nội dung
application/json
ID của lệnh điều kiện cần hủy.
Mã xác thực OTP hoặc mã PIN dùng để xác thực giao dịch.
Định danh thiết bị thực hiện gửi yêu cầu. Thông thường dùng MAC address hoặc IMEI của thiết bị.
Thông tin về trình duyệt hoặc ứng dụng gửi yêu cầu.