{s}omniamarkets

@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / LivePrice

Interface: LivePrice

Defined in: priceFeed/types.ts:36

The current price of one asset — the Feed singleton, parsed. This is what a live watch keeps current.

Properties

asset

asset: string

Defined in: priceFeed/types.ts:38

Asset symbol this feed tracks (e.g. "BTC", "ETH"), uppercased.


price

price: number

Defined in: priceFeed/types.ts:41

Latest price, human units (raw / 1e18). Lossy past ~15 sig figs — use raw for exact math.


ema

ema: number

Defined in: priceFeed/types.ts:43

Latest EMA-smoothed mark price, human units (the feed's mark).


blockNumber

blockNumber: number

Defined in: priceFeed/types.ts:45

Block the latest tick landed in (chain time, monotonic).


blockTimestamp

blockTimestamp: number

Defined in: priceFeed/types.ts:48

Block timestamp of the latest tick — unix seconds, chain time. Use this as a series x-axis; it never drifts.


decimals

decimals: number

Defined in: priceFeed/types.ts:50

Price scale (Feed.decimals, always 18 today).


raw

raw: object

Defined in: priceFeed/types.ts:53

Exact 1e18-scaled integer strings — never round-trip money through the number fields above.

price

price: string

ema

ema: string