Hercle
WebSocket
Deprecated

Get Deposit Addresses

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

Auth:API Key
Tags:
Funding
Deposits
Command Name
GetDepositAddress

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('GetDepositAddress', 'my-client-123')

Response Event

Event Name
executionEvents
Subject
account.internalAddresses.snapshot
FieldTypeDescription
idstringAddress ID
namestringAddress name
userIdstringUser ID
endUserIdstringEnd user ID if applicable; empty string when there is none (never null)
assetstringAsset name
addressstringAddress
addressParamsobjectExtra address parameters as string key/value pairs; empty object when there are none. Fiat virtual-account addresses can also carry their bank routing codes here
tagstringDestination tag / memo, for assets that use one (e.g. XRP, XLM, ATOM)
networkstringAddress network
deletedbooleanDeleted flag
creationDatestringDatetime of address creation
refAccountIdstringID of the linked account (for VIRTUAL_ACCOUNT, the virtual account ID); empty string when there is none
refAccountTypestringType of the linked account: VIRTUAL_ACCOUNT (fiat) or CRYPTO_ACCOUNT; empty string when there is none
refAccountDetailsstringDetails of the linked account as a JSON-encoded string; empty string when there is none. For CRYPTO_ACCOUNT its keys are PascalCase: Id, Address, LegacyAddress, EnterpriseAddress, Tag, EosAccountName, Status, ActivationTxId. For VIRTUAL_ACCOUNT it holds the bank details (bankName, accountHolderName, country, accountNumber, iban, bic, routingCodes[{type, value}]); these keys are PascalCase instead when the bank details came back when the address was created

Example Response

{
  "data": [
    {
      "id": "xxxx",
      "name": "EUR",
      "userId": "yyyy",
      "endUserId": "eus_987654321",
      "asset": "EUR",
      "address": "zzzz",
      "addressParams": {},
      "network": "Sepa",
      "deleted": false,
      "creationDate": "2025-01-15T10:30:00.000Z",
      "refAccountId": "vac_123456789",
      "refAccountType": "VIRTUAL_ACCOUNT",
      "refAccountDetails": "{\"bankName\":\"Deutsche Bank\",\"accountHolderName\":\"John Doe\",\"country\":\"DE\",\"accountNumber\":\"532013000\",\"routingCodes\":[{\"type\":\"sortcode\",\"value\":\"123456\"}],\"iban\":\"DE89370400440532013000\",\"bic\":\"COBADEFFXXX\"}"
    },
    {
      "id": "aaaa",
      "name": "BTC",
      "userId": "bbbb",
      "endUserId": "",
      "asset": "BTC",
      "address": "cccc",
      "addressParams": {},
      "network": "Bitcoin",
      "deleted": false,
      "creationDate": "2025-01-15T10:30:00.000Z",
      "refAccountId": "",
      "refAccountType": "",
      "refAccountDetails": ""
    }
  ]
}

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('GetDepositAddress', "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.