00xLazy
TradeOS
TypeScript

Institutional-grade CEX trading infrastructure for AI agents. 100+ exchanges via natural language.

Last updated Jul 3, 2026
20
Stars
1
Forks
0
Issues
0
Stars/day
Attention Score
47
Language breakdown
No language data available.
โ–ธ Files click to expand
README

โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•
   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•  โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•‘
   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘
   โ•šโ•โ•   โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•

> Institutional-grade CEX trading infrastructure for AI agents_


Version TypeScript CCXT License OpenClaw


English ยท ็ฎ€ไฝ“ไธญๆ–‡


-----

What is TradeOS?

One sentence to trade. One layer to rule them all.

TradeOS is an OpenClaw Skill that transforms natural language into secure, auditable exchange operations across 100+ centralized cryptocurrency exchanges. It functions as a complete trading infrastructure layer โ€” handling key management, order execution, risk enforcement, portfolio analytics, and autonomous strategies โ€” so AI agents can operate with the same rigor expected of institutional trading desks.

  • All keys encrypted at rest (AES-256-GCM)
  • All data stays local โ€” zero cloud dependency
  • All trades require explicit confirmation


-----

Feature Matrix

Security & Infrastructure

| Module | Capability | |:--|:--| | Key Vault | AES-256-GCM + PBKDF2 (600K iter) | | Risk Guard | Per-order limits, daily caps, leverage ceilings | | Anomaly Detection | Balance drops, unknown orders, API failures | | Security Auditor | Per-exchange health scoring |

Trading & Analytics

| Module | Capability | |:--|:--| | Trading Engine | Market / Limit / Stop / TP across spot & futures | | Portfolio Tracker | Multi-exchange aggregation & snapshots | | PnL Reports | Daily, weekly, monthly & quarterly reports |

Autonomous Strategies

| Module | Capability | |:--|:--| | DCA Scheduler | Hourly / Daily / Weekly / Monthly auto-buys | | Conditional Orders | Price triggers, once or recurring + cooldowns |

Market Intelligence

| Module | Capability | |:--|:--| | Arbitrage Scanner | Cross-exchange spread detection (net of fees) | | Funding Rates | Perpetual contract yield tracking & alerts |


-----

Architecture

flowchart TB
    User["User (Natural Language)"] --> OpenClaw["OpenClaw Agent"]
    OpenClaw --> Core["TradeOS Core"]

Core --> Vault["Key Vault\n(AES-256-GCM)"] Core --> EM["Exchange Manager"] Core --> OE["Order Executor"] Core --> RG["Risk Guard"]

EM --> CCXT["CCXT"] CCXT --> EX["100+ Exchanges"]

OE --> EM RG --> OE

Core --> DCA["DCA Scheduler"] Core --> ARB["Arbitrage Scanner"] Core --> FR["Funding Monitor"] Core --> CO["Conditional Orders"] Core --> AD["Anomaly Detector"] Core --> SR["Security Reporter"]

DCA --> OE CO --> OE

Core --> DB[("SQLite\nPortfolio DB\nTrade DB")]

style User fill:#0d1117,stroke:#58a6ff,color:#c9d1d9,stroke-width:2px style OpenClaw fill:#0d1117,stroke:#58a6ff,color:#c9d1d9,stroke-width:2px style Core fill:#161b22,stroke:#f78166,color:#f0f6fc,stroke-width:3px style Vault fill:#161b22,stroke:#7ee787,color:#c9d1d9,stroke-width:2px style EM fill:#161b22,stroke:#7ee787,color:#c9d1d9,stroke-width:2px style OE fill:#161b22,stroke:#7ee787,color:#c9d1d9,stroke-width:2px style RG fill:#161b22,stroke:#7ee787,color:#c9d1d9,stroke-width:2px style CCXT fill:#0d1117,stroke:#d2a8ff,color:#c9d1d9,stroke-width:2px style EX fill:#0d1117,stroke:#d2a8ff,color:#c9d1d9,stroke-width:2px style DCA fill:#161b22,stroke:#79c0ff,color:#c9d1d9 style ARB fill:#161b22,stroke:#79c0ff,color:#c9d1d9 style FR fill:#161b22,stroke:#79c0ff,color:#c9d1d9 style CO fill:#161b22,stroke:#79c0ff,color:#c9d1d9 style AD fill:#161b22,stroke:#79c0ff,color:#c9d1d9 style SR fill:#161b22,stroke:#79c0ff,color:#c9d1d9 style DB fill:#0d1117,stroke:#ffa657,color:#c9d1d9,stroke-width:2px


