Authorization fails for LakeBTC when calling private API
See original GitHub issueWhen trying to call fetch_balance()
for with lakeBTC I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ccxt/lakebtc.py", line 72, in fetch_balance
response = self.privatePostGetAccountInfo()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ccxt/lakebtc.py", line 199, in request
response = self.fetch2(path, api, method, params, headers, body)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ccxt/base/exchange.py", line 258, in fetch2
request = self.sign(path, api, method, params, headers, body)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ccxt/lakebtc.py", line 193, in sign
'Authorization': "Basic " + self.apiKey + ':' + signature,
TypeError: must be str, not bytes
I think this is because both self.apiKey
and signature
are bytes and you are trying to concatenate them into a string. I think they need to be converted into strings. I think also, you need to create the string self.apiKey + ':' + signature
and convert that into base64 before adding it 'Basic '.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Resolve connection issues with API Gateway private ... - AWS
AWS resources in Amazon VPC can fail to connect to a private API ... "User: anonymous is not authorized to perform: execute-api:Invoke on ......
Read more >ccxt Documentation - Read the Docs
The ccxt library currently supports the following 115 cryptocurrency exchange markets and trading APIs: id name ver doc countries. _1broker.
Read more >How do I troubleshoot issues connecting to an API Gateway ...
How do I troubleshoot issues connecting to an API Gateway private API endpoint? 4.5K views 11 months ago. Amazon Web Services.
Read more >CCXT-REST API Documentation
createPrivateConnection. Creates a private connection to the exchange referenced in {exchangeName}. Authorizations: bearerAuth ...
Read more >teatien-ccxt - CryptoCurrency eXchange Trading Library - PyPI
id name ver doc
acx ACX 2 API
anxpro ANXPro * API
aofex AOFEX * API
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@LaurentIsRunning this is fixed in the most recent version of ccxt as well, thx for reporting! Let us know if you have any other difficulties with it.
Ok, this is now fixed completely, let us know if you have any difficulties with it. Thx again!