WebSocket
Accept RFQ
Accept a Request For Quote (RFQ) within the time limit to execute the trade.
Auth:API Key
Tags:
Trading
Command Name
AcceptRequestForQuoteCommand Arguments
| Field | Type | Required | Description |
|---|---|---|---|
ClientId | string | Required | Custom client ID for tracking (max 36 characters) Example: "my-client-456" |
RequestForQuoteId | string | Required | Unique identifier of the RFQ to accept Example: "rfq-789" |
ClientIdRequired
Type:
string
Description:
Custom client ID for tracking (max 36 characters)
Example:
"my-client-456"RequestForQuoteIdRequired
Type:
string
Description:
Unique identifier of the RFQ to accept
Example:
"rfq-789"Command Invocation
Command Arguments Example:
[
"my-client-456",
"rfq-789"
]Invocation Example:
connection.invoke('AcceptRequestForQuote', 'my-client-456', 'rfq-789')Response Event
Event Name
executionEventsSubject
execution.order.executedEvent sent when the RFQ is accepted and executed successfully.
| Field | Type | Description |
|---|---|---|
tradeId | string | Unique identifier for the executed trade |
side | string | Indicates if the trade was a buy or sell buy→ Buysell→ Sell |
pair | string | Trading pair involved in the trade |
price | number | Execution price of the trade |
size | number | Size of the trade executed |
notional | number | Notional value of the trade |
status | number | Status code of the trade execution 0→ Created1→ Executed2→ Cancelled3→ Pending |
baseCurrency | string | Base currency of the trading pair |
quoteCurrency | string | Quote currency of the trading pair |
timestamp | string | Timestamp of when the trade was executed |
statusError | string | Error message if the trade failed |
Example Response
{
"data": {
"tradeId": "trade-123",
"side": "buy",
"pair": "BTCUSDT",
"price": 15000,
"size": 0.5,
"notional": 7500,
"status": 1,
"baseCurrency": "BTC",
"quoteCurrency": "USDT",
"timestamp": "2024-01-01T12:00:00Z",
"statusError": ""
}
}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('AcceptRequestForQuote', "my-client-456", "rfq-789")
.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