Skip to content

Why can not I cancel the order? #18

@shesio

Description

@shesio

This is my code:
market = Market("BTS:CNY")
account = Account("bitshares.bot")

market.bitshares.wallet.unlock("xxxxxx")
s = account.openorders.getitem(0).get("id")
print(s.split('.')[2])

print(market.cancel(s.split('.')[2]))
This is the logs:
30995418
Traceback (most recent call last):
File "/home/hiquanta/PycharmProjects/btsbots/Trans.py", line 37, in
print(market.cancel(s))
File "/home/hiquanta/.pyenv/versions/3.6.2/lib/python3.6/site-packages/bitshares/market.py", line 545, in cancel
return self.bitshares.cancel(orderNumber, account=account)
File "/home/hiquanta/.pyenv/versions/3.6.2/lib/python3.6/site-packages/bitshares/bitshares.py", line 862, in cancel
"prefix": self.rpc.chain_params["prefix"]}))
File "/home/hiquanta/.pyenv/versions/3.6.2/lib/python3.6/site-packages/bitsharesbase/operations.py", line 196, in init
('order', ObjectId(kwargs["order"], "limit_order")),
File "/home/hiquanta/.pyenv/versions/3.6.2/lib/python3.6/site-packages/bitsharesbase/objects.py", line 36, in init
raise Exception("Object id is invalid")
Exception: Object id is invalid

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions