Skip to content

Commit ce94c0f

Browse files
author
Sam McHardy
committed
Merge branch 'feature/withdraw_fee_endpoint' into develop
2 parents b007ca5 + 67680c2 commit ce94c0f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

binance/client.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,28 @@ def get_deposit_address(self, **params):
17281728
"""
17291729
return self._request_withdraw_api('get', 'depositAddress.html', True, data=params)
17301730

1731+
def get_withdraw_fee(self, **params):
1732+
"""Fetch the withdrawal fee for an asset
1733+
1734+
:param asset: required
1735+
:type asset: str
1736+
:param recvWindow: the number of milliseconds the request is valid for
1737+
:type recvWindow: int
1738+
1739+
:returns: API response
1740+
1741+
.. code-block:: python
1742+
1743+
{
1744+
"withdrawFee": "0.0005",
1745+
"success": true
1746+
}
1747+
1748+
:raises: BinanceRequestException, BinanceAPIException
1749+
1750+
"""
1751+
return self._request_withdraw_api('get', 'withdrawFee.html', True, data=params)
1752+
17311753
# User Stream Endpoints
17321754

17331755
def stream_get_listen_key(self):

docs/withdraw.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,10 @@ Raises a `BinanceWithdrawException <binance.html#binance.exceptions.BinanceWithd
6363
.. code:: python
6464
6565
address = client.get_deposit_address(asset='BTC')
66+
67+
`Get withdraw fee <binance.html#binance.client.Client.get_withdraw_fee>`_
68+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
69+
70+
.. code:: python
71+
72+
address = client.get_withdraw_fee(asset='BTC')

0 commit comments

Comments
 (0)