Pre-request for crypto withdraw [Private]

A pre-request for a withdrawal operation is required in order to receive information about available withdrawal methods.

Method name:/v2/withdraw/pre-request
Request type:POST

📘

To call private endpoints, you need to get a JWT token or an API key for authentication.

Here you can learn in detail how to successfully authenticate.

A pre-request for a crypto withdrawal operation is required to obtain withdrawal payment methods available for use, as well as the necessary details for each of them regarding the asset to be withdrawn.
In order to withdraw funds using /v2/withdraw/crypto, you need to know:

  • is there an available payment method for performing such a withdrawal? If not, the output is impossible;
  • payment method code for use in a request to /v2/withdraw/crypto;
  • fields that must be filled in when performing output.
    By analogy with a deposit, one payment method actually = one unique asset_source value.

For each payment method, the pre-request also returns the value of the fees for withdraw transaction and the minimum and maximum values for the withdraw amount.

Data dictionary

NameTypeParameter typeRequiredRangeDescription
assetstringBODYYES-Asset(Currency) code, e.g. BTC - Bitcoin, ETH - Ethereum.

Exemplary request

const url = BASE_URL;
const path = "/v2/withdraw/pre-request";

const body = { asset: "USDT" };

const options = {
  method: "POST",
  headers: {
    accept: "application/json",
    "Content-Type": "application/json",
    "Authorization": `Bearer ${data.accessToken}` // data.accessToken - generated a JWT token via /v2/auth/login.
  },
  body: JSON.stringify(body),
};

fetch(url + path, options)
  .then((response) => response.json())
  .then((showResponse) => console.log(showResponse.data));
import requests

url = BASE_URL
path = "/v2/withdraw/pre-request"
headers = {
    "accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": "Bearer " + data.accessToken # data.accessToken - generated a JWT token via /v2/auth/login.
}
body = { "asset": "USDT" }

request = requests.post(url + path, headers=headers, json=body)
print(request.json())

How to call private endpoints here

Swagger here

Response

{
  "data": [
    {
      "asset": "USDT",                                  // Asset name.
      "code": "crypto_withdraw_trx_usdt",               // Asset code.
      "name": {                                         // Text name of the method.
        "en": "On wallet TRC20",
        "ru": "На кошелек TRC20",
        "uk": "На гаманець TRC20"
      },
      "position": 0,                                    // Field positions.
      "source": "TRX",                                  // Network name.
      "type": "Withdraw",                               // Method type.
      "fields": [                                       // Additional method fields.
        {
          "name": "address",                            // Key name of additional method field.
          "description": {                              // Description of additional method field.
            "en": "Address",
            "ru": "Адрес",
            "uk": "Адреса"
          },
          "group": null,                                // null - must be filled out by the customer; "technical" - this information must be filled out from the customer's metadata.
          "isRequired": true,                           // Whether the field is mandatory or not (false).
          "label": {                                    // Text name of additional method field.
            "en": "Address",
            "ru": "Адрес",
            "uk": "Адреса"
          },
          "position": 0,                                // Field position.
          "type": "string",                             // Value type.
          "validators": [                               // Rules for value.
            {
              "type": "regex",
              "message": {
                "en": "Invalid TRC20 address",
                "ru": "Неверный TRC20 адресс",
                "uk": "Невірна TRC20 адреса"
              },
              "regex": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
            }
          ]
        }
      ],
      "product": {
        "feeFixed": "0.36",                              // Fixed Fee.
        "feeRate": "0",                                  // Percentage fee.
        "feeStrategy": "external",                       // external - commission paid by customer; internal - commission paid by the merchant.
        "maxAmount": "1000",                             // Maximum deposit amount.
        "minAmount": "1"                                 // Minimum deposit amount.
      }
    },
    {
      "asset": "USDT",
      "code": "crypto_withdraw_eth_usdt",
      "name": {
        "en": "On wallet ERC20",
        "ru": "На кошелек ERC20",
        "uk": "На гаманець ERC20"
      },
      "position": 0,
      "source": "ETH",
      "type": "Withdraw",
      "fields": [
        {
          "name": "address",
          "description": {
            "en": "Address",
            "ru":"Адрес",
            "uk": "Адреса"
          },
          "group": null,
          "isRequired": true,
          "label": {
            "en": "Address",
            "ru": "Адрес",
            "uk": "Адреса"
          },
          "position": 0,
          "type": "string",
          "validators": [
            {
              "type": "regex",
              "message": {
                "en": "Address is not valid",
                "ru": "Адрес не действителен",
                "uk": "Адреса не дійсний"
              },
              "regex": "^0x[a-fA-F0-9]{40}$"
            }
          ]
        }
      ],
      "product": {
        "feeFixed": "8.31",
        "feeRate": "0",
        "feeStrategy": "external",
        "maxAmount": "10000",
        "minAmount": "1"
      }
    }
  ]
}