NEWDirect chain access. 50% cheaper than competitors.

Ticks

Fetch raw tick/swap data

Get raw, individual swap data (ticks) for granular analysis.

Method

client.ticks.get(
    symbol: str = None,
    pool: str = None,
    limit: int = 100,
    from_time: datetime = None,
    to_time: datetime = None
) -> Response

Example: Get DataFrame

Retrieve raw tick data as a DataFrame for high-precision backtesting or analysis.

import qoery

client = qoery.Client()

# Get last 100 swaps for WETH-USDC
ticks = client.ticks.get(
    symbol="WETH-USDC", 
    limit=100
)

# Convert to DataFrame
df = ticks.df

print(df[['timestamp', 'price', 'side', 'amount_usd']].head())

Output:

                  timestamp    price  side  amount_usd
0 2023-11-30 12:05:01+00:00  2055.10   buy     5000.00
1 2023-11-30 12:05:05+00:00  2055.15  sell     1200.50
...

Parameters

ParameterTypeDescription
symbolstrTrading pair (e.g., "WETH-USDC").
poolstrPool address.
limitintNumber of ticks to return (1-1000).
from_timedatetimeStart time.
to_timedatetimeEnd time.