How to connect
SQL API
Authentication
Python
pip install clickhouse-connectimport clickhouse_connect
conn = clickhouse_connect.get_client(
host="<provided_database_url>",
port=8443,
username="<username>",
password="<password>",
database="public_data",
)
df = conn.query_df(
"select * from trade where market like 'BTC%' and timestamp > toStartOfDay(now()) order by timestamp desc limit 20"
)
print(df.columns)
print(df[["exchange", "market", "timestamp", "price", "quantity", "side"]].head())Rust
Golang
Other methods
REST API
Authentication
curl
python
Last updated