OKX Funding Rate, Mark Price and Open Interest Explained
A perpetual swap has no expiry, so it needs a mechanism that pulls its price back toward spot. OKX uses a funding rate settled on a clock, prices margin against a mark price rather than the last trade, and reports open interest in three units that are often mistaken for three different measurements. This guide reads all three off the public API.

Cover artwork: CoinSoso · AI-generated, not a photograph of a real venue, product or market capture.
Key takeaways
- On OKX, funding is settled at intervals — eight hours for BTC-USDT-SWAP — and the endpoint's fundingTime minus prevFundingTime is how you confirm the interval for any contract.
- The fundingRate field is a forecast for the period that has not settled yet; settFundingRate is the rate that was actually used last time. They are different numbers and neither replaces the other.
- The premium behind the rate is built from impact bid and impact ask at a fixed depth, documented as 20,000 USDT on BTC-USDT-SWAP, not from the best bid and offer.
- Open interest is one quantity reported three ways: oi in contracts, oiCcy in base coin, oiUsd in dollars. On 2026-10-31 one contract was 0.01 BTC, so oi × 0.01 reproduced oiCcy exactly.
- oiUsd is a price-times-size figure, so it falls when the price falls even if nobody closes a position.
One contract, three prices
The three numbers do different jobs. Funding is a payment between longs and shorts settled on a schedule — eight hours for BTC-USDT-SWAP, though the interval is contract-specific. Mark price, not the last trade, is what margin and liquidation use. Open interest is a single quantity that OKX reports as contracts, as base coin and as USD. The trap is that the funding rate shown in the API is a forecast for the period that has not settled yet, not the rate that was last charged.
A perpetual swap has no delivery date, which creates a problem a futures contract does not have. Nothing forces its price to converge to spot at expiry, so the venue needs a standing mechanism to pull it back. On OKX the mechanism is a funding rate, charged on a clock, in a direction set by the sign of the rate.
Everything about that mechanism depends on which price you are looking at, and OKX keeps three of them separate. Read at 01:31 UTC on 2026-10-31, the BTC-USDT-SWAP contract reported:
| Price | Value (USDT) | What it is |
|---|---|---|
| Last trade | 77,372 | The most recent matched price |
| Mark price | 77,362.9 | The price used for margin and liquidation |
| Index price | 77,397.7 | The composite spot reference |
The three differ by a few basis points, and each one answers a different question. The last trade is what someone paid. The index is what the asset is worth across the venues OKX samples. The mark sits between them and is what your position’s health is measured against.
That separation is not cosmetic. If liquidation were triggered by the last trade, a single thin print on the book could close a solvent position. Using a mark price that is not the last trade is the standard defence, and it means the number you watch on the chart is not always the number that decides whether you keep the position.
Funding: the payment, not the price
Funding is a transfer between holders, not a fee paid to the exchange. On OKX, a positive rate means long positions pay short positions at settlement; a negative rate means shorts pay longs. That single sentence is the whole economic content, and it is documented in the endpoint’s field description rather than in a help article.
The settlement interval is the first thing to check, because it is not always what you expect. On 2026-10-31 the BTC-USDT-SWAP response gave fundingTime as 1793433600000 and prevFundingTime as 1793404800000 — a difference of 28,800,000 milliseconds, exactly eight hours. The documented settlement times that day were 00:00, 08:00 and 16:00 UTC.
OKX’s documentation then adds a caveat worth quoting rather than paraphrasing: the rate is “currently set at 8 hours” but “may be adjusted to higher frequencies such as 6 hours, 4 hours, 2 hours, or 1 hour” for some contracts, and the way to confirm is “the difference between fundingTime and nextFundingTime”. A trader who annualises an eight-hour rate on a contract that has moved to one-hour settlement will be wrong by a factor of eight.
How the rate is built
The rate is not chosen. It is computed from the gap between the perpetual’s book and the index, then corrected by an interest-rate term and clamped.
The gap is the premium index, and OKX publishes its formula in the field description:
[Max (0, Impact bid price – Index price) – Max (0, Index price – Impact ask price)] / Index price
Two features of that formula matter more than the algebra.
It uses impact prices, not the top of the book. impactValue on BTC-USDT-SWAP read 20,000 USDT, and OKX describes it as the “depth weighted amount (in the unit of quote currency)”. The impact bid is the average price you would achieve selling 20,000 USDT into the bids; the impact ask is the same on the other side. So the premium measures the cost of moving size, not the difference between two 0.1-tick quotes.
The two max terms make it asymmetric. There is no subtraction of a combined mid. If the book is skewed, only the side that is away from the index contributes. A wide bid and a tight offer produce a different premium from the mirror image of the same average spread.
That premium is then combined with an interest rate and bounded. The live response carried interestRate 0.0001 — 0.01%, or about 10.95% annualised at three settlements a day — and a band from minFundingRate −0.00375 to maxFundingRate 0.00375. The band is ±0.375% per settlement, which annualises to about 410%. It is a guard rail, not a working range.
At the snapshot, the pieces read:
| Field | Value | Reading |
|---|---|---|
premium |
−0.0003878549680988 | −0.0388%, perpetual trading below index |
interestRate |
0.0001 | 0.01% per settlement |
fundingRate |
0.0000936247616476 | +0.00936%, predicted for the open period |
settFundingRate |
0.0001 | +0.0100%, the last rate actually used |
Note the signs. The premium was negative — the perpetual was below the index — yet the predicted funding rate was still slightly positive. That is the interest-rate term at work, and it is the reason a trader who watches only the premium will sometimes see funding go the wrong way relative to the book.
The documented formulaType distinguishes an “old funding rate formula” (noRate) from a “new” one (withRate). BTC-USDT-SWAP reported withRate, and its interest rate was populated. A contract reporting noRate returns an empty interest rate, which is one way to tell from the API which mechanism you are looking at.
Forecast versus settled
The most common reading error in this data is comparing the wrong pair of numbers.
fundingRate is documented as “predicted funding rate for the upcoming settlement period”, with the note that “this is a forecast — the final settled rate may differ”. settFundingRate is documented as the rate used in the previous settlement cycle once the state reads settled.
Those two fields describe different periods. At 01:31 UTC, the open period was the one ending at 08:00, and fundingRate was its forecast of +0.00936%. The previous settlement, at 00:00, had actually used +0.0100%, which is what settFundingRate reported. Neither is “the funding rate” in the abstract.
There is a third wrinkle in the history endpoint, where the field is named realizedRate rather than settFundingRate. If you are building a chart, take the settled series from history and the forecast from the live endpoint, and label them differently. Mixing them produces a line that appears to revise its own past.
Open interest, in three units
Open interest is the number of contracts that exist and have not been closed. OKX reports it three ways in a single response:
| Field | Value at 01:31 UTC, 2026-10-31 |
|---|---|
oi |
3,486,872.33 contracts |
oiCcy |
34,868.7233 BTC |
oiUsd |
2,695,993,895.60 USD |
These are not three measurements. They are one measurement, converted twice, and the conversions are checkable against the instrument specification.
ctVal for BTC-USDT-SWAP read 0.01 with ctValCcy BTC — one contract is 0.01 BTC. Multiplying: 3,486,872.33 × 0.01 = 34,868.7233 BTC, which is oiCcy to the last digit displayed.
The dollar figure is the base amount times a price. Dividing oiUsd by oiCcy gives 77,318.4, which matches neither the mark price of 77,362.9 nor the last trade of 77,372 exactly — it sits about 0.06% below both, which is what two endpoints read a second apart look like. The base amount times the mark gives $2,697,595,000; times the implied price it is the $2,695,994,000 on the wire. The contract count is the same in both cases; only the chosen price differs.
That has a practical consequence. Open interest in dollars can fall while the number of open positions does not change at all, simply because the price fell. A chart of oiUsd that drops 5% during a sell-off is telling you about the move, not necessarily about deleveraging. Use oi or oiCcy when the question is “how many positions are open”, and oiUsd only when the question is “how much notional is at risk” — which is a different and equally useful question.
What this costs on an actual position
Percentages hide the scale of funding, so it is worth converting one.
One BTC-USDT-SWAP contract is 0.01 BTC. At the mark price of 77,362.9, its notional is about 773.63 USDT. At the forecast rate of 0.00936%, one contract would pay about 0.0724 USDT at the next settlement — roughly seven cents, per contract, per eight hours.
Seven cents sounds negligible until it is annualised and applied to size. The same forecast runs at 10.25% a year at three settlements a day. The last settled rate, 0.0100%, annualises to 10.95%. And the cap of ±0.375% per settlement annualises to about 410% — which is why the cap exists.
The comparison that matters for a leveraged position is funding against equity, not funding against notional. A trader holding 100 contracts posts margin against roughly 77,363 USDT of notional; at 10× that is about 7,736 USDT of margin, and the forecast funding on the position is about 7.24 USDT per settlement, or 0.094% of margin each time. At the last settled rate it was 0.100% of margin. Neither is dramatic on its own; both accumulate silently, and both change sign with the rate.
A short checklist before settlement
- Confirm the interval from
fundingTimeminusnextFundingTime, not from memory. - Distinguish forecast from settled. Read
fundingRatefor what is coming andsettFundingRateor the history endpoint for what happened. - Read the sign, then the size. Positive means longs pay. The magnitude tells you how strongly the market is leaning.
- Do the notional arithmetic in the contract’s own units.
ctValconverts contracts to coin; the mark price converts coin to dollars. - Watch open interest in
oioroiCcyif you want to compare across days, and inoiUsdif you want exposure. - Check the leverage cap. BTC-USDT-SWAP carried a 100× setting on the instrument record; the maximum available is not a recommendation, and funding costs scale against the margin actually posted, not against the maximum.
Mark price and the index are covered from the trading side in spread, depth and slippage, and the account-level settings that determine how a position is margined — cross, isolated, long/short mode — are set out in OKX account modes. The position-size calculator converts a risk budget into a contract quantity that respects lotSz and minSz, and the OKX fee guide covers the trading fee that sits on top of funding.
Risk note. Every figure in this article was read from OKX’s public API between 01:30 and 01:32 UTC on 2026-10-31, and the derivations are shown so they can be repeated against current data. Funding rates, open interest and prices change continuously; the values here are a snapshot for explaining the fields, not a market view. A perpetual swap with leverage can lose more than the margin posted if liquidation is not managed, and funding is a recurring cost that does not stop when the price is flat. Nothing here is investment advice or a recommendation to trade.
Sources
How this was researched. Written from primary documentation and the exchange or protocol's own published material, with sources listed at the end of the article.
Primary sources for the factual claims on this page. A date appears only where a human has actually read the source; where it is missing, the check is still outstanding.
- OKX API v5 — Get funding rate (field definitions, premium formula, interval note)(read 2026-10-31)
- OKX API v5 — funding rate, BTC-USDT-SWAP (live response)(read 2026-10-31)
- OKX API v5 — instruments, BTC-USDT-SWAP (ctVal, tickSz, lotSz, minSz)(read 2026-10-31)
- OKX API v5 — open interest, BTC-USDT-SWAP (oi, oiCcy, oiUsd)(read 2026-10-31)
Frequently asked questions
When does OKX charge funding?
At the settlement times published in fundingTime, which for BTC-USDT-SWAP were 00:00, 08:00 and 16:00 UTC on 2026-10-31. OKX's documentation warns that the eight-hour interval is the usual case rather than a guarantee: some contracts move to six, four, two or one hours, and the documented way to check is the difference between fundingTime and nextFundingTime rather than an assumption.
Why is the funding rate I see different from the one that actually got charged?
Because the field you are reading is a forecast. OKX defines fundingRate as the predicted rate for the upcoming settlement period and says explicitly that the final settled rate may differ; settFundingRate carries the rate that was actually used. During a settlement cycle the two fields can describe different periods, so compare a settled rate with settFundingRate, not with the forecast.
Does a positive funding rate mean longs are losing money?
It means long positions pay short positions. Whether a long is losing overall depends on the price move as well. The payment is proportional to position notional, so a rate that looks small in percent can still be meaningful on leverage: 0.00936% on a $800 contract is about seven cents, but the same rate on a large position with borrowed margin is a recurring cost against a thinner equity base.
Why is my open interest in USD different from contracts multiplied by the last price?
Because the USD figure is price times size at an instant, and the price used is not necessarily the last trade you are looking at. On the snapshot used here, oiUsd divided by oiCcy came to about the mark price rather than the last traded price, which is a difference of a few basis points. The contract count is the stable quantity; the dollar figure moves with price on its own.
Can I use open interest to tell whether longs or shorts are in control?
Not on its own. Open interest counts outstanding contracts without saying which side holds them, and every trade that opens a position opens one on each side. OKX publishes separate long/short ratio statistics if that is the question, and open interest answers a different one: how much exposure exists to be unwound.
Where to go next
Independent research. Each card shows the platform’s invite code, and its Create Account button is a referral link that may earn us a commission at no extra cost to you. Whether an account can be opened is decided by the platform at sign-up.
Binance

One of the largest global exchanges by traded volume, with a very broad product range.
20% Trading Fee Rebate
Use invite code con888 when signing up to enjoy trading fee benefits.
Download from the exchange's official download service. Verify the source and follow the on-screen installation instructions.
Do not install an APK from an unknown source, or one that has been modified or cannot be checked.
OKX

A large global exchange offering spot, derivatives and a self-custody wallet.
20% Trading Fee Rebate
Enter invite code con888 when signing up to check available trading fee benefits.
Download from the exchange's official download service. Verify the source and follow the on-screen installation instructions.
Do not install an APK from an unknown source, or one that has been modified or cannot be checked.