@somnia-chain/markets-sdk / index / BaseMarket
Type Alias: BaseMarket
BaseMarket =
object
Defined in: packages/sdk/src/markets.ts:48
Fields every market has, regardless of type.
Properties
id
id:
string
Defined in: packages/sdk/src/markets.ts:50
Primary key (lowercased): bytes32 marketId for binary, pool address for spot.
marketType
marketType:
MarketType
Defined in: packages/sdk/src/markets.ts:52
Discriminator — narrow on this (or the is*Market guards).
poolAddress
poolAddress:
Address
Defined in: packages/sdk/src/markets.ts:57
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:59
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:61
Timestamp (unix seconds) of the last fill; null until first fill.
cumulativeBaseVolume
cumulativeBaseVolume:
string
Defined in: packages/sdk/src/markets.ts:63
Cumulative base/outcome-token volume (raw, decimal string).
cumulativeQuoteVolume
cumulativeQuoteVolume:
string
Defined in: packages/sdk/src/markets.ts:65
Cumulative quote/collateral volume (raw, decimal string).
tradeCount
tradeCount:
string
Defined in: packages/sdk/src/markets.ts:67
Lifetime fill count (decimal string).
baseDecimals
baseDecimals:
number
Defined in: packages/sdk/src/markets.ts:69
Base-token decimals (binary: outcome tokens mirror the collateral's decimals).
quoteDecimals
quoteDecimals:
number
Defined in: packages/sdk/src/markets.ts:74
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:76
Timestamp (unix seconds) the market was created/indexed.