Skip to content

Commit

Permalink
Add docs for new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam McHardy committed Aug 12, 2019
1 parent 846cbb1 commit 6138e57
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 5 deletions.
9 changes: 4 additions & 5 deletions binance/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,7 @@ def get_asset_dividend_history(self, **params):
https://github.com/binance-exchange/binance-official-api-docs/blob/9dbe0e961b80557bb19708a707c7fad08842b28e/wapi-api.md#asset-dividend-record-user_data
:param asset: The asset being converted. e.g: 'ONE
:param asset: optional
:type asset: str
:param startTime: optional
:type startTime: long
Expand All @@ -1822,7 +1822,7 @@ def get_asset_dividend_history(self, **params):
.. code:: python
result = client.transfer_dust(asset='ONE')
result = client.get_asset_dividend_history()
:returns: API response
Expand Down Expand Up @@ -3086,7 +3086,7 @@ def create_sub_account_transfer(self, **params):
:param fromEmail: required - Sender email
:type fromEmail: str
:param toEmail: required - Recipient email
:type ftoEmail: str
:type toEmail: str
:param asset: required
:type asset: str
:param amount: required
Expand All @@ -3108,15 +3108,14 @@ def create_sub_account_transfer(self, **params):
"""
return self._request_withdraw_api('post', 'sub-account/transfer.html', True, data=params)


def get_sub_account_assets(self, **params):
"""Fetch sub-account assets
https://github.com/binance-exchange/binance-official-api-docs/blob/9dbe0e961b80557bb19708a707c7fad08842b28e/wapi-api.md#query-sub-account-assetsfor-master-account
:param email: required
:type email: str
:param symbol: required
:param symbol: optional
:type symbol: str
:param recvWindow: optional
:type recvWindow: int
Expand Down
15 changes: 15 additions & 0 deletions docs/account.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,18 @@ Account
.. code:: python
log = client.get_dust_log()
`Transfer dust <binance.html#binance.client.Client.transfer_dust>`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python
transfer = client.transfer_dust(asset='BNZ')
`Get Asset Dividend History <binance.html#binance.client.Client.get_asset_dividend_history>`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python
history = client.get_asset_dividend_history()
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Contents
general
market_data
account
sub_accounts
margin
websockets
depth_cache
Expand Down
36 changes: 36 additions & 0 deletions docs/sub_accounts.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Sub Account Endpoints
=====================


`Get Sub Account list <binance.html#binance.client.Client.get_sub_account_list>`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python
accounts = client.get_sub_account_list()
`Get Sub Account Transfer History <binance.html#binance.client.Client.get_sub_account_transfer_history>`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python
history = client.get_sub_account_transfer_history(email='[email protected]')
`Create Sub Account Transfer <binance.html#binance.client.Client.create_sub_account_transfer>`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python
transfer = client.create_sub_account_transfer(
fromEmail='[email protected]',
toEmail='[email protected]',
asset='BNB',
amount='100'
)
`Get Sub Account Assets <binance.html#binance.client.Client.get_sub_account_assets>`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python
assets = client.get_sub_account_assets(email='[email protected]')

0 comments on commit 6138e57

Please sign in to comment.