WebSocket
Get Withdrawals by ClientId
Returns an array of the user's withdrawals with a 7 days limit.
Auth:API Key
Tags:
Funding
Withdrawals
Command Name
GetWithdrawalsByClientIdCommand Arguments
| Field | Type | Required | Description |
|---|---|---|---|
ClientId | string | Required | Custom client ID for tracking (max 36 characters) Example: "my-client-123" |
withdrawClientId | string | Required | Withdraw client ID Example: "68925acb-4f03-48ab-98a9-16b845f21017" |
ClientIdRequired
Type:
string
Description:
Custom client ID for tracking (max 36 characters)
Example:
"my-client-123"withdrawClientIdRequired
Type:
string
Description:
Withdraw client ID
Example:
"68925acb-4f03-48ab-98a9-16b845f21017"Command Invocation
Command Arguments Example:
[
"my-client-123",
"68925acb-4f03-48ab-98a9-16b845f21017"
]Invocation Example:
connection.invoke('GetWithdrawalsByClientId', 'my-client-123', '68925acb-4f03-48ab-98a9-16b845f21017')Response Event
Event Name
executionEventsSubject
account.withdrawals.snapshotWithdrawals snapshot response containing an array of withdrawal records filtered by client ID
| 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 address 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": "xxxx",
"clientId": "68925acb-4f03-48ab-98a9-16b845f21017",
"userId": "yyyy",
"name": "Mario",
"surname": "Rossi",
"company": "Company",
"description": null,
"destination": "zzzz",
"destinationParams": {},
"network": "Ethereum",
"amount": 0.05,
"asset": "ETH",
"fee": 5,
"status": "CONFIRMING",
"refId": "ab1234",
"isInstant": false,
"timestamp": "2023-11-10T15:26:10.586Z"
}
]
}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('GetWithdrawalsByClientId', "my-client-123", "68925acb-4f03-48ab-98a9-16b845f21017")
.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