Skip to main content
POST
/
exchanges
/
{exchangeId}
/
accounts
/
{accountId}
/
withdrawals
Create Exchange Withdrawal
curl --request POST \
  --url https://api.dfns.io/exchanges/{exchangeId}/accounts/{accountId}/withdrawals \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-DFNS-USERACTION: <api-key>' \
  --data '{
  "kind": "Native",
  "amount": "<string>",
  "priority": "Slow",
  "createDestinationAccount": true,
  "offer": true,
  "expiresAt": "2023-11-07T05:31:56Z",
  "targetChain": "<string>",
  "externalId": "<string>",
  "travelRule": {
    "kind": "Notabene",
    "beneficiaryVASPdid": "<string>",
    "beneficiaryProof": {},
    "originator": {},
    "beneficiary": {}
  },
  "feeSponsorId": "<string>",
  "walletId": "<string>",
  "otp": "<string>"
}'
{
  "id": "<string>",
  "exchangeId": "<string>",
  "accountId": "<string>",
  "transferId": "<string>",
  "exchangeReference": "<string>",
  "kind": "Withdrawal",
  "walletId": "<string>",
  "requester": {
    "userId": "<string>",
    "tokenId": "<string>"
  },
  "requestBody": {
    "kind": "Native",
    "amount": "<string>",
    "priority": "Slow",
    "createDestinationAccount": true,
    "offer": true,
    "expiresAt": "2023-11-07T05:31:56Z",
    "targetChain": "<string>",
    "externalId": "<string>",
    "travelRule": {
      "kind": "Notabene",
      "beneficiaryVASPdid": "<string>",
      "beneficiaryProof": {},
      "originator": {},
      "beneficiary": {}
    },
    "feeSponsorId": "<string>",
    "walletId": "<string>",
    "otp": "<string>"
  },
  "dateCreated": "<string>"
}

Authentication

✅ Organization User (CustomerEmployee)
❌ Delegated User (EndUser)
✅ Service Account

Required Permissions

Exchanges:Withdrawals:Create: Always required.

Authorizations

Authorization
string
header
required

Bearer Token: Used to authenticate API requests. More details how to generate the token: Authentication flows

X-DFNS-USERACTION
string
header
required

User Action Signature: Used to sign the change-inducing API requests. More details how to generate the token: User Action Signing flows

Path Parameters

exchangeId
string
required

The exchange id obtained from the Create Exchange endpoint. Ex: ex-1f04s-lqc9q-xxxxxxxxxxxxxxxx

Minimum length: 1
accountId
string
required

Unique identifier for the account like "spot"

Minimum length: 1

Body

application/json
  • Native Assets
  • EVM Fungible Token (ERC-20)
  • TRON Native Fungible Token (TRC-10)
  • TRON Smart Contract Fungible Token (TRC-20)
  • Algorand Standard Asset
  • Stellar Classic Assets (SEP-41)
  • Solana Program Library Token (SPL and SPL 2022)
  • TON Jetton (TEP-74)
kind
enum<string>
required
Available options:
Native
amount
string
required

The amount of native tokens to transfer in minimum denomination.

walletId
string
required
Minimum length: 1
priority
enum<string>

The priority that determines the fees paid for the transfer. All EVM compatible networks and Bitcoin support priority. Not supported for other networks. It uses the estimate fees API to calculate the transfer fees. When not specified, defaults to Standard priority.

Available options:
Slow,
Standard,
Fast
createDestinationAccount
boolean

Whether to create the destination account on chains that require account creation (e.g., Stellar, Kadena). Only valid for chains that require the receiver account to exist before transfer.

offer
boolean

Optional field for Canton, if true it will create a transfer offer.

expiresAt
string<date-time>

Optional field for Canton, especially useful in the context of offers

targetChain
string

For multi-chain networks (e.g., Kadena), specify the destination chain for cross-chain transfers.

externalId
string

A unique ID from your system. It can be leveraged to be used as an idempotency key. (read more here)

Required string length: 1 - 50
travelRule
object

A travel rule payload to associate with the transfer. (read more here)

feeSponsorId
string

Id of the fee sponsor that will be used to pay for your transfer fees, it might not be available for all blockchains. (read more here)

Required string length: 1 - 50
otp
string
Required string length: 6

Response

200 - application/json

Success

id
string
required
exchangeId
string
required
accountId
string
required
kind
enum<string>
required
Available options:
Withdrawal,
Deposit
walletId
string
required
requester
object
required
requestBody
object
required
  • Native Assets
  • EVM Fungible Token (ERC-20)
  • TRON Native Fungible Token (TRC-10)
  • TRON Smart Contract Fungible Token (TRC-20)
  • Algorand Standard Asset
  • Stellar Classic Assets (SEP-41)
  • Solana Program Library Token (SPL and SPL 2022)
  • TON Jetton (TEP-74)
dateCreated
string
required
transferId
string
exchangeReference
string
I