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.

Coinbase Pro Orders Never Fill

See original GitHub issue
  • OS: Windows WSL
  • Programming Language version: Python3.8
  • CCXT version: 1.66.32

I’m facing an issue where coinbase pro doesn’t fill my market orders for some reason.

import ccxt
exchange_id = "coinbasepro"
trading_pair = "ADA/USD
exchange_class = getattr(ccxt, exchange_id)

exchange_class_set = exchange_class(
            {'apiKey': api_key, 'secret': api_secret, 'password': api_pass ,
            'enableRateLimit': True})

if exchange_class_set.has['createMarketOrder']:
    if exchange.options.get('createMarketBuyOrderRequiresPrice', False):
        pass
    else:
        amount = 5  # how much ADA you want to market-buy, change for your value here
        order = exchange.createOrder(trading_pair, 'market', 'buy', amount)

    print("Made Market Order", order)

orderDetails = exchange.fetch_order_trades(order['id'])

 if not orderDetails:
     raise Exception

And so I get the exception raised for some reason:

Exception get raised stating that there is no order that can be found for that order id.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ShamanShazcommented, Jan 9, 2022

I just let the above modifications run for a few minutes and still nothing. Are the API calls I’m making just getting automatically ignored?

I would suggest asking CoinbasePro’s tech support. As you can see from your own verbose log, your requests are being properly sent towards the exchange, and the exchange replies with an empty list of trades. It doesn’t look like a bug in CCXT to me. Maybe they will only return trades for limit orders, idk. Cannot test on my side rn, cause CoinbasePro is restricting the access to the exchange for me.

Will do. I remember during testing I would see this error but it would resolve itself on its own after a while. Not sure what’s going on now.

1reaction
ShamanShazcommented, Jan 9, 2022

I would also recommend checking the permissions on your keypair on the exchange website, just in case.

Already double checked this and even generated new API keys. No luck.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Managing open orders - Coinbase Help
Filled - The quantity of this order that has been filled. Orders may be partially filled depending on market availability unless you use...
Read more >
COINBASE PRO Order Not Going Through? This Is Why...
If your Coinbase Pro order (or any other exchange) is not going through, it may be due to the type of market order...
Read more >
How to Use Limit Orders on Coinbase Advanced Trade (Full ...
Now that limit orders on Coinbase are only officially on their Advanced Trade platform, let's explore how to use the limit order function ......
Read more >
Twitter-এ Coinbase: "Limit orders let you buy or sell an asset ...
But there's no guarantee this will happen. If you submit a buy limit order, the asset could keep going up and never hit...
Read more >
Buy Limit Order Above Market Price - Investopedia
A buy limit order won't get filled if the price of the underlying asset jumps above the order's stated price. This is because...
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