Quote
Last updated
Last updated
This endpoint facilitates the creation of a potential quote for executing a swap between two assets. It allows users to obtain pricing information and other essential details necessary to initiate asset swaps within the system. Use this endpoint to explore the potential cost and feasibility of asset exchanges before finalizing transactions.
Body Param | Description | Example |
---|---|---|
Quote object
Field | Description |
---|---|
If you want to create a quote to make a swap from ETH to USDC in Ethereum Mainnet (chain_id=1)
Request
Response
chain_id
Integer - Required ID of the chain
"chain_id": 137
time_in_seconds
Integer - Optional Amount of time between accepting a quote and receiving the quote on the blockchain. As this value increases, the quote will get worse for the user.
"time_in_seconds": 30
output_amount
Integer/String - Optional
Desired quantity of assets to receive as part of the swap
This field is mutually exclusive with input_amount
"output_amount": "18000" output_amount: 18000
input_amount
Integer/String - Optional
Desired quantity of assets you are willing to exchange
This field is mutually exclusive with output_amount
"input_amount": "18000" input_amount: 18000
input_asset_symbol
String - Required Identifier of the asset you want to provide for the swap Should correspond to the asset name returned from the pool call
"input_asset_symbol": "ETH"
output_asset_symbol
String - Required Identifier of the asset you want to receive in the swap Should correspond to the asset name returned from the pool call
"output_asset_symbol": "DAI"
id
String(UUID) - Id of the quote, use this value when signing a quote
must_accept_by
String - Human-readable UTC timestamp by which you must accept the quote and should be expected to be a short duration. If this time has passed already, request a new quote - the server will not sign a quote after must_accept_by
has passed
good_until
Integer - number of seconds that quotes live
chain_id
Integer - Represents the ID of the chain
input_asset_address
String - Contract address of the asset you want to provide for the swap
input_amount
String - Amount of assets to be exchanged
output_asset_address
String - Contract address of the asset you want to receive in the swap
output_amount
String - Amount of assets you will receive in the exchange
input_value_in_usd
Float - Amount in dollars to be exchanged
output_value_in_usd
Float - Amount in dollars you will receive in the exchange
created_at
Integer - Unix Timestamp indicating the date and time when the quote was created
rate
Float - swap rate