Skip to content

Commit b023110

Browse files
committed
Add coin_futures_user_socket
1 parent 59e3c80 commit b023110

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

binance/streams.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ def user_socket(self):
10551055
return self._get_account_socket('user')
10561056

10571057
def futures_user_socket(self):
1058-
"""Start a websocket for coin futures user data
1058+
"""Start a websocket for futures user data
10591059
10601060
https://binance-docs.github.io/apidocs/futures/en/#user-data-streams
10611061
@@ -1066,6 +1066,18 @@ def futures_user_socket(self):
10661066

10671067
return self._get_account_socket('futures', stream_url=self.FSTREAM_URL)
10681068

1069+
def coin_futures_user_socket(self):
1070+
"""Start a websocket for coin futures user data
1071+
1072+
https://binance-docs.github.io/apidocs/delivery/en/#user-data-streams
1073+
1074+
:returns: connection key string if successful, False otherwise
1075+
1076+
Message Format - see Binanace API docs for all types
1077+
"""
1078+
1079+
return self._get_account_socket('coin_futures', stream_url=self.DSTREAM_URL)
1080+
10691081
def margin_socket(self):
10701082
"""Start a websocket for cross-margin data
10711083
@@ -1429,6 +1441,13 @@ def start_futures_user_socket(self, callback: Callable) -> str:
14291441
params={}
14301442
)
14311443

1444+
def start_coin_futures_user_socket(self, callback: Callable) -> str:
1445+
return self._start_async_socket(
1446+
callback=callback,
1447+
socket_name='coin_futures_user_socket',
1448+
params={}
1449+
)
1450+
14321451
def start_margin_socket(self, callback: Callable) -> str:
14331452
return self._start_async_socket(
14341453
callback=callback,

0 commit comments

Comments
 (0)