Catalogue sync - tokens.json, networks.json and paths
Sync SwapKit's whole token and route catalogue in a few dozen static-file requests — which tokens exist, which chains, and what each token can be swapped into — instead of calling /swapTo once per tok
If you mirror SwapKit's catalogue into your own backend — to show users only the pairs SwapKit can quote, or to route requests between aggregators — sync these three static files instead of calling /swapTo once per token.
tokens.json
Every token SwapKit supports, with its identifier, chain, contract address and decimals
networks.json
Every chain in tokens.json, its native token and how many tokens it has
paths/{srcChainId}.json
For every token on one source chain, the tokens it can be swapped into
All three are static JSON files served from SwapKit's CDN at https://tokens.swapkit.dev. They need no API key, they're compressed automatically, and they support conditional requests. A full sync is one tokens.json, one networks.json, and one paths file per chain — 37 requests today — and a sync where nothing changed is the same requests answered with 304 Not Modified.
Endpoints
GET
https://tokens.swapkit.dev/tokens.json
Every token
GET
https://tokens.swapkit.dev/networks.json
Every chain
GET
https://tokens.swapkit.dev/paths/{srcChainId}.json
Every route from one source chain
No authentication. Don't send an
x-api-key; these requests don't count against your API key's rate limits.HEADworks too, if you only want the currentETagandLast-Modified.{srcChainId}is achainIdfromnetworks.json, used as-is:paths/1.json,paths/42161.json,paths/bitcoin.json,paths/solana.json.A
404on a paths file means "no routes yet". A chain newly added tonetworks.jsoncan be listed a few hours before its paths file is first written; treat it as having no routes and try again on the next sync.Fetch only the chains
networks.jsonlists. A paths file for a chain that has since left the catalogue may still be served; ignore it.
Sync flow
GET /tokens.json— load every token, keyed byidentifier.GET /networks.json— the chains, and so the list of paths files to fetch.For each
chainIdinnetworks.json:GET /paths/{chainId}.json.
Make every request conditional (next section). Read tokens.json before the paths files, so every identifier a paths file names can be resolved.
Conditional requests and ETag
Every response carries an ETag and a Last-Modified header. A file is rewritten only when its content changes, so both stay the same between changes, and a request that presents them gets 304 Not Modified with no body.
Store the
ETagper file, exactly as received, and send it back inIf-None-Match. Each file — every paths file included — has its ownETag; one file changing says nothing about the others.Weak and strong forms both match. A compressed response carries a weak tag (
W/"…"), an uncompressed one the same value without theW/prefix. Either form gets a304whichever encoding you ask for, so you don't need to normalise it.If-Modified-Sinceworks as well, with theLast-Modifiedvalue from the previous response. Use one or the other;ETagis the more precise.Treat the
ETagas an opaque string. Don't parse it or compare it to anything but a previousETagfor the same URL.On
304, keep what you have. There is no body; reuse your stored copy of that file.versionis for your logic, theETagis for transport. Use theETagto decide whether to download a file, andversion(see Freshness and versioning) to decide what a change means for the data you've stored.
Compression
Every file is served compressed — brotli (br) or gzip, whichever your client lists in Accept-Encoding — and nothing on SwapKit's side needs configuring. What you need to check is your HTTP client: some decompress for you, some don't.
Prefer brotli where your client supports it. The paths files repeat the same identifiers across their destination lists, and brotli exploits that far better than gzip: paths/1.json is 773 KB uncompressed, 400 KB with gzip and 44 KB with brotli. A full sync is about 490 KB with brotli and about 1 MB with gzip (see File sizes).
fetch — browsers, Node.js 18+, Bun, Deno
Yes (br, gzip)
Yes
Node.js https / http modules
No — set the header
No — use node:zlib
Python requests
Yes (gzip; br once the brotli package is installed)
Yes
Python urllib.request
No — set the header
No — use gzip (the standard library has no brotli decoder)
Go net/http
Yes (gzip only), unless you set Accept-Encoding yourself
Yes, on the same condition — for br, set the header and decode with a brotli package
Java java.net.http.HttpClient
No — set the header
No — use GZIPInputStream (or a brotli library such as Brotli4j)
OkHttp (Kotlin / Android)
Yes (gzip)
Yes
curl
Only with --compressed
Only with --compressed
Each example fetches a file compressed, then re-requests it with If-None-Match and gets a 304, except the Go (brotli) tab, which shows only the decode.
File sizes
Measured on 2026-10-07. Sizes move as tokens and routes change, so don't hard-code limits from them.
tokens.json
1.2 MB
208 KB
218 KB
networks.json
3.4 KB
1 KB
1 KB
paths/1.json (Ethereum, largest)
773 KB
44 KB
400 KB
paths/56.json (BSC)
267 KB
22 KB
118 KB
A chain with a handful of tokens
1–35 KB
1–7 KB
1–7 KB
All 35 paths files together
2.3 MB
281 KB
786 KB
A first sync is about 490 KB with brotli (about 1 MB with gzip); every sync after that is a few dozen 304s plus whichever files changed.
tokens.json
URL: https://tokens.swapkit.dev/tokens.json
identifier
string
The SwapKit identifier — the value /v3/quote takes as sellAsset / buyAsset, and the value the paths files use.
chain
string
SwapKit chain code, the prefix of the identifier (ETH, BTC, SOL).
chainId
string
SwapKit chain ID: a numeric ID for EVM chains (1, 42161) or a name (bitcoin, solana).
network
string
The chain's CoinGecko asset-platform ID (ethereum, binance-smart-chain). For chains CoinGecko has no asset platform for — Bitcoin, Litecoin and other native-coin-only chains, plus a few newer chains such as Arc (arc) and Robinhood Chain (robinhood) — the CoinGecko ID of the chain's native coin.
contractAddress
string | null
The token's contract, mint or account address. null for a chain's native coin — always present, never omitted.
decimals
number
The token's decimals.
symbol
string
The token's ticker (USDC) — not the symbol field of /tokens, which includes the address.
name, logoURI, coingeckoId
string
Display metadata. Optional — omitted when unknown.
geoBlockRule
string
Present only when a jurisdiction restriction applies — see Tokenized equities & geo-restrictions.
tokens.json lists the same tokens as GET /tokens?provider=all, one entry per identifier, sorted by identifier (case-insensitive).
networks.json
URL: https://tokens.swapkit.dev/networks.json
chainId
string
SwapKit chain ID. Also the name of the chain's paths file: paths/{chainId}.json.
chain
string
SwapKit chain code.
network
string
Same as network in tokens.json.
nativeToken
string | null
The identifier of the chain's native token, spelled as in tokens.json. null when the catalogue doesn't list it.
tokens
number
How many tokens tokens.json lists on this chain.
Every chain in networks.json has tokens in tokens.json, and every chain in tokens.json appears in networks.json.
paths/{srcChainId}.json
URL: https://tokens.swapkit.dev/paths/{srcChainId}.json — for example paths/1.json (Ethereum) or paths/solana.json.
Most tokens on a chain can be swapped into exactly the same set of tokens, so each file lists every distinct destination list once in dstSets, and paths points each source token at its list. Written out per token instead, a single chain could run to hundreds of megabytes.
Trimmed from the live paths/1.json — the real lists hold about 1,300 identifiers each. List names change between versions.
srcChainId
string
The chain this file covers. Every srcToken is on this chain.
count
number
Number of entries in paths.
dstSets
object
Destination lists by name. Each list holds SwapKit identifiers, on any chain, sorted case-insensitively.
paths[].srcToken
string
A token on srcChainId that SwapKit can swap from.
paths[].dstSet
string
The name of the dstSets list this token can be swapped into.
Rules for reading a paths file:
Skip the token itself. A list may contain the source token — that is what lets many tokens share one list. Treat
srcToken == destinationas not a route.List names are local.
d0inpaths/1.jsonis unrelated tod0inpaths/solana.json, and names can change between versions. Resolve them when you load a file; don't store them.A token missing from
pathshas no route from this chain today. Chains with no routable tokens still have a file, with an emptypaths.
Identifiers
Every file uses SwapKit identifiers, the same strings /v3/quote takes, so a route from these files can be quoted without translation.
The part before the first
.is the chain code:ETH.USDC-0x…,SOL.USDC-EPjF…,NEAR.wBTC-2260…factory.bridge.near. Native coins have no address part:BTC.BTC,ETH.ETH.Every identifier a paths file names comes from the
tokens.jsonpublished when that paths file was built. Paths files are rebuilt on a shorter cycle thantokens.json(see Freshness), so aftertokens.jsonchanges they catch up within one cycle.Match identifiers exactly as published — every file spells a token the same way. Addresses on Solana, Tron, TON and other non-EVM chains are case-sensitive.
To map an identifier to your own
chainId + addresskey, usechainIdandcontractAddressfromtokens.json.
Freshness and versioning
Cadence.
tokens.jsonandnetworks.jsonare rebuilt every 8 hours, the paths files every 6 hours. A file is rewritten only when its content changes, so itsETagandLast-Modifiedstay the same otherwise.Caching. Files are served with
Cache-Control: public, max-age=300, so a change can take up to five minutes to reach you after it's written. Polling every 15 minutes with conditional requests is plenty; almost every request is an empty304.versionfollows token-list semver:
major
Something you may have stored is no longer valid: a token or route removed, or a token's chainId, contractAddress or decimals changed.
minor
Tokens, chains or routes added.
patch
Metadata only — a name, a logo, a network value.
timestamp is when the file's content last changed.
Expect paths files to change more often than tokens.json. Which routes are available moves with provider status and liquidity, so a paths file can gain and lose destinations between rebuilds, and a lost destination is a major bump. Treat any new version of a paths file as a replacement: swap in the whole file rather than merging it into what you had, and don't alert on its major bumps. A major bump on tokens.json is rarer and worth reviewing: a token was removed, or its contract or decimals changed.
Example: sync loop
What the files don't tell you
A route listed in these files is one SwapKit can quote. A particular request can still fail for reasons only known at quote time:
Amount limits — minimums, maximums and per-route size ceilings. See Route availability and providers errors.
Liquidity — the route exists but can't fill the amount:
insufficientLiquidity, or no route for that size.Regional restrictions — some tokenized equities are rejected with
451for callers in restricted jurisdictions. The files list every token for every caller; usegeoBlockRule. See Tokenized equities & geo-restrictions.Your API key's settings — the files reflect SwapKit's global provider and chain availability. If a provider or chain is switched off for your key only, the files still list its routes.
These surface as normal /v3/quote responses, so handle them the way you already do.
Last updated

