DFlow Kalshi Portfolio
Read-only views on a wallet's Kalshi activity — holdings, mark-to-market valuations, realized P&L, fill history, redeemable positions.
Prerequisites
- DFlow docs MCP (
https://pond.dflow.net/mcp) — install per the repo README. This skill is the recipe; the MCP is the reference. Look up exact response shapes, pagination, and batch-endpoint payloads viasearch_d_flow/query_docs_filesystem_d_flow— don't guess. dflowCLI (optional, for the fast-path holdings view) — install per the repo README.
Surface
There is no /positions endpoint. A portfolio is assembled by hand from onchain wallet balances + metadata joins. Two ways to do it:
- CLI —
dflow positions— one command, dumps spot + outcome tokens for the active vault wallet with balances and market labels. Covers "what do I hold right now?" on the CLI, and the stablecoinuiAmountalready reads as USD. Doesn't carry mark prices for outcome tokens,redemptionStatus, or fill history, so outcome-token valuation, redemption checks, and P&L still need the API pipeline. Active-vault only. - API — build-your-own pipeline — needed whenever the user wants any of: mark-to-market, P&L, activity history, redemption eligibility, or to inspect a wallet that isn't the CLI's active vault.
Quick path: `dflow positions` (CLI)
Output (single JSON envelope, same on every wallet):
{
"ok": true,
"data": {
"wallet": "<pubkey>",
"positions": [
{ "type": "spot", "mint": "...", "symbol": "USDC", "amount": "1326161", "uiAmount": 1.326161, "decimals": 6 },
{ "type": "outcome", "mint": "...", "symbol": "DFlowYU0192", "amount": "2000000", "uiAmount": 2.0, "decimals": 6,
"side": "yes", "market": { "title": "...", "status": "active" } }
]
}
}
type: "spot"— SOL, USDC, CASH, and anything else in the wallet.type: "outcome"— Kalshi outcome token; additionally carriesside("yes"|"no") and a minimalmarket(title,status).- No flag to inspect another wallet. For that, use the API pipeline.