getregime npm SDK: Crypto Regime Detection in TypeScript
The getregime npm package gives you crypto regime detection in 3 lines of code. Here's how to use it.
Install
npm install getregime
Quick Start
import { CseClient } from 'getregime';
const client = new CseClient(); // No key needed for free tier
// Get current regime
const regime = await client.getRegime();
console.log(regime.regime); // "bull" | "bear" | "chop"
console.log(regime.confidence); // 0.71
// Get market overview
const overview = await client.getOverview();
console.log(overview.btc.price); // 70110
console.log(overview.fearGreedIndex); // 10
With Authentication (Pro Features)
const client = new CseClient({ apiKey: 'cse_pro_your_key_here' });
// Intelligence brief (Pro)
const brief = await client.getBrief();
console.log(brief.regime);
console.log(brief.crowdPositioning);
console.log(brief.macroEnvironment);
// Strategy signals (Pro)
const signals = await client.getSignals();
signals.forEach(s => console.log(`${s.symbol}: ${s.action} (${s.strategy})`));
Express.js Integration
import express from 'express';
import { CseClient } from 'getregime';
const app = express();
const regime = new CseClient();
app.get('/api/market-status', async (req, res) => {
const data = await regime.getRegime();
res.json({
status: data.regime,
confidence: data.confidence,
shouldTrade: data.regime !== 'bear' || data.confidence < 0.7,
});
});
app.listen(3000);
API Reference
| Method | Endpoint | Auth Required |
|---|---|---|
getRegime() |
/api/v1/market/regime |
No |
getOverview() |
/api/v1/market/overview |
No |
getAssets() |
/api/v1/market/assets |
No |
getBrief() |
/api/v1/intelligence/brief |
Pro |
getSignals() |
/api/v1/signals/all |
Pro |
getCrowdPositioning() |
/api/v1/intelligence/crowd-positioning |
Pro |
Links
- npm: npmjs.com/package/getregime
- Docs: getregime.com/quickstart
- GitHub: github.com/Thordersonjg/regime-trading-bot
Try Regime Intelligence
Regime is a real-time crypto market regime detection API. One endpoint tells you if the market is bull, bear, or chop — so your bot only trades when conditions match your strategy.
Top comments (0)