Skip to main content
PUT
/
v1
/
markets
/
{market_id}
/
orders
/
{order_id}
/
sell
Sell a Position
curl --request PUT \
  --url https://api.predictamarkets.com/v1/markets/{market_id}/orders/{order_id}/sell \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "quantity": "5.00",
  "price": "70.00"
}
'
{
  "id": 502,
  "market_id": 12,
  "market_asset_id": 34,
  "account_id": 1042,
  "order_type": "SELL",
  "opinion_side": "YES",
  "price": "70.00",
  "quantity": "5.00",
  "initial_quantity": "10.00",
  "status": "OPEN",
  "prediction_key": "mkt-12-yes",
  "auto_cancel_at": null,
  "created_at": "2025-04-10T09:00:00Z",
  "updated_at": "2025-04-10T09:01:00Z"
}

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.

order_id
integer
required

Body

application/json

Request body for PUT /v1/markets/{market_id}/orders/{order_id}/sell. Specifies how many shares of an existing filled position to sell and at what price.

account_id
integer
required

ID of the account placing the order

quantity
required

Quantity to sell of the order

Response

Sell order created

The response is of type string.