Get the funding rate and the oracle gap of a market over time
/v1/chains/{chain}/perpl/fundingCall this to draw the funding rate and the gap between mark and oracle of one market. market is required. The series covers the last hours hours, ascending in time. Each point holds the time and block of a stored snapshot, the mark and oracle prices, gap_bps (the mark against the oracle in basis points, null without an oracle price) and the funding_rate of the interval.
Sona stores a snapshot about every 30 s, so a long window is thinned: the point is the last stored snapshot of each step_s-second window. step_s is the window length, a multiple of 30 s chosen to give about 720 points, so 30 for a window of up to 6 hours and 840 for 7 days. The series is empty for a market that was not stored in the window. It starts when Sona started, and coverage says so.
hours is 1 to 168, 24 by default.
Path parameters
| Name | Type | Description |
|---|---|---|
chainRequired | string | The chain, as a CAIP-2 chain ID. Only Monad, |
Query parameters
| Name | Type | Description |
|---|---|---|
marketRequired | string | The market, as its symbol in any case or its decimal perp id. It is required, because a series of all markets would be too long. An unknown market answers 404 |
hours | integerDefault 24 | How many hours back the series reaches, from 1 to 168. The default is 24. |
Response
The answer, wrapped in the {data, meta, links} envelope. data.kind is perpl_funding. meta.as_of names the snapshot block.
| Field | Type | Description |
|---|---|---|
| chain | string | The CAIP-2 id of the chain. |
| coverage | array of strings | The codes of the limits that apply to this answer, in a fixed order. It is empty when none applies. The status route explains each code. |
| hours | integer | |
| items | array of objects | The points in ascending order of time. |
| kind | string | perpl_funding |
| perp_id | integer | |
| step_s | integer | The length in seconds of the window that each point stands for. |
| symbol | string |
Cost
1 credit. The time limit is 5 seconds.
Errors
| Status | Code |
|---|---|
| 400 | invalid_query |
| 404 | not_foundunsupported_chain |
| 429 | rate_limitedcredits_exhausted |
| 500 | internal |
| 503 | upstream_unavailable |
| 504 | deadline_exceeded |
400 invalid_query for a missing market or a bad hours, 404 not_found, 404 unsupported_chain, 503 and 504 as elsewhere.