Get conversion routes for a specific currency
curl --request GET \
--url https://api.request.network/v2/currencies/{currencyId}/conversion-routesimport requests
url = "https://api.request.network/v2/currencies/{currencyId}/conversion-routes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.request.network/v2/currencies/{currencyId}/conversion-routes', 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.request.network/v2/currencies/{currencyId}/conversion-routes",
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.request.network/v2/currencies/{currencyId}/conversion-routes"
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.request.network/v2/currencies/{currencyId}/conversion-routes")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.request.network/v2/currencies/{currencyId}/conversion-routes")
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{
"currencyId": "USD",
"network": "mainnet",
"conversionRoutes": [
{
"id": "USDT-mainnet",
"name": "Tether USD",
"symbol": "USDT",
"decimals": 6,
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"network": "mainnet",
"type": "ERC20",
"hash": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"chainId": 1
},
{
"id": "ETH-mainnet",
"name": "Ether",
"symbol": "ETH",
"decimals": 18,
"address": "0xf5af88e117747e87fc5929f2ff87221b1447652e",
"network": "mainnet",
"type": "ETH",
"hash": "0xf5af88e117747e87fc5929f2ff87221b1447652e",
"chainId": 1
}
]
}Currencies
Get conversion routes for a specific currency
Get a list of currency objects (with all details) that can be converted to from the specified currency. Optionally filter by network using the βnetworkβ query parameter.
GET
/
v2
/
currencies
/
{currencyId}
/
conversion-routes
Get conversion routes for a specific currency
curl --request GET \
--url https://api.request.network/v2/currencies/{currencyId}/conversion-routesimport requests
url = "https://api.request.network/v2/currencies/{currencyId}/conversion-routes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.request.network/v2/currencies/{currencyId}/conversion-routes', 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.request.network/v2/currencies/{currencyId}/conversion-routes",
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.request.network/v2/currencies/{currencyId}/conversion-routes"
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.request.network/v2/currencies/{currencyId}/conversion-routes")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.request.network/v2/currencies/{currencyId}/conversion-routes")
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{
"currencyId": "USD",
"network": "mainnet",
"conversionRoutes": [
{
"id": "USDT-mainnet",
"name": "Tether USD",
"symbol": "USDT",
"decimals": 6,
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"network": "mainnet",
"type": "ERC20",
"hash": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"chainId": 1
},
{
"id": "ETH-mainnet",
"name": "Ether",
"symbol": "ETH",
"decimals": 18,
"address": "0xf5af88e117747e87fc5929f2ff87221b1447652e",
"network": "mainnet",
"type": "ETH",
"hash": "0xf5af88e117747e87fc5929f2ff87221b1447652e",
"chainId": 1
}
]
}Headers
Query Parameters
Response
Conversion routes retrieved successfully
Was this page helpful?