Skip to main content
GET
/
v1
/
tokens
/
portfolio
/
{address}
Get Portfolio
curl --request GET \
  --url https://swap-api.flux.fun/v1/tokens/portfolio/{address}
[
  {
    "portfolioItem": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "chainId": 8453,
      "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
      "contractAddress": "0x...",
      "tokenId": "0x123...",
      "amount": "100",
      "averageFillCost": "0.525",
      "unrealizedPnL": "12.50",
      "updatedAt": "2024-01-12T10:00:00.000Z"
    },
    "token": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "chainId": 8453,
      "contractAddress": "0x...",
      "tokenId": "0x123...",
      "tokenType": "erc1155",
      "decimals": 0,
      "tokenRepresentation": "kalshiMarket",
      "metadata": {
        "marketId": "KXBTC-24DEC31-T100K",
        "side": "yes"
      }
    },
    "kalshiMarket": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "tokenId": "0x123...",
      "marketId": "KXBTC-24DEC31-T100K",
      "side": "yes",
      "exchange": "Kalshi",
      "name": "Will Bitcoin reach $100,000 by Dec 31?",
      "subtitle": "Bitcoin price prediction",
      "marketPrice": 45,
      "bidPrice": 44,
      "askPrice": 46,
      "settledAt": "2024-12-31T23:59:59.000Z",
      "createdAt": "2024-01-01T00:00:00.000Z",
      "updatedAt": "2024-01-12T10:00:00.000Z"
    }
  }
]

Path Parameters

address
string
required

The wallet address to get portfolio for

Query Parameters

chainId
string

Chain ID (default: 8453 for Base)

Response

200 - application/json

Array of portfolio items with token and market details

portfolioItem
object
required
token
object
required
kalshiMarket
object
required