PyWaves / BlackBot

Grid Trading Bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Price is pulled with moved decimal by two digits

kastmada opened this issue · comments

@jansenmarc
@PyWaves
image
the price has been pulled as 1750.39 instead 17.5039

same issue on all pairs.
Are the last commits from March 2019 correct?

setting the manual price in the bot.cfg file doesn't solve the problem, since every time order is filled, bot reads the wrong sell price with moved decimal.

Is there a change to discuss it with anyone here?

Yep, price calculation depends on the version of transactions.

You can try to change all lines:

10 ** (PAIR.asset2.decimals + (PAIR.asset2.decimals - PAIR.asset1.decimals)

into

10 ** 8

since PyWaves is currently using Version 3 of exchange transactions.

If that is successful, please provide a pull request.

it works now by replacing:

10 ** (PAIR.asset2.decimals + (PAIR.asset2.decimals - PAIR.asset1.decimals)

with:

10 ** 6

After changing it to 10 ** 8 decimal got moved two digits too far (0.175039).

After some testing it turns out, that 10 ** 8 works for some pairs and 10 ** 6 works for other pairs.
I'm not familiar with Python so I won't be able to fix the code, unfortunately.

Can you please check which verson of PyWaves you are using? If it is not the latest version, please upgrade accordingly. Since version 3 is used for orders, 8 should be working properly.

How to check this? For the WAVES/USDN pair I had to use 10**6.

Show me the output of:

pip list | grep PyWaves

please.

PyWaves 0.8.41

How to get the latest version? I am using pip install pywaves. I have python3.

I checked in the Waves developers group and this is in fact the latest version of PyWaves.

Again, did you check if the following formula works:

10^(8 + priceAssetDecimals - amountAssetDecimals)

This formula works, but I tested only on the WAVES/USDN pair.