@somnia-chain/markets-sdk / index / UnifiedTicker
Interface: UnifiedTicker
Defined in: packages/sdk/src/unified/structs.ts:232
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:234
The tradable symbol the ticker describes.
timestamp
timestamp:
number
Defined in: packages/sdk/src/unified/structs.ts:236
When this snapshot was computed (ms, local clock).
datetime
datetime:
string
Defined in: packages/sdk/src/unified/structs.ts:238
ISO-8601 of timestamp.
high?
optionalhigh?:number
Defined in: packages/sdk/src/unified/structs.ts:240
Highest fill price in the window.
low?
optionallow?:number
Defined in: packages/sdk/src/unified/structs.ts:242
Lowest fill price in the window.
open?
optionalopen?:number
Defined in: packages/sdk/src/unified/structs.ts:244
First fill price in the window.
last?
optionallast?:number
Defined in: packages/sdk/src/unified/structs.ts:246
Most recent fill price (may predate the window on quiet markets).
change?
optionalchange?:number
Defined in: packages/sdk/src/unified/structs.ts:248
last − open, when both are known.
percentage?
optionalpercentage?:number
Defined in: packages/sdk/src/unified/structs.ts:250
change / open as a plain fraction (0.05 = +5%), when derivable.
baseVolume
baseVolume:
number
Defined in: packages/sdk/src/unified/structs.ts:252
Σ base-asset volume over the window.
quoteVolume
quoteVolume:
number
Defined in: packages/sdk/src/unified/structs.ts:254
Σ quote-asset volume over the window.
markPrice?
optionalmarkPrice?:number
Defined in: packages/sdk/src/unified/structs.ts:263
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:265
PERP ONLY — oracle index price, human quote units. Undefined on spot/binary.
fundingRate?
optionalfundingRate?:number
Defined in: packages/sdk/src/unified/structs.ts:275
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:280
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:287
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:293
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.