Skip to content

returnOrderTrades() maybe bug #151

@ghost

Description

Hello,
I am using the v0.4.6 and there are a strange bug in my code or in poloniex api or in the module ...
I have put an amount to buy then sell it
I check when the amount is buy before sell it
My bot is working well a lot of time but when i was wake up this morning i have had the amount buy and no sell order set.
So i think maybe there are a bug in returnOrderTrades().
I use in a function returnOrderTrades to get the amount to sell but it seems sometime it's not working.
Here my func:

def check(order_id):
global polo
global timeout
polo.timeout = (timeout, timeout)
while True:
try:
result = polo.returnOrderTrades(order_id)
total_end = Decimal("0")
amount_end = Decimal("0")
for item in result:
fee = Decimal(str(item["fee"]))
total_end += Decimal(str(item["total"]))
amount = Decimal(str(item["amount"]))
amount = amount * (Decimal("1") - fee)
amount = amount.quantize(Decimal('.00000001'), rounding=ROUND_FLOOR)
amount_end += amount
else:
return(1, amount_end, total_end)
except Exception as exc:
if str(exc) == "Order not found, or you are not the person who placed it."):
return(0, Decimal("0"), Decimal("0")

Note i cancel the order before the check so if i have buy something check return me (1, amount_end, total_end) if not (0, Decimal("0"), Decimal("0")

I have read all my code a lot of time and i found nothing wrong in it.

So i think there are a bug in the poloniex module for returnOrderTrades() or in poloniex which return not the good value.

And other question does i need to use the v0.4.6 or the last one from github ?

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not behaving as it should in the codeserversideStems from a poloniex server issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy