If you can think it,
your agent can trade it.

Trade on OKX with natural language, from market signals to execution. MCP Server + CLI + Skills, open source, keys never leave your device.

npm install -g okx-trade-mcp okx-trade-cli
$ okx market ticker ETH-USDT
ETH-USDT $3,487.20 ▲ +1.82% 24h Vol: $9.3B
> Show my current positions and P&L
Calling swap_get_positions + account_get_balance
BTC-USDT-SWAP Long 0.1 Entry: $87,432 uPnL: +$128.50 (+0.15%)
Available balance: 8,240.32 USDT
> Long BTC-USDT-SWAP 0.1 at market, TP at 92000, SL at 84000
Calling swap_place_order

Poate fi folosit cu fiecare client MCP

Două moduri de a tranzacționa

Un singur motor performant. Alegeți modul de conectare.

Server MCP

Adresați-vă OKX folosind Claude, ChatGPT sau orice alt asistent AI care acceptă standardul MCP. Este suficient să transmiteți viziunea dvs., AI construiește strategia și execută tranzacția.

#AI-Native#Claude/GPT#Market Data
Consultați documentele

CLI

Tranzacționați direct din terminalul dvs. Transformați datele de piață în scripturi, programați sarcini cron și automatizați orice element din stiva dvs. de dezvoltare.

#Terminal#Shell Pipes#Cron Jobs
Consultați documentele

Plug-and-Play Skills

Pick the capabilities you need. Each skill is a self-contained module. Install one, or install them all.

npx skills add okx/agent-skills
okx-cex-market

Market data

Real-time tickers, orderbook depth, candlesticks, funding rates, open interest, and index data. No API key required.

#Public#Real-time#No Auth
okx-cex-trade

Trading

Spot, futures, options, and advanced orders. Execute, cancel, amend, or batch orders, including OCO, trailing stops, and grid bots.

#Spot#Futures#Options#Algo
okx-cex-portfolio

Portfolio

Track balances, positions, PnL, billing history, fee rates, and transfers. Get full portfolio visibility with a single skill.

#Balance#Positions#P&L#Fees
Browse all skills on GitHub

Built for any and every trading setup

Every strategy type from grid bots, algo orders, DCA, to arbitrage, built with a sentence.

Verificarea integrității portofoliului

„Afișează-mi PnL din ultima săptămână și totalul comisioanelor plătite”

Obțineți o defalcare completă a propriului PnL, comisioanelor și expunerii. Aflați imediat situația curentă a portofoliului dvs.

Arbitraj pentru rata de finanțare

„Dacă rata de finanțare pentru BTC depășește 0,1%, deschideți o poziție short”

Asistentul AI monitorizează ratele de finanțare și deschide poziții când spreadul este potrivit. Dvs. setați declanșatorul, iar acesta gestionează restul proceselor.

Deschideți poziția cu TP/SL

„Contract long BTC 0,1 la prețul pieței, TP la 92.000, SL la 84.000”

O singură comandă vă deschide poziția cu protecție integrată. Nu există ordine separate de gestionat.

DCA la scăderi

„Am 1.000 USDT. Cumpără BTC de fiecare dată când scade cu 2%”

Stabiliți-vă bugetul și pragul pentru scăderi. Asistentul AI vă aranjează ordinele de cumpărare, permițându-vă să acumulați cripto fără a urmări piața.

Robot de tranzacționare în grilă

„Configurează o grilă ETH-USDT între 3.200 USD și 3.800 USD cu 10 grile”

Obțineți automat volatilitatea bazată pe interval. Asistentul AI calculează spațierea, vă măsoară investiția și plasează fiecare ordin.

Reechilibrare automată

„Reechilibrează-mi portofoliul la 50% BTC, 30% ETH, 20% SOL”

Setați-vă alocarea țintă. Asistentul AI calculează numărul exact de tranzacții necesare și vă reechilibrează portofoliul, totul simultan.

Dați startul în 3 minute

01 Instalare
npm install -g okx-trade-mcp okx-trade-cli
02 Inițializare
mkdir -p ~/.okx && vim ~/.okx/config.toml

# ~/.okx/config.toml
default_profile = "demo"

[profiles.demo]
site = "global"
api_key = "your-demo-api-key"
secret_key = "your-demo-secret-key"
passphrase = "your-demo-passphrase"
demo = true
03 Tranzacționare
okx-trade-mcp setup --client claude-desktop  # or: cursor / vscode / claude-code

# MCP — natural language in Claude Desktop / Cursor
"Show my account balance"
"Long BTC 0.1 SWAP at market with SL at 85000"
# CLI — terminal + script integration
okx market ticker BTC-USDT
okx market candles ETH-USDT --bar 1H --limit 200 --json
Nu este necesară nicio cheie API pentru datele de piață. Utilizați --piața cu module pentru acces cu zero configurări. Creați chei API pe OKX (cheile live și cele demo sunt gestionate separat).

Întrebări frecvente

Just about everything you can do on OKX. Check prices, trade spot, futures, and options, set up advanced orders (like stop-loss or trailing stop), manage your account, and run grid bots. You can do it all using natural language or your command line. Check GitHub for the full feature list.

We built four layers of safety to prevent that. Start in --demo mode to trade with simulated funds, or use --read-only mode to restrict the AI to data queries. Even in live mode, the AI is strictly warned before taking any action with real funds. Read our Safety guide for details. You need to independently verify all relevant information prior to execution. AI can make mistakes, and you are responsible for losses.

It works with any AI client that supports the Model Context Protocol (MCP). This includes Claude Desktop, Claude Code, Cursor, and custom agents built with the MCP SDK. Right now, it runs locally on your device, with cloud-hosted support coming soon. We may add or remove certain AI clients at our discretion.

Yes. Agent Trade Kit is 100% free and open-source under the MIT license. All you need is an OKX account and API keys to execute trades. (You don’t even need API keys just to pull market data).

Absolutely. Everything runs locally, but please keep your key secure and avoid exposing it to AI clients. Your keys are securely stored on your device (~/.okx/config.toml), all transactions are signed locally, and the AI never sees your credentials. No data is ever sent anywhere except directly to OKX. Since it’s open-source, you can audit the code yourself on GitHub. You are responsible for keeping your API keys safe.

The Agent Trade Kit is a collection of servers and toolkits intended to facilitate automated or AI-assisted trading, and does not constitute financial, investment, legal, or tax advice. AI-generated actions may trigger real trades and result in significant losses due to model errors, hallucinations, inaccurate or outdated information, latency, market volatility, slippage, liquidity constraints, technical failures, incorrect parameters, or service disruptions. The Service is provided “as is” and “as available,” with no warranties regarding accuracy, completeness, execution reliability, or continuous availability. The Kit may rely on third-party large language models (LLMs) that are not owned, operated, controlled, verified, or endorsed by OKX; OKX disclaims all responsibility and liability for any third-party LLM services or outputs, and you use them entirely at your own risk. You are solely responsible for independently verifying all information, configuring and supervising automated strategies, safeguarding API credentials, applying least-privilege permissions (including avoiding withdrawal permissions unless strictly necessary), binding trusted IPs, and testing with small amounts before scaling. To the maximum extent permitted by law, OKX disclaims liability for any direct or indirect losses arising from use of the AgentTrade Kit, and you agree to indemnify and hold OKX harmless from any claims related to your use, trading activities, or reliance on AI-generated outputs.

De la idee la execuție.
Începeți să construiți acum.

MCP + CLI + Skills • Zero-cost local deployment