Create a withdraw [Private]
Method for assets withdraw (crypto and fiat). Returns withdraw id
and status
.
Temporarily only for crypto.
To call any private endpoint, headers should include authorization key(s).
You may use a single API key or a public-private key pair based on your current tasks. Here you may find typical Header configurations for both options.
Method name: | /v4/withdraw/private/create |
Request type: | POST |
Data dictionary
Name | Type | Parameter type | Required | Range | Description |
---|---|---|---|---|---|
id | string | BODY | NO | - | id must be a UUID format. If you do not specify id , it will be generated automatically. |
currency | string | BODY | YES | - | Currency code (cryptocurrency or fiat). All available currencies are available through "Get information about available currencies" endpoint. |
address | string | BODY | NO | - | Withdraw address for cryptocurrency. |
paymentId | string | BODY | NO | - | Field for withdraw identifier Destination tag/Memo. |
paymentMethod | string | BODY | YES | - | Withdraw method for currency, should be taken from "Get info about withdrawal methods by currency name" endpoint (key field). |
withdrawAll | boolean | BODY | NO | true , false | This field says that the amount should also include a fee. |
amount | int | BODY | YES | - | Withdraw amount. |
paymentMethod
for TRC20 and ERC20 tokens:USDT TRC20 and other TRC20 tokens -
TRX
.
USDT ERC20 and other ERC20 tokens -ETH
.You can learn more about all the blockchains in our knowledge base.
If the cryptocurrency asset has only its own blockchain, then
currency
andpaymentMethod
should repeat the name of the asset, for example for BTC:"currency": "BTC"
,"paymentMethod": "BTC"
.
If the cryptocurrency asset has more than one blockchain, then thepaymentMethod
should specify the name of the blockchain, for example for USDT in the TRC20 network:"currency": "USDT"
,"paymentMethod": "TRX"
.
All withdrawals should be confirmed by email!
If you have email confirmation enabled, all withdrawals will have to be confirmed. When working with API withdrawals, it's better to turn off confirmation by email in your account settings.
Exemplary request
const apiKey = "YOUR_API_KEY"; // put here your Api key
const url = "https://api.kuna.io";
const path = "/v4/withdraw/private/create";
const body = {
"currency": "XRP",
"address": "rEZnowWMyrY8YoGwLatyPBxx8QkJeimgAb",
"paymentId": "2395629693",
"paymentMethod": "XRP",
"amount": 5.00
};
const options = {
method: "POST",
headers: {
accept: "application/json",
"Content-Type": "application/json",
"api-key": apiKey,
},
body: JSON.stringify(body),
};
fetch(url + path, options)
.then((response) => response.json())
.then((showResponse) => console.log(showResponse.data));
import requests
api_key = "YOUR_API_KEY" # put here your Api key
url = "https://api.kuna.io"
path = "/v4/withdraw/private/create"
headers = {
"accept": "application/json",
"Content-Type": "application/json",
"api-key": api_key,
}
body = {
"currency": "XRP",
"address": "rEZnowWMyrY8YoGwLatyPBxx8QkJeimgAb",
"paymentId": "2395629693",
"paymentMethod": "XRP",
"amount": 5.00
}
request = requests.post(url + path, headers=headers, json=body)
print(request.json())
How to call private endpoints here
Response
{
"id": "edb17459-c9bf-4148-9ae6-7367d7f55d71", // Unique identifier of a withdraw
"status": "waitingForConfirmation" // status of a withdraw. If you turn off withdrawal confirmation by email, it will return "Processing" status, which means that the transaction is already being processed on our side
}
Updated about 1 year ago