Get pairs
GET/v3/pairsDescription
Get a list of all the pairs that are available for exchange considering the user’s location.
If the exchange is blocked in the user’s location (based on their IP), this endpoint will respond with an empty array.
How to filter available pairs
In your app, you can filter the available pairs, so the user can select from the combinations that are swapable.
filter pairs
const pairs = await fetch('https://exchange.exodus.io/v3/pairs?format=csv').then((res) =>
res.json()
);
const availableFromAssets = assets.filter((asset) =>
pairs.some((pair) => {
const [from] = pair.split('_');
return from === asset.id;
})
);
const availableToAssets = assets.filter((asset) =>
pairs.some((pair) => {
const [from, to] = pair.split('_');
return from === fromAssetId && to === asset.id;
})
);
Header Parameters
Name | Description | Required | Example |
---|---|---|---|
App-Name | App-Name for the authorization | yes | acme-inc |
App-Version | App-Version for the authorization | no | 23.5.5 |
Forwarded | If you are proxying requests to the API, you must include the "Forwarded" header with the original request IP address. This is used for geolocation availability purposes. | no | |
User-Agent | User-Agent for the authorization | no | AgentName/1.0.0 |
Query Parameters
Name | Description | Required | Default | Options |
---|---|---|---|---|
to | [ 2 .. 10 ] characters | no | ||
from | [ 2 .. 10 ] characters | no | ||
format | Change the response type to optimize the network transfer size. | no | json | json, csv |
Try it
Press on the 'Send' button to try this request.
Last updated on