Some time ago, I was looking for a way to trade cryptocurrency at Binance in a semi-automated fashion, where I could outline my trading strategy in a chart.
At the exchange website and application, I could do my technical analysis with the charts, but I couldn’t say: “Hey, I want to either buy or sell, depending on the market movements.”
Let’s clarify with an example with a scenario:
- The current
BTC
price is at33,000 USDT
(BTC/USDT
pair), and the currentETH
price is at2,100 USDT
(ETH/USDT
). - You want to buy the
BTC
dip if it drops to28,000 USDT
perBTC
. - At the same time, you might want to buy the
ETH
dip if it drops further to1800 USDT
perETH
. - How can you buy either asset without locking
USDT
funds depending on the scenario that comes first?
Enter: Webhook Trader.
Webhook Trader enables you to use TradingView alerts (using webhooks to trigger the orders) to place orders at different scenarios in different charts.
What is great about this way of trading is: since the order does not yet exist at the exchange for when it gets set as a chart alert, you do not need to lock the funds.
So the life of an order placed from TradingView this way is the following:
- You place an alert at a specific price in a TradingView chart.
- In the alert options, you set your server’s webhook URL and the JSON of the order you want to execute.
- The alert triggers, TradingView sends the JSON instruction to your server’s webhook URL, and the server with the configured parameters places the order (either a Market Order, Limit Order, or Stop Limit Order).
- You’ll see the order under the Open Orders tab or Order History, depending on the execution time.
For setting up this environment, you’ll need:
- A Binance account which you can set it up here. (affiliate link) In theory, this works with any cryptocurrency exchange that ccxt supports, but in case you run into problems please let me know via the Issue Tracker at GitHub.
- A TradingView Pro or better plan in your account.
- A server in DigitalOcean, which you can set it up here. (affiliate link)
- A FreeDNS account, pointing to your DigitalOcean server. Sign up here.
If you need help setting it up in your server, please drop me a Direct Message on my Twitter account, and we can arrange something for a small fee via web conference meeting outside of business hours.
blog comments powered by Disqus