curl --request POST \
--url https://calibri.io/api/v2/atlas/account/wallet/relay \
--header 'Content-Type: application/json' \
--header 'X-Auth-Apikey: <api-key>' \
--data '
{
"data": "0x095ea7b3…",
"safe": "0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD",
"signature": "0x7b21…",
"to": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"nonce": "3",
"operation": 0,
"quote_id": "6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f",
"value": "0"
}
'import requests
url = "https://calibri.io/api/v2/atlas/account/wallet/relay"
payload = {
"data": "0x095ea7b3…",
"safe": "0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD",
"signature": "0x7b21…",
"to": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"nonce": "3",
"operation": 0,
"quote_id": "6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f",
"value": "0"
}
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({
data: '0x095ea7b3…',
safe: '0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD',
signature: '0x7b21…',
to: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
nonce: '3',
operation: 0,
quote_id: '6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f',
value: '0'
})
};
fetch('https://calibri.io/api/v2/atlas/account/wallet/relay', 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/wallet/relay",
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([
'data' => '0x095ea7b3…',
'safe' => '0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD',
'signature' => '0x7b21…',
'to' => '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
'nonce' => '3',
'operation' => 0,
'quote_id' => '6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f',
'value' => '0'
]),
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/wallet/relay"
payload := strings.NewReader("{\n \"data\": \"0x095ea7b3…\",\n \"safe\": \"0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD\",\n \"signature\": \"0x7b21…\",\n \"to\": \"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\",\n \"nonce\": \"3\",\n \"operation\": 0,\n \"quote_id\": \"6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f\",\n \"value\": \"0\"\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/wallet/relay")
.header("X-Auth-Apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": \"0x095ea7b3…\",\n \"safe\": \"0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD\",\n \"signature\": \"0x7b21…\",\n \"to\": \"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\",\n \"nonce\": \"3\",\n \"operation\": 0,\n \"quote_id\": \"6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f\",\n \"value\": \"0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://calibri.io/api/v2/atlas/account/wallet/relay")
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 \"data\": \"0x095ea7b3…\",\n \"safe\": \"0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD\",\n \"signature\": \"0x7b21…\",\n \"to\": \"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\",\n \"nonce\": \"3\",\n \"operation\": 0,\n \"quote_id\": \"6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f\",\n \"value\": \"0\"\n}"
response = http.request(request)
puts response.read_body{
"relay_id": "1842",
"state": "pending",
"tx": "0x7d1e…",
"merge": {
"id": 311,
"state": "submitted"
},
"status": "mined"
}{
"relay_id": "1842",
"state": "pending",
"tx": "0x7d1e…",
"merge": {
"id": 311,
"state": "submitted"
},
"status": "mined"
}{
"errors": [
"market.order.insufficient_balance"
]
}{
"errors": [
"market.order.insufficient_balance"
]
}Relay a Safe transaction
Gasless relay for a Safe transaction you have signed — setup approvals, redeeming winnings, or moving USDC out. Refused with 422 and a code: a withdrawal to another network (a Circle burn) is relayed only with the quote_id it was priced under (bridge_quote_required); a MultiSend batch may not contain token transfers or approvals to Circle, so send a USDC transfer as a single call (bridge_quote_required); DELEGATECALL is accepted only to the MultiSend contract (delegatecall_not_allowed); any call that is not one Calibri sends, alone or in a MultiSend batch (relay.call_not_allowed) — the relayed calls are redeeming and transferring outcome tokens, approving the exchange or the auto-redeemer on the conditional tokens, USDC transfers to addresses outside the protocol (a community payment to the operator relays as its prepared intent) and USDC approvals to the exchange, matcher or operator, adding or removing a signing key at threshold 1 and the session-key handler on your Safe, and session-key grants and revocations; a signature over a different nonce than nonce (relay.nonce_mismatch); a wallet changed outside Calibri (a module, guard, fallback handler, implementation, owner or threshold Calibri did not set) relays only withdrawals and redemptions until support has reviewed it (wallet.modified). Merging YES and NO pairs back into USDC (mergePositions on the conditional tokens, USDC collateral, as a single call and never inside a MultiSend) is relayed only where merges are switched on, and refused with 422: merge.bad_call (a partition other than [1, 2], or an amount of zero), merge.unknown_market, merge.market_state (merges are relayed while the market is active, closed, resolving, proposed or escalated; once it is determined, claim your winnings instead) or merge.not_enough_pairs (more pairs than you hold free of resting sells and unsettled buys, less your merges still pending; max gives the most you can merge). The 200 and 202 answers to a relayed merge carry merge with its id and state. Refused with 409 when another of your transactions still confirming holds that nonce (relay.nonce_in_use) or it is already spent (relay.nonce_spent): read GET /account/wallet/nonce and sign again. Before your first deposit only changes to your Safe’s signing keys are relayed — anything else is refused with 409 wallet.deposit_required, and with 409 wallet.deploying until Calibri has created the Safe. 202 means the transaction was sent but its outcome is not known yet. The operator executes and pays the gas; it cannot act without your signature. The Safe must be your own.
curl --request POST \
--url https://calibri.io/api/v2/atlas/account/wallet/relay \
--header 'Content-Type: application/json' \
--header 'X-Auth-Apikey: <api-key>' \
--data '
{
"data": "0x095ea7b3…",
"safe": "0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD",
"signature": "0x7b21…",
"to": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"nonce": "3",
"operation": 0,
"quote_id": "6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f",
"value": "0"
}
'import requests
url = "https://calibri.io/api/v2/atlas/account/wallet/relay"
payload = {
"data": "0x095ea7b3…",
"safe": "0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD",
"signature": "0x7b21…",
"to": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"nonce": "3",
"operation": 0,
"quote_id": "6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f",
"value": "0"
}
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({
data: '0x095ea7b3…',
safe: '0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD',
signature: '0x7b21…',
to: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
nonce: '3',
operation: 0,
quote_id: '6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f',
value: '0'
})
};
fetch('https://calibri.io/api/v2/atlas/account/wallet/relay', 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/wallet/relay",
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([
'data' => '0x095ea7b3…',
'safe' => '0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD',
'signature' => '0x7b21…',
'to' => '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
'nonce' => '3',
'operation' => 0,
'quote_id' => '6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f',
'value' => '0'
]),
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/wallet/relay"
payload := strings.NewReader("{\n \"data\": \"0x095ea7b3…\",\n \"safe\": \"0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD\",\n \"signature\": \"0x7b21…\",\n \"to\": \"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\",\n \"nonce\": \"3\",\n \"operation\": 0,\n \"quote_id\": \"6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f\",\n \"value\": \"0\"\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/wallet/relay")
.header("X-Auth-Apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": \"0x095ea7b3…\",\n \"safe\": \"0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD\",\n \"signature\": \"0x7b21…\",\n \"to\": \"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\",\n \"nonce\": \"3\",\n \"operation\": 0,\n \"quote_id\": \"6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f\",\n \"value\": \"0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://calibri.io/api/v2/atlas/account/wallet/relay")
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 \"data\": \"0x095ea7b3…\",\n \"safe\": \"0x0DECE7d83f8D47CD8dD8278c0F22c361C58577BD\",\n \"signature\": \"0x7b21…\",\n \"to\": \"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\",\n \"nonce\": \"3\",\n \"operation\": 0,\n \"quote_id\": \"6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f\",\n \"value\": \"0\"\n}"
response = http.request(request)
puts response.read_body{
"relay_id": "1842",
"state": "pending",
"tx": "0x7d1e…",
"merge": {
"id": 311,
"state": "submitted"
},
"status": "mined"
}{
"relay_id": "1842",
"state": "pending",
"tx": "0x7d1e…",
"merge": {
"id": 311,
"state": "submitted"
},
"status": "mined"
}{
"errors": [
"market.order.insufficient_balance"
]
}{
"errors": [
"market.order.insufficient_balance"
]
}Authorizations
Body
Cross-chain withdrawal: the quote_id of GET /account/bridge/withdraw/quote; to / value / data / operation must be its safe_tx exactly. Required for any transaction that burns USDC over CCTP (else 422 bridge_quote_required). A quote is used once: 422 quote_used, quote_expired, quote_not_found, 409 quote_mismatch — request a new quote.
"6c1f0a52-4b1e-4f0e-9d7a-2a1b3c4d5e6f"