API Documentation
Overview
ZeroAI provides hourly and daily cryptocurrency price predictions. Our API delivers forecasted prices for selected cryptocurrencies with high accuracy, drawing data from binance.us.
API Endpoint
https://jgnojpprhahljpqfmqqs.supabase.co/functions/v1/zeroai-api
Frequency of Data Update
Hourly Forecasts: Updated every integer hour for the upcoming hour.
Daily Forecasts: Updated at 00:00 UTC daily for the next day.
Note: The day begins at UTC time (GMT+0). Please avoid repeated requests for the same data.
Available Cryptocurrencies
Bitcoin (BTC)
Ethereum (ETH)
Request Format
GET https://jgnojpprhahljpqfmqqs.supabase.co/functions/v1/zeroai-api?symbol=[cryptocurrency]
Example: https://jgnojpprhahljpqfmqqs.supabase.co/functions/v1/zeroai-api?symbol=btc
Response Format
Each request returns a JSON array containing two objects: one for the hourly forecast (1h
) and one for the daily forecast (1d
). Each object includes the following fields:
symbol: Cryptocurrency symbol (e.g., BTC, ETH).
average: Average of the highest and lowest prices over the last period.
moving_average: Average price over the last five periods (5 hours or 5 days).
forest_price: Price predicted by the Random Forest model. Known for stable predictions over larger periods.
prophet_price: Price predicted by the Neural Prophet model. Often more accurate when there are clear price trends.
lstm_price: Price predicted by the LSTM model. Known for good fit and wider prediction ranges, capable of handling minor unpredictable price fluctuations.
stacking_price: The meta-model price, derived from the Ridge algorithm based on the first three models. It's the primary forecast used by ZeroAI, known for good performance in trend prediction.
real_price: Closing price of the previous period, also the current price at the time of data retrieval.
prediction_date: The time of prediction. Format:
YYYY-MM-DDTHH:MM:SS.000Z
.frequency: Time scale of the prediction (
1d
for daily,1h
for hourly).generation_time: Time when the prediction was generated.
accuracy: Relative error of the last period in percentage (e.g., 0.23 for 0.23%).
open: Opening price of the last period.
high: Highest price of the last period.
low: Lowest price of the last period.
price_deviation: Absolute error of the last period, measured as Mean Absolute Error (MAE).
pred_img: URL to the prediction chart image.
Example Response:
[
{
"symbol": "BTC",
"average": "39879.58",
"moving_average": "40533.31",
"forest_price": "39760.88",
"prophet_price": "39725.01",
"lstm_price": "39632.63",
"stacking_price": "39738.32",
"real_price": "39888.64",
"prediction_date": "2024-01-25T00:00:00.000Z",
"frequency": "1d",
"generation_time": "2024-01-24T00:01:29.838Z",
"accuracy": "1.37",
"open": "39870.49",
"high": "39888.7",
"low": "39870.47",
"price_deviation": "545.19",
"pred_img": "https://jgnojpprhahljpqfmqqs.supabase.co/storage/v1/object/public/zeroai//pred/BTC_1d_202401240000.png?"
},
{
"symbol": "BTC",
"average": "40071.07",
"moving_average": "40016.09",
"forest_price": "40093.74",
"prophet_price": "40064.41",
"lstm_price": "40142.1",
"stacking_price": "40122.04",
"real_price": "40072.0",
"prediction_date": "2024-01-24T17:00:00.000Z",
"frequency": "1h",
"generation_time": "2024-01-24T16:01:17.237Z",
"accuracy": "0.23849571",
"open": "40080.14",
"high": "40080.14",
"low": "40062.01",
"price_deviation": "95.57",
"pred_img": "https://jgnojpprhahljpqfmqqs.supabase.co/storage/v1/object/public/zeroai//pred/BTC_1h_202401241600.png?"
}
]
Last updated