curl --request GET \
--url https://api.velora.xyz/pricesimport requests
url = "https://api.velora.xyz/prices"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.velora.xyz/prices', 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.velora.xyz/prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.velora.xyz/prices"
req, _ := http.NewRequest("GET", url, nil)
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.velora.xyz/prices")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velora.xyz/prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"priceRoute": {
"blockNumber": 123,
"network": 1,
"srcToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"srcDecimals": 123,
"srcAmount": "1000000000000000000",
"destToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"destDecimals": 123,
"destAmount": "1000000000000000000",
"bestRoute": [
{}
],
"gasCostUSD": "<string>",
"gasCost": "<string>",
"side": "SELL",
"version": "<string>",
"contractAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"tokenTransferProxy": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"contractMethod": "<string>",
"partnerFee": 123,
"srcUSD": "<string>",
"destUSD": "<string>",
"partner": "<string>",
"maxImpactReached": true,
"hmac": "<string>"
}
}{
"errorType": "PricingError",
"details": "Error getting price data"
}{
"errorType": "PricingError",
"details": "Error getting price data"
}{
"errorType": "PricingError",
"details": "Error getting price data"
}Get Market price route
Get a Market route from the Velora aggregator.
curl --request GET \
--url https://api.velora.xyz/pricesimport requests
url = "https://api.velora.xyz/prices"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.velora.xyz/prices', 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.velora.xyz/prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.velora.xyz/prices"
req, _ := http.NewRequest("GET", url, nil)
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.velora.xyz/prices")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velora.xyz/prices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"priceRoute": {
"blockNumber": 123,
"network": 1,
"srcToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"srcDecimals": 123,
"srcAmount": "1000000000000000000",
"destToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"destDecimals": 123,
"destAmount": "1000000000000000000",
"bestRoute": [
{}
],
"gasCostUSD": "<string>",
"gasCost": "<string>",
"side": "SELL",
"version": "<string>",
"contractAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"tokenTransferProxy": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"contractMethod": "<string>",
"partnerFee": 123,
"srcUSD": "<string>",
"destUSD": "<string>",
"partner": "<string>",
"maxImpactReached": true,
"hmac": "<string>"
}
}{
"errorType": "PricingError",
"details": "Error getting price data"
}{
"errorType": "PricingError",
"details": "Error getting price data"
}{
"errorType": "PricingError",
"details": "Error getting price data"
}GET /v2/quote with mode=ALL; see
Trading modes.Query Parameters
Source token address. A token symbol listed in /tokens can be used instead. Example uses ETH.
EVM address (20 bytes, hex-encoded with 0x prefix). Use the mixed-case placeholder 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH.
^0x[a-fA-F0-9]{40}$"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Destination token address. A token symbol listed in /tokens can be used instead. Example uses USDC.
EVM address (20 bytes, hex-encoded with 0x prefix). Use the mixed-case placeholder 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH.
^0x[a-fA-F0-9]{40}$"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
EVM chain ID. Default: 1 (Mainnet). Market uses network for this parameter; Delta uses chainId — both are EVM chain IDs.
EVM chain ID. Supported values today include 1 (Mainnet), 10 (Optimism), 56 (BSC), 137 (Polygon), 8453 (Base), 42161 (Arbitrum), 43114 (Avalanche), 100 (Gnosis). The set is open — call GET /chains for the live list.
1
Receiver wallet address. Omit when swapping from/to the same account.
EVM address (20 bytes, hex-encoded with 0x prefix). Use the mixed-case placeholder 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH.
^0x[a-fA-F0-9]{40}$"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"