From 5586d971788fb3560bf3701d03fcbde7ba8c823d Mon Sep 17 00:00:00 2001 From: zp Date: Tue, 10 Sep 2019 12:56:21 +0800 Subject: [PATCH] Update Bitstamp API. --- cryptofeed/exchange/bitstamp.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cryptofeed/exchange/bitstamp.py b/cryptofeed/exchange/bitstamp.py index 03ca8ec34..b26d35f08 100644 --- a/cryptofeed/exchange/bitstamp.py +++ b/cryptofeed/exchange/bitstamp.py @@ -136,7 +136,7 @@ async def message_handler(self, msg: str, timestamp: float): async def _snapshot(self, pairs: list): await asyncio.sleep(5) - urls = [f'https://www.bitstamp.net/api/order_book/{sym}' for sym in pairs] + urls = [f'https://www.bitstamp.net/api/v2/order_book/{sym}' for sym in pairs] async def fetch(session, url): async with session.get(url) as response: @@ -169,7 +169,5 @@ async def subscribe(self, websocket): } })) if 'diff_order_book' in channel: - if pair == 'btcusd': - pair = '' snaps.append(pair) await self._snapshot(snaps)