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

Coinbase migration to Advanced Trade #1005

Merged
merged 11 commits into from
Feb 4, 2024
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]>
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### 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
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
Loading