Developer Documentation

Build with the
Tradyn API

Programmatic trading, real-time market data, and account management — all through a single, well-documented API.

Quick Start

Your first trade
in minutes

Authenticate with a single API key, fetch account data, and execute trades — all in a few lines of code. No complex setup required.

Secure by Default

Bearer token auth, IP whitelisting, and key scoping

RESTful & Consistent

Predictable endpoints, JSON responses, standard HTTP verbs

Built for Speed

Sub-22ms processing for latency-sensitive trading strategies

tradyn_api.py
1import requests
2
3API_KEY = "tk_live_a1b2c3d4e5f6"
4BASE = "https://api.tradyn.com/v1"
5headers = {"Authorization": f"Bearer {API_KEY}"}
6
7# Fetch account balance
8account = requests.get(f"{BASE}/api/account", headers=headers).json()
9print(f"Balance: ${account['data']['balance']:,.2f}")
10print(f"Equity: ${account['data']['equity']:,.2f}")
11
12# Open a market buy on EURUSD
13order = requests.post(f"{BASE}/api/trade/open", headers=headers, json={
14 "symbol": "EURUSD",
15 "side": "buy",
16 "volume": 0.10,
17 "sl": 1.0850,
18 "tp": 1.0950
19}).json()
20
21print(f"Order filled: ticket #{order['data']['ticket']}")
22print(f"Fill price: {order['data']['price']}")

API Endpoints

A clean, RESTful interface for every trading operation you need.

MethodEndpoint
GET/api/account
GET/api/positions
POST/api/trade/open
POST/api/trade/close
POST/api/trade/modify
GET/api/symbols
GET/api/history
WS/ws/ticks

Choose Your Integration

Three ways to connect — from REST APIs to real-time WebSocket streams and MT5 trade copying.

REST API

REST API Reference

Complete HTTP API for account management, trading operations, market data, and position management.

  • Account balance and equity endpoints
  • Market order and pending order execution
  • Position management and modifications
  • Symbol data and market information
WebSocket

WebSocket Streaming

Real-time data streaming via WebSocket for live market ticks, position updates, and account notifications.

  • Real-time tick data streaming
  • Symbol subscription management
  • Instant price updates
  • Low-latency data delivery
MQL5

MT5 Trade Copier

Expert Advisor for MetaTrader 5 that copies trades to Tradyn in real-time with full position mapping.

  • Instant trade detection via OnTradeTransaction
  • Symbol mapping for broker differences
  • Volume multiplier support
  • SL/TP synchronization

Built for Production

Everything you need to build reliable, high-performance trading systems.

Sub-22ms Latency

Internal order processing optimized for speed-sensitive strategies

Enterprise Security

TLS 1.3, API key scoping, IP whitelisting, and rate limiting

Multi-Asset

Forex, CFDs, Crypto, Indices, and Commodities via a single API

Full Market Data

Real-time quotes, historical ticks, and instrument metadata

Position Management

Open, close, modify, and monitor positions programmatically

Webhook Events

Subscribe to trade fills, margin calls, and account updates

99.9% Uptime

Highly available infrastructure with automatic failover

Rate Limits

Generous rate limits with burst support for trading operations

Ready to start building?

Integrate trading, market data, and account management into your application today.