WebSocket
Get Asset Networks
Retrieves a list of supported asset networks for the given asset.
Auth:API Key
Tags:
General Methods
Command Name
GetNetworksCommand Arguments
| Field | Type | Required | Description |
|---|---|---|---|
ClientId | string | Required | Custom client ID for tracking (max 36 characters) Example: "my-client-123" |
Asset | string | Required | The asset to retrieve networks for Example: "USDT" |
ClientIdRequired
Type:
string
Description:
Custom client ID for tracking (max 36 characters)
Example:
"my-client-123"AssetRequired
Type:
string
Description:
The asset to retrieve networks for
Example:
"USDT"Command Invocation
Command Arguments Example:
[
"my-client-123",
"USDT"
]Invocation Example:
connection.invoke('GetNetworks', ['my-client-123', 'USDT'])Response Event
Event Name
executionEventsSubject
execution.asset.networksResponse containing supported networks for the specified asset
| Field | Type | Description |
|---|---|---|
- | string[] | List of network names |
Example Response
{
"data": [
"Bitcoin",
"Ethereum",
"Tron",
"BNB Smart Chain",
"Polygon",
"Optimism",
"Arbitrum One"
]
}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('GetNetworks', "my-client-123", "USDT")
.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