Skip to main content
POST
/
quotes
Single-Pair Quote
curl --request POST \
  --url http://localhost:8000/v2/quotes \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "destination": {
    "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "amount": "50000000",
    "chain_id": 1
  },
  "recipient": "0x1234...abcd",
  "slippage_bps": 50,
  "source": {
    "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "amount": "50000000",
    "chain_id": 1
  },
  "trade_type": "EXACT_OUTPUT"
}
'
{
  "issues": {
    "price_impact_warning": {
      "impact": 0.07,
      "threshold": 0.05
    }
  },
  "quote": {
    "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "balance": {
      "raw_amount": "2400000",
      "ui_amount": 2.4,
      "ui_amount_display": "2.4",
      "value_usd": 123.45
    },
    "base": {
      "raw_amount": "2400000",
      "ui_amount": 2.4,
      "ui_amount_display": "2.4",
      "value_usd": 123.45
    },
    "chain_id": 30000000000001,
    "currency_amount": {
      "raw_amount": "2400000",
      "ui_amount": 2.4,
      "ui_amount_display": "2.4",
      "value_usd": 123.45
    },
    "decimals": 6,
    "fees": {
      "custom_fee": {
        "raw_amount": "2400000",
        "ui_amount": 2.4,
        "ui_amount_display": "2.4",
        "value_usd": 123.45
      },
      "protocol_fee": {
        "raw_amount": "2400000",
        "ui_amount": 2.4,
        "ui_amount_display": "2.4",
        "value_usd": 123.45
      },
      "relayer_fee": {
        "raw_amount": "2400000",
        "ui_amount": 2.4,
        "ui_amount_display": "2.4",
        "value_usd": 123.45
      },
      "total_fee": {
        "raw_amount": "2400000",
        "ui_amount": 2.4,
        "ui_amount_display": "2.4",
        "value_usd": 123.45
      }
    },
    "gas": {
      "raw_amount": "2400000",
      "ui_amount": 2.4,
      "ui_amount_display": "2.4",
      "value_usd": 123.45
    },
    "id": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "image_uri": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png",
    "name": "USD Coin",
    "output": {
      "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "chain_id": 30000000000001,
      "currency_amount": {
        "raw_amount": "2400000",
        "ui_amount": 2.4,
        "ui_amount_display": "2.4",
        "value_usd": 123.45
      },
      "decimals": 6,
      "id": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "image_uri": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png",
      "name": "USD Coin",
      "price_usd": 1,
      "ticker": "USDC"
    },
    "price_usd": 1,
    "ticker": "USDC",
    "total": {
      "raw_amount": "2400000",
      "ui_amount": 2.4,
      "ui_amount_display": "2.4",
      "value_usd": 123.45
    }
  },
  "result_type": "OK"
}

Documentation Index

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

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

Authorizations

X-API-KEY
string
header
required

Headers

X-API-KEY
string
required

API key for authentication

Body

application/json
source
object
required
Example:
{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "50000000",
"chain_id": 1
}
destination
object
required
Example:
{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "50000000",
"chain_id": 1
}
trade_type
enum<string>
required

Whether the source or destination amount is fixed.

Available options:
EXACT_INPUT,
EXACT_OUTPUT
Example:

"EXACT_OUTPUT"

recipient
string | null
Example:

"0x1234...abcd"

slippage_bps
integer | null
Example:

50

Response

Quote produced (check result_type for soft errors)

result_type
enum<string>
required

Soft-error result code returned by /v2/quotes endpoints. Non-OK values still arrive on a 200 so polling clients don't have to special-case errors.

Available options:
OK,
NO_ROUTE,
HIGH_IMPACT
Example:

"OK"

quote
object
Example:
{
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"balance": {
"raw_amount": "2400000",
"ui_amount": 2.4,
"ui_amount_display": "2.4",
"value_usd": 123.45
},
"base": {
"raw_amount": "2400000",
"ui_amount": 2.4,
"ui_amount_display": "2.4",
"value_usd": 123.45
},
"chain_id": 30000000000001,
"currency_amount": {
"raw_amount": "2400000",
"ui_amount": 2.4,
"ui_amount_display": "2.4",
"value_usd": 123.45
},
"decimals": 6,
"fees": {
"custom_fee": {
"raw_amount": "2400000",
"ui_amount": 2.4,
"ui_amount_display": "2.4",
"value_usd": 123.45
},
"protocol_fee": {
"raw_amount": "2400000",
"ui_amount": 2.4,
"ui_amount_display": "2.4",
"value_usd": 123.45
},
"relayer_fee": {
"raw_amount": "2400000",
"ui_amount": 2.4,
"ui_amount_display": "2.4",
"value_usd": 123.45
},
"total_fee": {
"raw_amount": "2400000",
"ui_amount": 2.4,
"ui_amount_display": "2.4",
"value_usd": 123.45
}
},
"gas": {
"raw_amount": "2400000",
"ui_amount": 2.4,
"ui_amount_display": "2.4",
"value_usd": 123.45
},
"id": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"image_uri": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png",
"name": "USD Coin",
"output": {
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"chain_id": 30000000000001,
"currency_amount": {
"raw_amount": "2400000",
"ui_amount": 2.4,
"ui_amount_display": "2.4",
"value_usd": 123.45
},
"decimals": 6,
"id": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"image_uri": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png",
"name": "USD Coin",
"price_usd": 1,
"ticker": "USDC"
},
"price_usd": 1,
"ticker": "USDC",
"total": {
"raw_amount": "2400000",
"ui_amount": 2.4,
"ui_amount_display": "2.4",
"value_usd": 123.45
}
}
expires_at
string | null
stale
boolean
issues
object
Example:
{
"price_impact_warning": { "impact": 0.07, "threshold": 0.05 }
}