tardis-dev 4.2.0__tar.gz → 4.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tardis-dev
3
- Version: 4.2.0
3
+ Version: 4.2.1
4
4
  Summary: Python client for tardis.dev - historical tick-level cryptocurrency market data replay API.
5
5
  Keywords: cryptocurrency data feed,market data,api client,orderbook,crypto markets data replay,historical data,historical cryptocurrency prices,cryptocurrency api
6
6
  Author: Thad
@@ -9,7 +9,7 @@ markers = [
9
9
 
10
10
  [project]
11
11
  name = "tardis-dev"
12
- version = "4.2.0"
12
+ version = "4.2.1"
13
13
  description = "Python client for tardis.dev - historical tick-level cryptocurrency market data replay API."
14
14
  readme = "README.md"
15
15
  requires-python = ">=3.9,<4.0"
@@ -82,7 +82,7 @@ def _is_non_retryable_download_error(exc: Exception) -> bool:
82
82
  if not isinstance(exc, urllib.error.HTTPError):
83
83
  return False
84
84
 
85
- if exc.code == 401:
85
+ if exc.code in (401, 403, 404):
86
86
  return True
87
87
 
88
88
  return exc.code == 400 and "ISO 8601 format" not in exc.msg
@@ -186,9 +186,14 @@ async def _find_instrument_symbols_for_exchange(
186
186
  http_proxy=http_proxy,
187
187
  )
188
188
 
189
+ if selector == "datasetId":
190
+ symbols = [instrument["datasetId"] for instrument in instruments if "datasetId" in instrument]
191
+ else:
192
+ symbols = [instrument["id"] for instrument in instruments]
193
+
189
194
  return {
190
195
  "exchange": exchange,
191
- "symbols": [_get_symbol(instrument, selector) for instrument in instruments],
196
+ "symbols": symbols,
192
197
  }
193
198
 
194
199
 
@@ -230,10 +235,3 @@ def _get_instrument_info_url(
230
235
  return f"{url}?filter={encoded_filter}"
231
236
 
232
237
  return url
233
-
234
-
235
- def _get_symbol(instrument: Mapping[str, Any], selector: InstrumentSymbolSelector) -> str:
236
- if selector == "datasetId":
237
- return instrument.get("datasetId") or instrument["id"]
238
-
239
- return instrument["id"]
File without changes
File without changes