MarketBotsLab

MarketBotsLab SDKs

Official clients generated from the OpenAPI 3.1 spec. See the interactive Swagger UI for the full endpoint catalogue.

TypeScript / JavaScript

Zero runtime dependencies. Works in Node 18+, browsers, Bun, and Deno.

Install

npm install @stock-insights/sdk
# or: pnpm add @stock-insights/sdk

Usage

import { StockInsightsClient, getBreakouts, getBars } from "@stock-insights/sdk";

const client = new StockInsightsClient({
  apiKey: process.env.STOCK_INSIGHTS_KEY, // optional for public reads
  baseUrl: "https://stock-insights.example.com",
});

const { rankedSignals } = await getBreakouts(client, { timeframe: "daily" });
const { bars } = await getBars(client, { symbol: "AAPL", range: "6mo" });

Python

Generated on demand from the live OpenAPI spec via openapi-generator-cli.

Generate & Install

# Generate the client from the live OpenAPI spec
openapi-generator-cli generate \
  -i http://localhost:3000/api/openapi.json \
  -g python \
  -o packages/sdk-python/src

cd packages/sdk-python/src && pip install -e .

Usage

import stock_insights
from stock_insights.api import default_api

config = stock_insights.Configuration(
    host="https://stock-insights.example.com",
    api_key={"BearerAuth": "sk_live_..."},
)
api = default_api.DefaultApi(stock_insights.ApiClient(config))

resp = api.get_breakouts(timeframe="daily")
for sig in resp.ranked_signals:
    print(sig.symbol, sig.final_score)

Or run make sdk-python from the repo root.

Authentication

Pass an API key via the Authorization: Bearer sk_… header. Read-only public endpoints work unauthenticated (rate-limited per IP); write endpoints and protected backtests require a key or Clerk session.