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 - fetch_my_trades - binance requires `apiKey`

See original GitHub issue
  • OS: Mac OS
  • Programming Language version: Python 3.6
  • CCXT version: latest
  • Exchange: Binance
  • Method: fetch_my_trades

Hi there,

I’m getting a “binance requires apiKey” authentification error each time I try to use fetch_my_trade on Binance. Please see log trace below:

Traceback (most recent call last): File “/Users/florent/PycharmProjects/light/exchanges/binance.py”, line 94, in fetch_my_trades my_trades = self.ccxt.fetch_my_trades(symbol, since=rounded, limit=None) File “/Users/florent/venvlight/lib/python3.7/site-packages/ccxt/binance.py”, line 822, in fetch_my_trades response = self.privateGetMyTrades(self.extend(request, params)) File “/Users/florent/venvlight/lib/python3.7/site-packages/ccxt/base/exchange.py”, line 362, in inner return entry(_self, **inner_kwargs) File “/Users/florent/venvlight/lib/python3.7/site-packages/ccxt/binance.py”, line 1129, in request response = self.fetch2(path, api, method, params, headers, body) File “/Users/florent/venvlight/lib/python3.7/site-packages/ccxt/base/exchange.py”, line 386, in fetch2 request = self.sign(path, api, method, params, headers, body) File “/Users/florent/venvlight/lib/python3.7/site-packages/ccxt/binance.py”, line 1056, in sign self.check_required_credentials() File “/Users/florent/venvlight/lib/python3.7/site-packages/ccxt/base/exchange.py”, line 954, in check_required_credentials self.raise_error(AuthenticationError, details=‘requires ' + key + '’) File “/Users/florent/venvlight/lib/python3.7/site-packages/ccxt/base/exchange.py”, line 372, in raise_error raise exception_type(output) ccxt.base.errors.AuthenticationError: binance requires apiKey

I’m fairly certain my apikeys are valid as I’m sending an order that gets executed a second before this. Is this a known issue?

Thanks in anticipation Florent

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
florent8000commented, Apr 6, 2019

The issue was really specific to my code, I have a middleware layer that connects to the exchange and the fetch_my_trade function wasn’t called via the middleware…

Sorry for wasting your time and thanks a lot for the help!

1reaction
florent8000commented, Apr 5, 2019

ok will look into this and post the solution here when found. Thanks the help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python binance fetchMyTrades gives only 3 month of personal ...
Python binance fetchMyTrades gives only 3 month of personal trades, so how do one iterates through results? Ask Question. Asked 2 years, 4 ......
Read more >
Updates to API Key Permission Rules (2021-07-08) - Binance
If your API Key has whitelisted IP address(es), the "Enable Spot & Margin Trading" permission will not expire. The new rules are valid...
Read more >
Exchanges — ccxt 2.4.71 documentation
JavaScript const exchange = new ccxt.binance (config) exchange. ... Most exchanges require this as well together with the apiKey.
Read more >
CCXT-REST API Documentation
Furthemore, all Private Data APIs of all exchanges would require API Key and Secret. Thus, although GET:/exchange/binance/market would work, ...
Read more >
How to Get Your Binance API Keys and Use Them [Full Guide]
1. 1.1 Sign into your Binance account and click on “Account” 2. 1.2 Click on “API Settings” 3. 1.3 Type a name for...
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