For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quote

get

Retrieves a quote for a token swap between different chains.

Query parameters
fromChainstringRequired
  • The source blockchain identifier.
toChainstringRequired
  • The destination blockchain identifier.
fromTokenstringRequired
  • The token address on the source chain.
toTokenstringRequired
  • The token address on the destination chain.
fromAmountstringRequired
  • The amount of the source token to swap.
fromAddressstringRequired
  • The address of the sender on the source chain.
toAddressstringOptional
  • The address of the recipient on the destination chain (optional).
orderstring · enumOptional
  • The order preference for the quote ('BEST_VALUE', 'BEST_FEE', 'BEST_FEE_GAS') (optional).
Possible values:
slippagenumber · doubleOptional
  • The maximum acceptable slippage percentage (optional).
integratorstringOptional
  • The integrator identifier (optional).
feenumber · doubleOptional
  • The fee amount (optional).
referrerstringOptional
  • The referrer identifier (optional).
allowBridgesstring[]Optional
  • A list of allowed bridges (optional).
allowExchangesstring[]Optional
  • A list of allowed exchanges (optional).
denyBridgesstring[]Optional
  • A list of denied bridges (optional).
denyExchangesstring[]Optional
  • A list of denied exchanges (optional).
preferBridgesstring[]Optional
  • A list of preferred bridges (optional).
preferExchangesstring[]Optional
  • A list of preferred exchanges (optional).
Responses
200

A promise that resolves to an ApiResponse containing the quote data.

application/json

Represents a standard API response.

