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>"
}{
"message": "<string>"
}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>"
}{
"message": "<string>"
}Authorizations
Your application ID. Required for all app-tier and user-tier routes.
JWT access token returned by POST /auth/verify. Required for user-tier routes.
Body
quoteId from GET /orderbook/{venueMarketOutcomeId}/route.
live (default) or paper to fill against the user's paper account.
live, paper Used only when quoteId has expired: the server fills against the user's latest quote with this same intent instead of returning 400. A different spend, mode or venue scope is a different intent and does not match.
Show child attributes
Show child attributes
Self-custody: the wallet that signs this fill. Must already be linked to the account. Omit for managed custody (the default).
42Self-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.
42Self-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 Response
200
The quote being filled. Poll GET /execution/status with it.
Orders created for the fill, including tracking orders for shares redeemed instead of sold.
Always pending: accepted, not yet executed. Poll GET /execution/status.
pending true when this quote was already accepted; the call had no new effect.
Present when a sell quote includes resolved shares that are redeemed rather than sold.
Readable note about redemption, when relevant.
Self-custody only: requests the user's wallet must sign before execution continues. Absent for managed custody. Answer them on POST /execution/fill/{quoteId}/signatures.
Show child attributes
Show child attributes