Quote

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.

Request

Response

Quote object

Examples

If you want to create a quote to make a swap from ETH to USDC in Ethereum Mainnet (chain_id=1)

Request

curl -X POST "https://api.clipper.exchange/rfq/quote" \
-H "Authorization: Basic <base64 USERNAME:PASSWORD>" \
-H "Content-Type: application/json" \
-d '{
  "input_amount": "10000000000000000000",
  "input_asset_symbol": "ETH",
  "output_asset_symbol": "USDC",
  "time_in_seconds": 60,
  "chain_id": 1
}'

Response

{
    "id": "05a51aa6-41b5-4c61-a452-f1b95d0d43e4",
    "must_accept_by": "2023-10-13 22:24:20.932560+00:00",
    "good_until": 1697235920,
    "chain_id": 1,
    "input_amount": "10000000000000000000",
    "output_amount": "5661947917",
    "input_value_in_usd": 15595.15,
    "output_value_in_usd": 5668.12,
    "created_at": 1697235848,
    "rate": 566.1947917,
    "input_asset_address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "output_asset_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}

Last updated