Get a swap quote
Deprecated — use POST /v1/order/swap without signer. This endpoint keeps its original response body so existing integrators keep working; it is not removed.
Deprecated — use POST /v1/order/swap without signer, which returns the same object as quoteResponse from the same engine. Kept, shape unchanged, until integrators have migrated.
Quotes a swap against the current registered maker books and returns what the taker will pay and receive, the effective mode, the price impact, and the fees.
The swapMode parameter controls how the size value is interpreted:
- Omitted (default):
sizeis always in base tokens. MaxAmountIn:sizeis the maximum input amount (buy → quote tokens, sell → base tokens).MinAmountOut:sizeis the minimum output amount (buy → base tokens, sell → quote tokens).
The quote runs the same matching engine, over the same registered maker books in the same order, that POST /v1/orders/build uses — a mirror of the on-chain matching engine — so the quoted amounts are what the built transaction executes. A size the book cannot cover is refused with INSUFFICIENT_LIQUIDITY, exactly as the build endpoint refuses it; the error carries the size that could be filled.
curl --request GET \
--url https://api.archer.exchange/v1/quote \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.archer.exchange/v1/quote"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.archer.exchange/v1/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.archer.exchange/v1/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.archer.exchange/v1/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.archer.exchange/v1/quote")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archer.exchange/v1/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"archerEstimatedBaseSize": "<string>",
"archerEstimatedQuoteSize": "<string>",
"archerEstimatedTotal": "<string>",
"archerPrice": "<string>",
"bpsDiff": "<string>",
"bpsLabel": "<string>",
"expiresAt": 123,
"fullyFilled": true,
"jupiterEstimatedTotal": "<string>",
"jupiterPrice": "<string>",
"maxFillableInput": "<string>"
}Authorizations
Query Parameters
Base58-encoded market address.
Trade side.
buy, sell, bid, ask Amount to trade (decimal string). Interpretation depends on swapMode.
Maximum allowed slippage in basis points (1 bps = 0.01%).
x >= 0Controls how size is interpreted. When omitted, size is always in base tokens.
MaxAmountIn, MinAmountOut Wallet that will sign the swap. When given, maker books it owns or is delegated on are excluded from the quote, exactly as the program excludes them from the fill. Omit for a wallet with no book on this market.
Response
The quote.
Legacy body of the deprecated GET /v1/quote, unchanged from what production has always served. The jupiter* / bps* fields are vestigial — the Jupiter comparison was stubbed out long before this, so they are constants — and expiresAt is always 0, since a quote reserves nothing. New integrations should use POST /v1/order/swap without signer, which returns QuoteResponse.
Base tokens that would trade.
Quote tokens that would trade, before fees.
Quote tokens the taker pays or receives, fees included.
Average execution price, quote per base.
Always "0.0". Vestigial.
Always "archer". Vestigial.
Always 0.
Always true: a request the book cannot cover is refused with INSUFFICIENT_LIQUIDITY rather than quoted short.
Always "0" at the quote's decimals. Vestigial.
Always "0" at the quote's decimals. Vestigial.
Echoes the requested size, since a quote that returns at all filled completely.
curl --request GET \
--url https://api.archer.exchange/v1/quote \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.archer.exchange/v1/quote"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.archer.exchange/v1/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.archer.exchange/v1/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.archer.exchange/v1/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.archer.exchange/v1/quote")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archer.exchange/v1/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"archerEstimatedBaseSize": "<string>",
"archerEstimatedQuoteSize": "<string>",
"archerEstimatedTotal": "<string>",
"archerPrice": "<string>",
"bpsDiff": "<string>",
"bpsLabel": "<string>",
"expiresAt": 123,
"fullyFilled": true,
"jupiterEstimatedTotal": "<string>",
"jupiterPrice": "<string>",
"maxFillableInput": "<string>"
}