Skip to main content
POST
/
clients
/
me
/
integrations
/
lifi
/
routes
Get Li.Fi swap/bridge routes
curl --request POST \
  --url https://api.portalhq.io/api/v3/clients/me/integrations/lifi/routes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fromChain": "<string>",
  "toChain": "<string>",
  "fromToken": "<string>",
  "toToken": "<string>",
  "fromAmount": "<string>",
  "fromAddress": "<string>",
  "toAddress": "<string>",
  "slippage": 123,
  "order": "RECOMMENDED",
  "allowBridges": [
    "<string>"
  ],
  "denyBridges": [
    "<string>"
  ],
  "allowExchanges": [
    "<string>"
  ],
  "denyExchanges": [
    "<string>"
  ]
}
'
{
  "data": {
    "rawResponse": {
      "routes": [
        {}
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Client API Key or Client Session Token (CST). Pass as a Bearer token in the Authorization header.

Body

application/json
fromChain
string
required

Source chain ID.

toChain
string
required

Destination chain ID.

fromToken
string
required

Source token address.

toToken
string
required

Destination token address.

fromAmount
string
required

Amount to swap in the smallest unit.

fromAddress
string

Sender address.

toAddress
string

Recipient address.

slippage
number

Maximum slippage as a decimal (e.g. 0.01 = 1%).

order
enum<string>

Route ordering preference.

Available options:
RECOMMENDED,
FASTEST,
CHEAPEST,
SAFEST
allowBridges
string[]

Bridges to include.

denyBridges
string[]

Bridges to exclude.

allowExchanges
string[]

Exchanges to include.

denyExchanges
string[]

Exchanges to exclude.

Response

Routes retrieved successfully

data
object