successbooleanRequired
messagestringRequired
get/lifi/quote
GET /lifi/quote?fromChain=text&toChain=text&fromToken=text&toToken=text&fromAmount=text&fromAddress=text HTTP/1.1
Host: beta.usemoon.ai/
Accept: */*
200

A promise that resolves to an ApiResponse containing the quote data.

{
  "success": true,
  "message": "text",
  "data": {
    "id": "text",
    "type": "text",
    "tool": "text",
    "action": {
      "fromChainId": 1,
      "fromAmount": "text",
      "fromToken": {
        "address": "text",
        "chainId": 1,
        "symbol": "text",
        "decimals": 1,
        "name": "text",
        "coinKey": "text",
        "logoURI": "text",
        "priceUSD": "text"
      },
      "fromAddress": "text",
      "toChainId": 1,
      "toToken": {
        "address": "text",
        "chainId": 1,
        "symbol": "text",
        "decimals": 1,
        "name": "text",
        "coinKey": "text",
        "logoURI": "text",
        "priceUSD": "text"
      },
      "toAddress": "text",
      "slippage": 1
    },
    "estimate": {
      "fromAmount": "text",
      "toAmount": "text",
      "toAmountMin": "text",
      "approvalAddress": "text",
      "gasCosts": [
        {
          "type": "text",
          "price": "text",
          "estimate": "text",
          "limit": "text",
          "amount": "text",
          "amountUSD": "text",
          "token": {
            "address": "text",
            "symbol": "text",
            "name": "text",
            "decimals": 1,
            "logoURI": "text"
          }
        }
      ],
      "executionDuration": 1,
      "feeCosts": [
        {
          "name": "text",
          "percentage": 1,
          "token": {
            "name": "text",
            "address": "text",
            "symbol": "text",
            "decimals": 1,
            "logoURI": "text",
            "chainId": 1
          },
          "amount": 1
        }
      ],
      "fromAmountUSD": "text",
      "toAmountUSD": "text"
    },
    "includedSteps": [
      {
        "id": "text",
        "type": "text",
        "tool": "text",
        "action": {
          "fromChainId": 1,
          "fromAmount": "text",
          "fromToken": {
            "address": "text",
            "chainId": 1,
            "symbol": "text",
            "decimals": 1,
            "name": "text",
            "coinKey": "text",
            "logoURI": "text",
            "priceUSD": "text"
          },
          "fromAddress": "text",
          "toChainId": 1,
          "toToken": {
            "address": "text",
            "chainId": 1,
            "symbol": "text",
            "decimals": 1,
            "name": "text",
            "coinKey": "text",
            "logoURI": "text",
            "priceUSD": "text"
          },
          "toAddress": "text",
          "slippage": 1
        },
        "estimate": {
          "fromAmount": "text",
          "toAmount": "text",
          "toAmountMin": "text",
          "approvalAddress": "text",
          "gasCosts": [
            {
              "type": "text",
              "price": "text",
              "estimate": "text",
              "limit": "text",
              "amount": "text",
              "amountUSD": "text",
              "token": {
                "address": "text",
                "symbol": "text",
                "name": "text",
                "decimals": 1,
                "logoURI": "text"
              }
            }
          ],
          "executionDuration": 1,
          "feeCosts": [
            {
              "name": "text",
              "percentage": 1,
              "token": {
                "name": "text",
                "address": "text",
                "symbol": "text",
                "decimals": 1,
                "logoURI": "text",
                "chainId": 1
              },
              "amount": 1
            }
          ],
          "fromAmountUSD": "text",
          "toAmountUSD": "text"
        }
      }
    ],
    "transactionRequest": {
      "nonce": "text",
      "data": "text",
      "value": "text",
      "to": "text",
      "from": "text",
      "maxFeePerGas": "text",
      "maxPriorityFeePerGas": "text"
    }
  }
}
post

Handles the retrieval of a quote for a token swap between different chains.

Path parameters
accountNamestringRequired
  • The name of the account requesting the quote.
Query parameters
fromChainstringRequired
  • The chain from which the token swap will originate.
toChainstringRequired
  • The chain to which the token swap will be sent.
fromTokenstringRequired
  • The token to be swapped from.
toTokenstringRequired
  • The token to be swapped to.
fromAmountstringRequired
  • The amount of the token to be swapped from.
fromAddressstringRequired
  • The address from which the token swap will originate.
toAddressstringOptional
  • (Optional) The address to which the token swap will be sent.
orderstring · enumOptional
  • (Optional) The order preference for the quote (BEST_VALUE, BEST_FEE, BEST_FEE_GAS).
Possible values:
slippagenumber · doubleOptional
  • (Optional) The acceptable slippage percentage for the swap.
integratorstringOptional
  • (Optional) The integrator identifier.
feenumber · doubleOptional
  • (Optional) The fee for the swap.
referrerstringOptional
  • (Optional) The referrer identifier.
allowBridgesstring[]Optional
  • (Optional) The list of allowed bridges for the swap.
allowExchangesstring[]Optional
  • (Optional) The list of allowed exchanges for the swap.
denyBridgesstring[]Optional
  • (Optional) The list of denied bridges for the swap.
denyExchangesstring[]Optional
  • (Optional) The list of denied exchanges for the swap.
preferBridgesstring[]Optional
  • (Optional) The list of preferred bridges for the swap.
preferExchangesstring[]Optional
  • (Optional) The list of preferred exchanges for the swap.
dryRunbooleanOptional
broadcastbooleanOptional
Header parameters
AuthorizationstringRequired
  • The authorization token for the request.
Responses
200

A promise that resolves to an ApiResponse containing the quote details, signed transaction, and broadcast information.

application/json

Represents a standard API response.

successbooleanRequired
messagestringRequired
post/lifi/{accountName}/quote
POST /lifi/{accountName}/quote?fromChain=text&toChain=text&fromToken=text&toToken=text&fromAmount=text&fromAddress=text HTTP/1.1
Host: beta.usemoon.ai/
Authorization: text
Accept: */*
200

A promise that resolves to an ApiResponse containing the quote details, signed transaction, and broadcast information.

