tardis-dev 4.2.0__tar.gz → 4.3.0__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.
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/PKG-INFO +1 -1
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/pyproject.toml +1 -1
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/tardis_dev/_http.py +1 -1
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/tardis_dev/instrument_info.py +6 -8
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/tardis_dev/replay.py +3 -2
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/LICENSE +0 -0
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/README.md +0 -0
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/tardis_dev/__init__.py +0 -0
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/tardis_dev/_options.py +0 -0
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/tardis_dev/channel.py +0 -0
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/tardis_dev/clear_cache.py +0 -0
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/tardis_dev/download_datasets.py +0 -0
- {tardis_dev-4.2.0 → tardis_dev-4.3.0}/tardis_dev/get_exchange_details.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tardis-dev
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.3.0
|
|
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
|
|
@@ -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
|
|
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":
|
|
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"]
|
|
@@ -50,7 +50,7 @@ async def replay(
|
|
|
50
50
|
api_key: str = "",
|
|
51
51
|
cache_dir: str = DEFAULT_CACHE_DIR,
|
|
52
52
|
endpoint: str = DEFAULT_ENDPOINT,
|
|
53
|
-
timeout: int =
|
|
53
|
+
timeout: int = 135,
|
|
54
54
|
http_proxy: Optional[str] = None,
|
|
55
55
|
compression: ReplayCompression = "zstd",
|
|
56
56
|
decode_response: bool = True,
|
|
@@ -309,9 +309,10 @@ async def _fetch_slice_if_not_cached(
|
|
|
309
309
|
replay_cached_slices[slice_date] = CachedSlice(cached_slice_path, requested_slice_size)
|
|
310
310
|
return SliceDownloadResult(requested_slice_size, DEFAULT_DATA_FEED_SLICE_SIZE)
|
|
311
311
|
|
|
312
|
+
request_compression = "zstd-multiframe" if compression == "zstd" else compression
|
|
312
313
|
fetch_url = (
|
|
313
314
|
f"{endpoint}/data-feeds/{exchange}?from={_format_replay_query_date(from_date)}"
|
|
314
|
-
f"&offset={offset}&compression={
|
|
315
|
+
f"&offset={offset}&compression={request_compression}"
|
|
315
316
|
)
|
|
316
317
|
if requested_slice_size > DEFAULT_DATA_FEED_SLICE_SIZE:
|
|
317
318
|
fetch_url += f"&sliceSize={requested_slice_size}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|