POST /api/v1/market/orders
Place a limit or market order on a prediction market.
Authentication​
Required. Bearer token in Authorization header.
Request​
Body Parameters​
| Parameter | Type | Required | Description |
|---|---|---|---|
market_id | int64 | Yes | ID of the market to place the order in. |
type | string | Yes | Order side: "buy" or "sell". |
kind | string | Yes | Order kind: "limit" or "market". |
token_type | string | Yes | Token to trade: "YES" or "NO". |
price | int | Yes* | Price in basis points (0--10000). Required for limit orders, ignored for market orders. |
amount | int | Yes | For buy orders with amount_type: "cents", the budget in cents. For sell orders with amount_type: "shares", the number of shares to sell. |
amount_type | string | Yes | "cents" (budget-based) or "shares" (quantity-based). |
use_bonus | bool | No | If true, uses bonus balance to fund the order. Defaults to false. |
Example​
curl -X POST https://intotes.com/api/v1/market/orders \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"market_id": 42,
"type": "buy",
"kind": "limit",
"token_type": "YES",
"price": 6500,
"amount": 1000,
"amount_type": "cents"
}'
Response​
200 OK​
{
"id": 1001,
"user_id": 7,
"market_id": 42,
"type": "buy",
"kind": "limit",
"token_type": "YES",
"price": 6500,
"amount": 1000,
"filled": 0,
"status": "pending",
"use_bonus": false,
"created_at": "2026-04-04T12:00:00Z"
}
Response Fields​
| Field | Type | Description |
|---|---|---|
id | int64 | Unique order identifier. |
user_id | int64 | ID of the user who placed the order. |
market_id | int64 | Market the order was placed in. |
type | string | "buy" or "sell". |
kind | string | "limit" or "market". |
token_type | string | "YES" or "NO". |
price | int | Limit price in basis points. |
amount | int | Total order amount (cents or shares). |
filled | int | Amount already filled. |
status | string | Order status: "pending", "partial", "filled", or "cancelled". |
use_bonus | bool | Whether bonus balance was used. |
created_at | string | ISO 8601 timestamp of order creation. |
Errors​
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_AMOUNT | Amount must be a positive integer. |
| 400 | INVALID_PRICE | Price must be between 0 and 10000 (basis points). |
| 402 | INSUFFICIENT_BALANCE | User does not have enough balance to place the order. |
| 409 | MARKET_PAUSED | The market is currently paused for trading. |
| 409 | MARKET_RESOLVED | The market has already been resolved. |