Hercle
WebSocket

Get Asset Networks

Retrieves a list of supported asset networks for the given asset.

Auth:API Key
Tags:
General Methods
Command Name
GetNetworks

Command Arguments

ClientId
Required
Type:
string
Description:

Custom client ID for tracking (max 36 characters)

Example: "my-client-123"
Asset
Required
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
executionEvents
Subject
execution.asset.networks
FieldTypeDescription
-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

Event Log

No events yet. Connect and invoke a command to see events.