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.

Binance fetchOpenOrders returns nothing

See original GitHub issue
  • OS: MacOS 10.14.5
  • Programming Language version: Python 3.6.4
  • CCXT version: 19.1.1
  • Exchange: Binance
  • Method: fetchOpenOrders

Here is a code snippet. No matter how many open orders I have in Binance I keep getting nothing returned from the function.

#fetch all the open orders of the user, get their order id and put them in a list
openorderids = []
orders = binance.fetchOpenOrders(pair)
print("Orders: ", orders)
for each in orders:
     openorderids.append(each['info']['orderId'])
#Cancelling all open orders
for id in openorderids:
     binance.cancelOrder(id, pair)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
magnitiscommented, May 13, 2021

@andy3520 after talking several times with the Binance devs, they confirmed that this is a known REST API issue from their side during volatile markets. I ended creating something bespoke using Websockets and caching the updates using a queue system (on Python 3).

2reactions
kroitorcommented, Nov 24, 2020

@rori4 sometimes the order is not returned on your first attempt, but returned immediately afterwards on a retry – i think this is related to the messaging queue pipe on the Binance side. So, your order is accepted, but due to a mooning BTC, the number of requests and the overall load from all users in general is so high that it takes time to process the order, and your fetchOpenOrders request does not see it on first attempt. Also, you may want to check this: https://github.com/ccxt/ccxt/wiki/Manual#rate-limit, i’m assuming you have enabled it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ccxt-dev/ccxt - Gitter
The fetchOrders is for retrieving orders, whether those orders are spot trading orders or margin trading orders or any other type of order....
Read more >
How to Resolve Order Issues - Binance
Issues like the inability to cancel your orders or coins not being credited to your account require further support. Please contact our Customer ......
Read more >
R/binance.R - Rdrr.io
Call binance_credentials()') } if (is.null(credentials$key)) ... the query string for Binance #' @param params list #' @return string #' @keywords internal ...
Read more >
Fetch open orders from the Binance account - R-Project.org
Fetch open orders from the Binance account ... run: binance_open_orders('ARKETH') binance_open_orders() # all symbols - binance.weight 40 ## End(Not run) ...
Read more >
Ccxt fetch orders. py at master - AEPH
Returns : Returns within 28 days. fetch_open_orders() and it does not return for minutes but spams "binance fetchOpenOrders WARNING: fetching open orders ...
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