@somnia-chain/markets-sdk / index / BaseMarket
Type Alias: BaseMarket
BaseMarket =
object
Defined in: packages/sdk/src/markets.ts:54
Fields every market has, regardless of type.
Properties
id
id:
string
Defined in: packages/sdk/src/markets.ts:56
Primary key (lowercased): bytes32 marketId for binary, pool address for spot.
marketType
marketType:
MarketType
Defined in: packages/sdk/src/markets.ts:58
Discriminator — narrow on this (or the is*Market guards).
poolAddress
poolAddress:
Address
Defined in: packages/sdk/src/markets.ts:63
The pool serving this market (lowercased; == id for SPOT/PERP). For binary, a TIME-VARYING binding — see the recycle caveat on BinaryMarket.nonce.
lastPrice
lastPrice:
string|null
Defined in: packages/sdk/src/markets.ts:65
Last fill price (raw). For binary, ≈ YES probability × 10^decimals. Null until first fill.
lastTradeAt
lastTradeAt:
string|null
Defined in: packages/sdk/src/markets.ts:67
Timestamp (unix seconds) of the last fill; null until first fill.
cumulativeBaseVolume
cumulativeBaseVolume:
string
Defined in: packages/sdk/src/markets.ts:69
Cumulative base/outcome-token volume (raw, decimal string).
cumulativeQuoteVolume
cumulativeQuoteVolume:
string
Defined in: packages/sdk/src/markets.ts:71
Cumulative quote/collateral volume (raw, decimal string).
tradeCount
tradeCount:
string
Defined in: packages/sdk/src/markets.ts:73
Lifetime fill count (decimal string).
baseDecimals
baseDecimals:
number
Defined in: packages/sdk/src/markets.ts:75
Base-token decimals (binary: outcome tokens mirror the collateral's decimals).
quoteDecimals
quoteDecimals:
number
Defined in: packages/sdk/src/markets.ts:80
Quote-token decimals (binary: the collateral's — per-venue, e.g. 6dp TestUSDC vs 18dp USDso). Format prices/amounts with this.
createdAtTimestamp
createdAtTimestamp:
string
Defined in: packages/sdk/src/markets.ts:82
Timestamp (unix seconds) the market was created/indexed.
createdAtBlock
createdAtBlock:
string
Defined in: packages/sdk/src/markets.ts:91
Block the market was created in. Carried for the same reason as
resolvedAtBlock: a market is bracketed by two reads of an off-chain feed
and only a BLOCK identifies which print each one saw — a "fixed"-mode
market's strike IS the feed's spot at THIS block (see
BinaryMarket.mode), and that print lands before tradingStart far
more often than on it, so createdAtTimestamp cannot find it.