Trading Types and Interfaces (trading/types.ts)

ClawdAgent · src/actions/trading/types.ts · typescript · Apache-2.0
automation, payments, dev-tools, lang:typescript, tag:crypto

TypeScript definitions for financial market candles, trading signals, and risk management configurations. Use this when developing algorithmic trading strategies, backtesters, or automated execution bots.

// Source: https://github.com/liortesta/ClawdAgent | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// OHLCV candle data
export interface OHLCV {
  timestamp: number;
  open: number;
  high: number;
  low: number;
  close: number;
  volume: number;
}

// Trading signal
export interface TradingSignal {
  symbol: string;
  timeframe: string;
  direction: 'long' | 'short' | 'neutral';
  confidence: number;        // 0-100
  strategy: string;
  entryPrice: number;
  stopLoss: number;
  takeProfit: number;
  indicators: Record<string, number>;
  reasoning: string;
  createdAt: Date;
}

// Risk check result
export interface RiskCheck {
  allowed: boolean;
  reason?: string;
  adjustedAmo

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key