Hercle
WebSocket

Get Whitelisted Addresses

Returns an array of the user's whitelisted addresses, both fiat and crypto.

Auth:API Key
Tags:
Funding
Addresses
Command Name
GetWhitelistedAddresses

Command Arguments

ClientId
Required
Type:
string
Description:

Custom client ID for tracking (max 36 characters)

Example: "my-client-123"

Command Invocation

Command Arguments Example:
[
  "my-client-123"
]
Invocation Example:
connection.invoke('GetWhitelistedAddresses', 'my-client-123')

Response Event

Event Name
executionEvents
Subject
account.externalAddresses.snapshot
FieldTypeDescription
idstringAddress ID
namestringAddress name
userIdstringUser ID
assetstringAsset name
addressstringAddress
addressParamsobjectAddress parameters
networkstringAddress network
statusnumber
Address status
0Pending
1Refused
2Approved
3Deleted
commentstringComments on address
auditBystringAuditor informations
auditDatestringDatetime of audit
enabledbooleanEnabled flag
deletedbooleanDeleted flag
creationDatestringDatetime of address creation

Example Response

{
  "data": [
    {
      "id": "xxxx",
      "name": "BTC 01",
      "userId": "yyyy",
      "asset": "BTC",
      "address": "zzzz",
      "addressParams": {},
      "network": "Bitcoin",
      "status": 2,
      "comment": "",
      "auditBy": "",
      "auditDate": "",
      "enabled": true,
      "deleted": false,
      "creationDate": "2023-10-05T14:07:59+00:00"
    }
  ]
}

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('GetWhitelistedAddresses', "my-client-123")
      .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.