Hercle
WebSocket

Whitelist Address

Sends a request for the whitelisting of a new address.

Auth:API Key
Tags:
Funding
Addresses
Command Name
WhitelistAddress

Command Arguments

ClientId
Required
Type:
string
Description:

Custom client ID for tracking (max 36 characters)

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

Address recognizable custom name

Example: "My BTC Wallet"
Asset
Required
Type:
string
Description:

Asset of the Address (e.g.: "BTC" or "EUR")

Example: "BTC"
Address
Required
Type:
string
Description:

Address

Example: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
Network
Required
Type:
string
Description:

Address network

Example: "Bitcoin"

Command Invocation

Command Arguments Example:
[
  "my-client-123",
  "My BTC Wallet",
  "BTC",
  "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
  "Bitcoin"
]
Invocation Example:
connection.invoke('WhitelistAddress', 'my-client-123', 'My BTC Wallet', 'BTC', 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh', 'Bitcoin')

Response Event

Event Name
executionEvents
Subject
account.address.registered
FieldTypeDescription
httpStatusCodenumberStatus code of the request (201: created successfully)
userIdstringUser ID
addressIdstringAddress ID
messagestringOptional message in case of errors or checks failed

Example Response

{
  "data": {
    "httpStatusCode": 201,
    "userId": "user-123",
    "addressId": "zzzz",
    "message": ""
  }
}

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('WhitelistAddress', "my-client-123", "My BTC Wallet", "BTC", "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh", "Bitcoin")
      .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.