question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

create_limit_sell_order() at YoBit returns invalid id.

See original GitHub issue

ccxt (1.9.284)

In case of YoBit, create_limit_sell_order() returns invalid id like ‘240006290265529’. So, the succeeding fetch_order() raises TypeError.

import ccxt
from pprint import pprint


if __name__ == "__main__":
    ex = ccxt.yobit({
        'apiKey': YOBIT_KEY,
        'secret': YOBIT_SECRET,
    })

    symbol = 'WAVES/BTC'
    sell_order = ex.create_limit_sell_order(symbol, 1, 0.1)
    pprint(sell_order)
    sell_order_id = sell_order['id']
    print('sell_order_id={}'.format(sell_order_id))
    fetched_sell_order = ex.fetch_order(sell_order_id, symbol)
    pprint(fetched_sell_order)
{'amount': 1.0,
 'cost': 0.1,
 'datetime': '2017-11-05T02:08:06.000Z',
 'fee': None,
 'filled': 0.0,
 'id': '240006290265529',
 'info': ...,
 'price': 0.1,
 'remaining': 1.0,
 'side': 'sell',
 'status': 'open',
 'symbol': 'WAVES/BTC',
 'timestamp': 1509847685661,
 'type': 'limit'}
sell_order_id=240006290265529
Traceback (most recent call last):
  File "/Users/akiyoko/PycharmProjects/cctrade/ccxt_test.py", line 20, in <module>
    fetched_sell_order = ex.fetch_order(sell_order_id, symbol)
  File "/Users/akiyoko/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/ccxt/exchanges.py", line 7226, in fetch_order
    order = self.parse_order(self.extend({'id': id}, response['return'][id]))
  File "/Users/akiyoko/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/ccxt/exchanges.py", line 7198, in parse_order
    'datetime': self.iso8601(timestamp),
  File "/Users/akiyoko/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/ccxt/exchange.py", line 556, in iso8601
    utc = datetime.datetime.utcfromtimestamp(int(round(timestamp / 1000)))
TypeError: unsupported operand type(s) for /: 'str' and 'int'

Process finished with exit code 1

On the other hand, Bittrex works well.

{'id': '9885d201-f612-4a3a-b526-43ec7f84f5b6',
 'info': {'message': '',
          'result': {'uuid': '9885d201-f612-4a3a-b526-43ec7f84f5b6'},
          'success': True}}
sell_order_id=9885d201-f612-4a3a-b526-43ec7f84f5b6
{'amount': 1.0,
 'average': None,
 'cost': 0.1,
 'datetime': '2017-11-05T02:10:26.000Z',
 'fee': {'cost': 0.0, 'currency': 'BTC'},
 'filled': 0.0,
 'id': '9885d201-f612-4a3a-b526-43ec7f84f5b6',
 'info': ...,
 'price': 0.1,
 'remaining': 1.0,
 'side': 'sell',
 'status': 'open',
 'symbol': 'WAVES/BTC',
 'timestamp': 1509847826000,
 'type': 'limit'}

Process finished with exit code 0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
akiyokocommented, Nov 5, 2017

ccxt (1.9.378)

Works well. Thanks, great!!!

1reaction
kroitorcommented, Nov 5, 2017

This was fixed in 1.9.378. Let us know if it works for you or not, plz. Thx!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Yobit.net Rules and Regulations
All the transactions are considered final and irrevocable. Return of funds to the initial state after the transaction is closed is not forseen....
Read more >
ccxt Documentation
The ccxt library currently supports the following 115 cryptocurrency exchange markets and trading APIs: id name ver doc countries. _1broker.
Read more >
ccxt
A JavaScript / Python / PHP cryptocurrency trading library with support for 130+ exchanges. Latest version: 1.93.36, last published: 18 minutes ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found