Official Python SDK for the CoinBell AI crypto prediction API
Project description
CoinBell AI — Python SDK
Embed CoinBell AI crypto price forecasts into your Python application.
Install
pip install coinbellai
Quickstart
from coinbellai import Client
client = Client(api_key="cb_live_...") # or set COINBELL_API_KEY
# predict() submits the job and polls until it's done (~120s typical).
result = client.predict("bitcoin", duration=7, model="nova-pulse")
print(result["prediction"]) # full forecast object
print(result["completedAt"])
Get an API key from the CoinBell dashboard → Settings → API Keys.
Async (submit + poll)
Predictions take ~120s, so the API is asynchronous. predict() blocks and polls
for you; if you'd rather manage it yourself (job queues, webhooks, UIs):
job = client.submit("bitcoin", duration=7, model="nova-pulse")
print(job["id"], job["status"]) # -> "...", "queued"
# later — poll yourself, or use client.wait(job["id"])
status = client.get_prediction(job["id"])
if status["status"] == "completed":
print(status["prediction"])
predict()
| Argument | Type | Default | Notes |
|---|---|---|---|
symbol |
str | — | CoinGecko coin id, e.g. "bitcoin", "ethereum" |
duration |
int | 7 |
Forecast horizon in days (1–90) |
model |
str | "nova-spark" |
nova-spark (1cr), nova-pulse (3cr), nova-cortex (10cr) |
current_price |
float | None |
Optional; fetched server-side if omitted |
language |
str | "en" |
"en" or "zh" |
context |
str | None |
Optional free-text to steer the analysis |
Configuration
COINBELL_API_KEY— used whenapi_keyis not passed.COINBELL_BASE_URL— override the API base URL (self-host / staging).
Errors
from coinbellai import (
AuthenticationError, # 401 — bad/missing/revoked key
InsufficientCreditsError, # 402 — not enough credits
RateLimitError, # 429 — has .retry_after
APIError, # other 4xx/5xx
CoinBellError, # base class
)
try:
client.predict("bitcoin")
except InsufficientCreditsError as e:
print("Top up credits:", e.body)
except RateLimitError as e:
print("Slow down, retry after", e.retry_after, "s")
Zero runtime dependencies (stdlib urllib only). Python 3.8+.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coinbellai-0.1.0.tar.gz.
File metadata
- Download URL: coinbellai-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c3a29dbe4feb478d3193482ab4461aad273f0e95705c6b31ca426c63512b7c6
|
|
| MD5 |
837ab84dfe39cc2ee195545aebb37032
|
|
| BLAKE2b-256 |
6fe0f57f245d4fb4a27dc802fd3ca0ad2013d6a8039cde3ebe295e91f9234ecc
|
File details
Details for the file coinbellai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: coinbellai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2b494e3206b8e358b45aef230aa30884b958b751c3c3d59b9a125a6cfb31af7
|
|
| MD5 |
ab4e1fe1a7dc302529a1f10889168ae7
|
|
| BLAKE2b-256 |
05883d10227cb31a25716497b983cfd8e2f8934978609121109550f46d292b8e
|