acontry / coinbasepro Goto Github PK
View Code? Open in Web Editor NEWA Python API for Coinbase Pro
License: MIT License
A Python API for Coinbase Pro
License: MIT License
Hi, i'm having problem retrive CVC-EUR value, this is my code:
import coinbasepro as cbp
client = cbp.PublicClient()
print(client.get_product_ticker('CVC-USD'))
print(client.get_product_ticker('CVC-EUR'))
And this is the output
{'ask': Decimal('0.2894'), 'bid': Decimal('0.289'), 'volume': Decimal('728795.1'), 'trade_id': 729264, 'price': Decimal('0.2891'), 'size': Decimal('179'), 'time': datetime.datetime(2022, 4, 15, 13, 42, 41, 332635)}
Traceback (most recent call last):
File "D:/PycharmProjects/KRYPTObot/myapi.py", line 5, in <module>
print(client.get_product_ticker('CVC-EUR'))
File "C:\Program Files\Python38\lib\site-packages\coinbasepro\public_client.py", line 190, in get_product_ticker
r = self._send_message(
File "C:\Program Files\Python38\lib\site-packages\coinbasepro\public_client.py", line 474, in _send_message
self._check_errors_and_raise(r)
File "C:\Program Files\Python38\lib\site-packages\coinbasepro\public_client.py", line 437, in _check_errors_and_raise
raise CoinbaseAPIError(message)
coinbasepro.exceptions.CoinbaseAPIError: NotFound
Hi, i wrote a bot using your API and i am running it against the pair ETH-EUR, and its working fine.
If i run another instance of the same bot against say the pair LTC-EUR, the first instance of bot starts giving this error:
PreparedRequest' object has no attribute 'status_code', any help on how i can debug and see what is the error your API receives?
Greetings! I am working on a PR for the WebsocketClient, and would like to submit for review soon.
Ideally, we'd have a develop branch for upcoming features, where the master branch reflects the PyPI package.
The withdrawal endpoint is listed as: https://api.exchange.coinbase.com/withdrawals/coinbase
The correct endpoint is: https://api.exchange.coinbase.com/withdrawals/coinbase-account
Python has all kinds of nice types other than string, let's use them.
Implement WebsocketClient
Following up and improving on #5.
Place limit order fails with error:
[Jul 15 2018 07:10:30 UTC] : Exception: May only specify a cancel period when time in_force is GTT.
I think the problem is that the parameter is called time_in_force but in function place_limit_order you are referring 'tif'.
This is happening back in 2017 so perhaps is due to a change in the Coinbase Pro API -- maybe there's a volume key populated but with value None?
File "/home/kdowney/dev/shadows/serenity/venv/lib/python3.7/site-packages/coinbasepro/auth_client.py", line 706, in
for fill in fills)
File "/home/kdowney/dev/shadows/serenity/venv/lib/python3.7/site-packages/coinbasepro/auth_client.py", line 700, in convert_volume_keys
fill[k] = Decimal(fill[k])
TypeError: conversion from NoneType to Decimal is not supported
Hi,
I am using a DCA bot (https://github.com/queball99/CoinbasePro-Recurring-Buy) which uses this library. When trying to place a 2 euro order for solana I get this error : coinbasepro.exceptions.BadRequest: funds is too small. Minimum size is 5.00000000.
When checking on coinbase's website it seems that 5 is the limit for quote orders for SOL-EUR, and I think that it should be placing a base order (minimum of 0.01). -> https://pro.coinbase.com/markets
The bot uses this python call to place the order : buy = auth_client.place_market_order(product_id=buy_pair, side="buy", funds=buy_amount)
This looks like a bug with the library to me becuase 5 solana is currently 710 euros ! That would be a very big minimum !
Thanks for any help
Hello,
Do you think it would be better to remove all the extra data formatting of Decimal and Datetime etc?
I think those should be handled outside of this API.
Thoughts?
Hi,
I would like to know if it's possible to request the top coins of the day (by market cap) via the API ?
This would be useful for a DCA bot so you could for example invest in the top 3 coins every week.
Thanks
Hello,
considering the mandatory migration from Coinbase Pro to Coinbase Advanced Trading, I'm assuming some changes will be required in this library:
Migrating from Pro
https://docs.cloud.coinbase.com/advanced-trade-api/docs/migration
Pro -> Advanced Trading API Mapping
https://docs.cloud.coinbase.com/advanced-trade-api/docs/rest-api-pro-mapping
I do not believe I will personally be able to contribute the changes required, however I'd like to start the discussion of those changes.
Thank you!
get_product_historic_rates doesn't pass start & end times/strings (says string not valid for end, doesn't appear to pass start)
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.