Open Interest
Type: NONE
Weight: 1
GET /fapi/v1/openInterest
Status: Implemented.
Aggregates open interest from ledger.positions — the sum of all positive (long) qty for the symbol. In a closed system with no external counterparty, sum(longs) == sum(abs(shorts)), so summing just the long side is sufficient and avoids double-counting.
Request
| Param | Type | Required |
|---|---|---|
symbol | string | yes |
Response
| Field | Type | Notes |
|---|---|---|
openInterest | string | Sum of long qty in base units, as a decimal string; "0" when there are no open positions. |
time | int64 | Server time (ms) when the response was built. |
{
"symbol": "BTCUSDT",
"openInterest": "12.500000000000000000",
"time": 1782899500075
}
Errors
| HTTP | code | msg |
|---|---|---|
400 | -1100 | Unknown symbol. |
400 | — | symbol missing or malformed: plain-text axum rejection (Failed to deserialize query string: …), not the {code,msg} JSON shape. |
500 | -1000 | Database error. |
Source: rocky-backend/services/api-gateway/src/fapi/routes_market.rs (open_interest handler).