Read the public asset catalog
GET https://api.allswap.io/v2/assets lists every asset AllSwap can swap, with its chain, decimals, route groups and minimum payment, in one JSON response. It is public: no API key, no account and no sign-up. The asset IDs it returns are the ones the Partner API uses in quotes and orders.
The catalog has no prices. Quotes and orders need a Partner API key; see the Quickstart.
Fetch it with curl
curl -sS https://api.allswap.io/v2/assetsThe endpoint takes no query parameters: a query string gets a 404, so filter on your side. The whole list comes back in one response of under 100 KB.
With jq you can summarize the response and pick one entry, here USDT on Tron:
curl -sS https://api.allswap.io/v2/assets \
| jq '{version, observedAt, stale, nextCursor, assets: (.assets | length), tronUsdt: (.assets[] | select(.chainId == "tron:mainnet" and .symbol == "USDT"))}'{
"version": "live-catalog-a48aedb9fae6f641",
"observedAt": "2026-11-28T17:57:47.860595591Z",
"stale": false,
"nextCursor": null,
"assets": 346,
"tronUsdt": {
"assetId": "tron:mainnet/trc20:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"chainId": "tron:mainnet",
"decimals": 6,
"destinationGroups": [
"a",
"b"
],
"minAmountIn": "100000000",
"quotable": true,
"sourceGroups": [
"a",
"b"
],
"symbol": "USDT",
"version": 1
}
}Response fields
The response object has five fields. All of them are always present.
Scroll the table sideways to view more columns.
| Field | Type | Description |
|---|---|---|
versionrequired | string | Version identifier of the catalog. It changes when the catalog changes. |
observedAtrequired | string (UTC time) | When the list was built, in RFC 3339 UTC (ends in Z). |
stalerequired | boolean | true when the list may be out of date. |
assetsrequired | Asset[] | Every asset, at most 1000; fields below. |
nextCursorrequired | null | Always null: the list is not paged. Kept for compatibility. |
Each entry of assets[]
Scroll the table sideways to view more columns.
| Field | Type | Description |
|---|---|---|
assetIdrequired | string (CAIP-19) | Asset ID, used as fromAssetId and toAssetId in quotes and orders. |
versionrequired | integer | Version number of this asset's data. |
chainIdrequired | string (CAIP-2) | ID of the asset's chain. Recipient and refund addresses use it as their chainId. |
decimalsrequired | integer (0–77) | Decimal places, to convert between smallest units and display amounts. |
symbolrequired | string | Asset symbol. Not unique: the same symbol appears on several chains. |
quotablerequired | boolean | true exactly when sourceGroups or destinationGroups is not empty. |
sourceGroupsrequired | string[] | Route group labels in which this asset can be paid (the source of a pair). |
destinationGroupsrequired | string[] | Route group labels in which this asset can be received (the destination of a pair). |
minAmountInoptional | string | null | The platform's minimum payment in this asset as a source, in smallest units. null or absent: no minimum. |
Amounts are integer strings in the asset's smallest unit, never JSON numbers. Convert with decimals using string or BigInt arithmetic, not floating point.
Asset IDs (CAIP-19)
An assetId follows CAIP-19: <chainId>/<namespace>:<reference>. The part before the first / is the chain and always equals the entry's chainId. Split on that first /, not on :, because the chain ID contains a colon itself.
Chain IDs follow CAIP-2: eip155:<chain id> for EVM chains (eip155:1 is Ethereum), bip122:<genesis hash prefix> for Bitcoin-style chains, and names such as tron:mainnet, ton:mainnet, near:mainnet and ripple:0 for the others. The namespace says what kind of asset it is:
Scroll the table sideways to view more columns.
| Namespace | Reference | Example |
|---|---|---|
slip44 | A chain's native coin; the reference is its SLIP-44 coin type (60 for ETH). | eip155:1/slip44:60 |
erc20 | A token on an EVM chain; the reference is the token contract address. | eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7 |
trc20 | A token on Tron; the reference is the token contract address. | tron:mainnet/trc20:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t |
spl | A token on Solana; the reference is the mint address. | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/spl:Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB |
jetton | A token on TON; the reference is the jetton master address. | ton:mainnet/jetton:EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs |
nep141 | A token on NEAR; the reference is the token contract account. | near:mainnet/nep141:usdt.tether-token.near |
When this guide was written, every entry used one of these six namespaces. Pass asset IDs back exactly as you received them.
List assets in TypeScript
This script uses only the built-in fetch. It prints every USDT entry with its asset ID split into parts, the assets that have a minimum payment, and whether USDT on Tron and BTC can form a pair.
// Fields as defined by the AssetsResponse and Asset schemas
interface Asset {
assetId: string;
version: number;
chainId: string;
decimals: number;
symbol: string;
quotable: boolean;
sourceGroups: string[];
destinationGroups: string[];
minAmountIn?: string | null;
}
interface AssetsResponse {
version: string;
observedAt: string;
stale: boolean;
assets: Asset[];
nextCursor: null;
}
// CAIP-19: <chainId>/<assetNamespace>:<assetReference>
function splitAssetId(assetId: string) {
const slash = assetId.indexOf("/");
const chain = assetId.slice(0, slash);
const asset = assetId.slice(slash + 1);
const colon = asset.indexOf(":");
return { chain, namespace: asset.slice(0, colon), reference: asset.slice(colon + 1) };
}
// Smallest units to a display amount, without floating point
function formatUnits(amount: string, decimals: number) {
const padded = amount.padStart(decimals + 1, "0");
const whole = padded.slice(0, padded.length - decimals);
const fraction = padded.slice(padded.length - decimals).replace(/0+$/, "");
return fraction ? `${whole}.${fraction}` : whole;
}
// A source and a destination can form a pair only when their groups share a label
function canPair(from: Asset, to: Asset) {
return from.sourceGroups.some((group) => to.destinationGroups.includes(group));
}
const res = await fetch("https://api.allswap.io/v2/assets");
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const catalog = (await res.json()) as AssetsResponse;
console.log(`${catalog.assets.length} assets, catalog ${catalog.version}, observed ${catalog.observedAt}, stale=${catalog.stale}`);
// 1. Every USDT entry, with its CAIP-19 ID split into parts
for (const a of catalog.assets.filter((asset) => asset.symbol === "USDT")) {
const { chain, namespace, reference } = splitAssetId(a.assetId);
console.log(chain.padEnd(40), namespace.padEnd(7), reference);
}
// 2. Minimum payments, in display units
for (const a of catalog.assets) {
if (a.minAmountIn) console.log(`minimum: ${formatUnits(a.minAmountIn, a.decimals)} ${a.symbol} on ${a.chainId}`);
}
// 3. Can USDT on Tron be swapped to BTC?
const byId = new Map(catalog.assets.map((a) => [a.assetId, a]));
const from = byId.get("tron:mainnet/trc20:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t");
const to = byId.get("bip122:000000000019d6689c085ae165831e93/slip44:0");
if (from && to) console.log(`USDT on Tron -> BTC: ${canPair(from, to)}`);node catalog.mts346 assets, catalog live-catalog-a48aedb9fae6f641, observed 2026-11-28T17:57:47.860595591Z, stale=false
eip155:1 erc20 0xdac17f958d2ee523a2206206994597c13d831ec7
eip155:10 erc20 0x94b008aa00579c1307b0ef2c499ad98a8ce58e58
eip155:100 erc20 0x4ecaba5870353805a9f068101a40e0f32ed605c6
eip155:137 erc20 0xc2132d05d31c914a87c6611c10748aeb04b58e8f
eip155:42161 erc20 0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9
eip155:43114 erc20 0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7
eip155:4326 erc20 0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb
eip155:534352 erc20 0xf55bec9cafdbe8730f096aa55dad6d22d44099df
eip155:56 erc20 0x55d398326f99059ff775485246999027b3197955
eip155:747474 erc20 0x2dca96907fde857dd3d816880a0df407eeb2d2f2
eip155:8453 erc20 0xfde4c96c8593536e31f229ea8f37b2ada2699bb2
near:mainnet nep141 usdt.tether-token.near
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp spl Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
ton:mainnet jetton EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs
tron:mainnet trc20 TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
minimum: 100 USDT on tron:mainnet
USDT on Tron -> BTC: trueNode.js 22.18 or later runs a .mts file directly; on older versions use npx tsx catalog.mts. The interfaces copy the AssetsResponse and Asset schemas of the OpenAPI document.
Pairs and minimum amounts
- A source asset and a destination asset can form a pair only when the source's
sourceGroupsand the destination'sdestinationGroupsshare a label. The labels are opaque and only comparable within one response; do not store them. - A shared label does not guarantee a route at this moment: a quote can still answer 422
NO_ROUTE. - An asset with empty
sourceGroupscan only be received, not paid. - A quote below
minAmountInis refused with 422AMOUNT_OUT_OF_RANGE. Show the minimum before the user enters an amount.
Caching and errors
- The catalog changes rarely. Cache it in your application and refresh it periodically. Responses carry
Cache-Control: no-store, so HTTP caches and CDNs will not keep a copy for you. GET /v2/assetsdoes not count against partner quotas.- Errors: 404
NOT_FOUNDwhen a query string is sent, 500INTERNAL_ERROR, and 503TEMPORARILY_UNAVAILABLEwith aRetry-Afterheader when known. A GET can always be retried safely. The error body is described on Errors & rate limits.
Machine-readable specification
The endpoint is GET /v2/assets in the Partner API's OpenAPI 3.1 document, /docs/partner-v2.openapi.json, with the schemas AssetsResponse and Asset. The API reference describes it too.
Related
- Validate addresses and memos locally: check a recipient address for an asset's
chainIdbefore you ask for a quote. - Quickstart: from the asset list to a quote and an order, with a Partner API key.
- MCP server: let an AI assistant search the asset catalog.