Skip to main content
POST
/
orders
Create order
curl --request POST \
  --url https://api-testnet.context.markets/v2/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "marketId": "0x1111111111111111111111111111111111111111111111111111111111111111",
  "trader": "0x1111111111111111111111111111111111111111",
  "nonce": "0xabc123",
  "signature": "0xabc123"
}
'
{
  "success": true,
  "order": {
    "marketId": "0x1111111111111111111111111111111111111111111111111111111111111111",
    "trader": "0x1111111111111111111111111111111111111111",
    "nonce": "0xabc123",
    "side": 0,
    "price": "1000000",
    "size": "1000000",
    "filledSize": "1000000",
    "remainingSize": "1000000",
    "percentFilled": 123,
    "insertedAt": "2023-11-07T05:31:56Z",
    "type": "limit",
    "status": "open",
    "voidedAt": "2023-11-07T05:31:56Z",
    "voidReason": "UNFILLED_MARKET_ORDER",
    "outcomeIndex": 123
  }
}

Authorizations

Authorization
string
header
required

Public API key passed as Bearer token

Body

application/json
marketId
string
required

32-byte hex hash

Pattern: ^0x[a-fA-F0-9]{64}$
Example:

"0x1111111111111111111111111111111111111111111111111111111111111111"

trader
string
required

EVM address

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x1111111111111111111111111111111111111111"

nonce
string
required

Hex string

Pattern: ^0x[a-fA-F0-9]*$
Example:

"0xabc123"

signature
string
required

Hex string

Pattern: ^0x[a-fA-F0-9]*$
Example:

"0xabc123"

{key}
unknown

Response

Order created

success
enum<boolean>
required
Available options:
true
order
object
required