Skip to content

Commit 0707631

Browse files
committed
docs: fix the download book ticker from Tardis.
1 parent 6bcae67 commit 0707631

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/Market Making with Alpha - Basis.ipynb

+5-5
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@
7373
"metadata": {},
7474
"outputs": [],
7575
"source": [
76-
"def download_book_ticker_from_tardis(exchange, symbol, start_date, end_date, output_path, token):\n",
76+
"def download_from_tardis(exchange, stream, symbol, start_date, end_date, output_path, token):\n",
7777
" date = start_date\n",
7878
" while date <= end_date:\n",
7979
" yyyymmdd = date.strftime('%Y%m%d')\n",
8080
" year = yyyymmdd[:4]\n",
8181
" month = yyyymmdd[4:6]\n",
8282
" day = yyyymmdd[6:]\n",
8383
" output_file = os.path.join(output_path, f'{symbol}_{yyyymmdd}.csv.gz')\n",
84-
" !wget --header=f\"Authorization: Bearer {token}\" https://datasets.tardis.dev/v1/binance-futures/book_ticker/{year}/{month}/{day}/{symbol}.csv.gz -O {output_file}\n",
84+
" !wget --header=f\"Authorization: Bearer {token}\" https://datasets.tardis.dev/v1/{exchange}/{stream}/{year}/{month}/{day}/{symbol}.csv.gz -O {output_file}\n",
8585
" date += datetime.timedelta(days=1)"
8686
]
8787
},
@@ -92,8 +92,8 @@
9292
"metadata": {},
9393
"outputs": [],
9494
"source": [
95-
"download_book_ticker('binance', 'BTCUSDT', start_date, end_date, 'spot/book_ticker/BTCUSDT')\n",
96-
"download_book_ticker('binance-futures', 'BTCUSDT', start_date, end_date, 'usdm/book_ticker/BTCUSDT')"
95+
"download_from_tardis('binance', 'book_ticker', 'BTCUSDT', start_date, end_date, 'spot/book_ticker/BTCUSDT', tardis_token)\n",
96+
"download_from_tardis('binance-futures', 'book_ticker', 'BTCUSDT', start_date, end_date, 'usdm/book_ticker/BTCUSDT', tardis_token)"
9797
]
9898
},
9999
{
@@ -503,7 +503,7 @@
503503
"metadata": {},
504504
"outputs": [],
505505
"source": [
506-
"download_book_ticker('binance-futures', 'BTCFDUSD', start_date, end_date, 'usdm/book_ticker/BTCFDUSD')"
506+
"download_from_tardis('binance', 'book_ticker', 'BTCFDUSD', start_date, end_date, 'spot/book_ticker/BTCFDUSD', tardis_token)"
507507
]
508508
},
509509
{

0 commit comments

Comments
 (0)