A simple Python SDK for Crypto AI API
Project description
Crypto AI
A simple Python SDK for Crypto AI API
Implementations
Crypto AI SDK is currently used in many diffrent applications, such as:
- Crypto Predictor - a Telegram bot that allows its users to generate custom forecasts for 100+ cryptocurrencies
- BTC Predictor - a Twitter bot that tweets daily forecasts about Bitcoin's price
Installation
You can use pip to install Crypto AI SDK:
pip3 install crypto-ai
Usage
from pprint import pprint
from crypto_ai import AI
API_KEY = "xxxxxxxxxxxxxxxxxxxx" # your rapidapi key
# initialize the sdk
ai = AI(API_KEY)
# generate a prediction on a specific time window
prediction = ai.predict(
symbol='BTCUSDT',
timeframe='3d',
)
# generate a series of short and long-term predictions
forecast = ai.forecast(
symbol='BTCUSDT',
)
# print results
print('\n==== Prediction:\n')
pprint(prediction)
print('\n==== Forecast:\n')
pprint(forecast)
Output:
==== Prediction:
{
"data":{
"prediction":{
"change":0.42,
"confidence":59.7,
"maximum":[
30510.0,
30664.0,
30444.0,
30711.0,
30424.0,
30364.0
],
"mean":[
29551.0,
29700.0,
29487.0,
29745.0,
29468.0,
29411.0
],
"minimum":[
28593.0,
28735.0,
28531.0,
28779.0,
28512.0,
28457.0
]
},
"symbol":"BTCUSDT",
"timeframe":"3d"
},
"status":"ok"
}
==== Forecast:
{
"data":{
"forecast":{
"12h":{
"change":-0.59,
"confidence":51.2,
"maximum":29911.91,
"mean":29814.17,
"minimum":29716.42
},
"15m":{
"change":-0.07,
"confidence":51.5,
"maximum":30175.29,
"mean":30129.35,
"minimum":30083.42
},
"1d":{
"change":-0.32,
"confidence":49.4,
"maximum":29981.0,
"mean":29919.0,
"minimum":29856.0
},
"1h":{
"change":-0.09,
"confidence":49.2,
"maximum":30127.75,
"mean":30017.03,
"minimum":29906.31
},
"1w":{
"change":-5.49,
"confidence":46.8,
"maximum":28902.7,
"mean":28521.1,
"minimum":28139.4
},
"2d":{
"change":1.91,
"confidence":50.8,
"maximum":30685.2,
"mean":30597.69,
"minimum":30510.17
},
"2w":{
"change":0.42,
"confidence":59.7,
"maximum":30364.0,
"mean":29411.0,
"minimum":28457.0
},
"30m":{
"change":-0.07,
"confidence":52.0,
"maximum":30151.82,
"mean":30103.13,
"minimum":30054.45
},
"3d":{
"change":3.94,
"confidence":50.5,
"maximum":31590.69,
"mean":31481.19,
"minimum":31371.69
},
"3h":{
"change":-0.22,
"confidence":50.3,
"maximum":30083.55,
"mean":29979.28,
"minimum":29875.02
},
"5m":{
"change":-0.01,
"confidence":49.0,
"maximum":30135.44,
"mean":30115.74,
"minimum":30096.04
},
"6h":{
"change":-0.27,
"confidence":51.0,
"maximum":30012.05,
"mean":29910.3,
"minimum":29808.54
}
},
"symbol":"BTCUSDT"
},
"status":"ok"
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
crypto-ai-0.0.1.post1.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for crypto_ai-0.0.1.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ec671b7da8ffff961a5ba24429bc48cb253fd667f8e01e59ea8f25fe89ccdc6 |
|
MD5 | 4fa78fe4df21e0299673402f9be23749 |
|
BLAKE2b-256 | 7171ab3ee71c3936fd452017111e8072b51a21bbffb03c1da275c7a86110f09f |