Skip to content

Commit 4c47927

Browse files
author
Sam McHardy
authored
Merge pull request sammchardy#1360 from OpenCoderX/patch-1
use correct account status path if the tld is .us, add param for vers…
2 parents 304edbc + e29140b commit 4c47927

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

binance/client.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2273,11 +2273,12 @@ def get_system_status(self):
22732273
"""
22742274
return self._request_margin_api('get', 'system/status')
22752275

2276-
def get_account_status(self, **params):
2276+
def get_account_status(self, version=1,**params):
22772277
"""Get account status detail.
22782278
22792279
https://binance-docs.github.io/apidocs/spot/en/#account-status-sapi-user_data
2280-
2280+
:param version: the api version
2281+
:param version: int
22812282
:param recvWindow: the number of milliseconds the request is valid for
22822283
:type recvWindow: int
22832284
@@ -2290,7 +2291,11 @@ def get_account_status(self, **params):
22902291
}
22912292
22922293
"""
2293-
return self._request_margin_api('get', 'account/status', True, data=params)
2294+
if self.tld == 'us':
2295+
path = 'accountStatus'
2296+
else:
2297+
path = 'account/status'
2298+
return self._request_margin_api('get', path, True, version, data=params)
22942299

22952300
def get_account_api_trading_status(self, **params):
22962301
"""Fetch account api trading status detail.

0 commit comments

Comments
 (0)