danpaquin / coinbasepro-python

The unofficial Python client for the Coinbase Pro API
MIT License
1.82k stars 740 forks source link

Update API #443

Closed teleprint-me closed 2 years ago

teleprint-me commented 3 years ago

I would like to start by saying good job overall and thank you for taking the time to build this.

I cloned the repo and played around with it and found quite a few issues with it.

So I forked the repo and fixed a lot of these issues over the past 2 weeks or so. I haven't submitted a PR because of some of the commit history. The biggest issue for me was backwards compatibility with Python 2.

Python 2 is officially deprecated now for a little over a year. While I understand some individuals don't have a choice and this API being a client API... I couldn't find a solid reason to actually continue supporting the API from a Python 2 point of view.

So I refactored the entire library from the ground up. Reimplemented the classes, applied the strategy pattern in certain cases, and stuck to seperation of concerns. The library is completely rebuilt from the ground up in Python 3 using mostly type hints and assertions for parameter modeling.

I'm more than happy and willing to make a PR if the changes are accepted.

I think it's important to state, heavily, that the new interface completely breaks the old one. Breaking the interface actually turned out to be a good thing in the end though because the code is now easier to understand, maintain, and update... which was the entire point of everything I did.

If anyone is interested, feel free to take a look.

Cheers,

EDIT 22 Oct 2021:

This fork is deprecated and no longer exists

I left an explanation below

Zeebrow commented 3 years ago

My immediate concern is the strict dependencies. Looking forward to tests.

I don't really mind that there aren't many bread crumbs hinting at the original code base, because I like your implementation. And I love bread crumbs, especially served by elderly park goers (they never chase you). I like your organization and am looking forward to cloning.

teleprint-me commented 3 years ago

I still have to fix the dependencies. The only requirements for the library are python3, requests, websocket-client, and pytest. I may opt for unittest because it's built in, but pytest has fixtures which is more useful in this context.

JTraversa commented 3 years ago

Unfortunately as of June 1st this repo might also be deprecated for institutional users. With Coinbase Prime now becoming their prime brokerage, the prime endpoints are moving from https://api.prime.coinbase.com to https://api.exchange.coinbase.com

Given the current wrapper still uses pro.coinbase, I'm unsure if this change impacts operation considering I've been using this with my prime account for years. If it does, more than happy to help accommodate those changes

teleprint-me commented 3 years ago

I just wanted to give an update. My fork is now stable. A few tests still need to be implemented and overall it's humming along smoothly.

I will create a branch for enabling a PR if it's still desired at that point in time so that a clean merge is possible. This way the core aspects of the original repo stay intact.

teleprint-me commented 2 years ago

Bad news first

I archived, abandoned, and deleted my fork of this repository on my profile. Coinbase is also in the process of updating their API and the Documentation is now redirected to a new path.

Good news last

I started a new library that supports Coinbase Pro, and Coinbase Exchange, REST API Version 1. I plan to maintain this library instead as long as Coinbase Pro's REST API remains supported.

Coinbase Pro

This will be my final post here.

Best Regards.