Skip to content

Commit

Permalink
[phemex] fix symbol parsing (bmoscon#916)
Browse files Browse the repository at this point in the history
Co-authored-by: Guillaume De Saint Martin <guillaume.minette_de_saintmartin@insa-rouen.fr>
  • Loading branch information
2 people authored and shaunc committed May 27, 2023
1 parent a0bd48a commit 619b822
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* 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

### 2.3.0 (2022-09-04)
* Bugfix: added list and str support to websocket_endpoint creation (allows more than 200 symbols on Binance)
Expand Down
4 changes: 2 additions & 2 deletions cryptofeed/exchanges/phemex.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def _parse_symbol_data(cls, data: dict) -> Tuple[Dict, Dict]:
if entry['status'] != 'Listed':
continue
stype = entry['type'].lower()
base, quote = entry['displaySymbol'].split(" / ")
s = Symbol(base, quote, type=stype)
base, quote = entry['displaySymbol'].split("/")
s = Symbol(base.strip(), quote.strip(), type=stype)
ret[s.normalized] = entry['symbol']
info['tick_size'][s.normalized] = entry['tickSize'] if 'tickSize' in entry else entry['quoteTickSize']
info['instrument_type'][s.normalized] = stype
Expand Down

0 comments on commit 619b822

Please sign in to comment.