/quote

POSThttps://api.aori.io

Request a price quote for a cross-chain swap. Returns real-time pricing information and all necessary parameters to create and execute an order.

Request

  • Name
    offerer
    Type
    string
    Description

    The address requesting the quote

  • Name
    recipient
    Type
    string
    Description

    The address that will receive the output tokens

  • Name
    inputToken
    Type
    string
    Description

    The token contract address to swap from

  • Name
    outputToken
    Type
    string
    Description

    The token contract address to swap to

  • Name
    inputAmount
    Type
    string
    Description

    The amount of input tokens to swap (in wei/smallest unit)

  • Name
    inputChain
    Type
    string
    Description

    The chain identifier where input tokens are located

  • Name
    outputChain
    Type
    string
    Description

    The chain identifier where output tokens will be sent

cURL

curl -X POST https://api.aori.io/quote \
  -H "Content-Type: application/json" \
  -d '{
    "offerer": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b",
    "recipient": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b",
    "inputToken": "0x4200000000000000000000000000000000000006",
    "outputToken": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
    "inputAmount": "1000000000000000000",
    "inputChain": "base",
    "outputChain": "arbitrum"
  }'

Response

  • Name
    orderHash
    Type
    string
    Description

    Unique identifier for the order

  • Name
    signingHash
    Type
    string
    Description

    Hash used for cryptographic signing of the order

  • Name
    offerer
    Type
    string
    Description

    The address initiating the swap

  • Name
    recipient
    Type
    string
    Description

    The address receiving the output tokens

  • Name
    inputToken
    Type
    string
    Description

    The token contract address being sold

  • Name
    outputToken
    Type
    string
    Description

    The token contract address being bought

  • Name
    inputAmount
    Type
    string
    Description

    The amount of input tokens (in wei/smallest unit)

  • Name
    outputAmount
    Type
    string
    Description

    The amount of output tokens (in wei/smallest unit)

  • Name
    inputChain
    Type
    string
    Description

    The source chain identifier

  • Name
    outputChain
    Type
    string
    Description

    The destination chain identifier

  • Name
    startTime
    Type
    number
    Description

    Unix timestamp when the order becomes valid

  • Name
    endTime
    Type
    number
    Description

    Unix timestamp when the order expires

  • Name
    estimatedTime
    Type
    number
    Description

    Estimated execution time in seconds

Response

{
  "orderHash": "0x1234567890abcdef1234567890abcdef12345678",
  "signingHash": "0xabcdef1234567890abcdef1234567890abcdef12",
  "offerer": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b",
  "recipient": "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b",
  "inputToken": "0x4200000000000000000000000000000000000006",
  "outputToken": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
  "inputAmount": "1000000000000000000",
  "outputAmount": "3200000000",
  "inputChain": "base",
  "outputChain": "arbitrum",
  "startTime": 1703001600,
  "endTime": 1703005200,
  "estimatedTime": 180
}