resy / coinbase_python3 Goto Github PK
View Code? Open in Web Editor NEWUnofficial Coinbase Python3 Client Library
Unofficial Coinbase Python3 Client Library
It will be by August 20th, 2014.
setup.py
does not install dependencies.
First run after installing returns:
(...)
ModuleNotFoundError: No module named 'requests'
in python 3.4.2, when I use "import coinbase"
I get the following error:
Traceback (most recent call last):
File "coinkiosk2.py", line 13, in <module>
import coinbase
File "C:\Python34\lib\site-packages\coinbase\__init__.py", line 8, in <module>
from .CoinbaseOAuth import CoinbaseOAuth
File "C:\Python34\lib\site-packages\coinbase\CoinbaseOAuth.py", line 10, in <m
odule>
import requests
ImportError: No module named 'requests'`
Hi,
After following the installation step from your readme file and trying to execute the following code:
import coinbase
coinbase_api_key = str('<api_key>')
coinbase_api_secret = str('<api_secret_key>')
coinbase = coinbase.Coinbase.with_api_key(coinbase_api_key, coinbase_api_secret)
balance = coinbase.get_balance()
print('Balance is ' + balance + ' BTC')
I get the following exception:
python3 wallet-watcher.py Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/utils.py", line 868, in check_header_validity
if not pat.match(value):
TypeError: expected string or bytes-like object
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "wallet-watcher.py", line 7, in <module>
balance = coinbase.get_balance()
File "/usr/local/lib/python3.6/dist-packages/coinbase/__init__.py", line 138, in get_balance
return self.get('/account/balance')['amount']
File "/usr/local/lib/python3.6/dist-packages/coinbase/__init__.py", line 122, in get
return self.__rpc.request('GET', path, params)
File "/usr/local/lib/python3.6/dist-packages/coinbase/CoinbaseRPC.py", line 75, in request
request = requests.get(url, headers=headers)
File "/usr/lib/python3/dist-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 506, in request
prep = self.prepare_request(req)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 449, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/usr/lib/python3/dist-packages/requests/models.py", line 306, in prepare
self.prepare_headers(headers)
File "/usr/lib/python3/dist-packages/requests/models.py", line 440, in prepare_headers
check_header_validity(header)
File "/usr/lib/python3/dist-packages/requests/utils.py", line 872, in check_header_validity
"bytes, not %s" % (name, value, type(value)))
requests.exceptions.InvalidHeader: Value for header {ACCESS_NONCE: 1609705740747573} must be of type str or bytes, not <class 'int'>
System info:
Kernel: 4.19.25-041925-generic x86_64
bits: 64
Desktop: Gnome 3.28.4
Distro: Ubuntu 18.04.5 LTS
Could I have any advice of what I would be doing wrong ?
Best regards,
Mike O.
Hello, I just found this api, and am pretty confused. I followed the instructions, and put coinbase inside my site-packages, and nothing is working. Something as simple as this is not working either.
https://gist.github.com/anonymous/75b48032ea78d7c7520322b68ecc52d9 (The apis keys are in ,but just not here)
Errors: https://gist.github.com/anonymous/d7d39e678c29cdc46c34dbfa01ac771e
Hopefully you can help me out.
In the library Coinbase OAuth, line 38 needs an & to correctly create links.
params = urllib.parse.urlencode(params) + 'scope=' + '+'.join(scope)
changed to
params = urllib.parse.urlencode(params) + '&scope=' + '+'.join(scope)
otherwise the site throws an error saying the redirect_uri is invalid
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.