curl --request POST \
--url https://api.agg.market/execution/fill \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-app-id: <api-key>' \
--data '
{
"quoteId": "k2r8v5n1x7c4m9t3b6q0w2za"
}
'import requests
url = "https://api.agg.market/execution/fill"
payload = { "quoteId": "k2r8v5n1x7c4m9t3b6q0w2za" }
headers = {
"x-app-id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-app-id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({quoteId: 'k2r8v5n1x7c4m9t3b6q0w2za'})
};
fetch('https://api.agg.market/execution/fill', 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.agg.market/execution/fill",
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([
'quoteId' => 'k2r8v5n1x7c4m9t3b6q0w2za'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-app-id: <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://api.agg.market/execution/fill"
payload := strings.NewReader("{\n \"quoteId\": \"k2r8v5n1x7c4m9t3b6q0w2za\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-app-id", "<api-key>")
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.agg.market/execution/fill")
.header("x-app-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quoteId\": \"k2r8v5n1x7c4m9t3b6q0w2za\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/execution/fill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quoteId\": \"k2r8v5n1x7c4m9t3b6q0w2za\"\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "k2r8v5n1x7c4m9t3b6q0w2za",
"orderIds": [
"cmf3r1a2b00c4mw0lq8y7e3uj",
"cmf3r1a3c00c5mw0lt2k9w6nd"
],
"status": "pending"
}{
"message": "<string>",
"code": "quote_not_found"
}{
"message": "<string>"
}{
"message": "<string>",
"code": "geo_blocked"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"statusCode": 429,
"code": "rate_limited",
"retryAfter": 2
}Execute quote
Accepts a previously quoted smart-route quote and returns pending order IDs for the submitted fill execution.
curl --request POST \
--url https://api.agg.market/execution/fill \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-app-id: <api-key>' \
--data '
{
"quoteId": "k2r8v5n1x7c4m9t3b6q0w2za"
}
'import requests
url = "https://api.agg.market/execution/fill"
payload = { "quoteId": "k2r8v5n1x7c4m9t3b6q0w2za" }
headers = {
"x-app-id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-app-id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({quoteId: 'k2r8v5n1x7c4m9t3b6q0w2za'})
};
fetch('https://api.agg.market/execution/fill', 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.agg.market/execution/fill",
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([
'quoteId' => 'k2r8v5n1x7c4m9t3b6q0w2za'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-app-id: <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://api.agg.market/execution/fill"
payload := strings.NewReader("{\n \"quoteId\": \"k2r8v5n1x7c4m9t3b6q0w2za\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-app-id", "<api-key>")
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.agg.market/execution/fill")
.header("x-app-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quoteId\": \"k2r8v5n1x7c4m9t3b6q0w2za\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/execution/fill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quoteId\": \"k2r8v5n1x7c4m9t3b6q0w2za\"\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "k2r8v5n1x7c4m9t3b6q0w2za",
"orderIds": [
"cmf3r1a2b00c4mw0lq8y7e3uj",
"cmf3r1a3c00c5mw0lt2k9w6nd"
],
"status": "pending"
}{
"message": "<string>",
"code": "quote_not_found"
}{
"message": "<string>"
}{
"message": "<string>",
"code": "geo_blocked"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"statusCode": 429,
"code": "rate_limited",
"retryAfter": 2
}Integration guide
- Before you call: Read quote prices, expiry, fees, and warnings.
- Workflow: Quote, execute, and track a trade.
- Next: Track orders to a final state.
Authorizations
Body
Idempotency key. Your own id for this trade, unique within your app. Saved on every order the quote splits into, so GET /execution/orders?externalId= returns all legs, and carried on each trades.filled webhook. Reusing it on a different quote is rejected with 409, unless the earlier fill was rejected before its orders were queued. Live mode only.
1 - 128Self-custody: other linked wallets this fill may spend from (signingAddress is always included). Order does not matter: per token, the wallet with the largest balance is used first. Omit to fund from the signing wallet only. Entries are EVM or Solana; a Solana entry only funds (the signer stays EVM) and is asked for one solana_transaction signature per bridge.
Linked funding wallet: EVM 0x-prefixed 20-byte hex, or Solana base58 (32–44 chars).
^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$Self-custody, cross-chain fills only: how the token approval a bridge needs is made. sponsored (default): the wallet does not send the approve itself; it signs a one-time EIP-7702 authorization per chain, over a raw digest (not EIP-191 or EIP-712), which many wallets cannot produce. user_broadcast: the user sends the approve transaction from their wallet and pays its gas, on every bridge. Pick based on what the wallet software supports. Neither mode makes bridging free: quote with deepEstimate and read feeBreakdown.bridgeFees and feeBreakdown.setupCosts.
sponsored, user_broadcast Self-custody buys, sponsored approvals only. true: if the funding wallet is EIP-7702 delegated to another application on the source chain, ask it for an eip7702_authorization that replaces that delegation instead of failing the fill. The previous delegation stops working on that chain until the user sets it again. Only send this for wallets whose owner has accepted that. Rejected with a 400 under approveMode: "user_broadcast". Default false.
Response
200