Get started
Hercle APIs uses Websockets to provide real-time access to OTC functionalities for traders and developer.
WEBSOCKET OVERVIEW
Websockets on HercleX utilize SignalR technology. More information
about SignalR can be found
here. Most major programming languages offer a client SDK for SignalR.
Below is a list of packages available for these primary languages:
C#:
Install-Package Microsoft.AspNetCore.SignalR.Client
Java:
-
Maven
<dependency>
<groupId>com.microsoft.signalr</groupId>
<artifactId>signalr</artifactId>
<version>1.0.0</version>
</dependency>
-
Gradle
implementation 'com.microsoft.signalr:signalr:7.0.0'
Javascript:
-
NPM
https://www.npmjs.com/package/@microsoft/signalr
-
From CDN without NPM:
<script src="https://cdnjs.cloudflare.com/ajax/libs/microsoft-signalr/6.0.1/signalr.js"></script>
C++:
https://github.com/aspnet/SignalR-Client-Cpp
Python:
https://pypi.org/project/signalrcore/
AUTHENTICATION
To utilize the public hub, an API key is required. This key ensures that your requests are authenticated, and it's essential for all our hub's endpoints. Before you proceed, ensure that you have completed our onboarding process and that your KYC has been approved. Completing this process is imperative to proceed with the API key creation. To retrieve your API key, follow these steps:
- Login within out systems following this link.
- Visit the Account page.
- Head over to the 'API Key' area.
- There, you can either generate a new key or retrieve an existing one
A word of advice: Your API key is valuable. Ensure you store it securely and refrain from sharing it publicly or in any insecure spaces.
CONNECTING TO THE HUB, HANDLING COMMANDS AND EVENTS
// Establishing a Connection to the Hub
const apiKey = "YOUR_API_KEY";
let connection = new signalR.HubConnectionBuilder()
.withUrl("${baseUrl}/${hubPath}", { accessTokenFactory: () => apiKey })
.build();
// Listening for Events
connection.on(eventName, (message) => {
console.log("Message received from server:", message);
});
// Starting the Connection
connection.start().catch(err => console.error(err));
// Sending Commands
connection.invoke(commandName, commandArguments).catch(err => console.error(err));
Below are the steps for starting the connection to the hub and handling commands and events with code examples written in JavaScript.
1. Establishing a Connection to the Hub
To initiate your connection with SignalR, you must first establish a "hub connection".
2. Listening for Events
To receive events you need to listen on a specific event name. In the example when an event is received, it's logged to the console.
3. Starting the Connection
Before you send commands or listen to events, ensure that you've started the connection.
4. Sending Commands
Once connected, you can send commands to the server by invoking methods with arguments if required.
| Name | Description | Type | Value |
|---|---|---|---|
| baseUrl | server's url | string |
Production:
https://publicapi.hercle.financial Sandbox: https://publicapi.sandbox.hercle.financial |
| hubPath | path of the public hub | string | ExecutionLiveServer/v1 |
| eventName | name of the event to listen to | string | |
| commandName | name of the command to send to the hub | string | |
| commandArguments | list of command's arguments | array |
HUB RESPONSE
Example of hub response:
{
'channel': 'eventName',
'topic': 'topicName',
'subject': 'topic.subject',
'type': 'message',
'clientId': 'clientId',
'data': '{
key: value
}'
}
Below is a brief description of the fields in a hub's response with an example.
| Field | Type | Description |
|---|---|---|
| channel | string | Name of the receiving events |
| topic | string | Topic of the event (e.g.: Account, Execution) |
| subject | string | Subject regarding the topic (e.g.: Execution.Pairs) |
| type | string | Type of the message (Message) |
| clientId | string | Custom client ID (max 36 characters) |
| data | JSON string | Requested Data |
⚠️ HercleX Upgrades Schedule
Regular Upgrade Window
Herclex undergoes scheduled upgrades every Wednesday from 10:00 AM to 11:00 AM GMT+1 time. During this window, users can expect system enhancements and routine maintenance to be carried out.
Urgent Upgrades
In cases where urgent upgrades are necessary outside the scheduled window, efforts will be made to communicate these exceptions in advance. However, the ability to provide prior notice is not guaranteed and will depend on the urgency and critical nature of the upgrade.
Impact on Connectivity
During the upgrade window, if a system upgrade is in progress, a disconnection from SignalR services may occur. It is advisable to anticipate such disconnections and prepare accordingly.
Reconnection Policy Recommendation
It is recommended to implement a reconnection policy to handle disconnections efficiently. This ensures minimal disruption to the user experience during and after the upgrade process.
Reconnection Example
// SignalR disconnection handling and reconnection example
connection.Closed += async (error) =>
{
// Log the disconnection event, if necessary
Console.WriteLine("Disconnected from SignalR. Attempting to reconnect...");
// Implement a reconnection strategy
// This example uses a simple delay before attempting to reconnect
await Task.Delay(new Random().Next(0,5) * 1000);
await connection.StartAsync();
};
The provided example, written in C#, showcases a fundamental method for attempting an automatic reconnection after experiencing a disconnection event. It is advisable to tailor the reconnection process to align with the unique needs and circumstances of your application.
For an in-depth exploration of connection lifetime event management in SignalR, including recommended practices for addressing disconnections and reestablishing connections, please consult the official Microsoft documentation: Handling Connection Lifetime Events in SignalR.
API STATUS
You can check the current status of HercleX services and any past incidents by visiting our status page: https://status.hercle.financial.
deprecated
⚠️ WARNING - The following deprecated methods will be permanently removed starting from 07 July 2024. ⚠️
place order
⚠️ WARNING - PlaceOrder is deprecated, please use PlaceOtcOrder instead.
Places an order based on a Price Update ID.
CommandName
PlaceOrder
CommandArguments
[ ClientId, PriceId, PairName, Price, Side, Size, Slippage
]
eventName
executionEvents
subject
execution.order.executed
Response Data Example:
'data': '{
"tradeId":"xxxx",
"side":"buy",
"pair":"BTCUSDT",
"price":26844.07,
"size":0.01,
"notional":268.4407,
"status":1,
"baseCurrency":"BTC",
"quoteCurrency":"USDT",
"timestamp":"2023-10-11T23:00:57.93094Z",
"statusError":""
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| PriceId | string | Price update ID |
| PairName | string | Pair name without separators (e.g.: BTCUSDT) |
| Price | number | Buy or sell price |
| Side | string | Selected side ("buy" or "sell") |
| Size | double | Selected size |
| Slippage | double | Maximum price slippage accepted in case of sudden price change (1.0 equals to 1%) |
ORDER PLACED OBJECT
| Field | Type | Description |
|---|---|---|
| tradeId | string | Trade ID |
| side | string | Selected side ("buy" or "sell") |
| pair | string | Pair name |
| price | number | Executed price |
| size | number | Trade size |
| notional | number | Trade notional value |
| status | number | Order status (0 created, 1 executed, 2 cancelled) |
| baseCurrency | string | Base currency name |
| quoteCurrency | string | Quote currency name |
| timestamp | string | Datetime of trade |
| statusError | string | Error in case of cancellation or rejection |
Get Orders
⚠️ WARNING - GetOrders is deprecated, please use GetOrdersPaginated instead.
Returns an array of the user's orders.
CommandName
GetOrders
CommandArguments
[ ClientId ]
eventName
executionEvents
subject
account.orders.snapshot
Response Data Example:
'data': '[
{
"orderId": "dcc30a80-88dd-485d-9c3e-d615059bafee",
"clientId": "68925acb-4f03-48ab-98a9-16b845f21017",
"userId": "3c6765a7-64fd-49d2-a797-7ad61101d836",
"instrument": "BNBEUR",
"side": "buy",
"orderType": 0,
"price": 541.351787638296,
"executedPrice": 541.351787638296,
"executedTimestamp": "2024-03-17T16:09:15.000Z",
"quantity": 0.05,
"quantityFilled": 0.05,
"orderStatus": 2,
"cancellationReason": "",
"slippage": 0.1,
"timestamp":"2024-03-17T16:09:14.000Z",
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
ORDER OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Order ID |
| clientId | string | Client ID |
| userId | string | User ID |
| instrument | string | Instrument name |
| side | string | Order side ("buy" or "sell") |
| orderType | number | Order type (0 market, 1 fill or kill) |
| price | number | Order Price |
| executedPrice | number | Executed price |
| executedTimestamp | number | Executed timestamp |
| quantity | number | Order quantity |
| quantityFilled | number | Executed quantity |
| orderStatus | string | Order status (0 created, 1 executed, 2 cancelled) |
| cancellationReason | string | Error in case of cancellation or rejection |
| slippage | string | Maximum price slippage accepted (1.0 equals to 1%) |
| timestamp | string | Datetime of order |
historic trades
⚠️ WARNING - GetTrades is deprecated, please use GetTradesPaginated instead.
Returns an array of the user's executed trades.
CommandName
GetTrades
CommandArguments
[ ClientId ]
eventName
executionEvents
subject
account.trades.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"userId":"yyyy",
"instrument": "ETH/EUR",
"side": "sell",
"price": 1534,
"quantityFilled": 0.05,
"timestamp": "2023-07-23:32:35.000Z",
"email": "abc@email.it"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
TRADE OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Transaction ID |
| userId | string | User ID |
| instrument | string | Instrument name |
| side | string | Trade side ("buy" or "sell") |
| price | number | Executed price |
| quantityFilled | number | Trade quantity executed |
| timestamp | string | Datetime of the trade |
| string | Account email |
historic withdrawals
⚠️ WARNING - GetWithdraws is deprecated, please use GetWithdrawals instead.
Returns an array of the user's historic withdrawals.
CommandName
GetWithdraws
CommandArguments
[ ClientId ]
eventName
executionEvents
subject
account.withdrawals.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"clientId": "68925acb-4f03-48ab-98a9-16b845f21017",
"userId":"yyyy",
"name":"Mario",
"surname":"Rossi",
"company":"Company",
"description":null,
"destination":"zzzz",
"network":"Ethereum",
"amount":0.05,
"asset":"ETH",
"fee": 5,
"status":"CONFIRMING",
"refId":"ab1234",
"isIstant":false,
"timestamp":"2023-11-10T15:26:10.586Z"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
WITHDRAW OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Withdraw ID |
| clientId | string | Client ID |
| userId | string | User ID |
| name | string | User first name |
| surname | string | User last name |
| company | string | User company |
| description | string | Description |
| destination | string | Destination address |
| network | string | Network name |
| amount | number | Withdraw amount |
| asset | string | Asset name |
| fee | number | Fee |
| status | string |
CREATE CONFIRMING CONFIRMED PENDING SUCCESS FAILURE REJECTED |
| refId | string | Cro or Trx Id added after network submission |
| isIstant | bool | Option for istant withdraw |
| timestamp | string | Timestamp of the withdraw |
historic transactions
⚠️ WARNING - GetTransactions is deprecated, please use GetTransactionsPaginated instead.
Returns an array of the user's historic movements, includint trades,
withdrawals and deposits.
CommandName
GetTransactions
CommandArguments
[ ClientId ]
eventName
executionEvents
subject
account.transactions.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"userId":"yyyy",
"sequence":123,
"type":4,
"asset":"USDC",
"amount":1050.32,
"timestamp":"2023-07-23T12:06:04.175Z"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
TRANSACTION OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Transaction ID |
| userId | string | User ID |
| sequence | number | Sequence number of the transaction |
| type | number |
0 - deposit 1 - withdraw 2 - trade fee 3 - custody fee 4 - trade 5 - trade lock 6 - trade unlock 7 - withdrawal fee 8 - withdrawal refund 9 - withdrawal fee refund |
| asset | string | Asset name |
| amount | number | Transaction amount |
| timestamp | string | Datetime of the transaction |
network fees
⚠️ WARNING - GetWithdrawalInfo is deprecated, please use GetWithdrawals instead.
Returns the network fees for the given asset.
CommandName
GetWithdrawalInfo
CommandArguments
[ ClientId, Asset ]
eventName
executionEvents
subject
execution.withdraw.fee.info
Response Data Example:
'data': '{
"httpStatusCode":200,
"assetNetworkIds":[{
"assetId":"BTC",
"description":"Bitcoin",
"networkFees":{
"low":{
"feePerByte":"214",
"gasPrice":"",
"networkFee":"0.00030174",
"baseFee":"",
"priorityFee":""
},
"medium":{
"feePerByte":"247",
"gasPrice":"",
"networkFee":"0.00034827",
"baseFee":"",
"priorityFee":""
},
"high":{
"feePerByte":"283",
"gasPrice":"",
"networkFee":"0.00039903",
"baseFee":"",
"priorityFee":""
}
}
}]
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| Asset | string | Asset name |
NETWORK FEES OBJECT
| Field | Type | Description |
|---|---|---|
| httpStatusCode | int | Status code of the request |
| assetNetworkIds | array | Array of network IDs |
NETWORK ID OBJECT
| Field | Type | Description |
|---|---|---|
| assetId | string | Asset ID |
| description | string | Asset Description |
| networkFees | dictionary | Dictionary of network fees (by fee level) |
NETWORK FEE OBJECT
| Field | Type | Description |
|---|---|---|
| feePerByte | string | Fee cost per Byte |
| gasPrice | string | Gas price |
| networkFee | string | Network fee |
| baseFee | string | Base fee cost |
| priorityFee | string | Priority fee cost |
get available pairs
Returns an array of supported tradable pairs along with their
minimum and maximum sizes.
CommandName
GetPairs
CommandArguments
[ ClientId ]
eventName
executionEvents
subject
execution.pairs
Response Data Example:
'data': '[
{
"asset": "BTC",
"currency": "USDT",
"maxQuoteSize": 200000.0,
"maxSize": 5.0,
"minQuoteSize": 50.0,
"minSize": 0.001,
"name": "BTCUSDT"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
PAIR OBJECT
| Field | Type | Description |
|---|---|---|
| name | string | Pair |
| asset | string | Asset name |
| currency | string | Asset currency |
| minSize | number | Minimum tradable size |
| minQuoteSize | number | Maximum tradable size in quote |
| maxSize | number | Maximum tradable size |
| maxQuoteSize | number | Maximum tradable size in quote |
get asset networks
Returns an array of supported networks for the given asset.
CommandName
GetNetworks
CommandArguments
[ ClientId, Asset ]
eventName
executionEvents
subject
execution.asset.networks
Response Data Example:
'data': '[
"Ethereum",
"Tron",
"BNB Smart Chain",
"Polygon",
"Optimism",
"Arbitrum One"
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| Asset | string | Asset name |
ASSET NETWORKS OBJECT
| Field | Type | Description |
|---|---|---|
| array | Array of network names |
get pair size by amount
Return pair quote size based on base amount
CommandName
GetPairSizeByAmount
CommandArguments
[ ClientId, pair, side, amount ]
eventName
executionEvents
subject
execution.pair.price
Response Data Example:
'data': '{
"id": "xxxx",
"pair":"BTCUSDT",
"price":26844.07,
"size":0.01,
"timestamp":"2023-10-11T23:00:57.93094Z",
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| pair | string | Pair name without separators (e.g.: BTCUSDT) |
| side | string | Order side ("buy" or "sell") |
| amount | double | Selected amount |
PAIR SIZE OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Price ID |
| pair | string | Pair name |
| price | number | Price of the pair with the selected amount and size |
| size | number | Selected size |
| timestamp | string | Datetime of the request |
pair price stream
Subscribe
Subscribes to the real-time feed of price updates of a pair with the
selected size.
CommandName
SubscribePairPriceChannel
CommandArguments
[ ClientId, PairName, Size ]
eventName
subscriptions
subject
execution.feeds.priceUpdate
Response Data Example:
'data': '{
"id":"xxxx",
"buyPrice":26798.50,
"sellPrice":26790.50,
"size":1.0,
"pair":"BTCUSDT",
"markPrice":26794.575,
"timestamp":"2023-10-11T23:00:57.93094Z"
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| PairName | string | Pair name without separators (e.g.: BTCUSDT) |
| Size | double | Selected size |
PRICE UPDATE OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Price update ID |
| buyPrice | number | Best buy price of pair with selected quantity |
| sellPrice | number | Best sell price of pair with selected quantity |
| size | number | Selected size |
| pair | string | Pair name |
| markPrice | number | Mark price of pair with selected quantity |
| timestamp | string | Datetime of price update |
Unsubscribe
Unsubscribes from an active price feed.
CommandName
UnsubscribePairPriceChannel
CommandArguments
[ ClientId, PairName, Size ]
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| PairName | string | Pair name without separators (e.g.: BTCUSDT) |
| Size | double | Selected size |
place otc order
Places an order based on a Price Update ID.
CommandName
PlaceOtcOrder
CommandArguments
[ ClientId, PriceId, Side, Slippage ]
eventName
executionEvents
subject
execution.order.executed
Response Data Example:
'data': '{
"tradeId":"xxxx",
"side":"buy",
"pair":"BTCUSDT",
"price":26844.07,
"size":0.01,
"notional":268.4407,
"status":1,
"baseCurrency":"BTC",
"quoteCurrency":"USDT",
"timestamp":"2023-10-11T23:00:57.93094Z",
"statusError":""
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| PriceId | string | Price update ID |
| Side | string | Selected side ("buy" or "sell") |
| Slippage | double | Maximum price slippage accepted in case of sudden price change (1.0 equals to 1%) |
ORDER PLACED OBJECT
| Field | Type | Description |
|---|---|---|
| tradeId | string | Trade ID |
| side | string | Selected side ("buy" or "sell") |
| pair | string | Pair name |
| price | number | Executed price |
| size | number | Trade size |
| notional | number | Trade notional value |
| status | number | Order status (0 created, 1 executed, 2 cancelled) |
| baseCurrency | string | Base currency name |
| quoteCurrency | string | Quote currency name |
| timestamp | string | Datetime of trade |
| statusError | string | Error in case of cancellation or rejection |
Get Orders by clientId
Returns an array of the user's orders with a 7 days limit.
CommandName
GetOrdersByClientId
CommandArguments
[ ClientId, orderClientId ]
eventName
executionEvents
subject
account.orders.snapshot
Response Data Example:
'data': '[
{
"orderId": "dcc30a80-88dd-485d-9c3e-d615059bafee",
"clientId": "68925acb-4f03-48ab-98a9-16b845f21017",
"userId": "3c6765a7-64fd-49d2-a797-7ad61101d836",
"instrument": "BNBEUR",
"side": "buy",
"orderType": 0,
"price": 541.351787638296,
"executedPrice": 541.351787638296,
"executedTimestamp": "2024-03-17T16:09:15.000Z",
"quantity": 0.05,
"quantityFilled": 0.05,
"orderStatus": 2,
"cancellationReason": "",
"slippage": 0.1,
"timestamp":"2024-03-17T16:09:14.000Z",
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| orderClientId | string | Order client ID |
ORDER OBJECT
| Field | Type | Description |
|---|---|---|
| orderId | string | Order ID |
| clientId | string | Client ID |
| userId | string | User ID |
| instrument | string | Instrument name |
| side | string | Order side ("buy" or "sell") |
| orderType | number | Order type (0 market, 1 fill or kill) |
| price | number | Order Price |
| executedPrice | number | Executed price |
| executedTimestamp | number | Executed timestamp |
| quantity | number | Order quantity |
| quantityFilled | number | Executed quantity |
| orderStatus | string | Order status (0 created, 1 executed, 2 cancelled) |
| cancellationReason | string | Error in case of cancellation or rejection |
| slippage | string | Maximum price slippage accepted (1.0 equals to 1%) |
| timestamp | string | Datetime of order |
Get Orders paginated
Returns an array of the user's orders with a 7 days limit.
CommandName
GetOrdersPaginated
CommandArguments
[ ClientId, startDate, endDate, page, pageSize ]
eventName
executionEvents
subject
account.orders.snapshot
Response Data Example:
'data': '[
{
"orderId": "dcc30a80-88dd-485d-9c3e-d615059bafee",
"clientId": "68925acb-4f03-48ab-98a9-16b845f21017",
"userId": "3c6765a7-64fd-49d2-a797-7ad61101d836",
"instrument": "BNBEUR",
"side": "buy",
"orderType": 0,
"price": 541.351787638296,
"executedPrice": 541.351787638296,
"executedTimestamp": "2024-03-17T16:09:15.000Z",
"quantity": 0.05,
"quantityFilled": 0.05,
"orderStatus": 2,
"cancellationReason": "",
"slippage": 0.1,
"timestamp":"2024-03-17T16:09:14.000Z",
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| startDate | string | is a datetime iso |
| endDate | string | is a datetime iso |
| page | number | page number |
| pageSize | number | min size is 5 and max is 50 |
ORDER OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Order ID |
| clientId | string | Client ID |
| userId | string | User ID |
| instrument | string | Instrument name |
| side | string | Order side ("buy" or "sell") |
| orderType | number | Order type (0 market, 1 fill or kill) |
| price | number | Order Price |
| executedPrice | number | Executed price |
| executedTimestamp | number | Executed timestamp |
| quantity | number | Order quantity |
| quantityFilled | number | Executed quantity |
| orderStatus | string | Order status (0 created, 1 executed, 2 cancelled) |
| cancellationReason | string | Error in case of cancellation or rejection |
| slippage | string | Maximum price slippage accepted (1.0 equals to 1%) |
| timestamp | string | Datetime of order |
create rfq
Creates a Request For Quote. Has to be accepted within the time
limit through Accept RFQ.
CommandName
CreateRequestForQuote
CommandArguments
[ ClientId, PairName, Side, Size, Amount ]
eventName
executionEvents
subject
account.requestForQuote.created
Response Data Example:
'data': '{
"requestForQuoteId":"xxxx",
"userId":"xxxx",
"instrument":"BTCUSDT",
"baseCurrency":"BTC",
"quoteCurrency":"USDT",
"side":"buy",
"size":0.01,
"price":26844.07,
"amount":1.0,
"status":1,
"RequestDateTime":"2023-10-11T23:00:57.93094Z",
"ExpireDateTime":"2023-10-11T23:01:27.87528Z"
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientID | string | Custom client ID (max 36 characters) |
| PairName | string | Pair name without separators (e.g.: BTCUSDT) |
| Side | string | Selected side ("buy" or "sell") |
| Size | double | Size (base currency) - 0 to skip |
| Amount | double | Size (quote currency) - 0 to skip |
RFQ CREATED OBJECT
| Field | Type | Description |
|---|---|---|
| requestForQuoteId | string | Request For Quote ID |
| userId | string | User ID |
| instrument | string | Instrument name |
| baseCurrency | string | Base currency name |
| quoteCurrency | string | Quote currency name |
| side | string | Selected side ("buy" or "sell") |
| size | number | Order size (base currency) |
| price | number | Proposed price |
| amount | number | Order amount (quote currency) |
| status | number | Order status (0 created, 1 executed, 2 cancelled) |
| requestDateTime | string | Timestamp of RFQ creation |
| expireDateTime | string | Timestamp of RFQ expiration |
Create Custom RFQ
Creates a Request For Quote with custom expiration time. Has to be
accepted within the time limit through Accept RFQ.
CommandName
CreateRequestForQuoteWithCustomExpiration
CommandArguments
[ ClientId, PairName, Side, Size, Amount, ExpirationInSeconds
]
eventName
executionEvents
subject
account.requestForQuote.created
Response Data Example:
'data': '{
"requestForQuoteId":"xxxx",
"userId":"xxxx",
"instrument":"BTCUSDT",
"baseCurrency":"BTC",
"quoteCurrency":"USDT",
"side":"buy",
"size":0.01,
"price":26844.07,
"amount":1.0,
"status":1,
"RequestDateTime":"2023-10-11T23:00:57.93094Z",
"ExpireDateTime":"2023-10-11T23:01:27.87528Z"
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientID | string | Custom client ID (max 36 characters) |
| PairName | string | Pair name without separators (e.g.: BTCUSDT) |
| Side | string | Selected side ("buy" or "sell") |
| Size | double | Size (base currency) - 0 to skip |
| Amount | double | Size (quote currency) - 0 to skip |
| ExpirationInSeconds | number | Expiration time in seconds (default 15, max 240) |
RFQ CREATED OBJECT
| Field | Type | Description |
|---|---|---|
| requestForQuoteId | string | Request For Quote ID |
| userId | string | User ID |
| instrument | string | Instrument name |
| baseCurrency | string | Base currency name |
| quoteCurrency | string | Quote currency name |
| side | string | Selected side ("buy" or "sell") |
| size | number | Order size (base currency) |
| price | number | Proposed price |
| amount | number | Order amount (quote currency) |
| status | number | Order status (0 created, 1 executed, 2 cancelled) |
| requestDateTime | string | Timestamp of RFQ creation |
| expireDateTime | string | Timestamp of RFQ expiration |
accept rfq
Accept a previously created Request For Quote.
CommandName
AcceptRequestForQuote
CommandArguments
[ ClientId, RequestForQuoteId ]
eventName
executionEvents
subject
execution.order.executed
Response Data Example:
'data': '{
"tradeId":"xxxx",
"side":"buy",
"pair":"BTCUSDT",
"price":26844.07,
"size":0.01,
"notional":268.4407,
"status":1,
"baseCurrency":"BTC",
"quoteCurrency":"USDT",
"timestamp":"2023-10-11T23:00:57.93094Z",
"statusError":""
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| RequestForQuoteId | string | ID of the RFQ generated through CreateRFQ |
RFQ ACCEPTED OBJECT
| Field | Type | Description |
|---|---|---|
| tradeId | string | Trade ID |
| side | string | Selected side ("buy" or "sell") |
| pair | string | Pair name |
| price | number | Executed price |
| size | number | Trade size |
| notional | number | Trade notional value |
| status | number | Order status (0 created, 1 executed, 2 cancelled) |
| baseCurrency | string | Base currency name |
| quoteCurrency | string | Quote currency name |
| timestamp | string | Datetime of trade |
| statusError | string | Error in case of cancellation or rejection |
get transactions paginated
Returns an array of the user's historic movements, includint trades,
withdrawals and deposits with a 7 days limit.
CommandName
GetTransactionsPaginated
CommandArguments
[ ClientId, startDate, endDate, page, pageSize ]
eventName
executionEvents
subject
account.transactions.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"userId":"yyyy",
"sequence":123,
"type":4,
"asset":"USDC",
"amount":1050.32,
"timestamp":"2023-07-23T12:06:04.175Z"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| startDate | string | is a datetime iso |
| endDate | string | is a datetime iso |
| page | number | page number |
| pageSize | number | min size is 5 and max is 50 |
TRANSACTION OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Transaction ID |
| userId | string | User ID |
| sequence | number | Sequence number of the transaction |
| type | number |
0 - deposit 1 - withdraw 2 - trade fee 3 - custody fee 4 - trade 5 - trade lock 6 - trade unlock 7 - withdrawal fee 8 - withdrawal refund 9 - withdrawal fee refund |
| asset | string | Asset name |
| amount | number | Transaction amount |
| timestamp | string | Datetime of the transaction |
get historical transactions paginated
Returns an array of the user's historic movements, includint trades,
withdrawals and deposits with a 30 days limit.
CommandName
GetHistoricalTransactionsPaginated
CommandArguments
[ ClientId, startDate, endDate, page, pageSize ]
eventName
executionEvents
subject
account.transactions.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"userId":"yyyy",
"sequence":123,
"type":4,
"asset":"USDC",
"amount":1050.32,
"timestamp":"2023-07-23T12:06:04.175Z"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| startDate | string | is a datetime iso |
| endDate | string | is a datetime iso |
| page | number | page number |
| pageSize | number | min size is 5 and max is 50 |
TRANSACTION OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Transaction ID |
| userId | string | User ID |
| sequence | number | Sequence number of the transaction |
| type | number |
0 - deposit 1 - withdraw 2 - trade fee 3 - custody fee 4 - trade 5 - trade lock 6 - trade unlock 7 - withdrawal fee 8 - withdrawal refund 9 - withdrawal fee refund |
| asset | string | Asset name |
| amount | number | Transaction amount |
| timestamp | string | Datetime of the transaction |
Get Trades by clientId
Returns an array of the user's executed trades with a 7 days limit.
CommandName
GetTradesByClientId
CommandArguments
[ ClientId, tradeClientId ]
eventName
executionEvents
subject
account.trades.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"userId":"yyyy",
"clientId":"zzzz",
"instrument": "ETH/EUR",
"side": "sell",
"price": 1534,
"quantityFilled": 0.05,
"timestamp": "2023-07-23:32:35.000Z",
"email": "abc@email.it"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| tradeClientId | string | Trade client ID |
TRADE OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Transaction ID |
| userId | string | User ID |
| clientId | string | Client ID |
| instrument | string | Instrument name |
| side | string | Trade side ("buy" or "sell") |
| price | number | Executed price |
| quantityFilled | number | Trade quantity executed |
| timestamp | string | Datetime of the trade |
| string | Account email |
get trades paginated
Returns an array of the user's executed trades with a 7 days limit.
CommandName
GetTradesPaginated
CommandArguments
[ ClientId, startDate, endDate, page, pageSize ]
eventName
executionEvents
subject
account.trades.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"userId":"yyyy",
"clientId":"zzzz",
"instrument": "ETH/EUR",
"side": "sell",
"price": 1534,
"quantityFilled": 0.05,
"timestamp": "2023-07-23:32:35.000Z",
"email": "abc@email.it"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| startDate | string | is a datetime iso |
| endDate | string | is a datetime iso |
| page | number | page number |
| pageSize | number | min size is 5 and max is 50 |
TRADE OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Transaction ID |
| userId | string | User ID |
| clientId | string | Client ID |
| instrument | string | Instrument name |
| side | string | Trade side ("buy" or "sell") |
| price | number | Executed price |
| quantityFilled | number | Trade quantity executed |
| timestamp | string | Datetime of the trade |
| string | Account email |
get historical trades paginated
Returns an array of the user's executed trades with a 30 days limit.
CommandName
GetHistoricalTradesPaginated
CommandArguments
[ ClientId, startDate, endDate, page, pageSize ]
eventName
executionEvents
subject
account.trades.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"userId":"yyyy",
"clientId":"zzzz",
"instrument": "ETH/EUR",
"side": "sell",
"price": 1534,
"quantityFilled": 0.05,
"timestamp": "2023-07-23:32:35.000Z",
"email": "abc@email.it"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| startDate | string | is a datetime iso |
| endDate | string | is a datetime iso |
| page | number | page number |
| pageSize | number | min size is 5 and max is 50 |
TRADE OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Transaction ID |
| userId | string | User ID |
| clientId | string | Client ID |
| instrument | string | Instrument name |
| side | string | Trade side ("buy" or "sell") |
| price | number | Executed price |
| quantityFilled | number | Trade quantity executed |
| timestamp | string | Datetime of the trade |
| string | Account email |
get balances
Returns informations about the user allocated and available
balances.
CommandName
GetBalances
CommandArguments
[ ClientId ]
eventName
executionEvents
subject
account.balances.snapshot
Response Data Example:
'data': '{
"userId":"yyyy",
"sequence":123,
"assets":[
{
"name":"BTC",
"available":0.5,
"allocated":0.0
},
{
"name":"ETH",
"available":5.0,
"allocated":0.0
}, ...
],
"deleted":false
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
BALANCES OBJECT
| Field | Type | Description |
|---|---|---|
| userId | string | User ID |
| sequence | number | Sequential |
| assets | array | Array of asset objects |
| deleted | bool | Deleted flag |
ASSET OBJECT
| Field | Type | Description |
|---|---|---|
| name | string | Asset name |
| available | number | Available quantity |
| allocated | number | Allocated quantity, due to pending orders |
withdraw
Sends a withdrawal request.
CommandName
WithdrawFunds
CommandArguments
[ ClientId, Asset, Amount, DestinationAddress, Network ]
eventName
executionEvents
subject
account.withdraw.created
Response Data Example:
'data': '{
"id": "xxxx",
"clientId": "68925acb-4f03-48ab-98a9-16b845f21017",
"userId": "yyyy",
"name" : "Marco",
"surname": "Rossi",
"company": "",
"description": "xyz",
"destination": "xyzwallet",
"destinationParams": {},
"network": "ethereum",
"amount": 1,
"asset": "USDT",
"fee": 5,
"status":"CONFIRMING",
"refId": "ab1234",
"isInstant" : false,
"timestamp" : "2024-03-27T16:03:12.456Z"
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| Asset | string | Asset of the address (e.g.: "BTC" or "EUR") |
| Amount | number | Quantity of asset to be withdrawn |
| DestinationAddress | string | Destination address, must be whitelisted |
| Network | string | Network of the address |
WITHDRAW OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Withdraw ID |
| clientId | string | Client ID |
| userId | string | User ID |
| name | string | User first name |
| surname | string | User last name |
| company | string | User company |
| description | string | Description |
| destination | string | Destination address |
| destinationParams | object | Destination parameters |
| network | string | Network name |
| amount | number | Withdraw amount |
| asset | string | Asset name |
| fee | number | Fee |
| status | string |
CREATED CONFIRMING CONFIRMED PENDING SUCCESS FAILURE REJECTED |
| refId | string | Cro or Trx Id added after network submission |
| isInstant | bool | Option for instant withdraw |
| timestamp | string | Timestamp of the withdraw |
withdraw funds with address params
Sends a withdrawal request with additional parameters for the
destination address.
CommandName
WithdrawFundsWithAddressParams
CommandArguments
[ ClientId, Asset, Amount, DestinationAddress,
DestinationAddressParams, Network, IsInstant ]
eventName
executionEvents
subject
account.withdraw.created
Response Data Example:
'data': '{
"id": "xxxx",
"clientId": "68925acb-4f03-48ab-98a9-16b845f21017",
"userId": "yyyy",
"name" : "Marco",
"surname": "Rossi",
"company": "",
"description": "xyz",
"destination": "xyzwallet",
"destinationParams": {},
"network": "ethereum",
"amount": 1,
"asset": "USDT",
"fee": 5,
"status":"CONFIRMING",
"refId": "ab1234",
"isInstant" : false,
"timestamp" : "2024-03-27T16:03:12.456Z"
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| Asset | string | Asset of the address (e.g.: "BTC" or "EUR") |
| Amount | number | Quantity of asset to be withdrawn |
| DestinationAddress | string | Destination address, must be whitelisted |
| DestinationAddressParams | object | Destination address parameters |
| Network | string | Network of the address |
| IsInstant | bool | Option for instant withdraw |
WITHDRAW OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Withdraw ID |
| clientId | string | Client ID |
| userId | string | User ID |
| name | string | User first name |
| surname | string | User last name |
| company | string | User company |
| description | string | Description |
| destination | string | Destination address |
| destinationParams | object | Destination parameters |
| network | string | Network name |
| amount | number | Withdraw amount |
| asset | string | Asset name |
| fee | number | Fee |
| status | string |
CREATED CONFIRMING CONFIRMED PENDING SUCCESS FAILURE REJECTED |
| refId | string | Cro or Trx Id added after network submission |
| isInstant | bool | Option for instant withdraw |
| timestamp | string | Timestamp of the withdraw |
instant withdraw
Sends a instant withdrawal request.
CommandName
WithdrawInstantFunds
CommandArguments
[ ClientId, Asset, Amount, DestinationAddress, Network ]
eventName
executionEvents
subject
account.withdraw.created
Response Data Example:
'data': '{
"id": "xxxx",
"clientId": "68925acb-4f03-48ab-98a9-16b845f21017",
"userId": "yyyy",
"name" : "Marco",
"surname": "Rossi",
"company": "",
"description": "xyz",
"destination": "xyzwallet",
"destinationParams": {},
"network": "ethereum",
"amount": 1,
"asset": "USDT",
"fee": 5,
"status":"CONFIRMING",
"refId": "ab1234",
"isInstant" : false,
"timestamp" : "2024-03-27T16:03:12.456Z"
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| Asset | string | Asset of the address (e.g.: "BTC" or "EUR") |
| Amount | number | Quantity of asset to be withdrawn |
| DestinationAddress | string | Destination address, must be whitelisted |
| Network | string | Network of the address |
WITHDRAW OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Withdraw ID |
| clientId | string | Client ID |
| userId | string | User ID |
| name | string | User first name |
| surname | string | User last name |
| company | string | company name |
| description | string | Description |
| destination | string | Destination daddress |
| destinationParams | object | Destination parameters |
| network | string | Destination address network |
| amount | number | Amount to be withdrawn |
| asset | string | Asset name |
| fee | number | Fee |
| status | string |
CREATED CONFIRMING CONFIRMED PENDING SUCCESS FAILURE REJECTED |
| refId | string | Cro or Trx Id added after network submission |
| isIstant | bool | Option for istant withdraw |
| timestamp | string | Timestamp of the withdraw |
get withdrawals
Returns an array of the user's withdrawals with a 30 days limit.
CommandName
GetWithdrawals
CommandArguments
[ ClientId ]
eventName
executionEvents
subject
account.withdrawals.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"clientId": "68925acb-4f03-48ab-98a9-16b845f21017",
"userId":"yyyy",
"name":"Mario",
"surname":"Rossi",
"company":"Company",
"description":null,
"destination":"zzzz",
"destinationParams": {},
"network":"Ethereum",
"amount":0.05,
"asset":"ETH",
"fee": 5,
"status":"CONFIRMING",
"refId":"ab1234",
"isInstant":false,
"timestamp":"2023-11-10T15:26:10.586Z"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
WITHDRAW OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Withdraw ID |
| clientId | string | Client ID |
| userId | string | User ID |
| name | string | User first name |
| surname | string | User last name |
| company | string | User company |
| description | string | Description |
| destination | string | Destination address |
| destinationParams | object | Destination address parameters |
| network | string | Network name |
| amount | number | Withdraw amount |
| asset | string | Asset name |
| fee | number | Fee |
| status | string |
CREATE CONFIRMING CONFIRMED PENDING SUCCESS FAILURE REJECTED |
| refId | string | Cro or Trx Id added after network submission |
| isIstant | bool | Option for istant withdraw |
| timestamp | string | Timestamp of the withdraw |
Get withdrawals by clientId
Returns an array of the user's withdrawals with a 7 days limit.
CommandName
GetWithdrawalsByClientId
CommandArguments
[ ClientId, withdrawClientId ]
eventName
executionEvents
subject
account.withdrawals.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"clientId": "68925acb-4f03-48ab-98a9-16b845f21017",
"userId":"yyyy",
"name":"Mario",
"surname":"Rossi",
"company":"Company",
"description":null,
"destination":"zzzz",
"destinationParams": {},
"network":"Ethereum",
"amount":0.05,
"asset":"ETH",
"fee": 5,
"status":"CONFIRMING",
"refId": "ab1234",
"isInstant" : false,
"timestamp":"2023-11-10T15:26:10.586Z"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| withdrawClientId | string | Withdraw client ID |
WITHDRAW OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Withdraw ID |
| clientId | string | Client ID |
| userId | string | User ID |
| name | string | User first name |
| surname | string | User last name |
| company | string | User company |
| description | string | Description |
| destination | string | Destination address |
| destinationParams | string | Destination address parameters |
| network | string | Network name |
| amount | number | Withdraw amount |
| asset | string | Asset name |
| fee | number | Fee |
| status | string |
CREATED CONFIRMING CONFIRMED PENDING SUCCESS FAILURE REJECTED |
| refId | string | Cro or Trx Id added after network submission |
| isInstant | bool | Option for instant withdraw |
| timestamp | string | Timestamp of the withdraw |
Get Withdrawals paginated
Returns an array of the user's withdrawals with a 7 days limit.
CommandName
GetWithdrawalsPaginated
CommandArguments
[ ClientId, startDate, endDate, page, pageSize ]
eventName
executionEvents
subject
account.withdrawals.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"clientId": "68925acb-4f03-48ab-98a9-16b845f21017",
"userId":"yyyy",
"name":"Mario",
"surname":"Rossi",
"company":"Company",
"description":null,
"destination":"zzzz",
"destinationParams": {},
"network":"Ethereum",
"amount":0.05,
"asset":"ETH",
"fee": 5,
"status":"CONFIRMING",
"refId": "ab1234",
"isInstant" : false,
"timestamp" : "2024-03-27T16:03:12.456Z"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| startDate | string | is a datetime iso |
| endDate | string | is a datetime iso |
| page | number | page number |
| pageSize | number | min size is 5 and max is 50 |
WITHDRAW OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Withdraw ID |
| clientId | string | Client ID |
| userId | string | User ID |
| name | string | User first name |
| surname | string | User last name |
| company | string | User company |
| description | string | Description |
| destination | string | Destination address |
| destinationParams | object | Destination address parameters |
| network | string | Network name |
| amount | number | Withdraw amount |
| asset | string | Asset name |
| fee | number | Fee |
| status | string |
CREATED CONFIRMING CONFIRMED PENDING SUCCESS FAILURE REJECTED |
| refId | string | Cro or Trx Id added after network submission |
| isInstant | bool | Option for instant withdraw |
| timestamp | string | Timestamp of the withdraw |
get whitelisted addresses
Returns an array of the user's whitelisted addresses, both fiat and
crypto.
CommandName
GetWhitelistedAddresses
CommandArguments
[ ClientId ]
eventName
executionEvents
subject
account.externalAddresses.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"name":"BTC 01",
"userId":"yyyy",
"asset":"BTC",
"address":"zzzz",
"addressParams": {},
"network":"Bitcoin",
"status":0,
"comment":"",
"auditBy":"",
"auditDate":"",
"enabled":true,
"deleted":false,
"creationDate":"2023-10-05T14:07:59+00:00"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
ADDRESS OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Address ID |
| name | string | Address name |
| userId | string | User ID |
| asset | string | Asset name |
| address | string | Address |
| addressParams | object | Address parameters |
| network | string | Address network |
| status | number | Address status (0: pending, 1: refused, 2: approved, 3: deleted) |
| comment | string | Comments on address |
| auditBy | string | Auditor informations |
| auditDate | string | Datetime of audit |
| enabled | bool | Enabled flag |
| deleted | bool | Deleted flag |
| creationDate | string | Datetime of address creation |
whitelist address
Sends a request for the whitelisting of a new address.
CommandName
WhitelistAddress
CommandArguments
[ ClientId, Name, Asset, Address, Network ]
eventName
executionEvents
subject
account.address.registered
Response Data Example:
'data': '{
"HttpStatusCode":201,
"AddressId":"zzzz",
"Message":""
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| Name | string | Address recognizible custom name |
| Asset | string | Asset of the Address (e.g.: "BTC" or "EUR") |
| Address | string | Address |
| Network | string | Address network |
WHITELISTED ADDRESS OBJECT
| Field | Type | Description |
|---|---|---|
| httpStatusCode | number | Status code of the request |
| addressId | string | Address ID |
| message | string | Optional message in case of errors or checks failed |
whitelist address with params
Sends a request for the whitelisting of a new address with
parameters.
CommandName
WhitelistAddress
CommandArguments
[ ClientId, Name, Asset, Address, Network ]
eventName
executionEvents
subject
account.address.registered
Response Data Example:
'data': '{
"HttpStatusCode":201,
"AddressId":"zzzz",
"Message":""
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| Name | string | Address recognizible custom name |
| Asset | string | Asset of the Address (e.g.: "BTC" or "EUR") |
| Address | string | Address |
| AddressParams | object | Address parameters |
| Network | string | Address network |
WHITELISTED ADDRESS OBJECT
| Field | Type | Description |
|---|---|---|
| httpStatusCode | number | Status code of the request |
| addressId | string | Address ID |
| message | string | Optional message in case of errors or checks failed |
Remove Whitelisted Address
Removes an address from the address whitelist.
CommandName
DeleteWhitelistedAddress
CommandArguments
[ ClientId, Id ]
eventName
executionEvents
subject
account.address.deleted
Response Data Example:
'data': '{
"httpStatusCode":200,
"addressId":"zzzz",
"message":""
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| Id | string | Address ID |
DELETE WHITELISTED ADDRESS OBJECT
| Field | Type | Description |
|---|---|---|
| httpStatusCode | number | Status code of the request |
| addressId | string | Address ID |
| message | string | Optional message in case of errors or checks failed |
create deposit address
Creates a deposit address for the given asset.
CommandName
CreateDepositAddress
CommandArguments
[ ClientId, Asset, Network ]
eventName
executionEvents
subject
account.internalAddress.created
Response Data Example:
'data': '{
"httpStatusCode":200,
"id":"xxxx",
"name":"BTC",
"userId":"yyyy",
"asset":"BTC",
"address":"zzzz",
"network":"Bitcoin",
"message":""
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| Asset | string | Asset name |
| Network | string | Network name |
DEPOSIT ADDRESS CREATED OBJECT
| Field | Type | Description |
|---|---|---|
| httpStatusCode | string | Status code of the request |
| id | string | Deposit Address ID |
| name | string | Deposit Address Name |
| userId | string | User ID |
| asset | string | Asset name |
| address | string | Deposit Address |
| network | string | Network Name |
| message | string | Optional message in case of errors or checks failed |
get deposit addresses
Returns an array of the user's deposit addresses, both fiat and
crypto.
CommandName
GetDepositAddress
CommandArguments
[ ClientId ]
eventName
executionEvents
subject
account.internalAddresses.snapshot
Response Data Example:
'data': '[
{
"id":"xxxx",
"name":"EUR",
"userId":"yyyy",
"asset":"EUR",
"address":"zzzz",
"addressParams": {},
"network":"Sepa",
"deleted":false,
"creationDate":"0001-01-01T00:00:00"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
DEPOSIT ADDRESS OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Address ID |
| name | string | Address name |
| userId | string | User ID |
| asset | string | Asset name |
| address | string | Address |
| addressParams | object | Address parameters |
| network | string | Address network |
| deleted | bool | Deleted flag |
| creationDate | string | Datetime of address creation |
create deposit
⚠️ WARNING - This method is only available in the staging environment and exclusively for the EUR asset.
Creates a fake deposit for the given asset. This method doesn't have
a response.
CommandName
CreateDeposit
CommandArguments
[ Asset, Amount, DepositAddress ]
eventName
executionEvents
subject
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| Asset | string | Asset name (EUR only) |
| Amount | number | Deposit amount |
| DepositAddress | string | Deposit Address |
get payees paginated
Returns an array of the user's payees.
CommandName
GetPayeesPaginated
CommandArguments
[ ClientId, From, To, Page, PageSize ]
eventName
executionEvents
subject
banking.payees.snapshot
Response Data Example:
'data': '[
{
"id": "id-001",
"userId": "userId-001",
"type": 1,
"name": "John",
"surname": "Doe",
"company": "Acme Corp",
"country": "US",
"state": "CA",
"city": "San Francisco",
"address": "123 Main Street",
"postalCode": "94105",
"disabled": false,
"deleted": false,
"createdAt": "2025-09-03T11:22:54.000Z"
}, ...
'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| From | string | null |
Start date in ISO format (e.g., 2025-01-01T00:00:00Z).
Can be null to omit start date filtering. |
| To | string | null |
End date in ISO format (e.g., 2025-12-31T23:59:59Z).
Can be null to omit end date filtering. |
| Page | number | Page number for pagination (0-based) |
| PageSize | number | Number of results per page (must be between 5 and 50) |
Validation Rules
- pageSize: Must be between 5 and 50 items (required)
- Date format: Must follow ISO (e.g., YYYY-MM-DDThh:mm:ssZ)
- Date validation: If both From and To are provided, To must be greater than From
- Date parameters: Both From and To can be null to omit date filtering
PAYEE OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Payee ID |
| userId | string | User ID associated with the payee |
| type | string | Payee type (e.g., Individual, Company) |
| name | string | Payee first name |
| surname | string | Payee last name |
| company | string | Payee company name (if applicable) |
| country | string | Payee country |
| state | string | Payee state or province |
| city | string | Payee city |
| address | string | Payee address |
| postalCode | string | Payee postal code |
| deleted | boolean | Indicates if the payee is deleted |
| disabled | boolean | Indicates if the payee is disabled |
| createdAt | string | Timestamp of payee creation |
register payee
Registers a new payee.
CommandName
RegisterPayee
CommandArguments
[ ClientId, Type, Name, Surname, Company, Country, State, City,
Address, PostalCode ]
eventName
executionEvents
subject
banking.payee.registered
Response Data Example:
'data': '{
"httpStatusCode": 201,
"message": "",
"id": "id-001",
"type": "Individual",
"name": "John",
"surname": "Doe",
"company": "Acme Corp",
"country": "US",
"state": "CA",
"city": "San Francisco",
"address": "123 Main Street",
"postalCode": "94105"
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| Type | number | Payee type (1: Individual, 2: Company) |
| Name | string | Payee first name |
| Surname | string | Payee last name |
| Company | string | Company name (if applicable) |
| Country | string | Country |
| State | string | State/Province |
| City | string | City |
| Address | string | Street address |
| PostalCode | string | Postal/ZIP code |
RESPONSE OBJECT
| Field | Type | Description |
|---|---|---|
| httpStatusCode | number | Status code of the request |
| message | string | Response message |
| id | string | Unique identifier of the payee |
| type | string | Type of the payee (e.g., Individual, Company) |
| name | string | First name of the payee |
| surname | string | Last name of the payee |
| company | string | Company name of the payee (if applicable) |
| country | string | Country of the payee |
| state | string | State or province of the payee |
| city | string | City of the payee |
| address | string | Address of the payee |
| postalCode | string | Postal code of the payee |
get payee addresses paginated
Returns an array of addresses associated with a specific payee.
CommandName
GetPayeeAddressesPaginated
CommandArguments
[ ClientId, PayeeId, From, To, Page, PageSize ]
eventName
executionEvents
subject
banking.payee.addresses.snapshot
Response Data Example:
'data': '[
{
"id": "id-001",
"payeeId": "payeeId-001",
"name": "USDC Wallet",
"asset": "USDC",
"address": "address_001",
"addressParams": {
"tag": "stable"
},
"network": "Ethereum",
"status": 1,
"comment": "USDC receiving wallet",
"auditBy": "System",
"auditDate": "2025-09-11T17:50:59.000Z",
"deleted": false,
"createdAt": "2025-09-11T17:50:59.000Z"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| PayeeId | string | Payee ID |
| From | string | null |
Start date in ISO format (e.g., 2025-01-01T00:00:00Z).
Can be null to omit start date filtering. |
| To | string | null |
End date in ISO format (e.g., 2025-12-31T23:59:59Z).
Can be null to omit end date filtering. |
| Page | number | Page number for pagination (0-based) |
| PageSize | number | Number of results per page (must be between 5 and 50) |
Validation Rules
- pageSize: Must be between 5 and 50 items (required)
- Date format: Must follow ISO (e.g., YYYY-MM-DDThh:mm:ssZ)
- Date validation: If both From and To are provided, To must be greater than From
- Date parameters: Both From and To can be null to omit date filtering
PAYEE ADDRESS OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Address ID |
| payeeId | string | ID of the associated payee |
| name | string | Descriptive name for the address |
| asset | string | Asset type for the address (e.g., BTC, ETH) |
| address | string | The actual blockchain or payment address |
| network | string | Network for the address (e.g., Bitcoin, Ethereum) |
| status | integer | Address status (0: pending, 1: refused, 2: approved, 3: deleted) |
| comment | string | Optional comment or description |
| addressParams | object | Additional parameters for the address (network specific) |
| payeeAddressStatus | string | Status of the address (e.g., active, inactive) |
| auditBy | string | ID of the user who audited the address |
| auditDate | string | Timestamp of the last audit |
| deleted | boolean | Indicates if the address has been deleted |
| createdAt | string | Timestamp of address creation |
register payee address
Registers a new address for an existing payee.
CommandName
RegisterPayeeAddress
CommandArguments
[ ClientId, PayeeId, Name, Asset, Address, AddressParams,
Network, Comment ]
eventName
executionEvents
subject
banking.payee.address.registered
Response Data Example:
'data': '{
"httpStatusCode": 201,
"message": "",
"id": "id_001",
"payeeId": "e3ab5fc5-fed6-4648-9e69-83c3fcb9e100",
"name": "USDC Wallet",
"asset": "USDC",
"address": "address_001",
"addressParams": {
"tag": "stable"
},
"network": "Ethereum",
"comment": "USDC receiving wallet"
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| PayeeId | string | Payee ID |
| Name | string | Address name |
| Asset | string | Asset name |
| Address | string | Address string |
| AddressParams | object | Additional address parameters |
| Network | string | Network name |
| Comment | string | Optional comment or description |
EUR Network Types
For EUR transfers, the following network types are available:
| Network | Description |
|---|---|
| Sepa | Single Euro Payments Area transfer |
GBP Network Types
For GBP transfers, the following network types are available:
| Network | Description |
|---|---|
| Faster Payments | Instant transfer within the UK |
USD Network Types
For USD transfers, the following network types are available:
| Network | Description |
|---|---|
| INTERNATIONAL_WIRE | International wire transfer |
| DOMESTIC_WIRE | Domestic wire transfer within the US |
| ACH | Standard ACH transfer |
| ACH_SAME_DAY | Same-day ACH transfer |
Required Address Parameters by Network
Each Currency network type requires specific address parameters:
| Network | Parameter ID | Description | Required |
|---|---|---|---|
| Sepa | bic | Bank Identifier Code (SWIFT code) | Yes |
| Faster Payments | sortcode | Sort code of the bank | Yes |
| INTERNATIONAL_WIRE | accountnumber | Bank account number | Yes |
| bic | Bank Identifier Code (SWIFT code) | Yes | |
| aba | American Banking Association routing number | Yes | |
| bankname | Name of the bank | Yes | |
| bankaddressline1 | First line of bank's address | Yes | |
| bankaddresscity | Bank's city | Yes | |
| bankaddresspostalcode | Bank's postal code | Yes | |
| bankcountry | Bank's country code | Yes | |
| DOMESTIC_WIRE | accountnumber | Bank account number | Yes |
| wire | Wire routing number | Yes | |
| bankname | Name of the bank | Yes | |
| ACH / ACH_SAME_DAY | accountnumber | Bank account number | Yes |
| aba | ACH routing number | Yes | |
| accounttype | Account type (CHECKING or SAVINGS) | Yes |
RESPONSE OBJECT
| Field | Type | Description |
|---|---|---|
| httpStatusCode | int | Status code of the request |
| message | string | Response message |
| id | string | Unique identifier of the newly created payee address |
| payeeId | string | ID of the payee associated with the address |
| name | string | Descriptive name for the address |
| asset | string | Asset type for the address (e.g., BTC, ETH) |
| address | string | The blockchain or payment address |
| addressParams | array | Additional parameters for the address |
| network | string | Network for the address (e.g., Bitcoin, Ethereum) |
| comment | string | Optional comment or description |
get transfers paginated
Returns a paginated list of transfers.
CommandName
GetTransfersPaginated
CommandArguments
[ ClientId, StartDate, EndDate, Page, PageSize ]
eventName
executionEvents
subject
banking.transfers.snapshot
Response Data Example:
'data': '[
{
"id": "id_123456,
"userId": "userId_123456",
"clientId": "client123",
"description": "Monthly payment to supplier",
"debtor": {
"internalAddressId": "internal_addr_123",
"asset": "BTC",
"address": "address_001",
"addressParams": {
"tag": "internal"
},
"network": "Bitcoin",
"amount": 0.001,
"fee": 0.0001
},
"creditor": {
"payeeAddressId": "payee_addr_456",
"asset": "BTC",
"address": "address_001",
"addressParams": {
"memo": "payment123"
},
"network": "Bitcoin",
"amount": 0.0009
},
"exchangeInfo": {
"rate": 1.0
},
"status": "Pending",
"refId": "ref_789xyz",
"payload": "{\"custom\":\"data\"}",
"isInstant": false,
"timestamp": "2025-09-12T14:30:00.000Z"
}, ...
]'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| StartDate | datetime | Start date in ISO format (e.g., 2025-01-01T00:00:00Z). |
| EndDate | datetime | End date in ISO format (e.g., 2025-01-31T23:59:59Z). |
| Page | number | Page number |
| PageSize | number | Number of transfers per page |
Validation Rules
- Date format: Must follow ISO (e.g., YYYY-MM-DDThh:mm:ssZ)
- Date validation: If both From and To are provided, To must be greater than From
- page: Page number must be 0 or greater
- pageSize: Must be between 5 and 50 items
TRANSFER OBJECT
| Field | Type | Description |
|---|---|---|
| id | string | Transfer ID |
| userId | string | User ID associated with the transfer |
| clientId | string | Client ID associated with the transfer |
| description | string | Transfer description |
| debtor | object | Source information (see Debtor Object) |
| creditor | object | Destination information (see Creditor Object) |
| exchangeInfo | object | Exchange rate information (see ExchangeInfo Object) |
| status | string | Transfer status |
| refId | string | Reference ID (transaction ID) |
| payload | string | Additional transaction payload data |
| isInstant | boolean | Indicates if the transfer was processed instantly |
| timestamp | string | Transfer timestamp |
DEBTOR OBJECT
| Field | Type | Description |
|---|---|---|
| internalAddressId | string | Source address ID |
| asset | string | Asset being transferred |
| address | string | Source blockchain address |
| addressParams | object | Additional address parameters |
| network | string | Blockchain network |
| amount | number | Amount being transferred |
| fee | number | Fee for the transfer |
CREDITOR OBJECT
| Field | Type | Description |
|---|---|---|
| payeeAddressId | string | Destination payee address ID |
| asset | string | Asset being received |
| address | string | Destination blockchain address |
| addressParams | object | Additional address parameters |
| network | string | Blockchain network |
| amount | number | Amount being received (after fees) |
EXCHANGEINFO OBJECT
| Field | Type | Description |
|---|---|---|
| rate | number | Exchange rate used for the transfer |
transfer
Initiates a transfer of funds to a payee address.
CommandName
TransferFunds
CommandArguments
[ ClientId, Asset, Amount, InternalAddressId, PayeeAddressId,
Description ]
eventName
executionEvents
subject
banking.transfer.created
Response Data Example:
'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"
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| Asset | string | Asset to transfer |
| Amount | number | Transfer amount |
| InternalAddressId | string | Source internal address ID |
| PayeeAddressId | string | Destination payee address ID |
| Description | string | Transfer description |
Validation Rules
- Description is required and must not exceed 250 characters
- Asset must exist in the configured networks
RESPONSE OBJECT
| Field | Type | Description |
|---|---|---|
| httpStatusCode | int | Status code of the request |
| 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 |
⚠️ WARNING - This endpoint is only available in the production environment.
get transaction ledger
Retrieves detailed information about a specific transaction,
including ledger entries.
CommandName
GetTransactionLedger
CommandArguments
[ ClientId, TransactionId ]
eventName
executionEvents
subject
ledger.transaction.details
Response Data Example:
'data': '{
"httpStatusCode": 200,
"message": "",
"id": "tx_123456",
"refId": "ref_transfer_001",
"userId": "userId_123456",
"type": "Transfer",
"status": "Completed",
"description": "Monthly payment to supplier",
"asset": "BTC",
"amount": 0.001,
"debtor": {
"address": "address-001",
"asset": "BTC",
"network": "Bitcoin"
},
"creditor": {
"address": "address-001",
"asset": "BTC",
"network": "Bitcoin"
},
"timestamp": "2025-09-12T14:30:00.000Z"
}'
ARGUMENTS
| Field | Type | Description |
|---|---|---|
| ClientId | string | Custom client ID (max 36 characters) |
| TransactionId | string | Transaction ID |
TRANSACTION LEDGER OBJECT
| Field | Type | Description |
|---|---|---|
| httpStatusCode | number | HTTP status code |
| message | string | Response message |
| id | string | Transaction ID |
| refId | string | Reference ID associated with the transaction |
| userId | string | User ID associated with the transaction |
| type | string | Transaction type (e.g., DEPOSIT, WITHDRAWAL) |
| status | string | Transaction status (e.g., CREATED, COMPLETED) |
| description | string | Description of the transaction |
| asset | string | Asset involved in the transaction (e.g., EUR, BTC) |
| amount | number | Amount involved in the transaction |
| debtor | object | Details of the debtor (sender) |
| creditor | object | Details of the creditor (receiver) |
| timestamp | string | Timestamp of the transaction creation |
DEBTOR OBJECT
| Field | Type | Description |
|---|---|---|
| address | string | Debtor's blockchain or bank address |
| asset | string | Asset being sent by the debtor |
| network | string | Network of the debtor's address (e.g., Bitcoin, Ethereum) |
CREDITOR OBJECT
| Field | Type | Description |
|---|---|---|
| address | string | Creditor's blockchain or bank address |
| asset | string | Asset being received by the creditor |
| network | string | Network of the creditor's address (e.g., Bitcoin, Ethereum) |
Errors
The Hercle public hub uses the response field
subject to communicate
errors. If the subject received in the message is not the expected
one, an error has occurred or the request hasn't passed some checks.
| Subject | Meaning |
|---|---|
| preChecksError | The request has failed some mandatory checks. This error usually appears when the passed arguments are not correct or in the wrong format. |
| *.error |
General error regarding the operation or the account. This
error usually is explained more in detail either in the field
StatusError or in
the field Message
|