Hercle
WebSocket

Create Deposit

Creates a fake deposit for the given asset. This method doesn't have a response.

Auth:API Key
Tags:
Funding
Deposits
Sandbox
Command Name
CreateDeposit

Command Arguments

Asset
Required
Type:
string
Description:

Asset name (EUR only)

Example: "EUR"
Amount
Required
Type:
number
Description:

Deposit amount

Example: 1000
DepositAddress
Required
Type:
string
Description:

Deposit Address

Example: "deposit-addr-123"

Command Invocation

Command Arguments Example:
[
  "EUR",
  1000,
  "deposit-addr-123"
]
Invocation Example:
connection.invoke('CreateDeposit', 'EUR', 1000.0, 'deposit-addr-123')

Response Event

Event Name
executionEvents
Subject

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('CreateDeposit', "EUR", 1000, "deposit-addr-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

Event Log

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