Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crypto_ai-0.0.1.post1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file crypto-ai-0.0.1.post1.tar.gz.

File metadata

  • Download URL: crypto-ai-0.0.1.post1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for crypto-ai-0.0.1.post1.tar.gz
Algorithm Hash digest
SHA256 718da09800670b7da34caf88029fc477b872316d7ad4eb7a857c99f578b46191
MD5 2f1b3b1348962f6ada3fc9d00a9531f4
BLAKE2b-256 f94cedee712f0009f1a35dc5365996a6363507dd8e59f24743fb01fc05fe44f7

See more details on using hashes here.

File details

Details for the file crypto_ai-0.0.1.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for crypto_ai-0.0.1.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ec671b7da8ffff961a5ba24429bc48cb253fd667f8e01e59ea8f25fe89ccdc6
MD5 4fa78fe4df21e0299673402f9be23749
BLAKE2b-256 7171ab3ee71c3936fd452017111e8072b51a21bbffb03c1da275c7a86110f09f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page