Skip to main content
POST
/
crypto
/
swaps
/
quote
curl -X POST https://secureapi.gridlog.io/api/v1/crypto/swaps/quote \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chain": "polygon",
    "sellToken": "0x0000000000000000000000000000000000001010",
    "buyToken": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
    "amount": "10.0",
    "slippageBps": 50
  }'
{
  "provider": "0x",
  "data": {
    "sellToken": "0x0000000000000000000000000000000000001010",
    "buyToken": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
    "sellAmount": "10000000000000000000",
    "buyAmount": "8750000",
    "price": "0.875",
    "estimatedGas": "120000"
  }
}
chain
string
required
Blockchain network (e.g., polygon, ethereum, solana)
sellToken
string
required
Token to sell — use the token contract address or mint address (e.g., 0xMATIC... on Polygon, or the USDC mint on Solana)
buyToken
string
required
Token to buy — use the token contract address or mint address
amount
string
required
Amount of sellToken to swap (human-readable string)
slippageBps
number
Maximum acceptable slippage in basis points (default: 50 = 0.5%)
curl -X POST https://secureapi.gridlog.io/api/v1/crypto/swaps/quote \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chain": "polygon",
    "sellToken": "0x0000000000000000000000000000000000001010",
    "buyToken": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
    "amount": "10.0",
    "slippageBps": 50
  }'
{
  "provider": "0x",
  "data": {
    "sellToken": "0x0000000000000000000000000000000000001010",
    "buyToken": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
    "sellAmount": "10000000000000000000",
    "buyAmount": "8750000",
    "price": "0.875",
    "estimatedGas": "120000"
  }
}
provider
string
Swap aggregator used: 0x (EVM chains) or jupiter (Solana)
data
object
Raw quote data from the provider. Fields vary by provider but typically include sellAmount, buyAmount, price, and estimatedGas.
Pass the same parameters directly to Execute Swap to perform the trade. The quote is informational — there is no quoteId to reference.