Create Exchange Withdrawal

POST /exchanges/{exchangeId}/accounts/{accountId}/withdrawal

Creates a new exchange withdrawal transaction.

Required Permissions

NameConditions

Exchanges:Withdrawals:Create

Always Required

Parameters

Path parameters

Path parameterDescription

exchangeID

Unique identifier of the Exchange. ex. ex-1f04s-lqc9q-xxxxxxxxxxxxxxxx

accountID

Unique ENUM identified for the account like "spot"

Body

PropertyRequired/OptionalDescriptionType

walletId*

Required

Id of the Dfns wallet receiving the withdrawal.

String

kind*

Required

Enum for the type of asset. Eg "Native" or "ERC20".

String

amount*

Required

Transaction amount denominated in min units

String

otp

Optional

OTP code if configured

String

Depending on the asset kind, the body must be completed with some extra parameter identical to the Transfer Asset from Wallet

Example

{
    "walletId": "wa-19lns-o74qn-xxxxxxxxxxxxxx",
    "kind": "Erc20",
    "amount": "2000000",
    "contract": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
    "otp": "258988"
}

Response

Response example

{
  "id": "extx-1fl2k-ouck8-xxxxxxxxxxxxxx",
  "exchangeId": "ex-1anvr-65s5k-xxxxxxxxxxxxxx",
  "accountId": "spot",
  "exchangeReference": "FTgTpu9-xxxxxxxxxxxxxx",
  "kind": "Withdrawal",
  "walletId": "wa-30md5-13q6n-xxxxxxxxxxxxxx",
  "requester": {
    "appId": "ap-2cpsu-jl2ua-xxxxxxxxxxxxxx",
    "userId": "us-kcrq8-hcrl9-xxxxxxxxxxxxxx"
  },
  "requestBody": {
    "kind": "Erc20",
    "amount": "5000000",
    "contract": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
    "walletId": "wa-30md5-13q6n-xxxxxxxxxxxxxx"
  },
  "dateCreated": "2024-09-09T16:11:13.579Z"
}

Last updated