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
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