Instantdex trade integration test

The purpose of this integration test is to write custom bot logic in JavaScript that employs a basic high frequency trading strategy.

Exhange: Poloniex

Trading Currencies: NXT / BTC

Interval: Interval should be relatively frequent, maybe every 5 seconds

Bot logic:

At each interval get the current high and low for NXT.

Place limit order at the low amount. If within X amount of time order is not completed, check low amount again, if it has increased since last check of low amount, place limit BUY order at this new amount. If low amount has not increased, increase BUY offer by Y %.

Repeat the above algorithm until a buy is successful. Then immediately attempt to SELL at the current high price. If within X amount of time order is not completed, check high amount again, if high amount has decreased since last check of low amount, place limit order at this new amount. If it has not decreased, decrease SELL offer by Y %.

Notes from James:

you can use the orderbook API to get the prices and the buy/sell API to do the trades but it is not many tested yet, so just with small amounts for now you need to use apikeypair to set the apikey/apisecret before authenticated commands will work

Posted on Dec 04, 2017