Skip to main content

Crypto Withdrawals

This module contains endpoints for sending cryptocurrencies to external wallets.
Available currencies: btc, doge, eth, eurt, ltc, pol, usdc, usdt.
Currencies usdc, usdt are available on two networks ethereum and polygon.
Default is ethereum network.


Get crypto withdrawal network fee

Method: GET
Endpoint: /v1/crypto-withdrawal/get-network-fee

Request

Query params - required

NameTypeRequiredExampleDescription
currencystringYesusdtThe cryptocurrency slug for the withdrawal. Enum: [ btc, doge, eth, eurt, ltc, pol, usdc, usdt ]
networkstringNopolygonThe blockchain network used for the withdrawal. Required only if currency is usdc, usdt and you want to make a withdrawal on the polygon network. If no parameter is added, the network fee will be calculated for the ethereum network. Enum: [ polygon ]

Response

Code: 200
Description: Returns crypto withdrawal network fee

Example response

{
"networkFee": 0.000469
}

 

Code: 400
Description: Currency not found

Example response

{
"errorCode": "P410",
"errorName": "invalid-currency"
}

Create Crypto Withdrawal

Method: POST
Endpoint: /v1/crypto-withdrawal

Request

Request body - required

NameTypeRequiredDescription
sourceExternalUserIdstringYesExternal user id (from your system)
currencystringYesThe cryptocurrency slug for the withdrawal (e.g., BTC, ETH)
amountnumberYesThe amount of cryptocurrency to withdraw
walletAddressstringYesThe destination wallet address for the cryptocurrency withdrawal
memostringNoOptional memo or title for the withdrawal transaction
networkstringNoThe blockchain network used for the withdrawal (e.g., ETHEREUM, POLYGON)
namestringYesName for travel rule, required for compliance with AML/KYC regulations
walletTypestringYesType of wallet: CUSTODIAL, NON_CUSTODIAL, or OTHER
receiverTypestringYesType of receiver: NATURAL or LEGAL

Example body request

{
"sourceExternalUserId": "bca65c48-df49-4831-a7b2-de7903321581",
"currency": "BTC",
"amount": 0.005,
"walletAddress": "bc1quy5nvh8npg0qdpnk35wctey8e923yms9udzfjr",
"memo": "Transaction to savings wallet",
"name": "John Doe",
"walletType": "CUSTODIAL",
"receiverType": "NATURAL"
}

Response

Code: 200
Description: Crypto withdrawal created successfully

Example response

{
"withdrawalId": "7fb02323-969a-4936-94ea-86b8773ff1a2"
}

 

Code: 400
Description: User does not exist

Example response

{
"errorCode": "P412",
"errorName": "invalid-user"
}

 

Code: 400
Description: Invalid request

Example response

{
"errorCode": "P410",
"errorName": "invalid-currency"
}

 

Code: 400
Description: Insufficient funds

Example response

{
"errorCode": "P433",
"errorName": "insufficient-funds"
}

Get Crypto Withdrawal Details

Method: GET
Endpoint: /v1/crypto-withdrawal/details/:withdrawalId

Request

Parameters - required

NameTypeRequiredExampleDescription
withdrawalIdstringYes7fb02323-969a-4936-94ea-86b8773ff1a2Unique ID of the crypto withdrawal

Response

Code: 200
Description: Returns details of the crypto withdrawal

Example response

{
"id": "7fb02323-969a-4936-94ea-86b8773ff1a2",
"amount": 0.1,
"fee": 0.002,
"destination": "34BswSPLbveHiULzdAahf6qr8V1VdkdHFa",
"status": "SUCCESSFUL",
"transactionHash": "b768f1fb7d9e69c9e6c3f1ccb8481ff4b0f1940a1c9e7c87d374d1814fd6383b",
"currency": {
"network": "",
"name": "LTC"
},
"createdAt": "2024-11-05T10:54:02.982Z",
"user": {
"externalUserId": "8bdd8c8a-e9b7-475e-9690-8a34e8b78dab",
"email": "Giovani34@yahoo.com",
"firstName": "Will",
"lastName": "Hahn",
"address": "0294 Greenholt Burgs",
"city": "Wilfredchester",
"country": "BM",
"documentType": "id",
"documentNumber": "109314",
"pesel": null,
"birthCountry": null,
"birthDate": null
}
}

 

Code: 404
Description: Withdrawal not found

Example response

{
"errorCode": "P421",
"errorName": "withdrawal-not-found"
}