-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/Cleanup Tradelog #35
Comments
I plan on analyzing the sqlite database and going through the code to fix this as soon as I can. |
This are great news! Here are my current insights in the defect, maybe they help you: I assume the defect in context of the tax calculation of poloniex. I initially implemented some naive tax handling (https://github.com/toirl/cointrader/blob/master/cointrader/exchange.py#L15) but I suspect this is a part of the problem, I currently tend to remove this completely. Further look into the reponse from Poloniex for a buy or sell order leaves some questions to me. See the following example:
I placed an buy order with 0.0001841BTC. The response returned 0.00018377 BTC. I am not sure what this means. Does it mean that my order is only partially filled, or does it mean that poloniex put an internal tax on this and completely filled my order with 0.00018377? Unfortunately the documentation of the API gives not detail on this. https://poloniex.com/support/api/ At last I think the current trade log is to complicated and can be reduced by the "tax" fields. Let me know your findings! |
Well, think that the fee is 0.25 not 0.025. Also in the database the tax field on the trades table is 0 for all entries. Believe that the difference in your order and the response was the fee automatically removed. The function for fee should still exist and be used before placing an order to be sure it has enough after the fee to trade with. |
Yes, you're right!
This looks like as it can be removed
You mean If I want to place an order to buy 10 coins of X @ a rate of 0.1 BTC I actually must have at least 1BTC+0.25%? In the result we than expect the 1BTC total, right? Another point to consider is: Polo differenciate between Taker and Maker Fees. (IIRC 0.25/0.15). But I think we would be on the safe side to always take the higher fee to make sure the order can be placed. |
Cointrader provides a Tradelog to log every trade made by a bot. This log is used while loading the bot to replay all trades and to set the current amount of coins and BTC.
I noticed some abnormalities when replaying the tradelog as BTC and LTC can become a negative value.
This is of course not possible and results in later errors when placing orders. ( E.g. in case the bot wants to sell a negativ amount of coins.)
It is currently unclear if the logging part, the replay part or both is broken.
So this Tradelog needs some work to do some investigation
This may result in
The text was updated successfully, but these errors were encountered: