Skip to content

Commit 61e8f1b

Browse files
authored
Merge pull request #1 from coinrising/feature-update
增加get_coin_withdrawal接口
2 parents fb4115b + af5786c commit 61e8f1b

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

pybit/_v5_account.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,25 @@ def get_wallet_balance(self, **kwargs):
2525
auth=True,
2626
)
2727

28+
def get_coin_withdrawal(self, **kwargs):
29+
"""Query the available amount to transfer of a specific coin in the Unified wallet.
30+
31+
Required args:
32+
coinName (string): Coin name, uppercase only
33+
34+
Returns:
35+
Request results as dictionary.
36+
37+
Additional information:
38+
https://bybit-exchange.github.io/docs/v5/account/unified-trans-amnt
39+
"""
40+
return self._submit_request(
41+
method="GET",
42+
path=f"{self.endpoint}{Account.GET_COIN_WITHDRAWAL}",
43+
query=kwargs,
44+
auth=True,
45+
)
46+
2847
def upgrade_to_unified_trading_account(self, **kwargs):
2948
"""Upgrade Unified Account
3049

pybit/account.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
class Account(str, Enum):
55
GET_WALLET_BALANCE = "/v5/account/wallet-balance"
6+
GET_COIN_WITHDRAWAL = "/v5/account/withdrawal"
67
UPGRADE_TO_UNIFIED_ACCOUNT = "/v5/account/upgrade-to-uta"
78
GET_BORROW_HISTORY = "/v5/account/borrow-history"
89
REPAY_LIABILITY = "/v5/account/quick-repayment"

0 commit comments

Comments
 (0)