@somnia-chain/markets-sdk / index / PortfolioTrade
Type Alias: PortfolioTrade
PortfolioTrade =
object
Defined in: packages/sdk/src/binary/portfolio.ts:255
One recent fill the wallet participated in (binary portfolio view).
Properties
id
id:
string
Defined in: packages/sdk/src/binary/portfolio.ts:257
Fill id (${blockNumber}_${logIndex}).
fillPrice
fillPrice:
string
Defined in: packages/sdk/src/binary/portfolio.ts:259
Execution price, raw quote units (YES-probability scale).
quantity
quantity:
string
Defined in: packages/sdk/src/binary/portfolio.ts:261
Outcome-token quantity filled, raw units.
timestamp
timestamp:
string
Defined in: packages/sdk/src/binary/portfolio.ts:263
Timestamp (unix seconds) of the fill.
txHash
txHash:
string
Defined in: packages/sdk/src/binary/portfolio.ts:265
Tx hash the fill landed in.
side
side:
OpenOrder["side"] |null
Defined in: packages/sdk/src/binary/portfolio.ts:267
The queried account's side on this fill (maker or taker side), if known.
asMaker
asMaker:
boolean
Defined in: packages/sdk/src/binary/portfolio.ts:269
Whether the account was the maker (resting) on this fill.
counterparty
counterparty:
string|null
Defined in: packages/sdk/src/binary/portfolio.ts:271
The other party's address, if known.
market
market:
object
Defined in: packages/sdk/src/binary/portfolio.ts:273
Minimal market context for rendering the trade row.
marketAddress
marketAddress:
string
The BinaryMarket clone contract's address (lowercased).
asset
asset:
string
Underlying asset symbol (e.g. "BTC").
quoteDecimals
quoteDecimals:
number
Collateral decimals — format fillPrice/quantity with this.
intervalSec
intervalSec:
string|null
Series cadence in seconds, as the indexer derived it; null on legacy rows.
interval
interval:
string|null
Human timeframe label — "15m" / "1h" / "4h" / "24h" — DERIVED by
the SDK from intervalSec (falling back to expiry − tradingStart) and
snapped to its canonical unit. The "which timeframe was the trade for"
value. Null when no cadence is determinable.
tradingStart
tradingStart:
string|null
Unix seconds trading opened; null on legacy rows.
expiry
expiry:
string|null
Unix seconds trading ends / the outcome is decided; null on legacy rows.