Skip to content

Commit

Permalink
Coinbase migration to Advanced Trade (bmoscon#1005)
Browse files Browse the repository at this point in the history
* Updated Coinbase: from Coinbase Pro to Advanced Trade

* updated AUTHORS.md

* finalized Coinbase updates

* flake8

* bug and typo fix

* bug fix

* bug fix

* Removed seq_no as per doc: Subscribe to the level2 channel to guarantee that messages are delivered and your order book is in sync.

* updates based on PR comments

* updated CHANGES.md based on PR comment
  • Loading branch information
leftys committed Nov 30, 2024
1 parent b962602 commit b64243a
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 343 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ Cryptofeed was originally created by Bryant Moscon, but many others have contrib
* [O. Janche](https://github.com/toyan) - <[email protected]>
* [Bastien Enjalbert](https://github.com/bastienjalbert) - <[email protected]>
* [Jonggyun Kim](https://github.com/gyunt) - <[email protected]>
* [Thomas Bouamoud](https://github.com/thomasbs17) - <[email protected]>
40 changes: 37 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
## Changelog

### 2.3.0
### 2.4.1
* Bugfix: Handle empty nextFundingRate in OKX
* Bugfix: Handle null next_funding_time and estimated_rate in HuobiSwap funding
* Update: transitioned from Coinbase Pro (retired) to Coinbase Advanced Trade

### 2.4.0 (2024-01-07)
* Update: Fix tests
* Update: Okcoin moved to v5 API used by OKX
* Bugfix: InfluxDB none type conversions
* New Exchange: GateIO Futures
* Bugfix: Fix instrument types in symbol parsing on Bitmex
* Bugfix: fix crash issue when init symbol data on Kraken Futures
* Updates: Remove closed exchanges, clean up feeds (update APIs, adjust symbol parsing, etc)

### 2.3.2 (2023-05-27)
* Bugfix: Fix Socket backend
* Bugfix: Fix AUCTION symbol parsing on Coinbase
* Bugfix: Fix PERPETUAL symbol parsing on Phemex
* Bugfix: Fix PERPETUAL symbol parsing on Kraken Futures
* Feature: Access to all AIOKafka configuration options
* Feature: Use backend Queue for Kafka
* Feature: Add support for storing book snapshots in Redis as key-value
* Update: Switch from unmaintained aioredis to redis-py
* Bugfix: Correct value for Crypto.com Ask price
* Update: Remove cChardet dependency
* Feature: Binance TR support

### 2.3.1 (2022-10-31)
* Bugfix: timestamp not reset correctly on reconnect
* Bugfix: Arctic backend failing to write Trades when trade type was not present in data
* Bugfix: Timestamp sometimes not present in Coinbase ticker updates
* Bugfix: Phemex, symbols parsing
* Bugfix: OKx - handle empty liquidations correctly

### 2.3.0 (2022-09-04)
* Bugfix: added list and str support to websocket_endpoint creation (allows more than 200 symbols on Binance)
* Feature: Add support for OKx streaming candles
* Bugfix: Binance Futures, double slash in open interest url
Expand Down Expand Up @@ -61,7 +95,7 @@
* Update: Exchange name change OKEx -> OKX
* Bugfix: OKX candle REST code was setting values incorrectly
* Update: OKX now uses v5 for all connections (REST and WS). Update endpoints to new exchange name: okex.com -> okx.com

### 2.2.0 (2021-02-16)
* Feature: New exchange: Bit.com
* Feature: Rework how exchanges that have multiple websocket endpoints are managed and configured.
Expand All @@ -88,7 +122,7 @@
* Feature: Add ByBit sandbox endpoints.
* Bugfix: Fix calculation in OrderInfo on Binance.
* Feature: Support list of bootstrap servers for Kafka backend.
* Feature: Add OrderInfo and Fills zmq callbacks
* Feature: Add OrderInfo and Fills zmq callbacks

### 2.1.1 (2021-11-29)
* Bugfix: Position data type missing side field.
Expand Down
6 changes: 3 additions & 3 deletions cryptofeed/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _symbol_endpoint_prepare(cls, ep: RestEndpoint) -> Union[List[str], str]:
return ep.route('instruments')

@classmethod
def symbol_mapping(cls, refresh=False) -> Dict:
def symbol_mapping(cls, refresh=False, headers: dict = None) -> Dict:
if Symbols.populated(cls.id) and not refresh:
return Symbols.get(cls.id)[0]
try:
Expand All @@ -97,10 +97,10 @@ def symbol_mapping(cls, refresh=False) -> Dict:
if isinstance(addr, list):
for ep in addr:
LOG.debug("%s: reading symbol information from %s", cls.id, ep)
data.append(cls.http_sync.read(ep, json=True, uuid=cls.id))
data.append(cls.http_sync.read(ep, json=True, headers=headers, uuid=cls.id))
else:
LOG.debug("%s: reading symbol information from %s", cls.id, addr)
data.append(cls.http_sync.read(addr, json=True, uuid=cls.id))
data.append(cls.http_sync.read(addr, json=True, headers=headers, uuid=cls.id))

syms, info = cls._parse_symbol_data(data if len(data) > 1 else data[0])
Symbols.set(cls.id, syms, info)
Expand Down
Loading

0 comments on commit b64243a

Please sign in to comment.