mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 16:58:08 +00:00
2.4 KiB
2.4 KiB
Funding Rate
Rate limits
- 1200 requests/min or 20 requests/sec per IP address. (weight = 2)
{% hint style="info" %} See more details in API Rate limits {% endhint %}
Single Product
Request
{% tabs %} {% tab title="Funding Rate" %} Query perp product 24hr funding rate.
POST [ARCHIVE_ENDPOINT]
Body
{
"funding_rate": {
"product_id": 2
}
}
{% endtab %} {% endtabs %}
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| product_id | number | Yes | Id of perp product to fetch funding rate for. |
Response
{
"product_id": 2,
"funding_rate_x18": "2447900598160952",
"update_time": "1680116326"
}
Multiple Products
Request
{% tabs %}
{% tab title="Perp Prices" %} POST [ARCHIVE_ENDPOINT]
Body
{
"funding_rates": {
"product_ids": [2]
}
}
{% endtab %} {% endtabs %}
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| product_ids | number[] | Yes | Ids of perp products to fetch funding rate for. |
Response
{% hint style="info" %}
Note: the response is a map of product_id -> funding_rate for each requested product.
{% endhint %}
{
"2": {
"product_id": 2,
"funding_rate_x18": "-697407056090986",
"update_time": "1692825387"
}
}
Response Fields
| Field name | Description |
|---|---|
| product_id | Id of the perp product this funding rate corresponds to. |
| funding_rate_x18 | Latest 24hr funding rate for the specified product, multiplied by 10^18 |
| update_time | Epoch time in seconds this funding rate was last updated at |