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.
| Type | Source | Actions |
|---|---|---|
| Buy | networks[].holdings with side buy | Exercise in window |
| Sell | networks[].holdings with side sell | Withdraw remaining underlying after expiry |
| Claim | networks[].holdings with side claim | Claim escrowed ERC-20 |
| Order | networks[].open_orders | Claim a fill (mint option tokens via claimBuy / claimSell). Withdraw an unfilled order (same mothership claim: refunds collateral and cancels the resting order) |
| Exercised | closed_holdings / settled_holdings with status exercised (or closed buys) | Read-only history |
| Withdrawn | closed_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 ordersclaimSell(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
| Status | Meaning |
|---|---|
active | Live position; may become exercisable |
exercisable | Inside the exercise window |
expired | Past expiry; longs can no longer exercise |
withdrawable | Writer can withdraw remaining collateral after expiry |
exercised | Long was exercised |
withdrawn | Short collateral withdrawn after expiry |
closed | No longer an open position |
unknown | Indexer could not classify |
Order status
| Status | Meaning |
|---|---|
queued / unfilled | Resting on the book |
filled | Filled; claim to receive option tokens |
claimable | Ready to claim |
partial | Partial fill. Claim the fill and/or withdraw the remainder |
expired | Order 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.