@somnia-chain/markets-sdk


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

Type Alias: SpotPortfolio

SpotPortfolio = object

Defined in: packages/sdk/src/spot/portfolio.ts:117

A wallet's spot portfolio — the shape SomniaMarketsClient.getSpotPortfolio returns.

Properties

account

account: string

Defined in: packages/sdk/src/spot/portfolio.ts:119

The queried account (lowercased).


openOrders

openOrders: SpotPortfolioOrder[]

Defined in: packages/sdk/src/spot/portfolio.ts:121

Currently-open spot orders, newest first.


stopOrders

stopOrders: SpotStopOrder[]

Defined in: packages/sdk/src/spot/portfolio.ts:123

Currently-PENDING stop orders across the wallet's spot markets.


trades

trades: SpotPortfolioTrade[]

Defined in: packages/sdk/src/spot/portfolio.ts:125

Recent spot fills the account participated in, newest first.


tradesTruncated

tradesTruncated: boolean

Defined in: packages/sdk/src/spot/portfolio.ts:133

The read hit its tradesLimit, so fills older than the last entry in trades exist and were NOT returned. Raise tradesLimit for the rest. A total folded from a truncated trades covers part of the history only. False when the page was short, and false for tradesLimit: 0, which asks for no trades at all.


tradesSince

tradesSince: number

Defined in: packages/sdk/src/spot/portfolio.ts:139

The lower time bound the trades leg was read with, unix seconds — since when passed, otherwise now minus seven days (DEFAULT_TRADES_SINCE_SEC). Echoed so a UI can label the list and a caller can page further back. Orders are not windowed.