@somnia-chain/markets-sdk / index / PerpPositionAnalytics
Type Alias: PerpPositionAnalytics
PerpPositionAnalytics =
object&PerpPositionMetrics| {priceable:false;asOfBlock:bigint;pool:Address;size:bigint; }
Defined in: packages/sdk/src/perp/margin.ts:947
One position's analytics as of a block, or the market reporting itself unpriceable.
Union Members
object & PerpPositionMetrics
Type Literal
{ priceable: false; asOfBlock: bigint; pool: Address; size: bigint; }
priceable
priceable:
false
The pool's mark feed is stale or zero, so nothing here can be marked. Render
the row blank — do NOT substitute zeros, which would show a live position as
flat — or drop it when size is 0n.
asOfBlock
asOfBlock:
bigint
The block the attempt was pinned to.
pool
pool:
Address
The pool that could not be priced.
size
size:
bigint
SIGNED position size, raw base units — the one figure that survives a dead
mark feed, because the MarginBank read succeeded and only the pool's price
read failed. 0n means the account genuinely holds no position here:
activePerpPools is has-position OR has-orders, so an order-only pool
appears in this list with nothing to show. Use it to tell "a position
nobody can price" from "no position at all" — nothing else here can.