curl --request POST \
--url https://api.geodesics.ai/swap/quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"originChain": 123,
"destinationChain": 123,
"inputToken": "<string>",
"outputToken": "<string>",
"amount": "<string>",
"walletAddress": "<string>",
"recipient": "<string>",
"slippageBps": 5000
}
'import requests
url = "https://api.geodesics.ai/swap/quote"
payload = {
"originChain": 123,
"destinationChain": 123,
"inputToken": "<string>",
"outputToken": "<string>",
"amount": "<string>",
"walletAddress": "<string>",
"recipient": "<string>",
"slippageBps": 5000
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
originChain: 123,
destinationChain: 123,
inputToken: '<string>',
outputToken: '<string>',
amount: '<string>',
walletAddress: '<string>',
recipient: '<string>',
slippageBps: 5000
})
};
fetch('https://api.geodesics.ai/swap/quote', 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.geodesics.ai/swap/quote",
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([
'originChain' => 123,
'destinationChain' => 123,
'inputToken' => '<string>',
'outputToken' => '<string>',
'amount' => '<string>',
'walletAddress' => '<string>',
'recipient' => '<string>',
'slippageBps' => 5000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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.geodesics.ai/swap/quote"
payload := strings.NewReader("{\n \"originChain\": 123,\n \"destinationChain\": 123,\n \"inputToken\": \"<string>\",\n \"outputToken\": \"<string>\",\n \"amount\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"recipient\": \"<string>\",\n \"slippageBps\": 5000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://api.geodesics.ai/swap/quote")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"originChain\": 123,\n \"destinationChain\": 123,\n \"inputToken\": \"<string>\",\n \"outputToken\": \"<string>\",\n \"amount\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"recipient\": \"<string>\",\n \"slippageBps\": 5000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.geodesics.ai/swap/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"originChain\": 123,\n \"destinationChain\": 123,\n \"inputToken\": \"<string>\",\n \"outputToken\": \"<string>\",\n \"amount\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"recipient\": \"<string>\",\n \"slippageBps\": 5000\n}"
response = http.request(request)
puts response.read_body{
"geoQuoteToken": "<string>",
"origin": "evm",
"output": "<string>",
"feeBps": 1,
"expiresAt": "2023-11-07T05:31:56Z",
"feeDiscount": {
"baseFeeBps": 1,
"discountPercent": 123,
"tier": "tier1"
},
"inputUsd": "<string>",
"outputUsd": "<string>",
"priceImpactBps": 123,
"warnings": [
{
"code": "RECIPIENT_SOL_LOW",
"message": "<string>"
}
]
}Price a swap
Prices a gasless swap from the input token; fee and gas come from the input.
curl --request POST \
--url https://api.geodesics.ai/swap/quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"originChain": 123,
"destinationChain": 123,
"inputToken": "<string>",
"outputToken": "<string>",
"amount": "<string>",
"walletAddress": "<string>",
"recipient": "<string>",
"slippageBps": 5000
}
'import requests
url = "https://api.geodesics.ai/swap/quote"
payload = {
"originChain": 123,
"destinationChain": 123,
"inputToken": "<string>",
"outputToken": "<string>",
"amount": "<string>",
"walletAddress": "<string>",
"recipient": "<string>",
"slippageBps": 5000
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
originChain: 123,
destinationChain: 123,
inputToken: '<string>',
outputToken: '<string>',
amount: '<string>',
walletAddress: '<string>',
recipient: '<string>',
slippageBps: 5000
})
};
fetch('https://api.geodesics.ai/swap/quote', 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.geodesics.ai/swap/quote",
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([
'originChain' => 123,
'destinationChain' => 123,
'inputToken' => '<string>',
'outputToken' => '<string>',
'amount' => '<string>',
'walletAddress' => '<string>',
'recipient' => '<string>',
'slippageBps' => 5000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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.geodesics.ai/swap/quote"
payload := strings.NewReader("{\n \"originChain\": 123,\n \"destinationChain\": 123,\n \"inputToken\": \"<string>\",\n \"outputToken\": \"<string>\",\n \"amount\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"recipient\": \"<string>\",\n \"slippageBps\": 5000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://api.geodesics.ai/swap/quote")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"originChain\": 123,\n \"destinationChain\": 123,\n \"inputToken\": \"<string>\",\n \"outputToken\": \"<string>\",\n \"amount\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"recipient\": \"<string>\",\n \"slippageBps\": 5000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.geodesics.ai/swap/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"originChain\": 123,\n \"destinationChain\": 123,\n \"inputToken\": \"<string>\",\n \"outputToken\": \"<string>\",\n \"amount\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"recipient\": \"<string>\",\n \"slippageBps\": 5000\n}"
response = http.request(request)
puts response.read_body{
"geoQuoteToken": "<string>",
"origin": "evm",
"output": "<string>",
"feeBps": 1,
"expiresAt": "2023-11-07T05:31:56Z",
"feeDiscount": {
"baseFeeBps": 1,
"discountPercent": 123,
"tier": "tier1"
},
"inputUsd": "<string>",
"outputUsd": "<string>",
"priceImpactBps": 123,
"warnings": [
{
"code": "RECIPIENT_SOL_LOW",
"message": "<string>"
}
]
}Authorizations
Body
Chain the swap originates from (an EVM chain or Solana).
Chain the swapped asset is delivered on (EVM or Solana).
Origin-chain token address (or native/currency id) being sold.
Destination-chain token address (or native/currency id) being bought.
Input amount in the token’s smallest unit (e.g. USDC = 6 dp).
^\d+$The agent wallet that originates the swap and signs it: the EVM address for EVM origin, or the base58 Solana address for Solana origin.
Where the output is delivered. Defaults to walletAddress; required for Solana origin.
Max slippage in basis points. Defaults per-route (tight for stables, higher for volatile).
0 <= x <= 10000Response
Default Response
Opaque sealed quote; echo verbatim to POST /swap/build-geo-op or build-solana-tx.
1Origin family, telling the client which build/submit pair to use (evm or solana).
evm, solana Estimated output amount, formatted in the destination token.
App fee applied to the input, in basis points (may be fractional).
x >= 0ISO-8601 instant after which the quote is stale.
Present when the origin wallet’s $GEO holdings earned a fee discount; feeBps already reflects the discounted value.
Show child attributes
Show child attributes
Indicative venue-priced USD value of the input amount at quote time. Omitted when USD pricing is unavailable for the pair.
Indicative venue-priced USD value of the estimated output at quote time. Omitted when USD pricing is unavailable for the pair.
All-in value change from inputUsd to outputUsd, in basis points, signed like swap UIs display impact: negative = the output is worth less than the input (includes price impact, network costs, and the app fee). Omitted when either USD value is unavailable.
Non-fatal notices about the quoted route (e.g. the Solana recipient holds too little SOL to ever swap the delivered asset back out, or a route losing an outsized share of the input value). The swap can proceed regardless.
Show child attributes
Show child attributes
