curl --request POST \
--url https://api.openxswitch.com/v1/withdraw/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"coin": "<string>",
"chain": "<string>",
"withdrawalAddress": "<string>",
"amount": "<string>",
"clientTxId": "<string>",
"fee": "0.01",
"memo": "<string>"
}
'import requests
url = "https://api.openxswitch.com/v1/withdraw/create"
payload = {
"coin": "<string>",
"chain": "<string>",
"withdrawalAddress": "<string>",
"amount": "<string>",
"clientTxId": "<string>",
"fee": "0.01",
"memo": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
coin: '<string>',
chain: '<string>',
withdrawalAddress: '<string>',
amount: '<string>',
clientTxId: '<string>',
fee: '0.01',
memo: '<string>'
})
};
fetch('https://api.openxswitch.com/v1/withdraw/create', 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.openxswitch.com/v1/withdraw/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'coin' => '<string>',
'chain' => '<string>',
'withdrawalAddress' => '<string>',
'amount' => '<string>',
'clientTxId' => '<string>',
'fee' => '0.01',
'memo' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.openxswitch.com/v1/withdraw/create"
payload := strings.NewReader("{\n \"coin\": \"<string>\",\n \"chain\": \"<string>\",\n \"withdrawalAddress\": \"<string>\",\n \"amount\": \"<string>\",\n \"clientTxId\": \"<string>\",\n \"fee\": \"0.01\",\n \"memo\": \"<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))
}HttpResponse<String> response = Unirest.post("https://api.openxswitch.com/v1/withdraw/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"coin\": \"<string>\",\n \"chain\": \"<string>\",\n \"withdrawalAddress\": \"<string>\",\n \"amount\": \"<string>\",\n \"clientTxId\": \"<string>\",\n \"fee\": \"0.01\",\n \"memo\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openxswitch.com/v1/withdraw/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"coin\": \"<string>\",\n \"chain\": \"<string>\",\n \"withdrawalAddress\": \"<string>\",\n \"amount\": \"<string>\",\n \"clientTxId\": \"<string>\",\n \"fee\": \"0.01\",\n \"memo\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "wd_001",
"workspaceId": "67804918f2b05ac82a129441",
"clientTxId": null,
"coin": "BTC",
"chain": "BTC",
"amount": 100,
"network": "Ethereum",
"fromAddress": "0xFromAddress001",
"toAddress": "0xToAddress001",
"hash": null,
"transactionLink": null,
"status": "success",
"networkFee": 1,
"tagMemo": null,
"confirmation": 0,
"confirmedAt": null,
"createdAt": null,
"walletId": "678a39d6b731ad1ad8832c8a"
}
}{
"statusCode": 400,
"path": "/v1/...",
"timestamp": "2025-03-13T12:34:56.789Z",
"message": "......"
}{
"statusCode": 404,
"path": "/v1/...",
"timestamp": "2025-03-13T12:34:56.789Z",
"message": "Cannot GET /v1/..."
}{
"statusCode": 422,
"path": "/v1/...",
"timestamp": "2025-03-13T12:34:56.789Z",
"message": [
"param is required"
]
}{
"statusCode": 500,
"path": "/v1/...",
"timestamp": "2025-03-13T12:34:56.789Z",
"message": "......"
}Prime Wallet Withdrawal
Withdraw funds from prime wallet to an external address. To estimate the withdrawal fee, use the Fee Estimate endpoint.
The network fee is automatically deducted from the specified amount, and the remaining balance is sent to the receiver
curl --request POST \
--url https://api.openxswitch.com/v1/withdraw/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"coin": "<string>",
"chain": "<string>",
"withdrawalAddress": "<string>",
"amount": "<string>",
"clientTxId": "<string>",
"fee": "0.01",
"memo": "<string>"
}
'import requests
url = "https://api.openxswitch.com/v1/withdraw/create"
payload = {
"coin": "<string>",
"chain": "<string>",
"withdrawalAddress": "<string>",
"amount": "<string>",
"clientTxId": "<string>",
"fee": "0.01",
"memo": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
coin: '<string>',
chain: '<string>',
withdrawalAddress: '<string>',
amount: '<string>',
clientTxId: '<string>',
fee: '0.01',
memo: '<string>'
})
};
fetch('https://api.openxswitch.com/v1/withdraw/create', 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.openxswitch.com/v1/withdraw/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'coin' => '<string>',
'chain' => '<string>',
'withdrawalAddress' => '<string>',
'amount' => '<string>',
'clientTxId' => '<string>',
'fee' => '0.01',
'memo' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.openxswitch.com/v1/withdraw/create"
payload := strings.NewReader("{\n \"coin\": \"<string>\",\n \"chain\": \"<string>\",\n \"withdrawalAddress\": \"<string>\",\n \"amount\": \"<string>\",\n \"clientTxId\": \"<string>\",\n \"fee\": \"0.01\",\n \"memo\": \"<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))
}HttpResponse<String> response = Unirest.post("https://api.openxswitch.com/v1/withdraw/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"coin\": \"<string>\",\n \"chain\": \"<string>\",\n \"withdrawalAddress\": \"<string>\",\n \"amount\": \"<string>\",\n \"clientTxId\": \"<string>\",\n \"fee\": \"0.01\",\n \"memo\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openxswitch.com/v1/withdraw/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"coin\": \"<string>\",\n \"chain\": \"<string>\",\n \"withdrawalAddress\": \"<string>\",\n \"amount\": \"<string>\",\n \"clientTxId\": \"<string>\",\n \"fee\": \"0.01\",\n \"memo\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "wd_001",
"workspaceId": "67804918f2b05ac82a129441",
"clientTxId": null,
"coin": "BTC",
"chain": "BTC",
"amount": 100,
"network": "Ethereum",
"fromAddress": "0xFromAddress001",
"toAddress": "0xToAddress001",
"hash": null,
"transactionLink": null,
"status": "success",
"networkFee": 1,
"tagMemo": null,
"confirmation": 0,
"confirmedAt": null,
"createdAt": null,
"walletId": "678a39d6b731ad1ad8832c8a"
}
}{
"statusCode": 400,
"path": "/v1/...",
"timestamp": "2025-03-13T12:34:56.789Z",
"message": "......"
}{
"statusCode": 404,
"path": "/v1/...",
"timestamp": "2025-03-13T12:34:56.789Z",
"message": "Cannot GET /v1/..."
}{
"statusCode": 422,
"path": "/v1/...",
"timestamp": "2025-03-13T12:34:56.789Z",
"message": [
"param is required"
]
}{
"statusCode": 500,
"path": "/v1/...",
"timestamp": "2025-03-13T12:34:56.789Z",
"message": "......"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The token name. Only rechargeable currencies are accepted.
Refer to the Get Recharge Currencies endpoint for the list of supported currencies.
The 'chain' name.
Refer to the Get Recharge Currencies endpoint for the list of supported chains.
The withdrawal address
The amount to withdraw
Unique ID for tracking the client's request.
fee is optional as the system automatically selects the best possible fee to minimize transaction delays and ensure faster processing. Use the Fee Estimate endpoint to estimate the fee.
"0.01"
An optional memo for the withdrawal
.png?fit=max&auto=format&n=ML35RDblT1Ol-zJb&q=85&s=062e79ad9c4540929eec204aff020178)
.png?fit=max&auto=format&n=ML35RDblT1Ol-zJb&q=85&s=f6328956931c9664a2a070c2edb6e9b3)