Portfolio
Read your trading state: open positions, fills, settlements and balance, plus deposit/withdraw funding actions. 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.com/api/portfolio/balance" \
-H "Authorization: Bearer $PMX_API_KEY"Response
{
"available": "842.50",
"reserved": "157.50",
"total": "1000.00",
"portfolio_value": "1063.20"
}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.com/api/portfolio/positions" \
-H "Authorization: Bearer $PMX_API_KEY"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.com/api/portfolio/fills" \
-H "Authorization: Bearer $PMX_API_KEY"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.com/api/portfolio/settlements" \
-H "Authorization: Bearer $PMX_API_KEY"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"
}
]
}Create deposit
Requires auth/api/portfolio/depositsCredits play-money funds to your balance (Phase 1 off-chain). Returns the updated balance.
Body parameters
amountnumberbodyrequiredAmount to deposit.
Request
curl -X POST "https://api.majjha.com/api/portfolio/deposits" \
-H "Authorization: Bearer $PMX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 500
}'{
"amount": 500
}Response
{
"available": "1342.50",
"reserved": "157.50",
"total": "1500.00"
}Create withdrawal
Requires auth/api/portfolio/withdrawalsDebits funds from your available balance. Returns the updated balance.
Body parameters
amountnumberbodyrequiredAmount to withdraw (must be ≤ available).
Request
curl -X POST "https://api.majjha.com/api/portfolio/withdrawals" \
-H "Authorization: Bearer $PMX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 200
}'{
"amount": 200
}Response
{
"available": "1142.50",
"reserved": "157.50",
"total": "1300.00"
}