Get assets
curl --request GET \
--url https://api.onswitch.xyz/asset \
--header 'x-service-key: <api-key>'import requests
url = "https://api.onswitch.xyz/asset"
headers = {"x-service-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-service-key': '<api-key>'}};
fetch('https://api.onswitch.xyz/asset', 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.onswitch.xyz/asset",
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-service-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.onswitch.xyz/asset"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-service-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.onswitch.xyz/asset")
.header("x-service-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onswitch.xyz/asset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-service-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Assets fetched successfully",
"timestamp": "2026-04-18T14:22:08.631Z",
"data": [
{
"id": "base:usdc",
"name": "USD Coin",
"code": "USDC",
"decimals": 6,
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"blockchain": {
"id": 8453,
"name": "Base"
},
"offramp_supported": true,
"onramp_supported": true,
"swap_supported": true,
"wallet_supported": true
},
{
"id": "ethereum:usdc",
"name": "USD Coin",
"code": "USDC",
"decimals": 6,
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"blockchain": {
"id": 1,
"name": "Ethereum"
},
"offramp_supported": true,
"onramp_supported": true,
"swap_supported": true,
"wallet_supported": true
}
],
"status": 200
}Get assets
Retrieve a list of all supported stablecoin assets.
GET
/
asset
Get assets
curl --request GET \
--url https://api.onswitch.xyz/asset \
--header 'x-service-key: <api-key>'import requests
url = "https://api.onswitch.xyz/asset"
headers = {"x-service-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-service-key': '<api-key>'}};
fetch('https://api.onswitch.xyz/asset', 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.onswitch.xyz/asset",
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-service-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.onswitch.xyz/asset"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-service-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.onswitch.xyz/asset")
.header("x-service-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onswitch.xyz/asset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-service-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Assets fetched successfully",
"timestamp": "2026-04-18T14:22:08.631Z",
"data": [
{
"id": "base:usdc",
"name": "USD Coin",
"code": "USDC",
"decimals": 6,
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"blockchain": {
"id": 8453,
"name": "Base"
},
"offramp_supported": true,
"onramp_supported": true,
"swap_supported": true,
"wallet_supported": true
},
{
"id": "ethereum:usdc",
"name": "USD Coin",
"code": "USDC",
"decimals": 6,
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"blockchain": {
"id": 1,
"name": "Ethereum"
},
"offramp_supported": true,
"onramp_supported": true,
"swap_supported": true,
"wallet_supported": true
}
],
"status": 200
}Authorizations
Service key for API authentication
Response
200 - application/json
Successfully retrieved assets
Hide child attributes
Hide child attributes
⌘I