Order Quotes
curl --request POST \
--url https://api.coinvoyage.io/v3/orders/{order_id}/quotes \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"filter": {
"limit": 5,
"min_balance_usd": 1,
"sources": [
{
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"chain_id": 30000000000001
}
],
"wallet": {
"address": "0x1234...abcd",
"chain_ids": [
1,
8453,
137
],
"chain_type": "EVM"
}
}
}
'import requests
url = "https://api.coinvoyage.io/v3/orders/{order_id}/quotes"
payload = { "filter": {
"limit": 5,
"min_balance_usd": 1,
"sources": [
{
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"chain_id": 30000000000001
}
],
"wallet": {
"address": "0x1234...abcd",
"chain_ids": [1, 8453, 137],
"chain_type": "EVM"
}
} }
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({
filter: {
limit: 5,
min_balance_usd: 1,
sources: [
{
address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
chain_id: 30000000000001
}
],
wallet: {address: '0x1234...abcd', chain_ids: [1, 8453, 137], chain_type: 'EVM'}
}
})
};
fetch('https://api.coinvoyage.io/v3/orders/{order_id}/quotes', 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.coinvoyage.io/v3/orders/{order_id}/quotes",
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([
'filter' => [
'limit' => 5,
'min_balance_usd' => 1,
'sources' => [
[
'address' => 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
'chain_id' => 30000000000001
]
],
'wallet' => [
'address' => '0x1234...abcd',
'chain_ids' => [
1,
8453,
137
],
'chain_type' => 'EVM'
]
]
]),
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.coinvoyage.io/v3/orders/{order_id}/quotes"
payload := strings.NewReader("{\n \"filter\": {\n \"limit\": 5,\n \"min_balance_usd\": 1,\n \"sources\": [\n {\n \"address\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n \"chain_id\": 30000000000001\n }\n ],\n \"wallet\": {\n \"address\": \"0x1234...abcd\",\n \"chain_ids\": [\n 1,\n 8453,\n 137\n ],\n \"chain_type\": \"EVM\"\n }\n }\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.coinvoyage.io/v3/orders/{order_id}/quotes")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"limit\": 5,\n \"min_balance_usd\": 1,\n \"sources\": [\n {\n \"address\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n \"chain_id\": 30000000000001\n }\n ],\n \"wallet\": {\n \"address\": \"0x1234...abcd\",\n \"chain_ids\": [\n 1,\n 8453,\n 137\n ],\n \"chain_type\": \"EVM\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinvoyage.io/v3/orders/{order_id}/quotes")
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 \"filter\": {\n \"limit\": 5,\n \"min_balance_usd\": 1,\n \"sources\": [\n {\n \"address\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n \"chain_id\": 30000000000001\n }\n ],\n \"wallet\": {\n \"address\": \"0x1234...abcd\",\n \"chain_ids\": [\n 1,\n 8453,\n 137\n ],\n \"chain_type\": \"EVM\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"options": [
{
"input": {
"amount": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"balance": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"breakdown": {
"base": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"fees": {
"custom_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"protocol_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"relayer_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"total_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
}
},
"gas": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"total": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
}
},
"currency": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain_id": 1,
"decimals": 6,
"id": "1:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"name": "USD Coin",
"price_usd": 1,
"symbol": "USDC"
}
},
"issues": {
"price_impact_warning": {
"impact": 0.07,
"threshold": 0.05
}
},
"output": {
"amount": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"amount_out_minimum": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"currency": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain_id": 1,
"decimals": 6,
"id": "1:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"name": "USD Coin",
"price_usd": 1,
"symbol": "USDC"
}
},
"rank": 1
}
],
"result_type": "OK"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}orders
Order Quotes
Ranked options for paying an order: source tokens (wallet scan and/or explicit list) ranked against the order fulfillment destination, falling back to a settlement currency. EXACT_OUTPUT only.
POST
/
orders
/
{order_id}
/
quotes
Order Quotes
curl --request POST \
--url https://api.coinvoyage.io/v3/orders/{order_id}/quotes \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"filter": {
"limit": 5,
"min_balance_usd": 1,
"sources": [
{
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"chain_id": 30000000000001
}
],
"wallet": {
"address": "0x1234...abcd",
"chain_ids": [
1,
8453,
137
],
"chain_type": "EVM"
}
}
}
'import requests
url = "https://api.coinvoyage.io/v3/orders/{order_id}/quotes"
payload = { "filter": {
"limit": 5,
"min_balance_usd": 1,
"sources": [
{
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"chain_id": 30000000000001
}
],
"wallet": {
"address": "0x1234...abcd",
"chain_ids": [1, 8453, 137],
"chain_type": "EVM"
}
} }
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({
filter: {
limit: 5,
min_balance_usd: 1,
sources: [
{
address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
chain_id: 30000000000001
}
],
wallet: {address: '0x1234...abcd', chain_ids: [1, 8453, 137], chain_type: 'EVM'}
}
})
};
fetch('https://api.coinvoyage.io/v3/orders/{order_id}/quotes', 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.coinvoyage.io/v3/orders/{order_id}/quotes",
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([
'filter' => [
'limit' => 5,
'min_balance_usd' => 1,
'sources' => [
[
'address' => 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
'chain_id' => 30000000000001
]
],
'wallet' => [
'address' => '0x1234...abcd',
'chain_ids' => [
1,
8453,
137
],
'chain_type' => 'EVM'
]
]
]),
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.coinvoyage.io/v3/orders/{order_id}/quotes"
payload := strings.NewReader("{\n \"filter\": {\n \"limit\": 5,\n \"min_balance_usd\": 1,\n \"sources\": [\n {\n \"address\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n \"chain_id\": 30000000000001\n }\n ],\n \"wallet\": {\n \"address\": \"0x1234...abcd\",\n \"chain_ids\": [\n 1,\n 8453,\n 137\n ],\n \"chain_type\": \"EVM\"\n }\n }\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.coinvoyage.io/v3/orders/{order_id}/quotes")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"limit\": 5,\n \"min_balance_usd\": 1,\n \"sources\": [\n {\n \"address\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n \"chain_id\": 30000000000001\n }\n ],\n \"wallet\": {\n \"address\": \"0x1234...abcd\",\n \"chain_ids\": [\n 1,\n 8453,\n 137\n ],\n \"chain_type\": \"EVM\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinvoyage.io/v3/orders/{order_id}/quotes")
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 \"filter\": {\n \"limit\": 5,\n \"min_balance_usd\": 1,\n \"sources\": [\n {\n \"address\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n \"chain_id\": 30000000000001\n }\n ],\n \"wallet\": {\n \"address\": \"0x1234...abcd\",\n \"chain_ids\": [\n 1,\n 8453,\n 137\n ],\n \"chain_type\": \"EVM\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"options": [
{
"input": {
"amount": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"balance": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"breakdown": {
"base": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"fees": {
"custom_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"protocol_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"relayer_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"total_fee": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
}
},
"gas": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"total": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
}
},
"currency": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain_id": 1,
"decimals": 6,
"id": "1:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"name": "USD Coin",
"price_usd": 1,
"symbol": "USDC"
}
},
"issues": {
"price_impact_warning": {
"impact": 0.07,
"threshold": 0.05
}
},
"output": {
"amount": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"amount_out_minimum": {
"raw": "100000000",
"ui": "100.0",
"value_usd": 100
},
"currency": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain_id": 1,
"decimals": 6,
"id": "1:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"name": "USD Coin",
"price_usd": 1,
"symbol": "USDC"
}
},
"rank": 1
}
],
"result_type": "OK"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"code": 400,
"error": "Bad Request",
"message": "Invalid request parameters"
}Authorizations
Headers
API key for authentication
Path Parameters
Body
application/json
Show child attributes
Show child attributes
Example:
{
"limit": 5,
"min_balance_usd": 1,
"sources": [
{
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"chain_id": 30000000000001
}
],
"wallet": {
"address": "0x1234...abcd",
"chain_ids": [1, 8453, 137],
"chain_type": "EVM"
}
}
Response
Ranked options (best→worst)
Was this page helpful?
⌘I