This AlgoTrader will purchase short or long contracts based on famous algorithms or your own algorithm. The exchange used in this specific code is Phemex but since we are using ccxt, there is support for every exchange that ccxt supports like Binance, ByBit, Coinbase, and many others.
An example config file is avaliable for each algorithm in it's respective folder if you decide to use them.
If you are using your own signals, then use a .env file in the parent folder. (files are highlighted below)
In order to use your own algorithm, implement it into a TradingView Chart and place Buy and Sell alerts.
Below you can see and example of my Algo setup on TradingView:
Set up webhook alerts using the alert feature on your Buy and Sell Signals, like displayed below.
Make up an auth token to make sure that no one can send webhooks to your endpoint and buy and sell
options without your permission.
After ensuring that your TradingView alert setup is correct, run api.py to start your API to recieve Buy and
Sell signals.
Example Output Below:
Now, if the API gets a request with the correct auth token and a string saying either "Buy" or "Sell", the bot
will perform the respective of longing or shorting!
Example of a "Buy" request below:
After ensuring that your config files are correct, just run the respective file of the algorithm and conditions
on your given token and long/short based on it.
Example Output of the Consolidaiton Pop Algorithm Below:
Happy Trading! ๐