NEWDirect chain access. 50% cheaper than competitors.

Quickstart

Get started with qoery API

Try the Interactive Playground

Test API requests directly in your browser

Open

Get Your API Key

Sign up to get your API key.

Base URL

https://api.qoery.com/v0

Authentication

Include your API key in the X-API-KEY header:

-H "X-API-KEY: your_api_key_here"

Make Your First Request

If you are using Python, we recommend using our official SDK for simpler integration and Pandas support.

curl "https://api.qoery.com/v0/candles?symbol=WETH-USDT&interval=15m&limit=10" \
  -H "X-API-KEY: your_api_key_here"
const response = await fetch(
  'https://api.qoery.com/v0/candles?symbol=WETH-USDT&interval=15m&limit=10',
  {
    headers: {
      'X-API-KEY': 'your_api_key_here'
    }
  }
);

const data = await response.json();
console.log(data);
import requests

response = requests.get(
    'https://api.qoery.com/v0/candles',
    headers={'X-API-KEY': 'your_api_key_here'},
    params={
        'symbol': 'WETH-USDT',
        'interval': '15m',
        'limit': 10
    }
)

data = response.json()
print(data)

Response

{
  "data": [
    {
      "time": "2023-11-30T12:00:00Z",
      "open": 2050.50,
      "high": 2060.00,
      "low": 2045.20,
      "close": 2055.80,
      "volume": 1500000.50
    }
  ],
  "credits_used": 2
}

Recommended: Save Credits with Pool Addresses

Save credits per request by using pool addresses instead of symbols!

Why Use Pool Addresses?

  • More efficient: Skips the pool discovery step
  • Faster responses: Direct queries are quicker
  • Lower cost: Consumes fewer credits by skipping discovery

How to Get Pool Addresses

Option 1: Use our /pools endpoint (one-time lookup)

# Find the pool once
curl "https://api.qoery.com/v0/pools?symbol=WETH-USDT" \
  -H "X-API-KEY: your_api_key_here"

# Response includes pool address
{
  "data": [{
    "id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
    ...
  }]
}

Option 2: Get it from Uniswap (0 credits)

Then Use the Pool Address

# Efficient: Direct pool query
curl "https://api.qoery.com/v0/candles?pool=0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640&interval=15m&limit=100" \
  -H "X-API-KEY: your_api_key_here"

# vs.

# Less efficient: Symbol query
curl "https://api.qoery.com/v0/candles?symbol=WETH-USDT&interval=15m&limit=100" \
  -H "X-API-KEY: your_api_key_here"

Supported Networks

Fully Verified:

  • ethereum (V3 and V4)
  • arbitrum (V3 and V4)
  • polygon (V3 only)

Note: Base and Optimism are configured but not yet verified. They may work but are not guaranteed.

Response Format

When using the symbol parameter instead of pool, the response includes a warning field with optimization suggestions:

{
  "data": [...],
  "credits_used": 3,
  "warning": {
    "message": "Using a symbol parameter consumes more credits than using a pool address. Consider using a pool address instead.",
    "documentation_url": "https://qoery.com/docs/best-practices",
    "tip": "Get pool addresses from the /pools endpoint or Uniswap UI, then use the pool parameter instead of symbol."
  }
}

The response also includes an X-API-Suggestion header with similar guidance.

Next Steps