Hercle
WebSocket

Get Withdrawals Paginated

Returns an array of the user's withdrawals with a 7 days limit.

Auth:API Key
Tags:
Funding
Withdrawals
Command Name
GetWithdrawalsPaginated

Command Arguments

ClientId
Required
Type:
string
Description:

Custom client ID for tracking (max 36 characters)

Example: "my-client-123"
startDate
Required
Type:
string
Description:

Start date in ISO datetime format

Example: "2024-03-20T00:00:00.000Z"
endDate
Required
Type:
string
Description:

End date in ISO datetime format

Example: "2024-03-27T23:59:59.999Z"
page
Required
Type:
number
Description:

Page number

Example: 1
pageSize
Required
Type:
number
Description:

Page size (min: 5, max: 50)

Example: 20

Command Invocation

Command Arguments Example:
[
  "my-client-123",
  "2024-03-20T00:00:00.000Z",
  "2024-03-27T23:59:59.999Z",
  1,
  20
]
Invocation Example:
connection.invoke('GetWithdrawalsPaginated', 'my-client-123', '2024-03-20T00:00:00.000Z', '2024-03-27T23:59:59.999Z', 1, 20)

Response Event

Event Name
executionEvents
Subject
account.withdrawals.snapshot
FieldTypeDescription
idstringWithdraw ID
clientIdstringClient ID
userIdstringUser ID
namestringUser first name
surnamestringUser last name
companystringUser company
descriptionstringDescription
destinationstringDestination address
destinationParamsobjectDestination address parameters
networkstringNetwork name
amountnumberWithdraw amount
assetstringAsset name
feenumberFee
statusstring
Withdrawal status
CREATEDCreated
CONFIRMINGConfirming
CONFIRMEDConfirmed
refIdstringCro or Trx Id added after network submission
isInstantbooleanOption for instant withdraw
timestampstringTimestamp 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": "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('GetWithdrawalsPaginated', "my-client-123", "2024-03-20T00:00:00.000Z", "2024-03-27T23:59:59.999Z", 1, 20)
      .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

Event Log

No events yet. Connect and invoke a command to see events.