Skip to main content

Documentation Index

Fetch the complete documentation index at: https://0x-250ca30e.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The positions endpoint fetches all open Polymarket positions for a connected wallet. Kuroko uses this to populate your portfolio page with live unrealized P&L and position details. It proxies Polymarket’s Gamma API to avoid browser CORS restrictions.

GET /api/positions

wallet
string
required
A valid Ethereum wallet address: 0x followed by 40 hexadecimal characters.
curl "/api/positions?wallet=0xYourWalletAddress"
Example response
[
  {
    "conditionId": "0xbd31dc8a20211944f6b70f31557f1001557b5923b5a4943afab25e89eaaea0e7",
    "market": "Will the Fed cut rates in June 2026?",
    "outcome": "YES",
    "size": 150.0,
    "avgPrice": 0.44,
    "currentPrice": 0.61,
    "unrealizedPnl": 25.50
  }
]
conditionId
string
The Polymarket condition ID for the market.
market
string
The market question text.
outcome
string
"YES" or "NO" — which side of the market you hold.
size
number
Number of shares held.
avgPrice
number
Your average entry price as a decimal (e.g. 0.44 = 44¢ per share).
currentPrice
number
Current market probability as a decimal.
unrealizedPnl
number
Unrealized profit or loss in USD.

Errors

StatusMeaning
400Missing wallet param, or address failed validation
429Rate limit exceeded — 60 requests/minute per IP. Retry after 60 seconds.
502Polymarket Gamma API unavailable
The wallet parameter must be a valid Ethereum address starting with 0x followed by 40 hexadecimal characters. Invalid formats return 400 Invalid wallet address.
Only positions with a size above 0.01 shares are returned. Dust positions are filtered out automatically.