Skip to main content
GET
/
v1
/
quotes
Get a quote for a token transfer
curl --request GET \
  --url https://api.alyra.finance/v1/quotes
{
  "inputAmount": "1000000",
  "outputAmount": "998400",
  "tool": "relay-router",
  "calldata": [
    {
      "chainId": 1,
      "to": "0xRouterContract",
      "data": "0xabcdef...",
      "value": "0",
      "gasLimit": "210000"
    }
  ],
  "fees": [
    {
      "name": "Bridge fee",
      "amount": "1200",
      "currency": "USDC"
    },
    {
      "name": "Service fee",
      "amount": "300",
      "currency": "USDC"
    }
  ]
}
The Alyra API is not yet public. For details, please contact our team.
This endpoint enables you to request a quote for transferring tokens, whether across chains or within the same chain. It returns detailed information, including an estimated output amount and a “calldata” that can be directly submitted to your wallet. The estimated output amount can be found in the outputAmount field.
All Alyra APIs don’t require an API key by default. An API key is only necessary for accessing higher request limits.
Base URL: https://api.alyra.finance/v1

Example requests for /v1/quotes

Basic quote request

import axios from "axios";

const response = await axios.get("https://api.alyra.finance/v1/quotes", {
params: {
  senderAddress: "0xYOUR_SENDER_ADDRESS",
  receiverAddress: "0xYOUR_RECEIVER_ADDRESS",
  originChainId: 10,
  destinationChainId: 42161,
  amount: "500000000000000000",
  originCurrency: "ETH",
  destinationCurrency: "ETH"
}
});

console.log(response);

Cross-environment quote

import axios from "axios";

const response = await axios.get("https://api.alyra.finance/v1/quotes", {
params: {
  senderAddress: "0xYOUR_EVM_ADDRESS",
  receiverAddress: "YOUR_SVM_ADDRESS",
  originChainId: 8453,
  destinationChainId: 1329,
  amount: "2500000",
  originCurrency: "USDT",
  destinationCurrency: "USDT"
}
});

console.log(response);

Query Parameters

originChainId
number
required

The sending chain id

destinationChainId
number
required

The receiving chain id

originCurrency
string
required

The token address that should be transferred

destinationCurrency
string
required

The token address that should be transferred to

senderAddress
string
required

The sending wallet address

receiverAddress
string

The receiving wallet address. If none is provided, the fromAddress will be used

amount
string
required

The amount that should be sent including all decimals (e.g. 1000000 for 1 USDC with 6 decimals)

integrator
string

A string containing tracking information about the integrator of the API

Response

Quote response

inputAmount
string
required

The amount that should be transferred including all decimals

outputAmount
string
required

The estimated resulting amount of the destinationCurrency including all decimals

tool
string
required

The tool used for the transaction

calldata
object[]
required

The transaction data that can be triggered using a wallet provider

fees
object[]

Fees included in the transfer