Tài khoản
Rút tiền từ tài khoản
Rút tiền từ tài khoản
POST
https://api-x9.verolabs.co
/
api
/
v1
/
users
/
accounts
/
{accountID}
/
equity
/
withdraw
Rút tiền từ tài khoản
curl --request POST \
--url https://api-x9.verolabs.co/api/v1/users/accounts/{accountID}/equity/withdraw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1,
"bankId": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 1, bankId: '<string>'})
};
fetch('https://api-x9.verolabs.co/api/v1/users/accounts/{accountID}/equity/withdraw', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-x9.verolabs.co/api/v1/users/accounts/{accountID}/equity/withdraw"
payload = {
"amount": 1,
"bankId": "<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-x9.verolabs.co/api/v1/users/accounts/{accountID}/equity/withdraw"
payload := strings.NewReader("{\n \"amount\": 1,\n \"bankId\": \"<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-x9.verolabs.co/api/v1/users/accounts/{accountID}/equity/withdraw");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"amount\": 1,\n \"bankId\": \"<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-x9.verolabs.co/api/v1/users/accounts/{accountID}/equity/withdraw");
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 \"amount\": 1,\n \"bankId\": \"<string>\"\n}");
CURLcode ret = curl_easy_perform(hnd);{
"status": "<string>",
"account_id": "<string>",
"amount": 123,
"new_credit": 123,
"new_equity": 123,
"trading_power": 123,
"message": "<string>"
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}Tham số đường dẫn
Nội dung
application/json
Withdrawal payload. amount must be greater than zero and bankId must reference a saved bank account owned by the user.
Phản hồi
Withdrawal result and updated account balances.
Response returned after a successful equity withdrawal.
⌘I
Rút tiền từ tài khoản
curl --request POST \
--url https://api-x9.verolabs.co/api/v1/users/accounts/{accountID}/equity/withdraw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1,
"bankId": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 1, bankId: '<string>'})
};
fetch('https://api-x9.verolabs.co/api/v1/users/accounts/{accountID}/equity/withdraw', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-x9.verolabs.co/api/v1/users/accounts/{accountID}/equity/withdraw"
payload = {
"amount": 1,
"bankId": "<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-x9.verolabs.co/api/v1/users/accounts/{accountID}/equity/withdraw"
payload := strings.NewReader("{\n \"amount\": 1,\n \"bankId\": \"<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-x9.verolabs.co/api/v1/users/accounts/{accountID}/equity/withdraw");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"amount\": 1,\n \"bankId\": \"<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-x9.verolabs.co/api/v1/users/accounts/{accountID}/equity/withdraw");
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 \"amount\": 1,\n \"bankId\": \"<string>\"\n}");
CURLcode ret = curl_easy_perform(hnd);{
"status": "<string>",
"account_id": "<string>",
"amount": 123,
"new_credit": 123,
"new_equity": 123,
"trading_power": 123,
"message": "<string>"
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}
