followsm-sdk
Official Python SDK for the FollowSM smart-money & orderbook toxicity API.
Install
pip install followsm-sdk
Quickstart
from followsm_sdk import FollowSMClient
client = FollowSMClient(api_key="fsm_live_...") # or omit for the free, IP-rate-limited tier
snapshot = client.get_toxicity_snapshot("BTCUSDT")
print(snapshot.vpin, snapshot.is_toxic_alert)
toxic_pairs = client.get_toxic_pairs() # also works without an api_key
SymbolToxicityMetrics response
get_toxicity_snapshot() and get_toxic_pairs() both return SymbolToxicityMetrics (pydantic models), matching the raw JSON the backend returns:
{
"symbol": "BTCUSDT",
"timestamp": 1758412800.0,
"price": 62150.5,
"vpin": 0.72,
"ob_toxicity_1pct": 2.35,
"ob_imbalance_l1": 0.61,
"depth_bands": {
"0.5%": { "bid_notional": 184320.0, "ask_notional": 96410.0, "imbalance_ratio": 0.657 },
"1.0%": { "bid_notional": 312500.0, "ask_notional": 210800.0, "imbalance_ratio": 0.597 },
"2.0%": { "bid_notional": 590100.0, "ask_notional": 470200.0, "imbalance_ratio": 0.556 }
},
"volume_z_score": 3.1,
"natr_15m": 0.84,
"taker_buy_ratio": 0.58,
"is_toxic_alert": true
}
| Field | Type | Description |
|---|---|---|
symbol |
str |
Trading pair, e.g. "BTCUSDT" |
timestamp |
float |
Unix epoch seconds when the snapshot was computed |
price |
float |
Last traded price |
vpin |
float |
Volume-Synchronized Probability of Informed Trading, [0.0, 1.0] |
ob_toxicity_1pct |
float |
Ask/bid notional ratio within ±1% of mid price |
ob_imbalance_l1 |
float |
Best bid/ask (L1) imbalance |
depth_bands |
dict[str, OrderBookDepthBand] |
Keyed by band width ("0.5%", "1.0%", "2.0%"), each with bid_notional, ask_notional, imbalance_ratio |
volume_z_score |
float |
Robust Z-score of recent traded volume |
natr_15m |
float |
Normalized ATR over 15-minute candles |
taker_buy_ratio |
float |
Share of taker volume that was buy-side |
is_toxic_alert |
bool |
True when vpin > 0.70 or ob_toxicity_1pct > 2.0 |
Free vs Developer API
| Free / Unauthenticated | DEVELOPER_API ($199/mo) | |
|---|---|---|
| Requests/min | 30 | 300 |
| WebSocket connections | 1 | Multiple |
| Binance pairs | Limited | 50+ |
| Latency | Standard | Sub-10ms in-memory snapshots |
On HTTP 429, the SDK raises RateLimitExceededException with an upgrade prompt pointing to https://follow-sm.com/pricing.
Live streaming
import asyncio
from followsm_sdk import FollowSMClient
async def main() -> None:
client = FollowSMClient(api_key="fsm_live_...")
async for snapshot in client.stream_toxicity():
print(snapshot.symbol, snapshot.vpin, snapshot.is_toxic_alert)
asyncio.run(main())
Release files for followsm-sdk 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| followsm_sdk-1.0.1.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| followsm_sdk-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / followsm_sdk-1.0.1.tar.gz
| Download URL | followsm_sdk-1.0.1.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3230124cf8eaea40537212e743e5127002931278082c7fd75afec35f718728d
|
|
BLAKE2b-256 checksum How to use checksums |
de54dd6861c06373cac4ed6d2d69184b723bbeffb197d7286ff50995dbef7542
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / followsm_sdk-1.0.1-py3-none-any.whl
| Download URL | followsm_sdk-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c47543679357744e7b9419aa190eece842f0182f7d57926ffed31023028a802b
|
|
BLAKE2b-256 checksum How to use checksums |
249411c82fe2887ec84e65157ac84cdd078987c7b560207fbfb500422aadb9e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|