Skip to main content
POST
/
v1
/
markets
/
{market_id}
/
orders
Place an Order
curl --request POST \
  --url https://api.predictamarkets.com/v1/markets/{market_id}/orders \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "account_id": 1042,
  "mini_market_id": 34,
  "order_type": "BUY",
  "opinion_side": "YES",
  "price": "65.00",
  "quantity": "10.00",
  "prediction_key": "mkt-12-yes",
  "referred_by_account_id": null,
  "auto_cancel_at": null,
  "is_opinion_order": false
}
'
{
  "id": 501,
  "market_id": 12,
  "market_asset_id": 34,
  "account_id": 1042,
  "order_type": "BUY",
  "opinion_side": "YES",
  "price": "65.00",
  "quantity": "10.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.

Body

application/json

Request body for POST /v1/markets/{market_id}/orders. Specifies the outcome to trade, the price (1–99 cents), quantity (number of shares), and whether this is a standard limit order or a simpler opinion order.

account_id
integer
required

ID of the account placing the order

mini_market_id
integer
required

The numeric ID of the market asset (outcome) you want to trade within this market. Obtain this from market_assets[n].id in the market detail response. Despite the field name 'mini_market_id', this maps directly to the market_asset.id.

order_type
enum<string>
required

Type of order (BUY or SELL)

Available options:
BUY,
SELL
opinion_side
enum<string>
required

Which side of the outcome you are betting on: YES (the event will happen) or NO (it will not). This must match the side of the prediction_key you supply.

Available options:
YES,
NO
price
required

Limit price for the order, in the range 1–99 (integer cents). This represents the implied probability you are willing to trade at — a price of 65 means you believe the event has at least a 65% probability of occurring (for BUY YES) or you are willing to sell at 65c. The order will only match against counterparties at this price or better.

quantity
required

Number of shares to buy or sell. Each share costs 'price' cents when filled. Total cost for a BUY order is approximately price x quantity (in PT). Must be a positive value.

prediction_key
string
required

The prediction key of the option you want to trade. This is the key field from the relevant entry in market_asset.options — fetch the market assets first, pick the option (e.g. the YES entry), and pass its key value here.

referred_by_account_id
integer | null

ID of the account that referred the user

auto_cancel_at
string<date-time> | null

Timestamp when the order will be automatically cancelled if unfilled

is_opinion_order
boolean | null

Set to true for an opinion order — a simplified order variant where only the side matters and the system auto-assigns the best available price. Useful for UX flows where the user just wants to express a directional view without specifying a price. When true, the price field is still required but may be overridden by the engine.

Response

Order placed

The response is of type string.