Hero Image

A Simple Way to Trade Cryptocurrencies without Locking Funds

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 at 33,000 USDT (BTC/USDT pair), and the current ETH price is at 2,100 USDT (ETH/USDT).
  • You want to buy the BTC dip if it drops to 28,000 USDT per BTC.
  • At the same time, you might want to buy the ETH dip if it drops further to 1800 USDT per ETH.
  • 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:

  1. You place an alert at a specific price in a TradingView chart.
  2. In the alert options, you set your server’s webhook URL and the JSON of the order you want to execute.
  3. 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).
  4. 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.

Other Related Posts:

» C++ is the new Python

C++ is making a comeback. It ranked fourth on the Tiobe Index as the most popular coding language this month after being rated top by 8% of people. That doesn't exactly put it on a par with C or Java or Python at 11-12%, but it does mean that C++ is up there with the favourites- and that it's continuing a run of increasing popularity that began at the start of 2020.

15th Jul 2021

My first steps in a fintech journey

Ever wondered how opaque Latin American financial markets are? Especially for the parallel ones. Mysterious and ever-changing, unstable and almost with own personality. The opaqueness I’m referring to is mostly about how rates in currency pairs seem to change a lot and how people tend to interpret these at their convenience.

11th Apr 2021