Swaps API
Our Swaps API utilizes 0x to execute swaps on EVM chains.
Overview
The Swaps API can be accessed at https://api.portalhq.io/
.
Authentication
There are two forms of required authentication in order to use the Swaps API
Client Authentication - a Client Session Token or Client API Key provided as a
Bearer
token in theAuthentication
header0x Authentication - a 0x API Key provided as
apiKey
property of the JSON request body
Get a list of available tokens
POST
/v1/swaps/sources
Retrieves a list of available tokens for a given EVM chain
Headers
Body
Response
The response of this request is a JSON object containing key/value pairs.
The key
is the Token Symbol and the value
is an acceptable value as the token
property provided to the /quote
route (either a Token Symbol or Token Address).
Example request
Create a new user
POST
/v1/swaps/quote
Retrieves a transaction and cost estimate for a given swap.
Headers
Body
Response
Example request
Last updated