Skip to main content
POST
/
v1
/
orders
Place orders
curl --request POST \
  --url https://api.foresight.now/v1/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "orders": [
    {
      "condition_id": "<string>",
      "chain_id": 56,
      "price": "0.55",
      "size": "100",
      "salt": "<string>",
      "signer": "<string>",
      "taker": "<string>",
      "token_id": "<string>",
      "maker_amount": "<string>",
      "taker_amount": "<string>",
      "expiration": "<string>",
      "nonce": "<string>",
      "fee_rate_bps": 100,
      "signature": "<string>"
    }
  ]
}
'
{
  "results": [
    {
      "order_hash": "<string>",
      "condition_id": "<string>",
      "chain_id": 56,
      "price": "<string>",
      "size": "<string>",
      "remaining_size": "<string>",
      "fills": [
        "<unknown>"
      ],
      "book_added_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "_idempotent_replayed": true
}

Authorizations

Authorization
string
header
required

Privy-issued JWT. Required for L1 routes; accepted on L2 routes.

Headers

fs-idempotency-key
string

Optional idempotency key, scoped to the authenticated user and request body hash. Honored on POST /v1/orders only.

Body

application/json
orders
object[]
required
Required array length: 1 - 15 elements

Response

Per-order results. Mixed success/error is normal.

results
object[]

One entry per submitted order, in request order. Each item is either a success or an inline error — always inspect each.

A successfully accepted order. Always status: OPEN at POST time — matching is asynchronous and transitions arrive on the user WebSocket channel.

_idempotent_replayed
boolean

Present and true only when an fs-idempotency-key replayed a cached result.