-----

Quick Start

# 1. Clone into your OpenClaw skills directory
git clone https://github.com/00xLazy/TradeOS.git ~/.openclaw/skills/TradeOS

2. Install & build

cd ~/.openclaw/skills/TradeOS && npm install && npm run build

Then, in your OpenClaw agent:

> "Initialize my TradeOS vault with a master password."
> "Add my Binance API key. The key is XXXX and the secret is YYYY."

TradeOS will encrypt the credentials, verify the connection, check permission scopes, and reject any key with withdrawal access enabled.


-----

Supported Exchanges

| Exchange | ID | Spot | Futures | | |:--|:--|:--:|:--:|:--| | Binance | binance | Yes | Yes | World's largest by volume | | OKX | okx | Yes | Yes | Advanced derivatives platform | | Bybit | bybit | Yes | Yes | Leading perpetuals exchange | | Gate.io | gateio | Yes | Yes | 1700+ trading pairs | | Bitget | bitget | Yes | Yes | Copy-trading leader | | Coinbase | coinbase | Yes | โ€” | Regulated US exchange | | KuCoin | kucoin | Yes | Yes | The people's exchange | | HTX | htx | Yes | Yes | Global digital asset platform | | MEXC | mexc | Yes | Yes | Fast listing exchange | | Crypto.com | cryptocom | Yes | โ€” | Consumer-friendly platform | | HyperLiquid | hyperliquid | Yes | Yes | On-chain perpetuals DEX |

100+ additional exchanges supported via CCXT. If your exchange speaks REST, TradeOS can trade on it.


-----

Usage Examples

Trading

You:     Buy 0.1 BTC on Binance at market price.

TradeOS: Order Preview โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Exchange: Binance Pair: BTC/USDT Side: BUY Type: Market Amount: 0.1 BTC Est. Cost: ~$8,430.20 Est. Fee: ~$8.43 Risk Check: PASSED โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Reply "confirm" to execute.

You: confirm

TradeOS: Filled @ $84,302.50 | 0.1 BTC | Fee: 0.0001 BTC

DCA Automation

You:     Set up a daily DCA plan to buy $100 of ETH on Bybit at 9am.

TradeOS: DCA Plan Created โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Name: Daily ETH DCA Exchange: Bybit Pair: ETH/USDT Amount: $100/day @ 09:00 UTC Status: RUNNING Next exec: Tomorrow 09:00

Arbitrage Scanning

You:     Scan for arbitrage on BTC/USDT across Binance, OKX, and Bybit.

TradeOS: Arbitrage Results โ€” BTC/USDT โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Buy on OKX: $84,290 (ask) Sell on Binance: $84,350 (bid) Gross spread: 0.071% Net profit: 0.051% (after fees) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Below 0.1% threshold โ€” monitor only

Portfolio Overview

You:     Show me my total balance across all exchanges.

TradeOS: Portfolio Summary โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Binance .............. $45,230.00 OKX ................. $12,800.00 Bybit ................. $3,200.00 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Total: $61,230.00

โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ BTC 42% โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ ETH 20% โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ USDT 31% โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ SOL 7%

Conditional Orders

You:     If ETH drops below $3,000, buy 2 ETH on OKX.

TradeOS: Conditional Order Created โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Trigger: ETH/USDT < $3,000.00 Action: BUY 2 ETH @ Market Exchange: OKX Mode: One-time Status: MONITORING (every 15s)


-----

Data Storage

All data is stored locally on your machine. Nothing is transmitted to external servers.

