mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 00:38:07 +00:00
Add Nado documentation and examples, including new API endpoints, FAQs, and guides for using the TypeScript SDK. Update .env.example with additional configuration options.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# APR
|
||||
|
||||
## Request
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="Get pairs" %} <mark style="color:green;">**GET**</mark> `[GATEWAY_V2_ENDPOINT]/apr`
|
||||
{% endtab %}
|
||||
{% endtabs %}
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"name": "USDT0",
|
||||
"symbol": "USDT0",
|
||||
"product_id": 0,
|
||||
"deposit_apr": 6.32465621e-10,
|
||||
"borrow_apr": 0.010050173557473174,
|
||||
"tvl": 20001010125092.633
|
||||
},
|
||||
{
|
||||
"name": "Wrapped BTC",
|
||||
"symbol": "WBTC",
|
||||
"product_id": 1,
|
||||
"deposit_apr": 8.561123e-12,
|
||||
"borrow_apr": 0.010050166480005895,
|
||||
"tvl": 1045563178297771.2
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Response Fields
|
||||
|
||||
<table><thead><tr><th width="139">Field name</th><th width="93">Type</th><th width="97">Nullable</th><th>Description</th></tr></thead><tbody><tr><td>product_id</td><td>number</td><td>No</td><td>Internal unique ID of spot / perp product</td></tr><tr><td>name</td><td>string</td><td>No</td><td>Asset name (as represented internally in the exchange).</td></tr><tr><td>symbol</td><td>string</td><td>No</td><td>Asset symbol (as represented internally in the exchange).</td></tr><tr><td>deposit_apr</td><td>float</td><td>No</td><td>The current estimated APR for depositing or holding this asset. <strong>Note</strong>: This value should be multiplied by 100 to represent the percentage (%) form.</td></tr><tr><td>borrow_apr</td><td>float</td><td>No</td><td>The current estimated APR for borrowing this asset. <strong>Note</strong>: This value should be multiplied by 100 to represent the percentage (%) form.</td></tr><tr><td>tvl</td><td>tvl</td><td>No</td><td>Total Value Locked (TVL) represents the current USDT0 value of this asset, calculated as the difference between deposits and borrows.</td></tr></tbody></table>
|
||||
@@ -0,0 +1,60 @@
|
||||
# Assets
|
||||
|
||||
## Rate limits
|
||||
|
||||
* 1200 requests/min or 20 requests/sec per IP address. (**weight = 2**)
|
||||
|
||||
{% hint style="info" %}
|
||||
See more details in [API Rate limits](https://docs.nado.xyz/developer-resources/api/rate-limits)
|
||||
{% endhint %}
|
||||
|
||||
## Request
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="Get assets" %} <mark style="color:green;">**GET**</mark> `[GATEWAY_V2_ENDPOINT]/assets`
|
||||
{% endtab %}
|
||||
{% endtabs %}
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"product_id": 0,
|
||||
"ticker_id": null,
|
||||
"market_type": null,
|
||||
"name": "USDT0",
|
||||
"symbol": "USDT0",
|
||||
"taker_fee": null,
|
||||
"maker_fee": null,
|
||||
"can_withdraw": true,
|
||||
"can_deposit": true
|
||||
},
|
||||
{
|
||||
"product_id": 2,
|
||||
"ticker_id": "BTC-PERP_USDT0",
|
||||
"market_type": "perp",
|
||||
"name": "Bitcoin Perp",
|
||||
"symbol": "BTC-PERP",
|
||||
"maker_fee": 0.0002,
|
||||
"taker_fee": 0,
|
||||
"can_withdraw": false,
|
||||
"can_deposit": false
|
||||
},
|
||||
{
|
||||
"product_id": 1,
|
||||
"ticker_id": "BTC_USDT0",
|
||||
"market_type": "spot",
|
||||
"name": "Bitcoin",
|
||||
"symbol": "BTC",
|
||||
"taker_fee": 0.0003,
|
||||
"maker_fee": 0,
|
||||
"can_withdraw": true,
|
||||
"can_deposit": true
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Response Fields
|
||||
|
||||
<table><thead><tr><th>Field name</th><th width="95">Type</th><th width="106">Nullable</th><th>Description</th></tr></thead><tbody><tr><td>product_id</td><td>number</td><td>No</td><td>Internal unique ID of spot / perp product</td></tr><tr><td>name</td><td>string</td><td>No</td><td>Asset name (as represented internally in the exchange).</td></tr><tr><td>symbol</td><td>string</td><td>No</td><td>Asset symbol (as represented internally in the exchange).</td></tr><tr><td>maker_fee</td><td>decimal</td><td>No</td><td>Fees charged for placing a market-making order on the book.</td></tr><tr><td>taker_fee</td><td>decimal</td><td>No</td><td>Fees applied when liquidity is removed from the book.</td></tr><tr><td>can_withdraw</td><td>boolean</td><td>No</td><td>Indicates if asset withdrawal is allowed.</td></tr><tr><td>can_deposit</td><td>boolean</td><td>No</td><td>Indicates if asset deposit is allowed.</td></tr><tr><td>ticker_id</td><td>string</td><td>Yes</td><td>Identifier of a ticker with delimiter to separate base/quote. This is <mark style="color:red;"><code>null</code></mark> for assets without market e.g: <mark style="color:red;"><code>USDT0</code></mark></td></tr><tr><td>market_type</td><td>string</td><td>Yes</td><td>Name of market type (<code>spot</code> or <code>perp</code>) of asset. This is <mark style="color:red;"><code>null</code></mark> for assets without a market e.g: <mark style="color:red;"><code>USDT0</code></mark></td></tr></tbody></table>
|
||||
@@ -0,0 +1,46 @@
|
||||
# Contracts
|
||||
|
||||
## Request
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="Get pairs" %} <mark style="color:green;">**GET**</mark> `[ARCHIVE_V2_ENDPOINT]/contracts?edge={true|false}`
|
||||
{% endtab %}
|
||||
{% endtabs %}
|
||||
|
||||
## Request Parameters
|
||||
|
||||
<table><thead><tr><th width="145">Parameter</th><th width="81">Type</th><th width="106">Required</th><th>Description</th></tr></thead><tbody><tr><td>edge</td><td>bool</td><td>No</td><td>Wether to retrieve volume and OI metrics for all chains. When turned off, it only returns metrics for the current chain. Defaults to <mark style="color:red;">true</mark>.</td></tr></tbody></table>
|
||||
|
||||
## Response
|
||||
|
||||
{% hint style="info" %}
|
||||
**Note**: the response is a map of <mark style="color:red;">`ticker_id`</mark> -> contract info object.
|
||||
{% endhint %}
|
||||
|
||||
```json
|
||||
{
|
||||
"BTC-PERP_USDT0": {
|
||||
"product_id": 1,
|
||||
"ticker_id": "BTC-PERP_USDT0",
|
||||
"base_currency": "BTC-PERP",
|
||||
"quote_currency": "USDT0",
|
||||
"last_price": 25744.0,
|
||||
"base_volume": 794.154,
|
||||
"quote_volume": 20475749.367766097,
|
||||
"product_type": "perpetual",
|
||||
"contract_price": 25830.738843799172,
|
||||
"contract_price_currency": "USD",
|
||||
"open_interest": 3059.325,
|
||||
"open_interest_usd": 79024625.11330591,
|
||||
"index_price": 25878.913320746455,
|
||||
"mark_price": 25783.996946729356,
|
||||
"funding_rate": -0.003664562348812546,
|
||||
"next_funding_rate_timestamp": 1694379600,
|
||||
"price_change_percent_24h": -0.6348599635253989
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Response Fields
|
||||
|
||||
<table><thead><tr><th width="274">Field Name</th><th width="93">Type</th><th width="97">Nullable</th><th>Description</th></tr></thead><tbody><tr><td>product_id</td><td>u32</td><td>No</td><td>Unique identifier for the product.</td></tr><tr><td>ticker_id</td><td>string</td><td>No</td><td>Identifier of a ticker with delimiter to separate base/target.</td></tr><tr><td>base_currency</td><td>string</td><td>No</td><td>Symbol of the base asset.</td></tr><tr><td>quote_currency</td><td>string</td><td>No</td><td>Symbol of the target asset.</td></tr><tr><td>last_price</td><td>decimal</td><td>No</td><td>Last transacted price of base currency based on given quote currency.</td></tr><tr><td>base_volume</td><td>decimal</td><td>No</td><td>24-hours trading volume for the pair (unit in base)</td></tr><tr><td>quote_volume</td><td>decimal</td><td>No</td><td>24-hours trading volume for the pair (unit in quote/target)</td></tr><tr><td>product_type</td><td>string</td><td>No</td><td>Name of product type.</td></tr><tr><td>contract_price</td><td>string</td><td>No</td><td>Describes the price per contract.</td></tr><tr><td>contract_price_currency</td><td>string</td><td>No</td><td>Describes the currency which the contract is priced in.</td></tr><tr><td>open_interest</td><td>decimal</td><td>No</td><td>The current open interest for the perp contract.</td></tr><tr><td>open_interest_usd</td><td>decimal</td><td>No</td><td>The value in USD of the current open interest.</td></tr><tr><td>index_price</td><td>decimal</td><td>No</td><td>Last calculated index price for underlying of contract</td></tr><tr><td>funding_rate</td><td>decimal</td><td>No</td><td>Current 24hr funding rate. Can compute hourly funding rate dividing by 24.</td></tr><tr><td>next_funding_rate_timestamp</td><td>integer</td><td>No</td><td>Timestamp of the next funding rate change</td></tr><tr><td>price_change_percent_24h</td><td>decimal</td><td>No</td><td>24-hours % price change of market pair</td></tr></tbody></table>
|
||||
@@ -0,0 +1,54 @@
|
||||
# Orderbook
|
||||
|
||||
## Rate limits
|
||||
|
||||
* 2400 requests/min or 40 requests/sec per IP address. (**weight = 1**)
|
||||
|
||||
{% hint style="info" %}
|
||||
See more details in [API Rate limits](https://docs.nado.xyz/developer-resources/api/rate-limits)
|
||||
{% endhint %}
|
||||
|
||||
## Request
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="Get orderbook" %} <mark style="color:green;">**GET**</mark> `[GATEWAY_V2_ENDPOINT]/orderbook?ticker_id={ticker_id}&depth={depth}`
|
||||
{% endtab %}
|
||||
{% endtabs %}
|
||||
|
||||
## Request Parameters
|
||||
|
||||
<table><thead><tr><th width="162">Parameter</th><th width="100">Type</th><th width="107">Required</th><th>Description</th></tr></thead><tbody><tr><td>ticker_id</td><td>string</td><td>Yes</td><td>Identifier of a ticker with delimiter to separate base/target.</td></tr><tr><td>depth</td><td>number</td><td>Yes</td><td>Number of price levels to retrieve.</td></tr></tbody></table>
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
"product_id": 1,
|
||||
"ticker_id": "BTC-PERP_USDT0",
|
||||
"bids": [
|
||||
[
|
||||
116215.0,
|
||||
0.128
|
||||
],
|
||||
[
|
||||
116214.0,
|
||||
0.172
|
||||
]
|
||||
],
|
||||
"asks": [
|
||||
[
|
||||
116225.0,
|
||||
0.043
|
||||
],
|
||||
[
|
||||
116226.0,
|
||||
0.172
|
||||
]
|
||||
],
|
||||
"timestamp": 1757913317944
|
||||
}
|
||||
```
|
||||
|
||||
## Response Fields
|
||||
|
||||
<table><thead><tr><th width="148">Field Name</th><th width="112.33333333333334">Type</th><th width="114">Nullable</th><th>Description</th></tr></thead><tbody><tr><td>product_id</td><td>u32</td><td>No</td><td>Unique identifier for the product.</td></tr><tr><td>ticker_id</td><td>string</td><td>No</td><td>Identifier of a ticker with delimiter to separate base/target.</td></tr><tr><td>bids</td><td>decimal[]</td><td>No</td><td>An array containing 2 elements. The offer price (first element) and quantity for each bid order (second element).</td></tr><tr><td>asks</td><td>decimal[]</td><td>No</td><td>An array containing 2 elements. The ask price (first element) and quantity for each ask order (second element).</td></tr><tr><td>timestamp</td><td>integer</td><td>No</td><td>Unix timestamp in milliseconds for when the last updated time occurred.</td></tr></tbody></table>
|
||||
@@ -0,0 +1,47 @@
|
||||
# Pairs
|
||||
|
||||
## Request
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="Get pairs" %} <mark style="color:green;">**GET**</mark> `[GATEWAY_V2_ENDPOINT]/pairs?market={spot|perp}`
|
||||
{% endtab %}
|
||||
{% endtabs %}
|
||||
|
||||
## Request Parameters
|
||||
|
||||
<table><thead><tr><th width="145">Parameter</th><th width="81">Type</th><th width="106">Required</th><th>Description</th></tr></thead><tbody><tr><td>market</td><td>string</td><td>No</td><td>Indicates the corresponding market to fetch trading pairs for. Allowed values are: <mark style="color:red;"><code>spot</code></mark>and <mark style="color:red;"><code>perp</code></mark>. When no <mark style="color:red;"><code>market</code></mark> param is provided, it returns all available pairs.</td></tr></tbody></table>
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"product_id": 1,
|
||||
"ticker_id": "BTC-PERP_USDT0",
|
||||
"base": "BTC-PERP",
|
||||
"quote": "USDT0"
|
||||
},
|
||||
{
|
||||
"product_id": 2,
|
||||
"ticker_id": "ETH-PERP_USDT0",
|
||||
"base": "ETH-PERP",
|
||||
"quote": "USDT0"
|
||||
},
|
||||
{
|
||||
"product_id": 3,
|
||||
"ticker_id": "BTC_USDT0",
|
||||
"base": "BTC",
|
||||
"quote": "USDT0"
|
||||
},
|
||||
{
|
||||
"product_id": 4,
|
||||
"ticker_id": "ETH_USDT0",
|
||||
"base": "ETH",
|
||||
"quote": "USDT0"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Response Fields
|
||||
|
||||
<table><thead><tr><th width="139">Field name</th><th width="93">Type</th><th width="97">Nullable</th><th>Description</th></tr></thead><tbody><tr><td>product_id</td><td>u32</td><td>No</td><td>Unique identifier for the product.</td></tr><tr><td>ticker_id</td><td>string</td><td>No</td><td>Identifier of a ticker with delimiter to separate base/target.</td></tr><tr><td>base</td><td>string</td><td>No</td><td>Symbol of the base asset.</td></tr><tr><td>quote</td><td>string</td><td>No</td><td>Symbol of the target asset.</td></tr></tbody></table>
|
||||
@@ -0,0 +1,37 @@
|
||||
# Tickers
|
||||
|
||||
## Request
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="Get pairs" %} <mark style="color:green;">**GET**</mark> `[ARCHIVE_V2_ENDPOINT]/tickers?market={spot|perp}&edge={true|false}`
|
||||
{% endtab %}
|
||||
{% endtabs %}
|
||||
|
||||
## Request Parameters
|
||||
|
||||
<table><thead><tr><th width="145">Parameter</th><th width="81">Type</th><th width="106">Required</th><th>Description</th></tr></thead><tbody><tr><td>market</td><td>string</td><td>No</td><td>Indicates the corresponding market to fetch trading tickers info for. Allowed values are: <mark style="color:red;"><code>spot</code></mark>and <mark style="color:red;"><code>perp</code></mark>. When no <mark style="color:red;"><code>market</code></mark> param is provided, it returns all available tickers.</td></tr><tr><td>edge</td><td>bool</td><td>No</td><td>Whether to retrieve volume metrics for all chains. When turned off, it only returns metrics for the current chain. Defaults to <mark style="color:red;">true</mark>.</td></tr></tbody></table>
|
||||
|
||||
## Response
|
||||
|
||||
{% hint style="info" %}
|
||||
**Note**: the response is a map of <mark style="color:red;">`ticker_id`</mark> -> ticker info object.
|
||||
{% endhint %}
|
||||
|
||||
```json
|
||||
{
|
||||
"BTC-PERP_USDT0": {
|
||||
"product_id": 1,
|
||||
"ticker_id": "BTC-PERP_USDT0",
|
||||
"base_currency": "BTC",
|
||||
"quote_currency": "USDT0",
|
||||
"last_price": 25728.0,
|
||||
"base_volume": 552.048,
|
||||
"quote_volume": 14238632.207250029,
|
||||
"price_change_percent_24h": -0.6348599635253989
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Response Fields
|
||||
|
||||
<table><thead><tr><th width="253">Field Name</th><th width="93">Type</th><th width="97">Nullable</th><th>Description</th></tr></thead><tbody><tr><td>product_id</td><td>u32</td><td>No</td><td>Unique identifier for the product.</td></tr><tr><td>ticker_id</td><td>string</td><td>No</td><td>Identifier of a ticker with delimiter to separate base/target.</td></tr><tr><td>base_currency</td><td>string</td><td>No</td><td>Symbol of the base asset.</td></tr><tr><td>quote_currency</td><td>string</td><td>No</td><td>Symbol of the target asset.</td></tr><tr><td>last_price</td><td>decimal</td><td>No</td><td>Last transacted price of base currency based on given quote currency.</td></tr><tr><td>base_volume</td><td>decimal</td><td>No</td><td>24-hours trading volume for the pair (unit in base)</td></tr><tr><td>quote_volume</td><td>decimal</td><td>No</td><td>24-hours trading volume for the pair (unit in quote/target)</td></tr><tr><td>price_change_percent_24h</td><td>decimal</td><td>No</td><td>24-hours % price change of market pair</td></tr></tbody></table>
|
||||
@@ -0,0 +1,43 @@
|
||||
# Trades
|
||||
|
||||
## Request
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="Get pairs" %} <mark style="color:green;">**GET**</mark> `[ARCHIVE_V2_ENDPOINT]/trades?ticker_id=BTC-PERP_USDT0&limit=10&max_trade_id=1000000`
|
||||
{% endtab %}
|
||||
{% endtabs %}
|
||||
|
||||
## Request Parameters
|
||||
|
||||
<table><thead><tr><th width="153">Parameter</th><th width="108">Type</th><th width="126">Required</th><th>Description</th></tr></thead><tbody><tr><td>ticker_id</td><td>string</td><td>Yes</td><td>Identifier of a ticker with delimiter to separate base/target.</td></tr><tr><td>limit</td><td>integer</td><td>No</td><td>Number of historical trades to retrieve. Defaults to 100. Max of 500.</td></tr><tr><td>max_trade_id</td><td>integer</td><td>No</td><td>Max trade id to include in the result. Use for pagination.</td></tr></tbody></table>
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"product_id": 1,
|
||||
"ticker_id": "BTC-PERP_USDT0",
|
||||
"trade_id": 6351,
|
||||
"price": 112029.5896,
|
||||
"base_filled": -0.388,
|
||||
"quote_filled": 43467.4807648,
|
||||
"timestamp": 1757335618,
|
||||
"trade_type": "sell"
|
||||
},
|
||||
{
|
||||
"product_id": 1,
|
||||
"ticker_id": "BTC-PERP_USDT0",
|
||||
"trade_id": 6350,
|
||||
"price": 112032.58899999999,
|
||||
"base_filled": -0.179,
|
||||
"quote_filled": 20053.833431,
|
||||
"timestamp": 1757335618,
|
||||
"trade_type": "sell"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Response Fields
|
||||
|
||||
<table><thead><tr><th width="147">Field Name</th><th width="96">Type</th><th width="140">Nullable</th><th>Description</th></tr></thead><tbody><tr><td>product_id</td><td>u32</td><td>No</td><td>Unique identifier for the product.</td></tr><tr><td>ticker_id</td><td>string</td><td>No</td><td>Identifier of a ticker with delimiter to separate base/target.</td></tr><tr><td>trade_id</td><td>integer</td><td>No</td><td>A unique ID associated with the trade for the currency pair transaction.</td></tr><tr><td>price</td><td>decimal</td><td>No</td><td>Trade price of base asset in target currency.</td></tr><tr><td>base_filled</td><td>decimal</td><td>No</td><td>Amount of base volume filled in trade.</td></tr><tr><td>quote_filled</td><td>decimal</td><td>No</td><td>Amount of quote/target volume filled in trade.</td></tr><tr><td>timestamp</td><td>integer</td><td>No</td><td>Unix timestamp in seconds for when the transaction occurred.</td></tr><tr><td>trade_type</td><td>string</td><td>No</td><td>Indicates the type of the transaction that was completed ("buy" or "sell").</td></tr></tbody></table>
|
||||
Reference in New Issue
Block a user