Tektii just went live. We're shipping fixes daily — spot a bug? Let us know

Install

The Trading Gateway runs as a single self-hosted binary, configured entirely via environment variables. Install it once, point your strategy at it, and move from paper to live trading with zero code changes. For what the Gateway is and which brokers it supports, see the Trading Gateway overview and its provider table.

Prerequisites

You need one of:

  • Docker (recommended) — no Rust toolchain required
  • Rust toolchain — version 1.91.0 or later

Installation

The published Docker image bundles all default broker adapters:

docker pull ghcr.io/tektii/gateway:latest

Build from Source

Build from source only if you need a custom feature set (for example, trimming adapters you don't use — see Setup → Feature-Gated Builds):

git clone https://github.com/Tektii/trading-gateway.git
cd trading-gateway
cargo build --release

Requires Rust 1.91.0 or later. The output binary is at target/release/tektii-gateway.

Starting the Gateway

Start the Gateway with a provider and its credentials — the full list is in the provider table.

Docker

docker run -d \
  -p 8080:8080 \
  -e GATEWAY_PROVIDER=alpaca \
  -e GATEWAY_MODE=paper \
  -e ALPACA_API_KEY=your-key \
  -e ALPACA_API_SECRET=your-secret \
  ghcr.io/tektii/gateway:latest

For a quick start that doesn't require credentials, use the mock provider. ENABLE_SWAGGER=true serves interactive API docs at localhost:8080/swagger-ui:

docker run -e GATEWAY_PROVIDER=mock -e ENABLE_SWAGGER=true -p 8080:8080 \
  ghcr.io/tektii/gateway:latest

From Source

export GATEWAY_PROVIDER=alpaca
export GATEWAY_MODE=paper
export ALPACA_API_KEY=your-key
export ALPACA_API_SECRET=your-secret
cargo run --release

Verify It's Running

curl http://localhost:8080/livez

A 200 OK means the Gateway is up. For full verification (provider connectivity, REST, WebSocket), configuration, and security, continue to Setup.

Next Steps

  • Setup — Configuration, securing the Gateway, verification, monitoring, and troubleshooting
  • Going Live — Connect your backtested strategy to the Gateway for paper and live trading