~/.openclaw/skills/TradeOS/
โ”‚
โ”œโ”€โ”€ vault/
โ”‚   โ””โ”€โ”€ exchanges.enc.json          Encrypted API credentials
โ”‚
โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ portfolio.db                Asset snapshots (SQLite)
โ”‚   โ””โ”€โ”€ trades.db                   Trade records (SQLite)
โ”‚
โ”œโ”€โ”€ alerts/
โ”‚   โ””โ”€โ”€ rules.json                  Alert rule definitions
โ”‚
โ”œโ”€โ”€ dca/
โ”‚   โ”œโ”€โ”€ plans.json                  DCA plan configurations
โ”‚   โ””โ”€โ”€ history.json                DCA execution log
โ”‚
โ”œโ”€โ”€ arbitrage/
โ”‚   โ””โ”€โ”€ config.json                 Arbitrage scanner settings
โ”‚
โ”œโ”€โ”€ funding/
โ”‚   โ””โ”€โ”€ config.json                 Funding rate monitor settings
โ”‚
โ”œโ”€โ”€ conditional-orders/
โ”‚   โ”œโ”€โ”€ orders.json                 Conditional order definitions
โ”‚   โ””โ”€โ”€ history.json                Execution history
โ”‚
โ”œโ”€โ”€ anomaly/
โ”‚   โ”œโ”€โ”€ config.json                 Anomaly detection settings
โ”‚   โ””โ”€โ”€ snapshots.json              Balance snapshot history
โ”‚
โ”œโ”€โ”€ security/
โ”‚   โ”œโ”€โ”€ config.json                 Security auditor settings
โ”‚   โ””โ”€โ”€ last-report.json            Most recent security report
โ”‚
โ””โ”€โ”€ risk-rules.json                 Risk management rules


-----

Security

TradeOS Enforces

  • AES-256-GCM encryption for all stored credentials
  • Automatic rejection of keys with withdrawal access
  • Mandatory preview + confirm flow for manual trades
  • File permissions set to chmod 600 (owner-only)
  • Full API key masking in logs and chat output
  • Risk guard always active โ€” even for automated strategies

You Should Configure

  • Never enable withdrawal on API keys
  • IP whitelist on every exchange API key
  • Strong, unique master password for the vault
  • Risk limits matching your risk tolerance
  • Run on a secure, private machine


-----

Skill Combo: TradeOS + CoinAnk

Install both TradeOS and CoinAnk API Skill in OpenClaw to unlock a complete "see the market + execute trades" closed loop.

CoinAnk = Eyes

18 categories, 59 real-time derivatives data endpoints: K-lines, liquidation heatmaps, funding rates, long/short ratios, order flow, whale movements, fear & greed index, and more.

TradeOS = Hands

100+ exchanges, market/limit/stop/TP orders, DCA automation, conditional orders, cross-exchange arbitrage scanning โ€” all with built-in risk controls and confirmation gates.

Combine both, and a single sentence does what used to require multiple screens:

"Check BTC funding rates and the liquidation heatmap. If the rate exceeds 0.1%
 and the long/short ratio is skewed long, open a 2x short on Binance."

"Monitor ETH order flow. When a large sell signal appears, market-sell all my ETH automatically."

"Compare SOL funding rates across exchanges. Find the arb opportunity, then go long on the lowest-rate exchange and short on the highest."

"Every morning, send me a report: yesterday's BTC liquidation data + whale movements + my portfolio PnL."

"Use the Fear & Greed Index for DCA: buy $100 BTC daily when the index drops below 20, pause when it rises above 80."

One Skill watches. The other executes. Data-driven decisions, AI-powered trades.


-----

Project Structure


| Module | File | Role | |:--|:--|:--| | Entry Point | scripts/index.ts | Initializes and exports all modules | | Key Vault | scripts/key-vault.ts | AES-256-GCM credential encryption and storage | | Exchange Manager | scripts/exchange-manager.ts | CCXT exchange connections, balances, tickers | | Order Executor | scripts/order-executor.ts | Order preview, confirmation, and execution | | Risk Guard | scripts/risk-guard.ts | Pre-trade risk checks and enforcement | | Portfolio Tracker | scripts/portfolio-tracker.ts | Multi-exchange balance aggregation and snapshots | | Balance Monitor | scripts/balance-monitor.ts | Price, balance, and drawdown alerts | | PnL Tracker | scripts/pnl-tracker.ts | Trade history and performance reports | | DCA Scheduler | scripts/dca-scheduler.ts | Automated dollar-cost averaging plans | | Arbitrage Scanner | scripts/arbitrage-scanner.ts | Cross-exchange price spread detection | | Funding Rate Monitor | scripts/funding-rate-monitor.ts | Perpetual contract funding rate analysis | | Conditional Orders | scripts/conditional-order.ts | Trigger-based automated order execution | | Anomaly Detector | scripts/anomaly-detector.ts | Account anomaly and integrity monitoring | | Security Reporter | scripts/security-reporter.ts | API key health scoring and recommendations | | Security Utilities | scripts/security-utils.ts | Shared cryptographic helpers |


License

MIT License โ€” 00xLazy


-----


Built with OpenClaw ยท CCXT ยท better-sqlite3


Built for autonomous trading infrastructure.


Made by 00xLazy

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท 00xLazy/TradeOS ยท Updated daily from GitHub