curl --request POST \
--url https://calibri.io/api/v2/atlas/account/positions/merges \
--header 'Content-Type: application/json' \
--header 'X-Auth-Apikey: <api-key>' \
--data '
{
"amount": "100",
"market_id": 14738
}
'import requests
url = "https://calibri.io/api/v2/atlas/account/positions/merges"
payload = {
"amount": "100",
"market_id": 14738
}
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({amount: '100', market_id: 14738})
};
fetch('https://calibri.io/api/v2/atlas/account/positions/merges', 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/positions/merges",
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([
'amount' => '100',
'market_id' => 14738
]),
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/positions/merges"
payload := strings.NewReader("{\n \"amount\": \"100\",\n \"market_id\": 14738\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/positions/merges")
.header("X-Auth-Apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"100\",\n \"market_id\": 14738\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://calibri.io/api/v2/atlas/account/positions/merges")
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 \"amount\": \"100\",\n \"market_id\": 14738\n}"
response = http.request(request)
puts response.read_body{
"booked_at": "2026-11-29T10:01:12Z",
"created_at": "2026-11-29T10:00:00Z",
"custody": "self",
"failure_reason": null,
"id": 311,
"kind": "merge",
"market": {
"event_slug": "btc-updown-5m-1730",
"event_title": "Bitcoin Up or Down 5m",
"id": 14738,
"outcome_labels": [
"Yes",
"No"
],
"title": "Will BTC close above its open?"
},
"market_id": 14738,
"pairs": "6",
"proceeds": "6",
"realized_pnl": "0.6",
"state": "booked",
"tx_id": "0x9f2c…",
"waiting_on": null
}{
"errors": [
"market.order.insufficient_balance"
]
}{
"errors": [
"market.order.insufficient_balance"
]
}{
"errors": [
"market.order.insufficient_balance"
]
}Merge your custodial pairs
Turns amount pairs of YES and NO you hold CUSTODIALLY in one market back into the same amount of the quote currency, credited to your balance at once. A pair always pays exactly 1 at resolution, so this releases that collateral early; there is no fee and nothing moves on-chain. Only the pairs not reserved by your resting sells can be merged. For pairs in your wallet, sign a merge and relay it with POST /account/wallet/relay instead. Available to accounts that trade custodially. Refusals: 404 merge.unknown_market; 422 merge.bad_amount, merge.market_state (resolved or settling), merge.not_enough_pairs; 409 merge.inflight (a trade of yours in this market is still settling on-chain; retry shortly), merge.account_held (your account is held for review); 403 market.order.custodial_disabled.
curl --request POST \
--url https://calibri.io/api/v2/atlas/account/positions/merges \
--header 'Content-Type: application/json' \
--header 'X-Auth-Apikey: <api-key>' \
--data '
{
"amount": "100",
"market_id": 14738
}
'import requests
url = "https://calibri.io/api/v2/atlas/account/positions/merges"
payload = {
"amount": "100",
"market_id": 14738
}
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({amount: '100', market_id: 14738})
};
fetch('https://calibri.io/api/v2/atlas/account/positions/merges', 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/positions/merges",
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([
'amount' => '100',
'market_id' => 14738
]),
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/positions/merges"
payload := strings.NewReader("{\n \"amount\": \"100\",\n \"market_id\": 14738\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/positions/merges")
.header("X-Auth-Apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"100\",\n \"market_id\": 14738\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://calibri.io/api/v2/atlas/account/positions/merges")
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 \"amount\": \"100\",\n \"market_id\": 14738\n}"
response = http.request(request)
puts response.read_body{
"booked_at": "2026-11-29T10:01:12Z",
"created_at": "2026-11-29T10:00:00Z",
"custody": "self",
"failure_reason": null,
"id": 311,
"kind": "merge",
"market": {
"event_slug": "btc-updown-5m-1730",
"event_title": "Bitcoin Up or Down 5m",
"id": 14738,
"outcome_labels": [
"Yes",
"No"
],
"title": "Will BTC close above its open?"
},
"market_id": 14738,
"pairs": "6",
"proceeds": "6",
"realized_pnl": "0.6",
"state": "booked",
"tx_id": "0x9f2c…",
"waiting_on": null
}{
"errors": [
"market.order.insufficient_balance"
]
}{
"errors": [
"market.order.insufficient_balance"
]
}{
"errors": [
"market.order.insufficient_balance"
]
}Authorizations
Body
Response
Booked
Why a failed merge did nothing: the transaction reverted, was dropped, was never sent, or was replaced by another one; refused: a custodial merge Calibri refused (the request said why).
reverted, dropped, not_broadcast, superseded, refused null