@somnia-chain/markets-sdk


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

Type Alias: PortfolioOptions

PortfolioOptions = object

Defined in: packages/sdk/src/binary/portfolio.ts:354

Paging/window options shared by the portfolio queries (SomniaMarketsClient.getPortfolio / SomniaMarketsClient.getSpotPortfolio / SomniaMarketsClient.getPerpPortfolio). All optional.

Properties

ordersLimit?

optional ordersLimit?: number

Defined in: packages/sdk/src/binary/portfolio.ts:362

Max open orders to fetch (default 200).

On SPOT this ALSO bounds pendingStopOrders: the spot query binds one limit variable to both sets, so a small value here shortens the stop-order list too, not just the open orders you asked about.


tradesLimit?

optional tradesLimit?: number

Defined in: packages/sdk/src/binary/portfolio.ts:370

Max recent trades to fetch (default 50).

The reads page newest-first, so this cap drops the OLDEST fills. Check tradesTruncated on the returned portfolio to see whether it did: the flag is true when trades.length reaches this limit.


since?

optional since?: number

Defined in: packages/sdk/src/binary/portfolio.ts:376

Only trades at/after this unix-seconds timestamp. Defaults to now minus seven days (DEFAULT_TRADES_SINCE_SEC) — see that constant for why a bound is always applied. The bound actually used comes back as tradesSince.