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.

Bug in exchange.fetch_open_orders(market) where market is either BSV or BCH

See original GitHub issue
  • OS: Windows
  • Programming Language version: Python 3.7
  • CCXT version: ccxt-1.18.661
  • Exchange: bit2c
  • Method: fetch_open_orders()

Consider the following code:

def scan_my_open_orders(exchange, markets):
    my_open_orders = {}
    for market in markets:
        open_orders = exchange.fetch_open_orders(market)
        print('[scan_my_open_orders] Scanning {} open {} orders'.format(len(open_orders), market))
        if len(open_orders):
            ...

Resulting output:

[scan_my_open_orders] Scanning 2 open BTC/NIS orders
[scan_my_open_orders] Scanning 1 open ETH/NIS orders
[scan_my_open_orders] Scanning 0 open BCH/NIS orders  <--- BUG
[scan_my_open_orders] Scanning 1 open LTC/NIS orders
[scan_my_open_orders] Scanning 2 open ETC/NIS orders
[scan_my_open_orders] Scanning 3 open BTG/NIS orders
[scan_my_open_orders] Scanning 0 open BSV/NIS orders  <--- BUG
[scan_my_open_orders] Scanning 9 open GRIN/NIS orders

Analysis:

  1. I verified I have open orders for BCH (bit2c refers to it as BCHABC) and BSV (bit2c refers to it as BCHSV).
  2. markets parameter is the markets returned by exchange.load_markets()

Hence, fetching the open orders fails to return the open orders of those 2 coins.

What I suspect is that there is some mix-up between the following pairs:

  1. BCHABC <-> BCH
  2. BCHSV <-> BSV

While you check your side, I will debug the contents of fetch_open_orders() and add some print outs to see what exactly goes wrong there

Thanks

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
asafravidcommented, Jun 9, 2019

Confirmed fix in ccxt-1.18.663 Thanks!

1reaction
asafravidcommented, Jun 9, 2019

Ok, waiting the 10 minutes and retesting

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exchanges — ccxt 2.4.71 documentation
Besides making basic market and limit orders, some exchanges offer margin trading (leverage), ... so, now there is BCH (for BCH ABC) and...
Read more >
Bitpanda error fetchOpenOrders(), fetchOrder() #13463
On bitpanda i get follow error when i try to get some informations about trades: UncaughtException: TypeError: Cannot read properties of ...
Read more >
Microsoft issues a fix for Exchange Y2K22 bug that shut ...
Microsoft has released an official fix for the Exchange server bug that cropped up at midnight on January 1st, 2022.
Read more >
CCXT | PDF | Java Script | Software
6 Chapter 1. Supported Exchanges. CHAPTER 2. Exchanges By Country. The ccxt library currently supports the following cryptocurrency exchange markets and trading ...
Read more >
HW 1 (FOR SHARING) : FTX.ipynb - Colaboratory
ccxt library ที่เป็นที่นิยมในการเชื่อม API กับ Exchange ... ioc = False # immidate or cancel เช่น ส่งคำสั่งไป Long 1000 market
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