WebSocket
Create Deposit Address
Creates a deposit address for the given asset.
Auth:API Key
Tags:
Funding
Deposits
Command Name
CreateDepositAddressCommand Arguments
| Field | Type | Required | Description |
|---|---|---|---|
ClientId | string | Required | Custom client ID for tracking (max 36 characters) Example: "my-client-123" |
Asset | string | Required | Asset name Example: "BTC" |
Network | string | Required | Network name Example: "Bitcoin" |
ClientIdRequired
Type:
string
Description:
Custom client ID for tracking (max 36 characters)
Example:
"my-client-123"AssetRequired
Type:
string
Description:
Asset name
Example:
"BTC"NetworkRequired
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
executionEventsSubject
account.internalAddress.createdDeposit address creation response
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier of the deposit address |
userId | string | User ID associated with the deposit address |
endUserId | string | End user ID associated with the deposit address |
name | string | Name of the deposit address |
asset | string | Asset type (e.g., EUR, BTC) |
network | string | Network type (e.g., Sepa, Bitcoin) |
address | string | The deposit address |
addressParams | object | Additional parameters for the deposit address |
refAccountId | string | Reference account ID (virtual account ID for fiat, blockchain address for crypto) |
refAccountType | string | Type of reference account |
refAccountDetails | object | Detailed 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