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, as key-value strings. Which keys are present depends on the asset and network; {} when there are none. Keys: hostedby (crypto wallet control, "individual" or "vasp"), tag (crypto destination tag, e.g. XRP), sortcode (GBP Faster Payments).
networkstringAddress network
statusnumber
Address status
0→ Pending
2→ Approved
commentstringComments on address
auditBystringAuditor informations
auditDatestringDatetime of the audit (UTC). If the address was never audited, this is the time the server loaded the address list, not an audit time
enabledbooleanEnabled flag
deletedbooleanAlways false: deleted addresses are not returned
creationDatestringDatetime of address creation
fiatRepublicPayeeIdstring | nullID of the payee registered for this address at FiatRepublic; null if none
openPaydBankBeneficiaryIdstring | nullID of the bank beneficiary registered for this address at OpenPayd; null if none

Example Response

{
  "data": [
    {
      "id": "xxxx",
      "name": "BTC 01",
      "userId": "yyyy",
      "asset": "BTC",
      "address": "zzzz",
      "addressParams": {},
      "network": "Bitcoin",
      "status": 2,
      "comment": "",
      "auditBy": "",
      "auditDate": "2023-10-06T09:00:00.000Z",
      "enabled": true,
      "deleted": false,
      "creationDate": "2023-10-05T14:07:59.000Z",
      "fiatRepublicPayeeId": null,
      "openPaydBankBeneficiaryId": null
    }
  ]
}

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.