vickitrix
vickitrix copied to clipboard
Is account['available'] set only once at running the script?
I have my config set to sell 25% of my eth stash (let's say for the example: 2 ether) when a tweet matches a pattern. The first time it matched a tweet, it sold 25% of the stash: 0.5 ether. Stash value should be now 1,5 ether. Which is good. The next time it matched a tweet to sell, it tried to sell the same amount. Again 0.50 ether. That's not 25% of 1,5 ether. It should have been .375 ether.
Which led me thinking: is the account available correctly calculated each time an order is placed?
So it's definitely retrieved again right before a rule is executed (see https://github.com/nellore/vickitrix/blob/master/vickitrix/init.py#L181), but your reporting this issue has me a little worried. I'll look into it before releasing the next version, probably in the next week.
Thanks.
Maybe I am mistaken, but I had it configed to sell 50% of the stash and after two matched tweets, the stash was gone in whole. That shouldn't be the intended outcome, I think.
Thanks! I also sent you a little tip in the tipping jar.
I saw, and I very much appreciate it! Thanks so much for helping with bug fixes, too.
In addition to this: https://gitter.im/nellore/vickitrix?at=59914dd9614889d47546b677 , I found another example that's related to the storage of variables:
The script tried to place a sell order with more btc than I had. It also happened the other way around: it tried to place an order but didn't use the full available funds (0.00600, while 0.2 BTC was available). The 0.00600 was what was left after the trade before. So I guess something is not stored properly. When I restart the script, it works fine!
Tuesday, Aug 15, 2017 at 09:07:40 AM UTC || TWEET MATCHED ||
Tuesday, Aug 15, 2017 at 09:07:40 AM UTC || Available to trade: 0.0000000000000000 LTC, 0.0000000000000000 ETH, 0.2000000000000 BTC, 0.0000000000000 EUR
Tuesday, Aug 15, 2017 at 09:07:40 AM UTC || PLACING ORDER
{
"size": "0.00600",
"type": "market",
"side": "sell",
"product_id": "BTC-EUR"
}
Tuesday, Aug 15, 2017 at 09:07:40 AM UTC || One of {"price", "funds", "size"} is zero! Order not placed.
@Lasterie would you mind emailing me your rules so I can look into the issue further? [email protected] .
Done!