Skip to main content
GET
/
v1
/
markets
/
{market_id}
/
holdings
Get Market Holdings
curl --request GET \
  --url https://api.predictamarkets.com/v1/markets/{market_id}/holdings \
  --header 'X-Api-Key: <api-key>'
[
  {
    "market_asset_id": 34,
    "prediction_key": "mkt-12-yes",
    "side": "YES",
    "quantity": "10.00",
    "avg_buy_price": "65.00",
    "current_price": "68.00",
    "current_value": "680.00",
    "unrealised_pnl": "30.00"
  }
]

Documentation Index

Fetch the complete documentation index at: https://docs.predictamarkets.com/llms.txt

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

Authorizations

X-Api-Key
string
header
default:your-api-key-here
required

Path Parameters

market_id
required

Flexible identifier type that accepts either a numeric integer ID or a human-readable qualified ID string (QID). QIDs follow a prefix convention: MA for markets, MAA for market assets, AP for account payouts. Most path parameters that accept an ID use this type so callers can use whichever form is more convenient.

Query Parameters

status
string

Filter by portfolio status (OPEN, CLOSED, LOSS)

Response

Current holdings

id
integer
required

Portfolio record ID

account_id
integer
required

Account ID

market_asset_id
integer
required

Market asset ID

opinion_side
enum<string>
required

Position side (YES/NO)

Available options:
YES,
NO
shares_in_market
string
required

Number of shares held

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
status
enum<string>
required

Portfolio status

Available options:
OPEN,
CLOSED,
LOSS
price
string | null

Purchase price

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
prediction_key
string | null

The prediction key of the option this position was opened on. Corresponds to market_asset.options[n].key for the option that was purchased.

created_at
string | null

Position creation timestamp

updated_at
string | null

Last update timestamp

market_asset
PortfolioMarketAssetSchema · object

Market asset details

market
PortfolioMarketSchema · object

Market details