Skip to main content

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​

ParamTypeRequired
symbolstringyes

Response​

FieldTypeNotes
openIntereststringSum of long qty in base units, as a decimal string; "0" when there are no open positions.
timeint64Server time (ms) when the response was built.
{
"symbol": "BTCUSDT",
"openInterest": "12.500000000000000000",
"time": 1782899500075
}

Errors​

HTTPcodemsg
400-1100Unknown symbol.
400—symbol missing or malformed: plain-text axum rejection (Failed to deserialize query string: …), not the {code,msg} JSON shape.
500-1000Database error.

Source: rocky-backend/services/api-gateway/src/fapi/routes_market.rs (open_interest handler).