Skip to main content

Portfolio

/portfolio is a public snapshot of a connected wallet’s CLOB activity across configured networks. Data comes from GET /api/portfolio/:address (optional ?chain_id=). No SIWE is required to read; wallet connection is required to exercise, withdraw, or claim.

Positions table​

One table lists every CLOB row. The Type column is buy, sell, claim, order, exercised, or withdrawn.

TypeSourceActions
Buynetworks[].holdings with side buyExercise in window
Sellnetworks[].holdings with side sellWithdraw remaining underlying after expiry
Claimnetworks[].holdings with side claimClaim escrowed ERC-20
Ordernetworks[].open_ordersClaim a fill (mint option tokens via claimBuy / claimSell). Withdraw an unfilled order (same mothership claim: refunds collateral and cancels the resting order)
Exercisedclosed_holdings / settled_holdings with status exercised (or closed buys)Read-only history
Withdrawnclosed_holdings / settled_holdings with status withdrawn (or closed sells)Read-only history

Package NFTs and margin loans stay in their own cards. They are not CLOB position rows.

Withdraw and claim both go through the mothership OrdersFacet. There is no separate cancel entrypoint on the CLOB.

Withdraw unfilled orders​

For resting orders (queued, unfilled, open, resting, or expired), use Withdraw on /portfolio or the Open orders tab on /trade. The app calls:

  • claimBuy(clob, orderId, beneficiary, referrer) for buy-side orders
  • claimSell(clob, orderId, beneficiary, referrer) for sell-side orders

Claiming an unfilled order unlinks it from the book and returns the unmatched deposit. Maker-post already charged on that rest is not refunded. Partially filled orders can be claimed (take the fill) and/or withdrawn (refund the remainder).

Pending rows (before the indexer sees your post transaction) show no action until the order id is indexed.

Click any open order row to open a detail modal with payoff diagram, pair key encoding, CLOB address, and Claim / Withdraw actions.

Filter by network in the UI (persisted locally). Spot / moneyness uses Moralis when VITE_MORALIS_API_KEY is set; local and some testnets often have no price.

Click an opshun name for its payoff diagram.

Holding status​

StatusMeaning
activeLive position; may become exercisable
exercisableInside the exercise window
expiredPast expiry; longs can no longer exercise
withdrawableWriter can withdraw remaining collateral after expiry
exercisedLong was exercised
withdrawnShort collateral withdrawn after expiry
closedNo longer an open position
unknownIndexer could not classify

Order status​

StatusMeaning
queued / unfilledResting on the book
filledFilled; claim to receive option tokens
claimableReady to claim
partialPartial fill. Claim the fill and/or withdraw the remainder
expiredOrder expired

API​

GET /api/portfolio/0xYourAddress
GET /api/portfolio/0xYourAddress?chain_id=11155111

Response shape:

{
"address": "0x…",
"networks": [
{
"chain_id": 31337,
"name": "Anvil Local",
"holdings": [],
"open_orders": [],
"closed_holdings": [],
"settled_holdings": [],
"discovery": {
"note": "…",
"candidate_token_count": 0,
"candidate_order_count": 0,
"transfer_rows": 0
}
}
]
}

Each holding / order includes clob, side, balance or amount, status, pair_key (option type, timestamps, strike, premium rate), and token addresses (underlying, quote, premium_token).

Returns 503 when the indexer or RPC is unavailable. Indexer endpoints: Networks & public settings.