@somnia-chain/markets-sdk / index / UnifiedTicker
Interface: UnifiedTicker
Defined in: packages/sdk/src/unified/structs.ts:330
A rolling 24h market snapshot (ccxt ticker shape), human units. Absent fields mean the window had no trades to derive them from.
Properties
symbol
symbol:
string
Defined in: packages/sdk/src/unified/structs.ts:332
The tradable symbol the ticker describes.
timestamp
timestamp:
number
Defined in: packages/sdk/src/unified/structs.ts:334
When this snapshot was computed (ms, local clock).
datetime
datetime:
string
Defined in: packages/sdk/src/unified/structs.ts:336
ISO-8601 of timestamp.
high?
optionalhigh?:number
Defined in: packages/sdk/src/unified/structs.ts:338
Highest fill price in the window.
low?
optionallow?:number
Defined in: packages/sdk/src/unified/structs.ts:340
Lowest fill price in the window.
open?
optionalopen?:number
Defined in: packages/sdk/src/unified/structs.ts:342
First fill price in the window.
last?
optionallast?:number
Defined in: packages/sdk/src/unified/structs.ts:344
Most recent fill price (may predate the window on quiet markets).
change?
optionalchange?:number
Defined in: packages/sdk/src/unified/structs.ts:346
last − open, when both are known.
percentage?
optionalpercentage?:number
Defined in: packages/sdk/src/unified/structs.ts:348
change / open as a plain fraction (0.05 = +5%), when derivable.
baseVolume
baseVolume:
number
Defined in: packages/sdk/src/unified/structs.ts:350
Σ base-asset volume over the window.
quoteVolume
quoteVolume:
number
Defined in: packages/sdk/src/unified/structs.ts:352
Σ quote-asset volume over the window.
markPrice?
optionalmarkPrice?:number
Defined in: packages/sdk/src/unified/structs.ts:361
PERP ONLY — mark price, human quote units.
Undefined on spot/binary, and undefined on a perp whose mark is unusable —
either the feed reported stale, or the price is zero. A zero mark is never
published: flattened to a number it reads as a real price, and downstream an
unguarded markPrice - entryPrice becomes a 100% loss on every open position.
indexPrice?
optionalindexPrice?:number
Defined in: packages/sdk/src/unified/structs.ts:363
PERP ONLY — oracle index price, human quote units. Undefined on spot/binary.
fundingRate?
optionalfundingRate?:number
Defined in: packages/sdk/src/unified/structs.ts:375
PERP ONLY — funding rate per 8 HOURS as a plain fraction (0.0001 = 0.01%).
The same axis UnifiedFundingRate.fundingRate and fetchFundingRateHistory
use, deliberately: a header reading one basis while the chart beside it reads
another is a wrong number that looks right. NOT the amount charged per settlement —
that is this divided by fundingWindowSec / fundingIntervalSec (8 on every live
pool; it has been 96 at a 300s cadence), and info.perp carries both figures. On a
historical catch-up row, multiply by that row's intervalsAccrued — one settlement
can charge more than one interval's worth.
fundingTimestamp?
optionalfundingTimestamp?:number
Defined in: packages/sdk/src/unified/structs.ts:380
PERP ONLY — when funding next settles (ms). Settlement is permissionless and lazy, so a past value means a settlement is DUE, not that anything is broken.
openInterest?
optionalopenInterest?:number
Defined in: packages/sdk/src/unified/structs.ts:387
PERP ONLY — total open interest in base units.
ONE counter, not a long/short pair: in a matched CLOB the short side is provably equal, so there is nothing to sum.
info
info:
unknown
Defined in: packages/sdk/src/unified/structs.ts:393
The raw fold this snapshot came from (raw-unit bigints). On a perp it also carries
perp, the full on-chain state — including fundingWindowSec /
fundingIntervalSec for re-basing the funding rate.