Auro Digital API
Overview
The Auro Digital API employs WebSockets for communication between the front-end and back-end services, allowing real-time data exchange. For developers aiming to programmatically interact with Auro Digital, a direct WebSocket connection to the back-end service can be established.
Please note, this API was initially designed for internal use, primarily for front-end development. Therefore, it may possess some complex payloads. Furthermore, it is subject to potential changes based on the evolving needs of the front-end application.
Connection Details
Base URL
Assuming your Auro Digital URL is https://test.aurodigital.ai/
, your corresponding WebSocket URL would be: wss://test-backend.aurodigital.ai/v2
.
The backend service adheres to the same IP whitelist policies as the front-end service. If you need to add (static) IP addresses to the whitelist, please contact our support team.
Pricing
`
JSON-RPC Schemagit
Name | Type | Description |
---|---|---|
jsonrpc | string | Only "2.0" is supported |
id | string | This will be echoed back in responses or subscription payloads |
method | string | Establishing the specific API to connect to. Documented below |
params | string | Details regarding the specific API call. Documented below |
API_GETWAY
Login
Login to an account. Returns a token.
{
"jsonrpc": "2.0",
"id": "9cc1e382-ba9a-4992-80aa-fc77628a14d",
"method": "login",
"params": {
"username": "admin",
"password": "Admin@123"
}
}
Request
Name | Type | Description |
---|---|---|
username | string | The user's login name. |
password | string | The user's password. |
{
"jsonrpc": "2.0",
"id": "9cc1e382-ba9a-4992-80aa-fc77628a14d",
"result": {
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL210dWF0LWJh"
}
}
Response
Name | Type | Description |
---|---|---|
token | string | JSON Web Token. |
Subscribe_get_pair
Subscribe to a pair. Returns updates on all metrics of that pair on the given exchanges as well as consolidated order books and other metrics across the given exchanges.
{
"jsonrpc": "2.0",
"id": "6c1985bf-80ad-4bbc-86d0-6e682cdb764d",
"method": "subscribe_get_pair",
"params": {
"pair": "BTC/USD",
"exchanges": [
"coinbasepro"
]
}
}
Request
Name | Type | Description |
---|---|---|
pair | string | The normalized symbol. |
exchange | array of object | A list of cryptocurrency exchanges to use. |
{
"jsonrpc": "2.0",
"id": "6c1985bf-80ad-4bbc-86d0-6e682cdb764d",
"result": {
"pair": "BTC/USD",
"exchanges": [
"coinbasepro"
],
"order_book": {
"columns": [
"Price",
"Size",
"Exchange"
],
"bids": [
[
32800562.00007545,
10897.2,
"coinbasepro"
],
[
84791055.49007545,
10897.1938683967,
"coinbasepro"
],
[
150392079.09007546,
10897.1878189978,
"coinbasepro"
]
],
"asks": [
[
32798972.124043528,
10897.22,
"coinbasepro"
],
[
84789656.45404352,
10897.2261317227,
"coinbasepro"
],
[
150391041.25404352,
10897.2321811358,
"coinbasepro"
]
],
"commission": 0.0,
"timestamps": {
"coinbasepro": 1600246762328
},
"done_at": [
[
"fetch_order_book",
1600246763260
]
],
"time_elapsed_after": [
[
"fetch_order_book",
{
"coinbasepro": 932
}
]
]
},
"other_info": [
{
"title": "Liquidity Metrics",
"columns": [
"bid",
"ask",
],
"values": [
[
10897.2,
10897.22,
]
]
}
],
"is_inverse": false,
"time": 1600246763302
}
}
Response
Name | Type | Description |
---|---|---|
pair | string | The normalized symbol. |
exchange | array of object | A list of cryptocurrency exchanges to use. |
order_book | object | A list of cryptocurrency exchanges to use. |
-- columns | array of string | Description of the format in bids and asks. |
-- bids | array of string or number | Bids aggregated across the specified exchanges. |
-- asks | array of string or number | Asks aggregated across the specified exchanges. |
-- commission | number | The administrator-defined fee that is applied on the order book prices. |
-- timestamps | number | Unix timestamp in milliseconds. |
-- done_at | array of string or number | Internal data structure. Please do not rely on this. |
-- time_elapsed_after | array of string or number | Internal data structure. Please do not rely on this. |
other_info | array of object | Internal data structure. Please do not rely on this. |
is_inverse | boolean | Whether this is an inverse futures contract. |
time | number | The Unix timestamp (in milliseconds) when the data in this payload is fetched. |
get_tickers
feed of best bid and ask values for a specified crypto pair on the provided Liquidity venue(s).
{
"id": "b1b61f11-d34b-408b-ba46-cd6c1907252b",
"jsonrpc": "2.0",
"method": "get_tickers",
"params": {
"pair": "ETH/BTC",
"exchanges": ["okx-new_test"]
}
}
Request
Name | Type | Description |
---|---|---|
pair | string | The normalized symbol. |
exchange | array of object | A list of cryptocurrency liquidity venue to use. |
{
"id": "b1b61f11-d34b-408b-ba46-cd6c1907252b",
"jsonrpc": "2.0",
"result": {
"best_bid": {
"price": 0.06296,
"size": 86.378417,
"exchange": "okx-new_test",
"timestamp": 1691055448
},
"display_name": "okx-new_test"
}
}
Request
Name | Type | Description |
---|---|---|
best_bid | Object | Contains the best bid data.(price,size,exchange,timestamps). |
exchange | array of object | A list of cryptocurrency exchanges to use. |
get_all_markets
Use the get_all_markets method to retrieve a list of all available exchanges and trading symbols. Please note, changes in the availability of symbols on the exchanges may not be immediately reflected in the response, so we recommend calling this method periodically.
{
"jsonrpc": "2.0",
"id": "22ad7310-b318-4eee-8618-b3c47ca2f225",
"method": "get_all_markets"
}
Request
{
"jsonrpc": "2.0",
"id": "22ad7310-b318-4eee-8618-b3c47ca2f225",
"result": [
{
"type": "SPOT",
"normalized_symbol": "BTC/USDT",
"exchange_id": "binance",
"base": "BTC",
"quote": "USDT",
"is_inverse": false
}
]
}
Response
Name | Type | Description |
---|---|---|
type | string | SPOT or FUTURES. |
normalized_symbol | string | The unique identifier for a symbol in Access. |
exchange_id | string | The name of the exchange as configured by your administrator. |
base | string | The base currency. |
quote | string | The quote currency. |
is_inverse | boolean | Whether this is an inverse futures contract. |
get_algo_executions
get all active orders
{
"jsonrpc": "2.0",
"id": "c407195b-4c35-483d-93f5-798b391dc710",
"method": "get_algo_executions",
"params": {
"start_time": "2018-09-07T16:00:00.000Z",
"end_time": "2020-09-07T16:00:00.000Z",
"filters": [
{
"exchange_id": "coinbasepro",
"normalized_symbol": "BTC/USD"
}
],
"algos_only": false,
"status": "ALL"
}
}
Request
Name | Type | Description |
---|---|---|
start_time | timestamp | A list of cryptocurrency exchanges to use. |
end_time | timestamp | The amount of the Auro Digital Trading order. |
exchange_id | string | The price of the Auro Digital Trading order. |
normalized_symbol | string | Start datetime of algo processing |
algo_only | Boolean | End datetime of algo processing |
status | string | Staus of order that we want("OPEN", "CLOSE", "ALL") |
{
"jsonrpc": "2.0",
"id": "c407195b-4c35-483d-93f5-798b391dc710",
"result": {
"executions": [
{
"id": 7333,
"name": null,
"algo_type": "LMT",
"status": "CLOSED",
"data": {
"pair": "BTC/USD",
"side": "sell",
"price": "9150",
"volume": "0.01",
"end_time": "2020-07-16T08:05:52.785000+00:00",
"exchange": "coinbasepro",
"start_time": "2020-07-16T07:06:58.104273+00:00",
"active_order_path": [
"coinbasepro",
"21f1206c-60b6-4323-8d99-233ebbe79c45"
],
"active_order_amount": "0.01",
"canceled_order_paths": []
},
"start_time": 1594883218000,
"end_time": 1594886752000,
"exchanges": [
{
"exchange_id": "coinbasepro",
"side": "sell"
}
],
"pairs": [
{
"pair": "BTC/USD",
"side": "sell"
}
],
"side": "sell",
"price": 9150.0,
"price_net": 9150.0,
"volume": 0.01,
"leg_room": null,
"slippage": null,
"filled": 0.01,
"average": 9156.02,
"average_net": 9156.02,
"updated_at": 1594883227000
}
]
}
}
Response
Name | Type | Description |
---|---|---|
id | number | The ID of the Auro Digital Trading order. |
name | null | Currently unused field. |
algo_type | string | Abbreviated order type. |
status | string | Status of the algo execution. |
data | object | Internal data structure, please avoid relying on this. |
pair | string | The normalized symbol. |
side | string | The side of the trade (buy or sell). |
price | number | The price of the Auro Digital Trading order. |
volume | number | The amount of the Auro Digital Trading order. |
start_time | timestamp | Start datetime of algo processing |
end_time | timestamp | End datetime of algo processing |
exchange | string | The name of the exchange as configured by your administrator. |
active_order_path | list | Currently working orders |
active_order_amount | string | Amount of those orders |
canceled_order_paths | list | Orders canceled by this Algorithm |
start_time | number | Unix timestamp in milliseconds. |
end_time | number or null | Unix timestamp in milliseconds. |
exchange | array of object | A list of cryptocurrency exchanges to use. |
exchange_id | string | The name of the exchange as configured by your administrator. |
side | string | buy or sell. |
pairs | array of object | A list of normalized symbols. |
pair | string | buy or sell. |
side | string | buy or sell. |
price | number | The price of the Auro Digital Trading order. |
price_net | number or null | The price, net of a fixed commission (if configured). |
volume | number | The amount of the Auro Digital Trading order. |
leg_room | number or null | Price adjustment before sending an order to the exchange. |
slippage | number or null | Slippage, if applicable. |
filled | number | The filled amount of the Auro Digital Trading order. |
average | number | The average price of the filled amount. |
average_net | number or null | The average price, net of a fixed commission (if configured). |
updated_at | number | Unix timestamp in milliseconds. |
place_orders
The place_orders method allows you to place LIMIT orders on an exchange.
A LIMIT order is an order to buy or sell a cryptocurrency at a specific price or better. It allows you to set a precise price at which you want to trade.
{
"jsonrpc": "2.0",
"id": "6c44a8f0-8196-40d0-8f39-620710bae10f",
"method": "place_orders",
"params": {
"orders": [
{
"pair": "BTC/USD",
"side": "BUY",
"price": 1234,
"volume": 0.01,
"exchange": "coinbasepro",
"end_time": "2020-09-10T10:44:02.187Z"
}
]
}
}
Request
Name | Type | Description |
---|---|---|
pair | string | The trading pair, represented as a normalized symbol |
side | string | Indicates whether you want to "buy" or "sell". |
price | number | Specifies the price at which you want to execute the order. |
volume | number | Represents the amount (in base currency) you want to order. |
exchange | string | The identifier of the exchange where the order will be placed, as configured by your administrator. |
end_time | timestamp | The time at which the order will expire if not fulfilled. |
{
"jsonrpc": "2.0",
"id": "6c44a8f0-8196-40d0-8f39-620710bae10f",
"result": "ok"
}
Response
Name | Type | Description |
---|---|---|
result | string | Confirmation of request. “ok“ indicates positive confirmation. Negative confirmation will display an “error” field instead of “result” |
get_balances
get all balances for the given exchanges.
{
"jsonrpc": "2.0",
"id": "6c1985bf-80ad-4bbc-86d0-6e682cdb764d",
"method": "get_balances",
"params": {
"pair": "BTC/USD",
"exchanges": ["coinbasepro"],
"from_mid_agg": 0,
"cutoff": 1
}
}
Request
Name | Type | Description |
---|---|---|
pair | string | The normalized symbol. |
exchanges | array of object | A list of cryptocurrency exchanges to use. |
from_mid_agg | number | Filter for Consolidated Orderbooks |
cutoff | number | Filter for Consolidated Orderbooks |
{
"jsonrpc": "2.0",
"id": "6c1985bf-80ad-4bbc-86d0-6e682cdb764d",
"result": {
"pair": "BTC/USD",
"exchanges": ["coinbasepro"],
"balances": {
"coinbasepro": {
"BTC": {
"free": 215.52433665,
"used": 0,
"total": 215.52433665
},
"ETH": {
"free": 883.80160773,
"used": 0,
"total": 883.80160773
},
"USD": {
"free": 363332.4740171202,
"used": 0,
"total": 363332.4740171202
},
"USDC": {
"free": 70000.0,
"used": 0,
"total": 70000.0
}
}
},
"is_inverse": false,
"time": 1600246763302
}
}
Response
Name | Type | Description |
---|---|---|
pair | string | The normalized symbol. |
exchanges | array of object | A list of cryptocurrency exchanges to use. |
balances | object | The balances on the exchanges configured by your administrator. |
exchange_id (as key) | object | The name of the exchange as configured by your administrator. |
currency_id (as key) | object | The currency ID. |
free | number | Money available for trading. |
used | number | Money on hold due to e.g., open orders. |
total | number | free + used. |
is_inverse | boolean | Whether this is an inverse futures contract. |
time | number | The Unix timestamp (in milliseconds) when the data in this payload is fetched. |
DEX APIs
This document outlines the APIs used to fetch quotes and place orders for token swaps on decentralized exchanges (DEX). The supported algorithm type is SWAP, and the response contains information on the price and slippage.
Base URL
Assuming your Auro Digital URL is https://mtuat.aurodigital.ai/, your corresponding WebSocket URL would be: wss://mtuat-backend.aurodigital.ai/v2.
The backend service adheres to the same IP whitelist policies as the front-end service. If you need to add (static) IP addresses to the whitelist, please contact our support team.
JSON-RPC Schema
Name | Type | Description |
---|---|---|
jsonrpc | string | Only "2.0" is supported |
id | string | This will be echoed back in responses or subscription payloads |
method | string | Establishing the specific API to connect to. Documented below |
params | string | Details regarding the specific API call. Documented below |
place_order_pre_processing_dex (Fetch Quotes)
This API is used to fetch token swap quotes for a given trading pair.
{
"id": "cd728c5d-b8ca-40ee-a9cf-895a91cf2571",
"jsonrpc": "2.0",
"method": "place_order_pre_processing_dex",
"params": {
"pair": "ETH/USDC",
"side": "SELL",
"amount": 1,
"exchange_ids": ["dex-arbitrum.Test"],
"type": "SPOT",
"unit": "ETH",
"slippage": 1,
"algo_type": "SWAP",
"price": 0
}
}
Request
Name | Type | Description |
---|---|---|
jsonrpc | string | Only "2.0" is supported |
id | string | This will be echoed back in responses or subscription payloads |
method | string | Establishing the specific API to connect to. Documented below |
params | string | Details regarding the specific API call. Documented below |
params.pair | string | Trading pair (e.g., "USDC/SOL"), specifying the assets involved in the trade |
params.side | string | The side of the order: "BUY" or "SELL" |
params.amount | number | The amount of the base currency to trade |
params.type | string | The type of trade: "SPOT" |
params.unit | string | Denomination of the base amount |
params.slippage | number | Maximum allowed slippage percentage |
params.algo_type | string | Type of algorithm used for the trade. In this case, "SWAP" for decentralized swaps |
params.price | number | Price limit for the trade (set to 0 for swap orders) |
Response
{
"jsonrpc": "2.0",
"id": "cd728c5d-b8ca-40ee-a9cf-895a91cf2571",
"result": {
"total_volume": "1.0000",
"base_amount": 1.0,
"quote_amount": 2669.771179,
"usd_amount": 3066.624755859375,
"usd_base_amount": 3066.624755859375,
"usd_quote_amount": 2669.3294320025893,
"plan": [
{
"exchange": "Arbitrum",
"exchange_id": "dex-arbitrum.Test",
"step_price": null,
"step_volume": null,
"base_amount": 1.0,
"quote_amount": 2669.771179,
"base_amount_usd": 2750.2073,
"quote_amount_usd": 2669.8470005014833,
"gas_amount": 0.0,
"gas_unit": "ETH",
"percent": 100,
"slippage": "1.0000",
"route_amounts": [
"1000000000000000000",
"2669771179"
],
"route_path_symbol": [
"WETH",
500,
"UNISWAP_V3",
"USDC"
],
"route_path_address": [
"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
500,
"UNISWAP_V3",
"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
],
"amm_configs": [null],
"pool_states": ["0xC6962004f452bE9203591991D15f6b388e09E8D0"],
"token_mints": [
"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
],
"token_vaults": [null, null],
"token_programs": [null, null],
"observation_states": [null],
"remaining_accounts": [[]],
"zero_for_ones": [true],
"route_dex_ids": ["UNISWAP_V3"],
"total_raw_base_amount": 1000000000000000000,
"total_raw_quote_amount": 2669771179,
"volume": "1.0000",
"price": "2669.7712",
"base": {
"unit": "ETH",
"volume": 1.0,
"volume_usd": 2750.2073
},
"quote": {
"unit": "USDC",
"volume": 2669.771179,
"volume_usd": 2669.8470005014833
},
"usd_volume": "3066.6248",
"gas_amount_usd": 0.0
}
]
}
}
Name | Type | Description |
---|---|---|
jsonrpc | string | The JSON-RPC version, typically "2.0". |
id | string | The ID from the request, echoed back in the response. |
result | object | Contains the results of the fetch quotes operation. |
result.total_volume | string | The total volume of the trade represented as a string. |
result.base_amount | number | The base amount specified for the quote. |
result.quote_amount | number | The amount of the quote currency corresponding to the base amount. |
result.usd_amount | number | The equivalent amount in USD for the base amount. |
result.usd_base_amount | number | The USD equivalent of the base amount. |
result.usd_quote_amount | number | The USD equivalent of the quote amount. |
result.plan | array | An array of execution plans used for placing the order, with details for each step. |
place_market_orders (Place Orders)
This API is used to place market orders for a token swap, using the quotes fetched in the previous step. Orders can either allow partial fill (enabling partial execution in case of liquidity constraints) or require full execution (ensuring the entire order is completed as planned).
Request
main fields
Name | Type | Description |
---|---|---|
id | string | Unique identifier for the request. |
jsonrpc | string | JSON-RPC version, typically "2.0". |
method | string | The method name, always "place_market_orders". |
params | object | The parameters for placing market orders. |
params.orders[]
Name | Type | Description |
---|---|---|
pair | string | The trading pair (e.g., "ETH/USDC"). |
side | string | "BUY" or "SELL". |
volume | number | Amount of the base asset being traded. |
price | number | Execution price (set to 0 for market orders). |
exchange | string | The exchange name where the order will be executed. |
start_time | string | Start time of the order (ISO 8601 format). |
end_time | string | Expiration time of the order (ISO 8601 format). |
timezone | string | The timezone of the order timestamps. |
timestamp | number | Epoch timestamp of when the order was created. |
params | object | Object containing order details |
Execution Strategy
Partial Fill Enabled (partialFill: true)
Partial fill only applies if a swap route consists of multiple main route parts. It allows for partial execution, preventing the transaction from being reversed if the market price moves out of favor. - The plan is taken directly from the place_order_pre_processing_dex API response without modification. - The entire volume is allocated to a single execution plan. - If the market changes, only a portion of the trade might be executed.
Request (Partial Fill Enabled)
{
"id": "508cf9f6-b49f-4d36-a84a-b775570f62f0",
"jsonrpc": "2.0",
"method": "place_market_orders",
"params": {
"orders": [ // list containing all orders
{
"pair": "ETH/USDC",
"side": "SELL",
"volume": 1,
"price": 0,
"exchange": "dex-arbitrum.Test",
"end_time": "2025-02-04T06:36:09.344Z",
"start_time": "2025-02-04T05:36:09.344Z",
"timezone": "Asia/Calcutta",
"timestamp": 1738647371663,
"params": {
"partialFill": true,
"plan": {..} // Taken directly from fetch quotes API
}
}
]
}
}
Partial Fill Disabled (partialFill: false)
When partial fill is disabled, the entire order must be executed as planned.
The execution plan is split into multiple parts.
Each plan executes a portion of the trade at a defined percentage.
If any part fails, the entire order is canceled.
Request (Partial Fill Disabled)
{
"id": "7bdac2f7-2b23-42db-94f3-d8963156ef74",
"jsonrpc": "2.0",
"method": "place_market_orders",
"params": {
"orders": [
{
"pair": "ETH/USDC",
"side": "SELL",
"volume": 1,
"price": 0,
"exchange": "dex-arbitrum.Test",
"start_time": "2025-02-04T06:28:11.128Z",
"end_time": "2025-02-04T07:28:11.128Z",
"timezone": "Asia/Calcutta",
"timestamp": 1738650536207,
"params": {
"partialFill": false,
"plans": [
{ "plan": { ... } }, // Plan 1
{ "plan": { ... } } // Plan 2
]
}
}
]
}
}
Note: Execution Plan (plan or plans[])
The execution plan is taken directly from the response of the place_order_pre_processing_dex API without modifications.
Partial Fill Handling
If partialFill: true, there is only one plan corresponding to each order. This allows for partial execution and prevents transaction failures if the market price moves out of favor.
If partialFill: false, the trade is split into multiple plans[], each executing part of the order to ensure full execution.