Skip to content

Commit

Permalink
Merge branch 'feature/withdraw_fee_endpoint' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam McHardy committed Mar 29, 2018
2 parents b007ca5 + 67680c2 commit ce94c0f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
22 changes: 22 additions & 0 deletions binance/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1728,6 +1728,28 @@ def get_deposit_address(self, **params):
"""
return self._request_withdraw_api('get', 'depositAddress.html', True, data=params)

def get_withdraw_fee(self, **params):
"""Fetch the withdrawal fee for an asset
:param asset: required
:type asset: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int
:returns: API response
.. code-block:: python
{
"withdrawFee": "0.0005",
"success": true
}
:raises: BinanceRequestException, BinanceAPIException
"""
return self._request_withdraw_api('get', 'withdrawFee.html', True, data=params)

# User Stream Endpoints

def stream_get_listen_key(self):
Expand Down
7 changes: 7 additions & 0 deletions docs/withdraw.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,10 @@ Raises a `BinanceWithdrawException <binance.html#binance.exceptions.BinanceWithd
.. code:: python
address = client.get_deposit_address(asset='BTC')
`Get withdraw fee <binance.html#binance.client.Client.get_withdraw_fee>`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python
address = client.get_withdraw_fee(asset='BTC')

0 comments on commit ce94c0f

Please sign in to comment.