WebSocket
Get Available Pairs
Retrieves a list of supported tradable pairs along with their minimum and maximum sizes.
Auth:API Key
Tags:
General Methods
Command Name
GetPairsCommand Arguments
| Field | Type | Required | Description |
|---|---|---|---|
ClientId | string | Required | Custom client ID for tracking (max 36 characters) Example: "my-client-123" |
ClientIdRequired
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('GetPairs', ['my-client-123'])Response Event
Event Name
executionEventsSubject
execution.pairsResponse containing available trading pairs and their size limits
| Field | Type | Description |
|---|---|---|
name | string | Trading pair name |
asset | string | Base asset |
currency | string | Asset currency |
minSize | number | Minimum trade size for the pair |
minQuoteSize | number | Minimum quote size for the pair |
maxSize | number | Maximum trade size for the pair |
maxQuoteSize | number | Maximum quote size for the pair |
Example Response
{
"data": [
{
"name": "BTCUSDT",
"asset": "BTC",
"currency": "USDT",
"minSize": 0.0001,
"minQuoteSize": 5,
"maxSize": 100,
"maxQuoteSize": 1000000
},
{
"name": "ETHUSDT",
"asset": "ETH",
"currency": "USDT",
"minSize": 0.001,
"minQuoteSize": 5,
"maxSize": 1000,
"maxQuoteSize": 1000000
}
]
}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('GetPairs', "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