Guide
How do I send TradingView webhooks to OKX?
A TradingView alert can't call OKX itself. It posts to a webhook URL. Paste a Nyria strategy URL into the alert. The bot places the order on OKX. Nyria connects OKX with your API key, secret key and passphrase. Test on paper first.
Official documentation
Send TradingView webhooks to OKX in seven steps
- 1
Open the API page
Sign in to OKX and open okx.com/account/my-api.
- 2
Create the key
Create a new API key. Set a passphrase. OKX can't recover it.
- 3
Set the permissions
Turn on Read and Trade. Leave Withdraw off.
- 4
Connect OKX in Nyria
Open the OKX card on Integrations. Paste the key, the secret and the passphrase, then select Connect OKX.
- 5
Create a strategy
Under My strategies, select Create strategy and pick TradingView as the source. Nyria shows the strategy's webhook URL. Copy it.
- 6
Paste the URL into your alert
Put the alert text in the Message box. Then open Notifications, tick Webhook URL, paste the strategy's URL, then select Apply.
- 7
Test, then deploy
Run a paper bot first. Then deploy on OKX and set a budget per entry.
How the webhook reaches OKX
- TradingView posts the alert message to the strategy's URL.
- Nyria reads the message and checks it against the strategy.
- The bot places the order on OKX with your key.
- A budget per entry sets the order size.
Why an alert can't call it
- A TradingView alert can't sign an OKX request.
- It sends a webhook. Something has to place the order.
- Nyria is that receiver, and it never places an order by itself.
- Your alerts and strategy rules decide every entry and exit.
What it can't do
- A demo key connects the demo account only.
- Spot has no short selling.
- Take the order size from an alert. The budget sets it.
- Move money. Withdrawals stay off.
Questions
- Does TradingView connect to OKX directly?
- No. An alert sends a webhook. Nyria receives it and places the order.
- Does Nyria need Withdraw turned on?
- No. Leave Withdraw off.
- What if I lose the passphrase?
- OKX can't recover it. Make a new key and set a new passphrase.
- Does a demo key work for a live account?
- No. A demo key connects the demo account only.
- Can I test before using real money?
- Yes. Run the strategy on Nyria Paper first. It's free.
Next
- Paste an alert into the alert tester to see how Nyria reads it.
- Write a TradingView message with the alert builder.
- Step by step for one account: how to automate TradingView to OKX.
- Step by step for one account: how to automate TradingView to Nyria Paper.
- OKX integration.
Guides
Does OKX have an API?
Yes. OKX's API uses an API key, a secret key and a passphrase.
Read guideCan Nyria withdraw money from my broker account?
No. Nyria reads balances and sends orders. Your cash stays at your broker.
Read guideWhy does Nyria say OKX rejected this key?
Copy the OKX key and secret again and paste them in. A demo key only works for paper.
Read guideWhy does Nyria say the OKX passphrase is wrong?
Paste the passphrase you set. If it's lost, create a new OKX key.
Read guideTry a paper bot first
No card required. Paper is free. Live trading from $15 a month.