@somnia-chain/markets-sdk / index / UnifiedTicker
Interface: UnifiedTicker
Defined in: packages/sdk/src/unified/structs.ts:320
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:322
The tradable symbol the ticker describes.
timestamp
timestamp:
number
Defined in: packages/sdk/src/unified/structs.ts:324
When this snapshot was computed (ms, local clock).
datetime
datetime:
string
Defined in: packages/sdk/src/unified/structs.ts:326
ISO-8601 of timestamp.
high?
optionalhigh?:number
Defined in: packages/sdk/src/unified/structs.ts:328
Highest fill price in the window.
low?
optionallow?:number
Defined in: packages/sdk/src/unified/structs.ts:330
Lowest fill price in the window.
open?
optionalopen?:number
Defined in: packages/sdk/src/unified/structs.ts:332
First fill price in the window.
last?
optionallast?:number
Defined in: packages/sdk/src/unified/structs.ts:334
Most recent fill price (may predate the window on quiet markets).
change?
optionalchange?:number
Defined in: packages/sdk/src/unified/structs.ts:336
last − open, when both are known.
percentage?
optionalpercentage?:number
Defined in: packages/sdk/src/unified/structs.ts:338
change / open as a plain fraction (0.05 = +5%), when derivable.
baseVolume
baseVolume:
number
Defined in: packages/sdk/src/unified/structs.ts:340
Σ base-asset volume over the window.
quoteVolume
quoteVolume:
number
Defined in: packages/sdk/src/unified/structs.ts:342
Σ quote-asset volume over the window.
markPrice?
optionalmarkPrice?:number
Defined in: packages/sdk/src/unified/structs.ts:351
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:353
PERP ONLY — oracle index price, human quote units. Undefined on spot/binary.
fundingRate?
optionalfundingRate?:number
Defined in: packages/sdk/src/unified/structs.ts:363
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 (96 on testnet,
expected 8 on mainnet), and info.perp carries both figures.
fundingTimestamp?
optionalfundingTimestamp?:number
Defined in: packages/sdk/src/unified/structs.ts:368
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:375
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:381
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.