Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert_stablecoin not updated in pip #455

Open
miguel-olivero opened this issue Aug 13, 2021 · 2 comments
Open

convert_stablecoin not updated in pip #455

miguel-olivero opened this issue Aug 13, 2021 · 2 comments

Comments

@miguel-olivero
Copy link

The last version available to download from pip3 seems not to be the same as the one available here.

The version I have throws AttributeError: "AuthenticatedClient" object has no attribute 'convert_stablecoin', when I try to access to such function.

import cbpro

auth_client = cbpro.AuthenticatedClient(key, b64secret, passphrase, api_url="https://api-public.sandbox.pro.coinbase.com")

auth_client.convert_stablecoin(10,"BAT","ETH")

Does anyone know if there is an alternative to do such currencies conversion by using the python API? (Or if there is a way to manually update my version from pip to include such function by using github as a source)

@ben-walczak
Copy link

Came here to say I'm getting the same error. I'm seeing everything listed correctly in the github source, but the pip install does not provide this as well

@carlitosborja
Copy link

The only way I had it working was to manually download the whole coinbasepro github repository, previously forking to my repo. After unzipping the file, doing pip install this in order to get the function convert_stablecoin... but some other issues appeared. I had to manually cange some lines in other files:

in files: bson.init.py, bson.raw_bson.py and pymongo.collection.py, changed:
collections.Mapping ----> collections.abc.Mapping

and in files: bson.codec_options.py, pymongo.monitoring.py and pymongo.read_preferences.py, changed:
from collections import MutableMapping ------> from collections.abc import MutableMapping

Now, I don't if this is a correct way to fix this issue, but for now it's working.

And by the way, does any of you know how to use the 'convert_stablecoin' function in order to exchange easily between any SCC and any VCC?? Or maybe this isnot the appropiate function??? Using 'convert_stablecoin' I was only able to make a conversion between USD and USDC, many other options like ADA-USDC, ARPA-USDT I was not able to convert them. The next message pops out:

auth_client.convert_stablecoin(2,'USD','USDT')
output: {'message': 'Cannot convert USD to USDT'}

Thanks in advance!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants