Portfolio
Read your test-Dot balance, open positions, fills, settlement history, and watchlist. All endpoints require a Bearer token.
Get balance
Requires auth/api/portfolio/balanceReturns your cash balance: `available` to trade, `reserved` against resting orders, `total` cash, and total `portfolio_value` (cash + mark-to-market positions). Amounts are decimal strings.
Request
curl "https://api.majjha.fun/api/portfolio/balance" \
-H "Authorization: Bearer $MAJJ_TOKEN"Response
{
"available": "842.50",
"reserved": "157.50",
"total": "1000.00",
"portfolio_value": "1063.20"
}List watchlist
Requires auth/api/portfolio/watchlistReturns your saved markets, newest saved first. The response includes `market_ids` for lightweight clients and full market rows for rendering discovery cards.
Request
curl "https://api.majjha.fun/api/portfolio/watchlist" \
-H "Authorization: Bearer $MAJJ_TOKEN"Response
{
"market_ids": ["mkt_btc5m_a1"],
"markets": [
{
"id": "mkt_btc5m_a1",
"ticker": "BTC-5MIN-25JUN04T0900-Y",
"title": "BTC above $68,500 at 09:05?",
"status": "ACTIVE",
"lastYesPrice": "0.54",
"lastNoPrice": "0.46",
"volume": "12840.00",
"category_name": "Crypto",
"category_slug": "crypto",
"trade_count": 381
}
]
}Save market
Requires auth/api/portfolio/watchlist/{market_id}Adds a market to your watchlist. The path accepts either a market id or ticker and stores the canonical market id. Re-saving an existing market is a no-op.
Path parameters
market_idstringpathrequiredMarket id or ticker to save.
Request
curl -X PUT "https://api.majjha.fun/api/portfolio/watchlist/{market_id}" \
-H "Authorization: Bearer $MAJJ_TOKEN"Response
{
"market_id": "mkt_btc5m_a1",
"watched": true,
"added": true
}Remove saved market
Requires auth/api/portfolio/watchlist/{market_id}Removes a market from your watchlist. Removing a market that is not currently saved is a no-op.
Path parameters
market_idstringpathrequiredMarket id or ticker to remove.
Request
curl -X DELETE "https://api.majjha.fun/api/portfolio/watchlist/{market_id}" \
-H "Authorization: Bearer $MAJJ_TOKEN"Response
{
"market_id": "mkt_btc5m_a1",
"watched": false,
"removed": true
}List positions
Requires auth/api/portfolio/positionsReturns your open positions, cursor-paginated, with mark-to-market value and P&L.
Query parameters
limitintegerqueryoptionaldefault: 20Page size. Max 100.
cursorstringqueryoptionalOpaque cursor from the previous page.
Request
curl "https://api.majjha.fun/api/portfolio/positions" \
-H "Authorization: Bearer $MAJJ_TOKEN"Response
{
"cursor": null,
"positions": [
{
"position_id": "pos_77",
"market_id": "mkt_btc5m_a1",
"market_title": "BTC above $68,500 at 09:05?",
"market_status": "ACTIVE",
"side": "YES",
"quantity": "100",
"avg_entry_price": "0.54",
"current_price": "0.58",
"value": "58.00",
"unrealized_pnl": "4.00",
"realized_pnl": "0.00"
}
]
}List fills
Requires auth/api/portfolio/fillsReturns your individual trade fills (executions), cursor-paginated and optionally filtered by ticker.
Query parameters
tickerstringqueryoptionalFilter by market ticker.
limitintegerqueryoptionaldefault: 20Page size. Max 100.
cursorstringqueryoptionalOpaque cursor from the previous page.
Request
curl "https://api.majjha.fun/api/portfolio/fills" \
-H "Authorization: Bearer $MAJJ_TOKEN"Response
{
"cursor": null,
"fills": [
{
"fill_id": "fil_31",
"trade_id": "trd_9f2",
"order_id": "ord_a1b2c3",
"ticker": "BTC-5MIN-25JUN04T0900-Y",
"side": "bid",
"count": "40",
"price": "0.54",
"is_taker": true,
"created_at": "2026-06-04T09:03:05Z"
}
]
}List settlements
Requires auth/api/portfolio/settlementsReturns markets that have resolved against your positions, with realized P&L.
Query parameters
tickerstringqueryoptionalFilter by market ticker.
limitintegerqueryoptionaldefault: 20Page size. Max 100.
cursorstringqueryoptionalOpaque cursor from the previous page.
Request
curl "https://api.majjha.fun/api/portfolio/settlements" \
-H "Authorization: Bearer $MAJJ_TOKEN"Response
{
"cursor": null,
"settlements": [
{
"settlement_id": "stl_12",
"market_id": "mkt_btc5m_z9",
"market_title": "BTC above $68,400 at 08:55?",
"market_status": "RESOLVED",
"side": "YES",
"avg_entry_price": "0.48",
"realized_pnl": "26.00",
"settled_at": "2026-06-04T08:55:00Z"
}
]
}