Skip to main content

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) Enterprise($499/mo)
Requests/min 30 300 1,000
WebSocket streaming (stream_toxicity()) ❌ ❌ ✅
Binance pairs Limited 50+ 50+
Latency Standard Sub-10ms in-memory snapshots 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 (Enterprise only)

stream_toxicity() connects to /ws/v1/toxicity, which requires an API key on an active Enterprise subscription — Developer API and free/unauthenticated keys are rejected with close code 4003.

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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for followsm-sdk 1.0.2
File Size Uploaded
followsm_sdk-1.0.2.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for followsm-sdk 1.0.2
File Interpreter ABI Platform
followsm_sdk-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / followsm_sdk-1.0.2.tar.gz

Download URL followsm_sdk-1.0.2.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
49c6903acfb8693bdf7ea4e756ed19de1ce1659a30dbc7d6a9ba41120a2ce92d
BLAKE2b-256 checksum
How to use checksums
04d73dc100f66442fcd4ac262fe145ab26321b68d240ff3f70eaab54214d3da3
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.2-py3-none-any.whl

Download URL followsm_sdk-1.0.2-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5de1ec8439dad7e7b91248cdf3a4c34d2f17d39d33fb0a69fb63965f7f3e6b18
BLAKE2b-256 checksum
How to use checksums
387dba2073c0855eb98e28b8209eb004f5392651103b43923e190431f18ae13e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page