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>"
}
]
}
'import requests
url = "https://api.foresight.now/v1/orders"
payload = { "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>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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>'
}
]
})
};
fetch('https://api.foresight.now/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.foresight.now/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.foresight.now/v1/orders"
payload := strings.NewReader("{\n \"orders\": [\n {\n \"condition_id\": \"<string>\",\n \"chain_id\": 56,\n \"price\": \"0.55\",\n \"size\": \"100\",\n \"salt\": \"<string>\",\n \"signer\": \"<string>\",\n \"taker\": \"<string>\",\n \"token_id\": \"<string>\",\n \"maker_amount\": \"<string>\",\n \"taker_amount\": \"<string>\",\n \"expiration\": \"<string>\",\n \"nonce\": \"<string>\",\n \"fee_rate_bps\": 100,\n \"signature\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.foresight.now/v1/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orders\": [\n {\n \"condition_id\": \"<string>\",\n \"chain_id\": 56,\n \"price\": \"0.55\",\n \"size\": \"100\",\n \"salt\": \"<string>\",\n \"signer\": \"<string>\",\n \"taker\": \"<string>\",\n \"token_id\": \"<string>\",\n \"maker_amount\": \"<string>\",\n \"taker_amount\": \"<string>\",\n \"expiration\": \"<string>\",\n \"nonce\": \"<string>\",\n \"fee_rate_bps\": 100,\n \"signature\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.foresight.now/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orders\": [\n {\n \"condition_id\": \"<string>\",\n \"chain_id\": 56,\n \"price\": \"0.55\",\n \"size\": \"100\",\n \"salt\": \"<string>\",\n \"signer\": \"<string>\",\n \"taker\": \"<string>\",\n \"token_id\": \"<string>\",\n \"maker_amount\": \"<string>\",\n \"taker_amount\": \"<string>\",\n \"expiration\": \"<string>\",\n \"nonce\": \"<string>\",\n \"fee_rate_bps\": 100,\n \"signature\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"order_hash": "<string>",
"condition_id": "<string>",
"chain_id": 56,
"status": "OPEN",
"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
}{
"correlation_id": "<string>",
"code": "NOT_FOUND",
"message": "<string>",
"status_code": 404,
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/markets/0x.../book"
}{
"correlation_id": "<string>",
"code": "NOT_FOUND",
"message": "<string>",
"status_code": 404,
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/markets/0x.../book"
}Place orders
Batch-place up to 15 signed EIP-712 orders. L2, permission trade.
Matching is asynchronous: every accepted order returns status: OPEN.
Per-order rejections are returned inline in results[] — always inspect
each item. Request-level failures (batch > 15, auth) are HTTP errors.
See the Signing orders guide for the EIP-712 domain, struct, and the
integer-tick maker_amount / taker_amount math.
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>"
}
]
}
'import requests
url = "https://api.foresight.now/v1/orders"
payload = { "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>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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>'
}
]
})
};
fetch('https://api.foresight.now/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.foresight.now/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.foresight.now/v1/orders"
payload := strings.NewReader("{\n \"orders\": [\n {\n \"condition_id\": \"<string>\",\n \"chain_id\": 56,\n \"price\": \"0.55\",\n \"size\": \"100\",\n \"salt\": \"<string>\",\n \"signer\": \"<string>\",\n \"taker\": \"<string>\",\n \"token_id\": \"<string>\",\n \"maker_amount\": \"<string>\",\n \"taker_amount\": \"<string>\",\n \"expiration\": \"<string>\",\n \"nonce\": \"<string>\",\n \"fee_rate_bps\": 100,\n \"signature\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.foresight.now/v1/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orders\": [\n {\n \"condition_id\": \"<string>\",\n \"chain_id\": 56,\n \"price\": \"0.55\",\n \"size\": \"100\",\n \"salt\": \"<string>\",\n \"signer\": \"<string>\",\n \"taker\": \"<string>\",\n \"token_id\": \"<string>\",\n \"maker_amount\": \"<string>\",\n \"taker_amount\": \"<string>\",\n \"expiration\": \"<string>\",\n \"nonce\": \"<string>\",\n \"fee_rate_bps\": 100,\n \"signature\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.foresight.now/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orders\": [\n {\n \"condition_id\": \"<string>\",\n \"chain_id\": 56,\n \"price\": \"0.55\",\n \"size\": \"100\",\n \"salt\": \"<string>\",\n \"signer\": \"<string>\",\n \"taker\": \"<string>\",\n \"token_id\": \"<string>\",\n \"maker_amount\": \"<string>\",\n \"taker_amount\": \"<string>\",\n \"expiration\": \"<string>\",\n \"nonce\": \"<string>\",\n \"fee_rate_bps\": 100,\n \"signature\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"order_hash": "<string>",
"condition_id": "<string>",
"chain_id": 56,
"status": "OPEN",
"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
}{
"correlation_id": "<string>",
"code": "NOT_FOUND",
"message": "<string>",
"status_code": 404,
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/markets/0x.../book"
}{
"correlation_id": "<string>",
"code": "NOT_FOUND",
"message": "<string>",
"status_code": 404,
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/markets/0x.../book"
}Authorizations
Privy-issued JWT. Required for L1 routes; accepted on L2 routes.
Headers
Optional idempotency key, scoped to the authenticated user and request body hash. Honored on POST /v1/orders only.
Body
1 - 15 elementsShow child attributes
Show child attributes
Response
Per-order results. Mixed success/error is normal.
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.
- Option 1
- Option 2
Show child attributes
Show child attributes
Present and true only when an fs-idempotency-key replayed a cached result.