TradingView to OKX
Turn TradingView alerts into OKX orders
Your alert decides when to trade. Latis places the order on your OKX account, inside limits you set: a maximum position, a daily loss limit and a kill switch. No code, no server to run, and you can test it on paper before any real money is involved.
How it fits together
- TradingView watches the chart and fires an alert with a one-line message such as
{"action": "buy"}. - Latis receives it at your bot’s private web address, checks your kill switch, your daily loss and your position limit, then sends a market order.
- OKX fills the order in your own account. Spot.
Make a paper bot and copy its web address
Sign up with just your email, open Bots, choose Bring your own and Paper, and enter the pair your alert trades, for example BTCUSDT. Latis shows the bot’s private webhook URL.
Point your TradingView alert at it
In the alert’s notifications, tick Webhook URL and paste the address. Set the message to what the alert should do:
{"action": "buy"}or, to follow a Pine strategy’s own orders, {"action": "{{strategy.order.action}}"}. The TradingView guide walks through every message, with pictures.
Connect OKX when the paper results look right
- Create the key on the OKX site you log into: regional OKX sites have their own accounts and keys.
- Set a passphrase, tick Read and Trade, and leave Withdraw off. Restricting it to Latis’s IP address is recommended.
- Keep your USDT in the Trading account: deposits usually land in Funding, and orders only spend Trading.
Then add the key under Exchanges and switch the bot to live. The alert keeps working unchanged. Switching pauses the bot first; a second, deliberate step starts real trading. Live trading needs a plan, starting with a 30-day free trial.
Questions
Can TradingView place orders on OKX by itself?
No. A TradingView alert can call a web address, but it cannot sign in to OKX or place an order. Latis receives the alert and places the order on your OKX account through an API key you create.
Do I need a paid TradingView plan?
Yes. Webhook alerts are not on TradingView’s free plan, and TradingView requires two-factor sign-in to use them.
Does Latis hold my money?
No. Your funds stay in your own OKX account. Latis checks that the key cannot withdraw, refuses a key that can, and checks again before every live order.
Can I try it without real money?
Yes. Up to three paper bots are free, with no card and no time limit: the same alerts and the same risk checks against real prices, with simulated funds.
Which OKX markets does it trade?
Spot. Futures on OKX are not supported yet.
Also on Binance, KuCoin, Bybit and MEXC. General information only, not financial advice. Trading crypto-assets is risky and you can lose money.