Hercle
WebSocket

Create Deposit Address

Creates a deposit address for the given asset.

Auth:API Key
Tags:
Funding
Deposits
Command Name
CreateDepositAddress

Command Arguments

ClientId
Required
Type:
string
Description:

Custom client ID for tracking (max 36 characters)

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

Asset name

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

Network name

Example: "Bitcoin"

Command Invocation

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

Response Event

Event Name
executionEvents
Subject
account.internalAddress.created
FieldTypeDescription
idstringUnique identifier of the deposit address
userIdstringUser ID associated with the deposit address
endUserIdstringEnd user ID associated with the deposit address
namestringName of the deposit address
assetstringAsset type (e.g., EUR, BTC)
networkstringNetwork type (e.g., Sepa, Bitcoin)
addressstringThe deposit address
addressParamsobjectAdditional parameters for the deposit address
refAccountIdstringReference account ID (virtual account ID for fiat, blockchain address for crypto)
refAccountTypestringType of reference account
refAccountDetailsobjectDetailed account information (banking or crypto)

Example Response

{
  "data": {
    "id": "addr_def456ghi789",
    "userId": "user_789xyz",
    "endUserId": "eus_987xyz654",
    "name": "BTC Deposit Address",
    "asset": "BTC",
    "network": "Bitcoin",
    "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
    "addressParams": {},
    "refAccountId": "35",
    "refAccountType": "CRYPTO_ACCOUNT",
    "refAccountDetails": {
      "id": "30",
      "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
      "legacyAddress": "",
      "enterpriseAddress": null,
      "tag": "",
      "eosAccountName": "Address BTC",
      "status": null,
      "activationTxId": 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('CreateDepositAddress', "my-client-123", "BTC", "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.