Skip to main content

Documentation Index

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

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

POST https://api.trustware.io/api/v1/routes/quote Returns a fee estimate, expected output amount, slippage, and estimated completion time for a proposed route. Call this before POST /route to show the user a confirmation screen. AML/OFAC screening runs synchronously — if the source or destination address is flagged, this call returns an error and no funds move.

Request

{
  "fromChain": "43114",
  "toChain": "137",
  "fromToken": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
  "toToken": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
  "fromAmount": "215124226346059100",
  "fromAddress": "0xeb212fe20f26243ec4d4df2dd49c8aa9fa75a201",
  "toAddress": "0xeb212fe20f26243ec4d4df2dd49c8aa9fa75a201",
  "slippage": 1
}
FieldRequiredDescription
fromChainYesSource chain ID as a string (e.g. "43114" for Avalanche).
toChainYesDestination chain ID as a string (e.g. "137" for Polygon). Use "stellar" for Stellar.
fromTokenYesSource token contract address. Use "0xeeee...eeee" for the native token.
toTokenYesDestination token contract address.
fromAmountYesAmount in the smallest unit of the source token (wei for EVM).
fromAddressYesSender wallet address. AML screening runs against this address.
toAddressYesRecipient wallet address.
slippageNoSlippage tolerance as a percentage. Defaults to 1. Squid-provided routes enforce a hard maximum of 3 (routes above this threshold are rejected by Squid); LiFi-provided routes do not impose this limit.

Response

{
  "data": {
    "estimate": {
      "fromAmount": "215124226346059100",
      "toAmount": "1994795",
      "toAmountMin": "1974049",
      "toAmountUsd": "1.99",
      "totalFeesUsd": "0.050017",
      "fees": [
        {
          "type": "Gas receiver fee",
          "amount": "3795341166702376",
          "amountUsd": "0.04",
          "token": {
            "chainId": "43114",
            "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
            "symbol": "AVAX",
            "decimals": 18
          }
        },
        {
          "type": "Service fee",
          "amount": "10020",
          "amountUsd": "0.010017",
          "token": {
            "chainId": "137",
            "address": "0x750e4c4984a9e0f12978ea6742bc1c5d248f40ed",
            "symbol": "USDC.axl",
            "decimals": 6
          }
        }
      ]
    }
  }
}
FieldDescription
estimate.fromAmountSource amount in the smallest unit.
estimate.toAmountExpected destination amount in the smallest unit of the destination token.
estimate.toAmountMinMinimum destination amount accounting for slippage.
estimate.toAmountUsdExpected destination value in USD.
estimate.totalFeesUsdTotal fees in USD across all fee types.
estimate.feesItemized fee breakdown. Each entry has type, amount, amountUsd, and token metadata.

AML behavior

If Trustware’s AML/OFAC screening flags the source or destination address, this endpoint returns an error. No funds move. The specific reason is never exposed in the error response — your application should handle the error generically and show a neutral message to the user.
Always call /quote before /route. The AML check runs here. If you skip the quote step and call /route directly, you bear the risk of initiating a transaction that would have been rejected at the quote stage.