WebSocket
Create Withdraw with Address Params
Sends a withdrawal request with additional parameters for the destination address.
Auth:API Key
Tags:
Funding
Withdrawals
Command Name
WithdrawFundsWithAddressParamsCommand Arguments
| Field | Type | Required | Description |
|---|---|---|---|
ClientId | string | Required | Custom client ID for tracking (max 36 characters) Example: "my-client-123" |
Asset | string | Required | Asset of the address (e.g.: "BTC") Example: "USDT" |
Amount | number | Required | Quantity of asset to be withdrawn Example: 100 |
DestinationAddress | string | Required | Destination address, must be whitelisted Example: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb" |
DestinationAddressParams | object | Required | Destination address parameters (e.g. tag) Example: {"tag":"payment-001"} |
Network | string | Required | Network of the address Example: "Ethereum" |
IsInstant | boolean | Required | Option for instant withdraw Example: true |
ClientIdRequired
Type:
string
Description:
Custom client ID for tracking (max 36 characters)
Example:
"my-client-123"AssetRequired
Type:
string
Description:
Asset of the address (e.g.: "BTC")
Example:
"USDT"AmountRequired
Type:
number
Description:
Quantity of asset to be withdrawn
Example:
100DestinationAddressRequired
Type:
string
Description:
Destination address, must be whitelisted
Example:
"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"DestinationAddressParamsRequired
Type:
object
Description:
Destination address parameters (e.g. tag)
Example:
{"tag":"payment-001"}NetworkRequired
Type:
string
Description:
Network of the address
Example:
"Ethereum"IsInstantRequired
Type:
boolean
Description:
Option for instant withdraw
Example:
trueCommand Invocation
Command Arguments Example:
[
"my-client-123",
"USDT",
100,
"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
{
"tag": "payment-001"
},
"Ethereum",
true
]Invocation Example:
connection.invoke('WithdrawFundsWithAddressParams', 'my-client-123', 'USDT', 100.0, '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb', { tag: 'payment-001' }, 'Ethereum', true)Response Event
Event Name
executionEventsSubject
account.withdraw.createdWithdrawal request with address parameters created successfully
| Field | Type | Description |
|---|---|---|
id | string | Withdraw ID |
clientId | string | Client ID |
userId | string | User ID |
name | string | User first name |
surname | string | User last name |
company | string | User company |
description | string | Description |
destination | string | Destination address |
destinationParams | object | Destination parameters |
network | string | Network name |
amount | number | Withdraw amount |
asset | string | Asset name |
fee | number | Fee |
status | string | Withdrawal status CREATED→ CreatedCONFIRMING→ ConfirmingCONFIRMED→ Confirmed |
refId | string | Cro or Trx Id added after network submission |
isInstant | boolean | Option for instant withdraw |
timestamp | string | Timestamp of the withdraw |
Example Response
{
"data": {
"id": "123abcde-4567-89ab-cdef-1234567890ab",
"clientId": "68925acb-4f03-48ab-98a9-16b845f21017",
"userId": "user-123",
"name": "Mario",
"surname": "Rossi",
"company": "",
"description": "xyz",
"destination": "xyzwallet",
"destinationParams": {
"memo": "payment-001"
},
"network": "ethereum",
"amount": 1,
"asset": "USDT",
"fee": 5,
"status": "CONFIRMING",
"refId": "ab1234",
"isInstant": false,
"timestamp": "2024-03-27T16:03:12.456Z"
}
}Code Examples
const signalR = require('@microsoft/signalr');
const apiKey = 'YOUR_API_KEY_HERE';
const connection = new signalR.HubConnectionBuilder()
.withUrl('https://publicapi.sandbox.hercle.financial/ExecutionLiveServer/v1', {
accessTokenFactory: () => apiKey,
})
.build();
connection.start()
.then(() => {
console.log('Connected to WebSocket');
// Invoke command
connection.invoke('WithdrawFundsWithAddressParams', "my-client-123", "USDT", 100, "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb", {"tag":"payment-001"}, "Ethereum", false)
.then(() => {
console.log('Command sent successfully');
})
.catch(err => {
console.error('Command failed:', err);
});
})
.catch(err => {
console.error('Connection failed:', err);
});
// Listen for events
connection.on('executionEvents', (data) => {
console.log('Received event:', data);
});SignalR API Tester
Test this command in the sandbox environment
Disconnected
Your API key is only used locally and never stored