Official Python client for the Regime crypto market regime API (bull / bear / chop + confidence). Drop-in regime filter for Freqtrade and trading bots.
Project description
getregime — Python client for the Regime crypto market API
Official, zero-dependency Python client for Regime — a real-time crypto market regime API. One call tells you whether the market is in a bull, bear, or chop regime, with a confidence score, fused from 9 data sources (price, funding, open interest, Fear & Greed, DeFi TVL, macro, and more).
Built for Freqtrade and trading bots: gate your entries on the market regime in two lines of code.
pip install getregime
Get a free API key at getregime.com — the free tier works with a ~15-minute delay; Pro keys are real-time.
Quickstart
from getregime import RegimeClient
rc = RegimeClient(api_key="your_key") # free key is fine
r = rc.freqtrade_regime()
print(r.regime) # "bull" | "bear" | "chop"
print(r.confidence) # 0.0 – 1.0
print(r.action) # "full_position" | "reduce_position" | "exit_or_hedge" | "hold"
if r.is_bull:
print("Risk-on — confidence", r.confidence)
Public endpoints work with no key at all:
rc = RegimeClient()
print(rc.overview()) # BTC, ETH, Fear & Greed, TVL, regime
print(rc.market_regime()) # full classification + signals
print(rc.stats())
Freqtrade in 2 lines
from getregime import RegimeClient
regime = RegimeClient(api_key="your_key").freqtrade_regime()
# in populate_entry_trend(...):
# only go long when the market is in a bull regime
risk_on = regime.is_bull
A complete, runnable strategy is in
examples/freqtrade_strategy.py
— it caches the regime (a market-wide signal) and only takes longs while the
regime is bull, exiting on bear/chop. See the
Freqtrade integration guide for details.
API
| Method | Auth | Returns |
|---|---|---|
freqtrade_regime() |
any key | Regime (bull/bear/chop + action) |
overview() |
none | dict — BTC, ETH, F&G, TVL, regime |
market_regime() |
none | dict — classification + signals |
assets() |
none | list — top assets w/ funding & OI |
stats() |
none | dict — snapshot/regime stats |
brief() |
Pro+ | dict — regime + crowd + macro + risk |
signals() |
Pro+ | dict — strategy signals |
Errors
from getregime import RegimeClient, AuthError, RateLimitError, RegimeError
try:
r = RegimeClient(api_key="bad").freqtrade_regime()
except AuthError:
... # 401/403 — bad or missing key
except RateLimitError as e:
print(e.retry_after) # 429 — seconds to wait (client auto-retries first)
except RegimeError as e:
print(e.status) # any other HTTP / network failure
The client retries rate-limit (429) and server (5xx) responses with backoff automatically.
Links
- Website & free key: https://getregime.com
- API docs / playground: https://getregime.com/quickstart
- Freqtrade guide: https://getregime.com/freqtrade
- Pricing: https://getregime.com/pricing
License
MIT
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 getregime-0.1.0.tar.gz.
File metadata
- Download URL: getregime-0.1.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d9a3b7130a246e22741e067f3b4a39023b410d484bc93ee7c0e3038f83ba7fd
|
|
| MD5 |
964b137446efaeb19bbb36314bc217d1
|
|
| BLAKE2b-256 |
6fe0f281fea380c03d40ec38b792ccf988f4fe672c267fbd50e9c20d2d8eb8fe
|
File details
Details for the file getregime-0.1.0-py3-none-any.whl.
File metadata
- Download URL: getregime-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84948615e53a499618f79ab862932ea224f323e722e7a89f1baebf7a147e7e5c
|
|
| MD5 |
c45dcd62c4b7779aa5f2e9fa39598603
|
|
| BLAKE2b-256 |
e52f0b3ac85fd8424d3a20f31fb6056d3568054138220a12f419baee892d9a52
|