curl --request POST \
--url https://calibri.io/api/v2/atlas/account/orders/{id}/replace \
--header 'Content-Type: application/json' \
--header 'X-Auth-Apikey: <api-key>' \
--data '
{
"market_id": 12,
"ord_type": "limit",
"side": "yes",
"signed_order": {
"expiration": "1797600000",
"fee_rate_bps": "0",
"maker": "0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD",
"maker_amount": "60000000",
"nonce": "0",
"salt": "5821094412",
"side": 0,
"signature": "0x4f2a…",
"signature_type": 2,
"signer": "0xE1188438C85C98aADFf1a88f97764E607B4978C3",
"taker": "0x0000000000000000000000000000000000000000",
"taker_amount": "100000000",
"token_id": "7138104..."
},
"volume": "100",
"client_order_id": "bot-7f3a-0001",
"direction": "buy",
"ioc": false,
"post_only": false,
"price": "0.6"
}
'import requests
url = "https://calibri.io/api/v2/atlas/account/orders/{id}/replace"
payload = {
"market_id": 12,
"ord_type": "limit",
"side": "yes",
"signed_order": {
"expiration": "1797600000",
"fee_rate_bps": "0",
"maker": "0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD",
"maker_amount": "60000000",
"nonce": "0",
"salt": "5821094412",
"side": 0,
"signature": "0x4f2a…",
"signature_type": 2,
"signer": "0xE1188438C85C98aADFf1a88f97764E607B4978C3",
"taker": "0x0000000000000000000000000000000000000000",
"taker_amount": "100000000",
"token_id": "7138104..."
},
"volume": "100",
"client_order_id": "bot-7f3a-0001",
"direction": "buy",
"ioc": False,
"post_only": False,
"price": "0.6"
}
headers = {
"X-Auth-Apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Apikey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
market_id: 12,
ord_type: 'limit',
side: 'yes',
signed_order: {
expiration: '1797600000',
fee_rate_bps: '0',
maker: '0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD',
maker_amount: '60000000',
nonce: '0',
salt: '5821094412',
side: 0,
signature: '0x4f2a…',
signature_type: 2,
signer: '0xE1188438C85C98aADFf1a88f97764E607B4978C3',
taker: '0x0000000000000000000000000000000000000000',
taker_amount: '100000000',
token_id: '7138104...'
},
volume: '100',
client_order_id: 'bot-7f3a-0001',
direction: 'buy',
ioc: false,
post_only: false,
price: '0.6'
})
};
fetch('https://calibri.io/api/v2/atlas/account/orders/{id}/replace', 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://calibri.io/api/v2/atlas/account/orders/{id}/replace",
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([
'market_id' => 12,
'ord_type' => 'limit',
'side' => 'yes',
'signed_order' => [
'expiration' => '1797600000',
'fee_rate_bps' => '0',
'maker' => '0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD',
'maker_amount' => '60000000',
'nonce' => '0',
'salt' => '5821094412',
'side' => 0,
'signature' => '0x4f2a…',
'signature_type' => 2,
'signer' => '0xE1188438C85C98aADFf1a88f97764E607B4978C3',
'taker' => '0x0000000000000000000000000000000000000000',
'taker_amount' => '100000000',
'token_id' => '7138104...'
],
'volume' => '100',
'client_order_id' => 'bot-7f3a-0001',
'direction' => 'buy',
'ioc' => false,
'post_only' => false,
'price' => '0.6'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Apikey: <api-key>"
],
]);
$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://calibri.io/api/v2/atlas/account/orders/{id}/replace"
payload := strings.NewReader("{\n \"market_id\": 12,\n \"ord_type\": \"limit\",\n \"side\": \"yes\",\n \"signed_order\": {\n \"expiration\": \"1797600000\",\n \"fee_rate_bps\": \"0\",\n \"maker\": \"0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD\",\n \"maker_amount\": \"60000000\",\n \"nonce\": \"0\",\n \"salt\": \"5821094412\",\n \"side\": 0,\n \"signature\": \"0x4f2a…\",\n \"signature_type\": 2,\n \"signer\": \"0xE1188438C85C98aADFf1a88f97764E607B4978C3\",\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"taker_amount\": \"100000000\",\n \"token_id\": \"7138104...\"\n },\n \"volume\": \"100\",\n \"client_order_id\": \"bot-7f3a-0001\",\n \"direction\": \"buy\",\n \"ioc\": false,\n \"post_only\": false,\n \"price\": \"0.6\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Auth-Apikey", "<api-key>")
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://calibri.io/api/v2/atlas/account/orders/{id}/replace")
.header("X-Auth-Apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"market_id\": 12,\n \"ord_type\": \"limit\",\n \"side\": \"yes\",\n \"signed_order\": {\n \"expiration\": \"1797600000\",\n \"fee_rate_bps\": \"0\",\n \"maker\": \"0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD\",\n \"maker_amount\": \"60000000\",\n \"nonce\": \"0\",\n \"salt\": \"5821094412\",\n \"side\": 0,\n \"signature\": \"0x4f2a…\",\n \"signature_type\": 2,\n \"signer\": \"0xE1188438C85C98aADFf1a88f97764E607B4978C3\",\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"taker_amount\": \"100000000\",\n \"token_id\": \"7138104...\"\n },\n \"volume\": \"100\",\n \"client_order_id\": \"bot-7f3a-0001\",\n \"direction\": \"buy\",\n \"ioc\": false,\n \"post_only\": false,\n \"price\": \"0.6\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://calibri.io/api/v2/atlas/account/orders/{id}/replace")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Auth-Apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"market_id\": 12,\n \"ord_type\": \"limit\",\n \"side\": \"yes\",\n \"signed_order\": {\n \"expiration\": \"1797600000\",\n \"fee_rate_bps\": \"0\",\n \"maker\": \"0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD\",\n \"maker_amount\": \"60000000\",\n \"nonce\": \"0\",\n \"salt\": \"5821094412\",\n \"side\": 0,\n \"signature\": \"0x4f2a…\",\n \"signature_type\": 2,\n \"signer\": \"0xE1188438C85C98aADFf1a88f97764E607B4978C3\",\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"taker_amount\": \"100000000\",\n \"token_id\": \"7138104...\"\n },\n \"volume\": \"100\",\n \"client_order_id\": \"bot-7f3a-0001\",\n \"direction\": \"buy\",\n \"ioc\": false,\n \"post_only\": false,\n \"price\": \"0.6\"\n}"
response = http.request(request)
puts response.read_body{
"avg_price": "0.61",
"client_order_id": "bot-7f3a-0001",
"contracts_count": 1,
"created_at": "2026-08-07T10:00:00Z",
"direction": "buy",
"event_slug": "btc-above-70k-december-2026",
"expires_at": "2026-08-07T11:00:00Z",
"fee": "0.17",
"filled_cost": "36.6",
"filled_volume": "60",
"id": 90311,
"ioc": false,
"locked": "24.68",
"market_id": 12,
"market_title": "Will BTC close above $70,000 on 31 Dec 2026?",
"ord_type": "limit",
"origin_locked": "61.68",
"origin_volume": "100",
"post_only": false,
"price": "0.6",
"quote_currency": "usdc",
"remaining_volume": "40",
"replaced_order_id": 90310,
"side": "yes",
"state": "wait",
"token_id": "52114319501245915516055106046884209969926127482827954674443846427813813222426",
"updated_at": "2026-08-07T10:05:00Z",
"volume": "40"
}{
"errors": [
"market.order.insufficient_balance"
]
}{
"errors": [
"market.order.insufficient_balance"
]
}Replace a signed order
Cancels an open order, then places a new signed order in its place. These are two steps, not one transaction: once the old order is cancelled it cannot fill, but the new order can still be refused. The body is exactly the body of POST /account/orders, with a fresh signed_order, and must be for the same market (422 order.replace_market_mismatch). The new order is validated in full before the old one is touched, so a rejected replacement leaves the old order resting. An old order that is no longer open (filled or cancelled) answers 409 order.not_open and nothing is placed. On success the response is the new order, as POST /account/orders returns it, plus replaced_order_id. If the old order was cancelled but the new one was then rejected, the error body also carries replaced_order_id: the old order is gone and nothing replaced it. Counts as one order against the order-placement rate limit.
curl --request POST \
--url https://calibri.io/api/v2/atlas/account/orders/{id}/replace \
--header 'Content-Type: application/json' \
--header 'X-Auth-Apikey: <api-key>' \
--data '
{
"market_id": 12,
"ord_type": "limit",
"side": "yes",
"signed_order": {
"expiration": "1797600000",
"fee_rate_bps": "0",
"maker": "0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD",
"maker_amount": "60000000",
"nonce": "0",
"salt": "5821094412",
"side": 0,
"signature": "0x4f2a…",
"signature_type": 2,
"signer": "0xE1188438C85C98aADFf1a88f97764E607B4978C3",
"taker": "0x0000000000000000000000000000000000000000",
"taker_amount": "100000000",
"token_id": "7138104..."
},
"volume": "100",
"client_order_id": "bot-7f3a-0001",
"direction": "buy",
"ioc": false,
"post_only": false,
"price": "0.6"
}
'import requests
url = "https://calibri.io/api/v2/atlas/account/orders/{id}/replace"
payload = {
"market_id": 12,
"ord_type": "limit",
"side": "yes",
"signed_order": {
"expiration": "1797600000",
"fee_rate_bps": "0",
"maker": "0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD",
"maker_amount": "60000000",
"nonce": "0",
"salt": "5821094412",
"side": 0,
"signature": "0x4f2a…",
"signature_type": 2,
"signer": "0xE1188438C85C98aADFf1a88f97764E607B4978C3",
"taker": "0x0000000000000000000000000000000000000000",
"taker_amount": "100000000",
"token_id": "7138104..."
},
"volume": "100",
"client_order_id": "bot-7f3a-0001",
"direction": "buy",
"ioc": False,
"post_only": False,
"price": "0.6"
}
headers = {
"X-Auth-Apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Apikey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
market_id: 12,
ord_type: 'limit',
side: 'yes',
signed_order: {
expiration: '1797600000',
fee_rate_bps: '0',
maker: '0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD',
maker_amount: '60000000',
nonce: '0',
salt: '5821094412',
side: 0,
signature: '0x4f2a…',
signature_type: 2,
signer: '0xE1188438C85C98aADFf1a88f97764E607B4978C3',
taker: '0x0000000000000000000000000000000000000000',
taker_amount: '100000000',
token_id: '7138104...'
},
volume: '100',
client_order_id: 'bot-7f3a-0001',
direction: 'buy',
ioc: false,
post_only: false,
price: '0.6'
})
};
fetch('https://calibri.io/api/v2/atlas/account/orders/{id}/replace', 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://calibri.io/api/v2/atlas/account/orders/{id}/replace",
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([
'market_id' => 12,
'ord_type' => 'limit',
'side' => 'yes',
'signed_order' => [
'expiration' => '1797600000',
'fee_rate_bps' => '0',
'maker' => '0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD',
'maker_amount' => '60000000',
'nonce' => '0',
'salt' => '5821094412',
'side' => 0,
'signature' => '0x4f2a…',
'signature_type' => 2,
'signer' => '0xE1188438C85C98aADFf1a88f97764E607B4978C3',
'taker' => '0x0000000000000000000000000000000000000000',
'taker_amount' => '100000000',
'token_id' => '7138104...'
],
'volume' => '100',
'client_order_id' => 'bot-7f3a-0001',
'direction' => 'buy',
'ioc' => false,
'post_only' => false,
'price' => '0.6'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Apikey: <api-key>"
],
]);
$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://calibri.io/api/v2/atlas/account/orders/{id}/replace"
payload := strings.NewReader("{\n \"market_id\": 12,\n \"ord_type\": \"limit\",\n \"side\": \"yes\",\n \"signed_order\": {\n \"expiration\": \"1797600000\",\n \"fee_rate_bps\": \"0\",\n \"maker\": \"0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD\",\n \"maker_amount\": \"60000000\",\n \"nonce\": \"0\",\n \"salt\": \"5821094412\",\n \"side\": 0,\n \"signature\": \"0x4f2a…\",\n \"signature_type\": 2,\n \"signer\": \"0xE1188438C85C98aADFf1a88f97764E607B4978C3\",\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"taker_amount\": \"100000000\",\n \"token_id\": \"7138104...\"\n },\n \"volume\": \"100\",\n \"client_order_id\": \"bot-7f3a-0001\",\n \"direction\": \"buy\",\n \"ioc\": false,\n \"post_only\": false,\n \"price\": \"0.6\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Auth-Apikey", "<api-key>")
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://calibri.io/api/v2/atlas/account/orders/{id}/replace")
.header("X-Auth-Apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"market_id\": 12,\n \"ord_type\": \"limit\",\n \"side\": \"yes\",\n \"signed_order\": {\n \"expiration\": \"1797600000\",\n \"fee_rate_bps\": \"0\",\n \"maker\": \"0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD\",\n \"maker_amount\": \"60000000\",\n \"nonce\": \"0\",\n \"salt\": \"5821094412\",\n \"side\": 0,\n \"signature\": \"0x4f2a…\",\n \"signature_type\": 2,\n \"signer\": \"0xE1188438C85C98aADFf1a88f97764E607B4978C3\",\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"taker_amount\": \"100000000\",\n \"token_id\": \"7138104...\"\n },\n \"volume\": \"100\",\n \"client_order_id\": \"bot-7f3a-0001\",\n \"direction\": \"buy\",\n \"ioc\": false,\n \"post_only\": false,\n \"price\": \"0.6\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://calibri.io/api/v2/atlas/account/orders/{id}/replace")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Auth-Apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"market_id\": 12,\n \"ord_type\": \"limit\",\n \"side\": \"yes\",\n \"signed_order\": {\n \"expiration\": \"1797600000\",\n \"fee_rate_bps\": \"0\",\n \"maker\": \"0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD\",\n \"maker_amount\": \"60000000\",\n \"nonce\": \"0\",\n \"salt\": \"5821094412\",\n \"side\": 0,\n \"signature\": \"0x4f2a…\",\n \"signature_type\": 2,\n \"signer\": \"0xE1188438C85C98aADFf1a88f97764E607B4978C3\",\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"taker_amount\": \"100000000\",\n \"token_id\": \"7138104...\"\n },\n \"volume\": \"100\",\n \"client_order_id\": \"bot-7f3a-0001\",\n \"direction\": \"buy\",\n \"ioc\": false,\n \"post_only\": false,\n \"price\": \"0.6\"\n}"
response = http.request(request)
puts response.read_body{
"avg_price": "0.61",
"client_order_id": "bot-7f3a-0001",
"contracts_count": 1,
"created_at": "2026-08-07T10:00:00Z",
"direction": "buy",
"event_slug": "btc-above-70k-december-2026",
"expires_at": "2026-08-07T11:00:00Z",
"fee": "0.17",
"filled_cost": "36.6",
"filled_volume": "60",
"id": 90311,
"ioc": false,
"locked": "24.68",
"market_id": 12,
"market_title": "Will BTC close above $70,000 on 31 Dec 2026?",
"ord_type": "limit",
"origin_locked": "61.68",
"origin_volume": "100",
"post_only": false,
"price": "0.6",
"quote_currency": "usdc",
"remaining_volume": "40",
"replaced_order_id": 90310,
"side": "yes",
"state": "wait",
"token_id": "52114319501245915516055106046884209969926127482827954674443846427813813222426",
"updated_at": "2026-08-07T10:05:00Z",
"volume": "40"
}{
"errors": [
"market.order.insufficient_balance"
]
}{
"errors": [
"market.order.insufficient_balance"
]
}Authorizations
Body
Your own id for this order, 1–64 characters of A-Z a-z 0-9 _ -. Echoed on the order and its websocket frames, and filterable on the order list. A second order with an id you used in the last 7 days is rejected with 409 order.duplicate_client_order_id, so a retried placement can never create two orders.
"bot-7f3a-0001"
Whether you are opening or closing. buy posts collateral and acquires the outcome; sell offers outcome tokens you already hold, so it locks INVENTORY rather than cash and its locked is zero. Defaults to buy, which is how every order behaved before position exit. See /account/positions for how much of a holding is sellable.
buy, sell "buy"
Immediate-or-cancel. Set it on a marketable order — the "market" order a signed wallet has to send as a limit at a price ceiling: whatever the book cannot fill on arrival is refunded instead of resting at that ceiling. Ignored together with post_only. Recorded on the order as ioc.
false