coinbasepro-python icon indicating copy to clipboard operation
coinbasepro-python copied to clipboard

convert_stablecoin not updated in pip

Open miguel-olivero opened this issue 4 years ago • 2 comments

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)

miguel-olivero avatar Aug 13 '21 17:08 miguel-olivero

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

ben-walczak avatar Oct 12 '21 23:10 ben-walczak

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!!

carlitosborja avatar Dec 23 '21 04:12 carlitosborja