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 '
{
  "fromChainId": "<string>",
  "toChainId": "<string>",
  "fromTokenAddress": "<string>",
  "toTokenAddress": "<string>",
  "fromAmount": "<string>",
  "fromAddress": "<string>",
  "toAddress": "<string>",
  "fromAmountForGas": "<string>",
  "options": {
    "integrator": "<string>",
    "fee": 123,
    "maxPriceImpact": 123,
    "order": "RECOMMENDED",
    "slippage": 123,
    "referrer": "<string>",
    "allowSwitchChain": true,
    "allowDestinationCall": true,
    "bridges": {
      "allow": [
        "<string>"
      ],
      "deny": [
        "<string>"
      ],
      "prefer": [
        "<string>"
      ]
    },
    "exchanges": {
      "allow": [
        "<string>"
      ],
      "deny": [
        "<string>"
      ],
      "prefer": [
        "<string>"
      ]
    }
  }
}
'
{
  "data": {
    "rawResponse": {
      "routes": [
        {}
      ]
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.portalhq.io/llms.txt

Use this file to discover all available pages before exploring further.

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
fromChainId
string
required

Source chain ID in CAIP-2 format (e.g. eip155:1).

toChainId
string
required

Destination chain ID in CAIP-2 format (e.g. eip155:137).

fromTokenAddress
string
required

Source token contract address.

toTokenAddress
string
required

Destination token contract address.

fromAmount
string
required

Amount to swap in the smallest unit of the source token.

fromAddress
string

Sender address.

toAddress
string

Recipient address.

fromAmountForGas
string

Amount of the source token to swap into destination-chain gas before bridging.

options
object

Optional routing preferences.

Response

Routes retrieved successfully

data
object