{
  "success": true,
  "message": "text",
  "data": {
    "quote": {
      "id": "text",
      "type": "text",
      "tool": "text",
      "action": {
        "fromChainId": 1,
        "fromAmount": "text",
        "fromToken": {
          "address": "text",
          "chainId": 1,
          "symbol": "text",
          "decimals": 1,
          "name": "text",
          "coinKey": "text",
          "logoURI": "text",
          "priceUSD": "text"
        },
        "fromAddress": "text",
        "toChainId": 1,
        "toToken": {
          "address": "text",
          "chainId": 1,
          "symbol": "text",
          "decimals": 1,
          "name": "text",
          "coinKey": "text",
          "logoURI": "text",
          "priceUSD": "text"
        },
        "toAddress": "text",
        "slippage": 1
      },
      "estimate": {
        "fromAmount": "text",
        "toAmount": "text",
        "toAmountMin": "text",
        "approvalAddress": "text",
        "gasCosts": [
          {
            "type": "text",
            "price": "text",
            "estimate": "text",
            "limit": "text",
            "amount": "text",
            "amountUSD": "text",
            "token": {
              "address": "text",
              "symbol": "text",
              "name": "text",
              "decimals": 1,
              "logoURI": "text"
            }
          }
        ],
        "executionDuration": 1,
        "feeCosts": [
          {
            "name": "text",
            "percentage": 1,
            "token": {
              "name": "text",
              "address": "text",
              "symbol": "text",
              "decimals": 1,
              "logoURI": "text",
              "chainId": 1
            },
            "amount": 1
          }
        ],
        "fromAmountUSD": "text",
        "toAmountUSD": "text"
      },
      "includedSteps": [
        {
          "id": "text",
          "type": "text",
          "tool": "text",
          "action": {
            "fromChainId": 1,
            "fromAmount": "text",
            "fromToken": {
              "address": "text",
              "chainId": 1,
              "symbol": "text",
              "decimals": 1,
              "name": "text",
              "coinKey": "text",
              "logoURI": "text",
              "priceUSD": "text"
            },
            "fromAddress": "text",
            "toChainId": 1,
            "toToken": {
              "address": "text",
              "chainId": 1,
              "symbol": "text",
              "decimals": 1,
              "name": "text",
              "coinKey": "text",
              "logoURI": "text",
              "priceUSD": "text"
            },
            "toAddress": "text",
            "slippage": 1
          },
          "estimate": {
            "fromAmount": "text",
            "toAmount": "text",
            "toAmountMin": "text",
            "approvalAddress": "text",
            "gasCosts": [
              {
                "type": "text",
                "price": "text",
                "estimate": "text",
                "limit": "text",
                "amount": "text",
                "amountUSD": "text",
                "token": {
                  "address": "text",
                  "symbol": "text",
                  "name": "text",
                  "decimals": 1,
                  "logoURI": "text"
                }
              }
            ],
            "executionDuration": 1,
            "feeCosts": [
              {
                "name": "text",
                "percentage": 1,
                "token": {
                  "name": "text",
                  "address": "text",
                  "symbol": "text",
                  "decimals": 1,
                  "logoURI": "text",
                  "chainId": 1
                },
                "amount": 1
              }
            ],
            "fromAmountUSD": "text",
            "toAmountUSD": "text"
          }
        }
      ],
      "transactionRequest": {
        "nonce": "text",
        "data": "text",
        "value": "text",
        "to": "text",
        "from": "text",
        "maxFeePerGas": "text",
        "maxPriorityFeePerGas": "text"
      }
    },
    "input": {
      "to": "text",
      "data": "text",
      "value": "text",
      "gasLimit": "text",
      "nonce": "text",
      "simulate": true,
      "gas": "text",
      "gasPrice": "text",
      "maxFeePerGas": "text",
      "maxPriorityFeePerGas": "text",
      "chain_id": "text",
      "encoding": "text",
      "type": 1,
      "accessList": [
        {
          "address": "text",
          "storageKeys": [
            "text"
          ]
        }
      ],
      "blobGas": "text",
      "blobGasFeeCap": "text",
      "blobHashes": [
        "text"
      ],
      "dryrun": true,
      "input": "text",
      "EOA": true,
      "contract_address": "text",
      "token_id": "text",
      "token_ids": "text",
      "approved": true,
      "broadcast": true,
      "alwaysIncrementNonce": true,
      "asset": "text",
      "amount": "text",
      "interestRateMode": 1,
      "referralCode": 1,
      "onBehalfOf": "text",
      "receiverAddress": "text",
      "assets": [
        "text"
      ],
      "amounts": [
        "text"
      ],
      "modes": [
        1
      ],
      "params": "text",
      "rateMode": 1,
      "useAsCollateral": true,
      "collateralAsset": "text",
      "debtAsset": "text",
      "user": "text",
      "debtToCover": "text",
      "receiveAToken": true,
      "inputTokens": [
        {
          "tokenAddress": "text",
          "amount": "text"
        }
      ],
      "outputTokens": [
        {
          "tokenAddress": "text",
          "proportion": 1
        }
      ],
      "slippageLimitPercent": 1,
      "minHealthFactor": "text",
      "premiums": [
        "text"
      ],
      "initiator": "text",
      "role": "text",
      "account": "text",
      "initialDeposit": "text",
      "borrowAmount": "text"
    },
    "signed": null,
    "broadcast": null
  }
}