I'm a small bitcoin trader who would like to automate his trading strategies. I don't know what would be the best or easiest way to achieve this, but I am comfortable with computers and some coding, and I'm hoping you can help me.
This is a project that aims to build a first working version of an automatic trading program that operates on cryptocurrency exchanges using what is called “REST API”. There appear to be different versions of API for different exchanges and perhaps even for the same exchange (?).
The first version is only required to perform very basic functions, does not require an interface and I expect can be finished in 30 minutes to 5 hours depending on your skills/familiarity.
If the work is delivered satisfactorily, you may be hired to work on expanding the code to include more features, as well as updating the code to reflect changes in rules and operations of the exchanges. Pay may increase if you are skilled.
You may use the programming language of your choice and there are libraries and sample codes available on e.g. Github that claim to perform very similar tasks and are possibly of help to you in this project. I don’t care if it works through a browser, as a standalone program or something else – as long as I can run it on a Windows 10 machine.
It is your task to educate me how to use your code, and I should be able to alter the code myself without needing to install expensive software. I am somewhat familiar with Java and very familiar with MATLAB, Stata and MS Excel. Integration with any of those is a plus but is definitely not required.
Program/Code Desired Functionalities
• Collect and store the 3 highest bid prices and 3 lowest ask prices every second, along with the volumes and actual trades (prices + volume) on BTC/USD for 1 minute on 1 exchange (preferably Bittrex); the data should be generated in or easily exportable to any standard format such as .csv, and should also be usable for trading rules (see below).
• Trade automatically BTC/USD on 1 exchange based on the last 5 price moves.
o Define midquote = (highest bid price + lowest ask price)/2.
o Define a price move as a change in the midquote. Since the program is collecting data on a second-to-second basis, at most 1 change can occur every second.
o Define USD balance as the amount of USD I am holding minus the amount of USD I am trying to sell in the market (measured by active limit orders). This may or may not be automatically delivered by the exchange.
o If the last 5 price moves are all in the same direction and with a total move of at least xx, put in a limit order that bets the price will keep moving in the same direction (bid if going up, ask if going down). Open a new long position (long BTC, short USD) with an amount that is dependent on the balances I have; Open $1 worth of positions if the USD balance is above $5, and 10% of remaining USD balance otherwise. Similarly, open a new short position worth $1 when the BTC balance is above $5 and 10% of remaining BTC balance when the remaining BTC balance is between $0-5. Use the midquote to compute BTC balance in USD.
The limit order should be one tick closer to the bid (ask) when submitting a buy (sell) order compared to the prevailing ask (bid). A tick is a minimum price increment, for example 0.01 when prices are quoted as 7059.43
I can provide an outline of the desired code if the above is unclear, such as "IF pricemove[-1] > 0 AND pricemove[-2] > 0 AND [...] , THEN BUYLIMIT(market = BTC-USDT, rate = bestbid + tick, quantity = 1)".
There is no need for a user interface at this point. Just tell me where to adjust values in the code if I want to change (say) 1 minute to 1 hour in the data collection process, and how to start and stop the code.
Important: To weed out spam, after greeting me, start your response with the words I am R34l. Thank you for being one of the people who actually read to the end of this job description.