Hercle
WebSocket

Get Transaction Ledger

Retrieves detailed information about a specific transaction, including ledger entries.

Auth:API Key
Tags:
Banking
Ledger
Command Name
GetTransactionLedger

Command Arguments

ClientId
Required
Type:
string
Description:

Custom client ID for tracking (max 36 characters)

Example: "my-client-123"
TransactionId
Required
Type:
string
Description:

Transaction ID

Example: "a12f5e4d-3c6e-4b2a-9f4d-8e2b1c3d4e5f"

Command Invocation

Command Arguments Example:
[
  "my-client-123",
  "a12f5e4d-3c6e-4b2a-9f4d-8e2b1c3d4e5f"
]
Invocation Example:
connection.invoke('GetTransactionLedger', 'my-client-123', 'a12f5e4d-3c6e-4b2a-9f4d-8e2b1c3d4e5f')

Response Event

Event Name
executionEvents
Subject
ledger.transaction.details
FieldTypeDescription
idstringTransaction ID
refIdstringReference ID associated with the transaction
userIdstringUser ID associated with the transaction
typestring
Transaction type
DEPOSITDeposit transaction
WITHDRAWALWithdrawal transaction
TRADE_FEETrade fee transaction
statusstring
Transaction status
CREATEDTransaction created
CONFIRMINGTransaction being confirmed
CONFIRMEDTransaction confirmed
descriptionstringDescription of the transaction
assetstringAsset involved in the transaction (e.g., EUR, BTC)
amountnumberAmount involved in the transaction
debtorobjectDetails of the debtor (sender) - see Debtor Object below
creditorobjectDetails of the creditor (receiver) - see Creditor Object below
timestampstringTimestamp of the transaction creation

Example Response

{
  "data": {
    "id": "a12f5e4d-3c6e-4b2a-9f4d-8e2b1c3d4e5f",
    "refId": "b34d6e7f-8a9b-4c0d-9e1f-2a3b4c5d6e7f",
    "userId": "c56e7f8a-9b0c-4d1e-2f3a-4b5c6d7e8f9a",
    "type": "DEPOSIT",
    "status": "CREATED",
    "description": "Deposit",
    "asset": "EUR",
    "amount": 1000,
    "debtor": {
      "bankName": "ABC Bank",
      "bankAddressCountry": "",
      "accountHolderName": "John Smith",
      "country": "IT",
      "accountNumber": "",
      "routingCodes": {},
      "iban": "IT123A456B789C012D345E678F90",
      "bic": "AABCDEFFXXX"
    },
    "creditor": {
      "bankName": "ACME Bank",
      "bankAddressCountry": "",
      "accountHolderName": "Acme Corporation",
      "country": "DE",
      "accountNumber": "",
      "routingCodes": {},
      "iban": "DE123A456B789C012D345E678F90",
      "bic": "AABCDEFFXXX"
    },
    "timestamp": "2025-08-26T12:56:36.065Z"
  }
}

Transaction Ledger Object Structure

Debtor Object (Fiat)

The debtor object contains information about the sender for fiat transactions.

FieldTypeDescription
bankNamestringName of the debtor's bank
bankAddressCountrystringCountry of the bank's address
accountHolderNamestringName of the account holder
countrystringCountry code of the account
accountNumberstringBank account number
routingCodesobjectRouting codes for the bank
ibanstringInternational Bank Account Number
bicstringBank Identifier Code (SWIFT code)

Debtor Object (Crypto)

For cryptocurrency transactions, the debtor object contains blockchain-specific information.

FieldTypeDescription
addressstringDebtor's blockchain address
assetstringAsset being sent by the debtor
networkstringNetwork of the debtor's address (e.g., Bitcoin, Ethereum)

Creditor Object (Fiat)

The creditor object contains information about the receiver for fiat transactions.

FieldTypeDescription
bankNamestringName of the creditor's bank
bankAddressCountrystringCountry of the bank's address
accountHolderNamestringName of the account holder
countrystringCountry code of the account
accountNumberstringBank account number
routingCodesobjectRouting codes for the bank
ibanstringInternational Bank Account Number
bicstringBank Identifier Code (SWIFT code)

Creditor Object (Crypto)

For cryptocurrency transactions, the creditor object contains blockchain-specific information.

FieldTypeDescription
addressstringCreditor's blockchain address
assetstringAsset being received by the creditor
networkstringNetwork of the creditor's address (e.g., Bitcoin, Ethereum)

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('GetTransactionLedger', "my-client-123", "a12f5e4d-3c6e-4b2a-9f4d-8e2b1c3d4e5f")
      .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.