To find servers that support a token pair, clients call the getURLsForToken function on the Registry contract for each token and then intersect the results. For example, if the resulting URLs for token A are [,] and for token B are [,] then the only server supporting swapping token A for B is

See getURLsForToken on the Registry contract:

function getURLsForToken(address token) external view returns (string[] memory urls);

Check deployments for latest contract addresses for Registry.


When connecting via HTTP, the server may respond with status code 426 (Upgrade Required) in which case the client should connect using WebSocket.


Using the Registry library from @airswap/protocols can return Server objects that implement the RFQ API.

import { Registry } from "@airswap/protocols";
const servers = await new Registry(chainId, provider).getServers(

Calling the Registry directly using ethers

import { ethers } from 'ethers'
import { chainNames } from '@airswap/constants'
import * as RegistryContract from '@airswap/registry/build/contracts/Registry.sol/Registry.json'
import * as registryDeploys from '@airswap/registry/deploys.js'
const RegistryInterface = new ethers.utils.Interface(
new ethers.Contract(
const signerTokenURLs = await this.contract.getURLsForToken(signerToken)
const senderTokenURLs = await this.contract.getURLsForToken(senderToken)
const serverURLs = signerTokenURLs
.filter(value => senderTokenURLs.includes(value))

Using the CLI

Ensure the AirSwap CLI is installed.

$ yarn global add airswap

Use airswap chain to set your chain to Rinkeby or Mainnet.

$ airswap chain
AirSwap CLI 1.6.1 —
set the active ethereum chain
Current chain: 4 (RINKEBY)
New chain: (1=mainnet, 4=rinkeby, 5=goerli, 42=kovan, 56=binance): (4) 1
Set active chain to MAINNET.

Use registry:get to fetch server URLs for a token pair.

$ airswap registry:get
AirSwap CLI 1.6.1 —
get urls from the registry MAINNET
Registry 0x8F9DA6d38939411340b19401E8c54Ea1f51B8f95
Token pair (e.g. WETH/USDT): DAI/WETH