Developer Platform

Custom Strategies
Code Your Edge

Build unlimited custom algorithmic trading strategies with our powerful SDK. From simple scripts to complex HFT algorithms—full code control with institutional infrastructure.

Everything You Need to Build

Professional tools and infrastructure for algorithm developers.

Full Code Control

Write custom strategies in JavaScript/TypeScript with complete access to our trading API.

Real-Time Data Access

Access live market data, order books, and historical data from 15+ exchanges.

Strategy Builder SDK

Use our powerful SDK with pre-built functions for indicators, orders, and risk management.

High-Frequency Ready

Build HFT strategies with ultra-low latency execution and tick-by-tick data.

Built-In Risk Controls

Leverage position limits, stop-loss, and circuit breakers to protect your capital.

Multi-Asset Support

Trade crypto, forex, stocks, and futures from a single strategy.

Simple, Powerful API

Write strategies in JavaScript/TypeScript with our intuitive SDK.

// ============================================
// RSI + MACD MOMENTUM STRATEGY
// ============================================
// Buys on oversold RSI with bullish MACD,
// sells on overbought conditions
// ============================================

// Parameters
const RSI_OVERSOLD = td.config.getNumber('RSI_OVERSOLD', 30);
const RSI_OVERBOUGHT = td.config.getNumber('RSI_OVERBOUGHT', 70);
const STOP_LOSS_PCT = td.config.getNumber('STOP_LOSS_PCT', 2);
const TAKE_PROFIT_PCT = td.config.getNumber('TAKE_PROFIT_PCT', 5);
const POSITION_SIZE = td.config.getNumber('POSITION_SIZE', 100);

// Get indicators
const rsi = td.indicators.rsi;
const macd = td.indicators.macd;
const price = td.market.price;

// Previous MACD for crossover detection
const prevMacd = td.state.get('prevMacd', macd.macd);
const prevSignal = td.state.get('prevSignal', macd.signal);

// ============================================
// ENTRY LOGIC
// ============================================
if (!td.position.hasPosition) {
    // Check for oversold RSI
    const isOversold = rsi < RSI_OVERSOLD;

    // Check for bullish MACD crossover
    const bullishCrossover = macd.macd > macd.signal
        && prevMacd <= prevSignal;

    // Check histogram is positive
    const positiveHistogram = macd.histogram > 0;

    if (isOversold && bullishCrossover && positiveHistogram) {
        const stopLoss = td.utils.round(
            price * (1 - STOP_LOSS_PCT / 100), 2
        );
        const takeProfit = td.utils.round(
            price * (1 + TAKE_PROFIT_PCT / 100), 2
        );

        td.trade.buy({
            amountPercent: POSITION_SIZE,
            stopLoss: stopLoss,
            takeProfit: takeProfit,
            reason: `RSI: ${rsi.toFixed(2)}, MACD crossover`
        });

        td.utils.log('BUY SIGNAL', {
            rsi: rsi.toFixed(2),
            macd: macd.macd.toFixed(4),
            signal: macd.signal.toFixed(4),
            price: price
        });
    }
}

// ============================================
// EXIT LOGIC
// ============================================
if (td.position.hasPosition && rsi > RSI_OVERBOUGHT) {
    td.trade.close(`RSI overbought at ${rsi.toFixed(2)}`);

    td.utils.log('SELL SIGNAL', {
        rsi: rsi.toFixed(2),
        pnl: td.position.pnl,
        pnlPercent: td.position.pnlPercent.toFixed(2)
    });
}

// Save state for next spin
td.state.set('prevMacd', macd.macd);
td.state.set('prevSignal', macd.signal);

Powerful SDK Features

Pre-built functions and utilities to speed up development.

Technical Indicators

Access 100+ built-in indicators including RSI, MACD, Bollinger Bands, and more.

Order Management

Simple API for market, limit, stop, and advanced order types.

Market Data

Real-time and historical candles, ticks, order book, and trades.

State Management

Persistent state storage for your strategy data and parameters.

How It Works

From code to production in four steps.

01

Write Your Strategy

Use our SDK to code your strategy logic with access to market data, indicators, and order functions.

02

Test & Debug

Run backtests on historical data and use our debugger to refine your strategy.

03

Paper Trade

Deploy to paper trading to validate in real-time without risking capital.

04

Go Live

Launch your strategy on live exchanges with full monitoring and analytics.

Build Anything You Imagine

From simple strategies to advanced ML-powered algorithms.

Custom Indicators

Build proprietary technical indicators that aren't available in standard platforms.

Machine Learning

Integrate ML models and AI algorithms for predictive trading strategies.

Complex Logic

Implement multi-condition strategies that standard bots can't handle.

100+
SDK Functions
Unlimited
Custom Strategies
<1ms
Latency
24/7
Support

Ready to Code Your Strategy?

Start building custom trading algorithms with our powerful SDK and infrastructure.

Free Tier Available • Full SDK Access • Deploy Unlimited Strategies