Skip to content

Commit 2ac8191

Browse files
committed
discrepancy between live/testnet urls
1 parent 35af5f1 commit 2ac8191

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

piker/brokers/binance/broker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ async def open_trade_dialog(
254254
wss: NoBsWs
255255
async with (
256256
client.manage_listen_key() as listen_key,
257-
open_autorecon_ws(f'{wss_url}/ws/{listen_key}') as wss,
257+
open_autorecon_ws(f'{wss_url}/?listenKey={listen_key}') as wss,
258258
):
259259
nsid: int = time_ns()
260260
await wss.send_msg({

piker/brokers/binance/venues.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
# 'wss://ws-api.binance.com:443/ws-api/v3',
4646

4747
# https://binance-docs.github.io/apidocs/futures/en/#websocket-market-streams
48-
_futes_ws: str = f'wss://fstream.{_domain}/ws/'
49-
_auth_futes_ws: str = 'wss://fstream-auth.{_domain}/ws/'
48+
_futes_ws: str = f'wss://fstream.{_domain}/ws'
49+
_auth_futes_ws: str = 'wss://fstream-auth.{_domain}/ws'
5050

5151
# test nets
5252
# NOTE: spot test network only allows certain ep sets:
@@ -58,7 +58,7 @@
5858
# 'wss://testnet.binance.vision/ws-api/v3'
5959

6060
_testnet_futes_url: str = 'https://testnet.binancefuture.com'
61-
_testnet_futes_ws: str = 'wss://stream.binancefuture.com'
61+
_testnet_futes_ws: str = 'wss://stream.binancefuture.com/ws'
6262

6363

6464
MarketType = Literal[

0 commit comments

Comments
 (0)