WebSocket
Create Transfer
Initiates a transfer of funds to a payee address.
Create a new transfer transaction from an internal address to a payee address.
Auth:API Key
Tags:
Banking
Transfers
Command Name
TransferFundsCommand Arguments
| Field | Type | Required | Description |
|---|---|---|---|
ClientId | string | Required | Custom client ID for tracking (max 36 characters) Example: "my-client-123" |
Asset | string | Required | Asset to transfer Example: "BTC" |
Amount | number | Required | Transfer amount Example: 0.001 |
InternalAddressId | string | Required | Source internal address ID Example: "internal_addr_123" |
PayeeAddressId | string | Required | Destination payee address ID Example: "payee_addr_456" |
Description | string | Required | Transfer description (max 250 characters) Example: "Monthly payment to supplier" |
ClientIdRequired
Type:
string
Description:
Custom client ID for tracking (max 36 characters)
Example:
"my-client-123"AssetRequired
Type:
string
Description:
Asset to transfer
Example:
"BTC"AmountRequired
Type:
number
Description:
Transfer amount
Example:
0.001InternalAddressIdRequired
Type:
string
Description:
Source internal address ID
Example:
"internal_addr_123"PayeeAddressIdRequired
Type:
string
Description:
Destination payee address ID
Example:
"payee_addr_456"DescriptionRequired
Type:
string
Description:
Transfer description (max 250 characters)
Example:
"Monthly payment to supplier"Command Invocation
Command Arguments Example:
[
"my-client-123",
"BTC",
0.001,
"internal_addr_123",
"payee_addr_456",
"Monthly payment to supplier"
]Invocation Example:
connection.invoke('TransferFunds', 'my-client-123', 'BTC', 0.001, 'internal_addr_123', 'payee_addr_456', 'Monthly payment to supplier')Response Event
Event Name
executionEventsSubject
banking.transfer.createdTransfer creation response
| Field | Type | Description |
|---|---|---|
httpStatusCode | number | Status code of the request (201: created successfully) |
message | string | Response message |
id | string | Unique identifier of the initiated transfer |
asset | string | Asset to transfer (e.g., BTC, ETH) |
amount | number | Amount of asset to transfer |
internalAddressId | string | Source address ID |
payeeAddressId | string | Destination payee address ID |
description | string | Description of the transfer |
Example Response
{
"data": {
"httpStatusCode": 201,
"message": "Transfer fund request registered successfully",
"id": "id_123456",
"asset": "BTC",
"amount": 0.001,
"internalAddressId": "internal_addr_123",
"payeeAddressId": "payee_addr_456",
"description": "Monthly payment to supplier"
}
}Validation Rules
Important Requirements
| Field | Type | Description |
|---|---|---|
Description | string | Required field and must not exceed 250 characters |
Asset | string | Must exist in the configured networks and be supported for transfers |
Amount | number | Must be a positive number greater than zero |
Address IDs | string | Both InternalAddressId and PayeeAddressId must be valid and active |
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('TransferFunds', "my-client-123", "BTC", 0.001, "internal_addr_123", "payee_addr_456", "Monthly payment to supplier")
.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