Getting started
Get started with Spice Data
Follow this guide to get started with Spice. An API key is not required!

Call the API

Using your browser or cURL, call the Gas Fees Estimates API as shown below. The response is a JSON object with an estimate of the next block's slow, normal, fast, and instant fees in Gwei.
Browser
cURL
Example:
https://data.spiceai.io/eth/v0.1/gasfees?price=USD
data.spiceai.io
Example results from the Ethereum gas fees API.
1
curl https://data.spiceai.io/eth/v0.1/gasfees
Copied!

Make a basic SQL query

cURL
1
curl --request POST \
2
--url 'https://data.spiceai.io/eth/v0.1/sql' \
3
--header 'Content-Type: text/plain' \
4
--data 'select * from recent_blocks order by "timestamp" desc'
Copied!

Use an SDK

Use the Python SDK to query Spice using it's high-performance Apache Arrow transport.
TypeScript/JavaScript SDK coming soon!
Export as PDF
Copy link
Edit on GitHub