+1 for this. There doesn't seem to be much documentation for using other exchanges.
Add poloniex to c.watch_exchanges in your config.js and the map/reduce will include poloniex trades. Trading is not implemented for Poloniex API yet though. See https://github.com/carlos8f/zenbot/pull/34 there are complications with needing order book logic.
Where can I look to fix the order book logic for poloniex? I want to start trading on Poloniex.
@domgolonka last week @JFD3D was working on some type of Poloniex trading support, I'm not sure what the status is of it though. I won't get around to porting the trading logic to other exchanges for at least a couple weeks.
@domgolonka, @carlos8f, I am still working on Poloniex support. I have been testing for about a week now with mixed results. At first I made a healthy 20% profit within 12-16 hours (trading ETC, FCT, and XMR) but then mongod crashed causing zenbot to lose connection. Since I was not home at the time (and did not have remote access zenbot was not running it could not trigger a sell on the downtrend and I lost all profits and then some. This was done with multiple pairs running at the same time. I also ran into a strange error with MongoDB where the entire terminal 'screen' turned green and I could not see any log info (it has also turned completely red in the past, I suspect the ANSI graph to be 'bleeding' into the terminal running mongod).
I am also getting many invalid nonce value errors. This only happens when zenbot is trading multiple pairs. I suspect that this can be fixed by adding nonce++ to either default_logic or somewhere in /core (perhaps in the async implementation). I do think this is causing substantial lag issues that effect performance and as a result lowers profitability.
To Do:
if (rs.op === 'buy') {
params.rate += parseFloat(rs.market_price * 0.05)
n(params.rate).format('0.00000000')
}
Notes:
var polo = require('poloniex-unofficial')
var nonce = require('nonce')()
client = new polo.TradingWrapper(c.poloniex_key, c.poloniex_secret, nonce)
rs.min_performance = -0.8 I get an awesome XMR/BTC ROI of 5.185861180412864 however this is not the case with most other pairs. FCT for example only gets an ROI of 1.3605448625604495, and this is only profitable in the last month. Before then it would consistently lose 20%, gain ~21% and repeat (with per at -0.8 until the recent surge in price.rs.rsi_period = '15m' // RSI tick size but again this only applies to a few pairs.I know this is a lot of info at once, any suggestions or help of any kind with these issues would be much appreciated. Thanks!
I please you to add support for poloniex exchange, because Coinbase exchange isn't anonymous. They follow transactions and check id etc.
@JFD3D regarding the nonce errors:
You can't send trade API calls asynchronously, because they may arrive out-of-order. Let's say you send a trade API call with the nonce 1, then one with the nonce 2, but due to the randomness of the network latency, or a delay with the orderbook processing, or for any other reason, the second call is processed first. The first call's nonce is now invalid. The only propery way is to wait for the first call to complete (i.e. return its answer) before sending the next one.
There is, however, a workaround. Each API key uses its own nonce counter, so if you generate multiple API keys for your account and then assign one key to each trading pair / thread, you shouldn't run into issues.
@scrawl @JFD3D
why not process calls in queue synchronously instead of creating multiple api keys?
@scrawl @egorbenko I've posted about using unique API keys (although not very user friendly) in the zenbot discord channel, it's linked in the README.md (Please Join in the discussion there, we can always use more input in real-time chat and I enjoy chatting there) I'm going to try defining the nonce value fresh right before every API call, I'll let you know if that works. I will also see if I can get async to do this although I've had some issues with that already.
It should look like this #79 :sweat_smile:
In the mean time I've decided to forgo the order book logic and use the Polo immediateOrCancel order flag with a slippage variable to ensure orders stay within a known %. Oh yea and Machine Learning. #79
@egorbenko I also may have figured out the proper way to async nonce, and I think the best way to do multi pair trading is to have many zenbot instances watching in 'adviser mode' and then spawn a live trading process once a buy signal is triggered per pair like we discussed on discord. BTW the discord channel has been pretty much dead since Carlos left so lets get that going again, I really enjoy the discussions there and they have lead to some good stuff. :+1:
@JFD3D have you finished Poloniex integration? If so, can you share with us?
yea... lol
(better yet how about bter?)
Zenbot 4 is out, so I'm cleaning up 3.x issues. It has Poloniex support. Please use and test 4, thanks!
Most helpful comment
@domgolonka, @carlos8f, I am still working on Poloniex support. I have been testing for about a week now with mixed results. At first I made a healthy 20% profit within 12-16 hours (trading ETC, FCT, and XMR) but then mongod crashed causing zenbot to lose connection. Since I was not home at the time (and did not have remote access zenbot was not running it could not trigger a sell on the downtrend and I lost all profits and then some. This was done with multiple pairs running at the same time. I also ran into a strange error with MongoDB where the entire terminal 'screen' turned green and I could not see any log info (it has also turned completely red in the past, I suspect the ANSI graph to be 'bleeding' into the terminal running mongod).
I am also getting many invalid nonce value errors. This only happens when zenbot is trading multiple pairs. I suspect that this can be fixed by adding nonce++ to either default_logic or somewhere in /core (perhaps in the async implementation). I do think this is causing substantial lag issues that effect performance and as a result lowers profitability.
To Do:
Notes:
rs.min_performance = -0.8I get an awesome XMR/BTC ROI of 5.185861180412864 however this is not the case with most other pairs. FCT for example only gets an ROI of 1.3605448625604495, and this is only profitable in the last month. Before then it would consistently lose 20%, gain ~21% and repeat (with per at -0.8 until the recent surge in price.rs.rsi_period = '15m' // RSI tick sizebut again this only applies to a few pairs.I know this is a lot of info at once, any suggestions or help of any kind with these issues would be much appreciated. Thanks!