
    5iy
                        S SK Jr  S SKJrJrJrJrJr  S SKrS SK	r	S SK
JrJr  SSKJr  SSKJrJrJr  SSKJrJrJr  SS	KJr   " S
 S\5      rg)    )Path)DictOptionalListUnionAnyN)	urlencodequote   )
BaseClient)convert_list_to_json_arrayinterval_to_millisecondsconvert_ts_str)BinanceAPIExceptionBinanceRequestExceptionNotImplementedException)HistoricalKlinesTypec                      ^  \ rS rSrSSSS\R
                  SSSSSS4S\\   S\\   S\\\\	4      S	\S
\S\
S\
S\\\\4      S\\   S\\
   S\\   4U 4S jjjrS\R                  4S jr GSES\S\
S\
4S jjr\S\R&                  4S j5       rS\R*                  4S\S\
4S jjr GSFS\S\4S jjrGSES\4S jjr GSFS\4S jjr GSFS\4S  jjrGSES\4S! jjr GSFS\4S" jjr GSFS\4S# jjrGSES\4S$ jjrS\R*                  4S% jr S\R*                  4S\4S& jjr!S\R*                  4S\4S' jjr"S\R*                  4S\4S( jjr#S\4S) jr$S\4S* jr%S\\   4S+ jr&S\4S, jr'S\4S- jr(S\)\\\4      4S. jr*S\4S/ jr+S\4S0 jr,S\4S1 jr-S\4S2 jr.S\4S3 jr/GSGS4\4S5 jjr0S\4S6 jr1S\4S7 jr2\3Rh                  4S8\3S\4S9 jjr5\3Rh                  4S8\34S: jjr6SSS\3Rh                  4S8\34S; jjr7SSS\3Rh                  4S8\34S< jjr8SSS\3Rh                  4S8\34S= jjr9SSS\3Rh                  4S8\34S> jjr:S? r;S@ r<SA r=SB r>SC r?SD r@\R                  4SE jrB\R                  4SF jrC\R                  4SG jrDSH rESI rFSJ rGSK rHSL rISM rJSN rKSO rLSP rMSQ rNSR rOSS rPST rQSU rRSV rSGSHSW jrTSX rUSY rVSZ rWS[ rXS\ rYGSIS] jrZS^ r[S_ r\S` r]Sa r^Sb r_Sc r`Sd raSe rbSf rcSg rdSh reSi rfSj rgSk rhSl riGSHSm\Sn\\   4So jjrjSp rkSq rlSr rmSs rnSt roSu rpSv rqSw rrSx rsSy rtSz ruS{ rvS| rwS} rxS~ ryS rzS r{S r|S r}S r~S rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS r GSGS4\S\4S jjr GSGS4\S\4S jjr GSHS jrS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rGS  rGS rGS rGS rGS rGS rGS Gr GS GrGS GrGS	 GrGS
 GrGS GrGS GrGS GrGS GrGS Gr	GS Gr
GS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS  GrGS! GrGS" GrGS# GrGS$ GrGS% GrGS& Gr GS' Gr!GS(\
4GS) jGr"GS* Gr#GS+ Gr$GS, Gr%GS- Gr&GS. Gr'GS/ Gr(GS0 Gr)GS1 Gr*GS2 Gr+GS3 Gr,GS4 Gr-GS5 Gr.GS6 Gr/GS7 Gr0GS8 Gr1GS9 Gr2GS: Gr3GS; Gr4GS< Gr5GS= Gr6GS> Gr7GS? Gr8GS@ Gr9GSA Gr:GSB Gr;GSC Gr<GSD Gr=GSE Gr>GSF Gr?GSG Gr@GSH GrAGSI GrBGSJ GrCGSK GrDGSL GrEGSM GrFGSN GrGGSO GrHGSP GrIGSQ GrJGSR GrKGSS GrLGST GrMGSU GrNGSV GrOGSW GrPGSX GrQGSY GrRGSZ GrSGS[ GrTGS\ GrUGS] GrVGS^ GrWGS_ GrXGS` GrYGSa GrZGSb Gr[GSc Gr\GSd Gr]GSe Gr^GSf Gr_GSg Gr`GSh GraGSi GrbGSj GrcGSk GrdGSl GreGSm GrfGSn GrgGSo Grh GSp GriGSq GrjGSr GrkGSs GrlGSt GrmGSu GrnGSv GroGSw GrpGSx GrqGSy GrrGSz GrsGS{ GrtGS| GruGS} GrvGS~ GrwGS GrxGS GryGS GrzGS Gr{GS Gr|GS Gr}GS Gr~GS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS Gr GS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS  GrGS Gr\R                  4GS jGr\R                  4GS jGr\R                  4GS jGrGS GrGS GrGS Gr GS GrGS	 GrGS
 GrGS GrGS GrGS GrGS GrGS GrGS Gr	GS Gr
GS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS  GrGS! GrGS" GrGS# GrGS$ GrGS% GrGS& GrGS' Gr GS( Gr!GS) Gr"GS* Gr#GS+ Gr$GS, Gr%GS- Gr&GS. Gr'GS/ Gr(GS0 Gr)GS1 Gr*GS2 Gr+GS3 Gr,GS4 Gr-GS5 Gr.GS6 Gr/GS7 Gr0GS8 Gr1GS9 Gr2GS: Gr3GS; Gr4GS< Gr5GS= Gr6GS> Gr7GS? Gr8GS@ Gr9GSA Gr:GSB Gr;GSC Gr<GSD Gr=GSE Gr>GSF Gr?GSG Gr@GSH GrAGSI GrBGSJ GrCGSK GrDGSL GrEGSM GrFGSN GrGGSO GrHGSP GrIGSQ GrJGSR GrKGSS GrLGST GrMGSU GrNGSV GrOGSW GrPGSX GrQGSY GrRGSZ GrSGS[ GrTGS\ GrUGS] GrVGS^ GrWGS_ GrXGS` GrYGSa GrZGSb Gr[GSc Gr\GSd Gr]GSe Gr^GSf Gr_GSg Gr`GSh GraGSi GrbGSj GrcGSk GrdGSl GreGSm GrfGSn GrgGSo GrhGSp GriGSq GrjGSr GrkGSs GrlGSt GrmGSu GrnGSv GroGSw GrpGSx GrqGSy GrrGSz GrsGS{ GrtGS| GruGS} GrvGS~ GrwGS GrxGS GryGS GrzGS Gr{GS Gr|GS Gr}GS Gr~GS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS  GrGS GrGS GrGS GrGS GrGS GrGS GrGS Gr GS GrGS	 GrGS
 GrGS GrGS GrGS GrGS GrGS GrGS Gr	GS Gr
GS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS GrGS  GrGS! GrGS" GrGS# GrGS$ GrGS% GrGS& GrGS' Gr GS( Gr!GS) Gr"GS* Gr#GS+ Gr$GS, Gr%GS- Gr&GS. Gr'GS/ Gr(GS0 Gr)GS1 Gr*GS2 Gr+GS3 Gr,GS4 Gr-GS5 Gr.GS6 Gr/GS7 Gr0GS8 Gr1GS9 Gr2GS: Gr3GS; Gr4GS< Gr5GS= Gr6GS> Gr7GS? Gr8GS@ Gr9GSA Gr:GSB Gr;GSC Gr<GSDGr=U =Gr>$ (J  Client   NcomFTapi_key
api_secretrequests_paramstldbase_endpointtestnetdemoprivate_keyprivate_key_passping	time_unitc                 b   > [         TU ]  UUUUUUUUU	US9
  U
(       a  U R                  5         g g )N)r"   )super__init__r!   )selfr   r   r   r   r   r   r   r   r    r!   r"   	__class__s               \/var/www/html/BTCUSD/btcusdt_trading_app/venv/lib/python3.13/site-packages/binance/client.pyr%   Client.__init__   sH     	 	 	
 IIK     returnc                     U R                  5       n[        R                  " 5       nUR                  R	                  U5        U$ N)_get_headersrequestssessionheadersupdate)r&   r1   r0   s      r(   _init_sessionClient._init_session7   s5    ##%""$w'r*   urisignedforce_paramsc                 P   0 nUR                  5       S;   a  UR                  SS05        SU;   a1  US    H(  nUS:X  d  M  UR                  US   U   5        US   U	   O   U R                  " XU40 UD6nUR                  S5      nUb  US	 U(       aV  U R                  (       aE  U(       a>  [
        R                  U5      n	SU	;   a  U	S   OS n
U
(       a  U	S	 [        U	5      nU SU
 3n[        U R                  U5      " U4XhS.UD6U l
        U R                  U R                  5      $ )	N)POSTPUTDELETEzContent-Typez!application/x-www-form-urlencodeddatar1   	signaturez&signature=)r1   r<   )upperr2   _get_request_kwargsgetPRIVATE_KEYr   convert_to_dictr	   getattrr0   response_handle_response)r&   methodr5   r6   r7   kwargsr1   keyr<   	dict_datar=   url_encoded_datas               r(   _requestClient._request>   s/    <<>66NNN,OPQVf~)#NN6&>##67vs+	 & ))&,Q&Qzz&!vd&&4..t4I2=2J	+.QUIk*(3&'{9+>Df5c`7`Y_`$$T]]33r*   rD   c                    SU R                   s=::  a  S:  d"  O  [        X R                   U R                  5      eU R                  S:X  a  0 $  U R                  5       $ ! [         a    [        SU R                  -  5      ef = f)zInternal helper for handling API responses from the Binance server.
Raises the appropriate exceptions when necessary; otherwise, returns the
response.
   i,   zInvalid Response: %s)status_coder   textjson
ValueErrorr   rD   s    r(   rE   Client._handle_response]   sw     x++1c1%h0D0DhmmTT==BI	R==?" 	R)*@8==*PQQ	Rs   A #B pathc                 N    U R                  X#U5      nU R                  " XU40 UD6$ r-   )_create_api_urirK   )r&   rF   rV   r6   versionrG   r5   s          r(   _request_apiClient._request_apin   s,     ""49}}V&;F;;r*   rY   c                     U R                   " U40 UD6nU R                  X$5      nUR                  SS5      nU R                  " XX740 UD6$ Nr7   F)_get_version_create_futures_api_uripoprK   r&   rF   rV   r6   rY   rG   r5   r7   s           r(   _request_futures_apiClient._request_futures_apiy   sO     ##G6v6**49zz.%8}}V&I&IIr*   c                 p    U R                  U5      nUR                  SS5      nU R                  " XX640 UD6$ )Nr7   T)_create_futures_data_api_urir`   rK   r&   rF   rV   r6   rG   r5   r7   s          r(   _request_futures_data_api Client._request_futures_data_api   s8    //5zz.$7}}V&I&IIr*   c                     U R                   " U40 UD6nU R                  X$S9nUR                  SS5      nU R                  " XX740 UD6$ )NrY   r7   F)r^   _create_futures_coin_api_urlr`   rK   ra   s           r(   _request_futures_coin_api Client._request_futures_coin_api   sR     ##G6v6///Fzz.%8}}V&I&IIr*   c                     U R                   " U40 UD6nU R                  X$S9nUR                  SS5      nU R                  " XX740 UD6$ )Nrj   r7   T)r^   !_create_futures_coin_data_api_urlr`   rK   ra   s           r(   _request_futures_coin_data_api%Client._request_futures_coin_data_api   sR     ##G6v644T4Kzz.$7}}V&I&IIr*   c                 p    U R                  U5      nUR                  SS5      nU R                  " XX640 UD6$ )zD
https://developers.binance.com/docs/derivatives/option/market-data
r7   T)_create_options_api_urir`   rK   rf   s          r(   _request_options_apiClient._request_options_api   s:     **40zz.$7}}V&I&IIr*   c                     U R                   " U40 UD6nU R                  X$5      nUR                  SS5      nU R                  " XX740 UD6$ r]   )r^   _create_margin_api_urir`   rK   ra   s           r(   _request_margin_apiClient._request_margin_api   sO     ##G6v6))$8zz.%8}}V&I&IIr*   c                     U R                   " U40 UD6nU R                  X$5      nUR                  SS5      nU R                  " XX740 UD6$ r]   )r^   _create_papi_api_urir`   rK   ra   s           r(   _request_papi_apiClient._request_papi_api   sO     ##G6v6''6zz.%8}}V&I&IIr*   c                 L    U R                  U5      nU R                  " XU40 UD6$ r-   )_create_website_urirK   )r&   rF   rV   r6   rG   r5   s         r(   _request_websiteClient._request_website   s(    &&t,}}V&;F;;r*   c                 ,    U R                   " SXU40 UD6$ )Nr@   rZ   r&   rV   r6   rY   rG   s        r(   _getClient._get   s      gHHHr*   c                 ,    U R                   " SXU40 UD6$ )Npostr   r   s        r(   _postClient._post   s       wI&IIr*   c                 ,    U R                   " SXU40 UD6$ )Nputr   r   s        r(   _putClient._put   s       gHHHr*   c                 ,    U R                   " SXU40 UD6$ )Ndeleter   r   s        r(   _deleteClient._delete   s       4KFKKr*   c                 *    U R                  SS5      nU$ )zReturn list of products currently listed on Binance

Use get_exchange_info() call instead

:returns: list - List of product dictionaries

:raises: BinanceRequestException, BinanceAPIException

r@   zGbapi/asset/v2/public/asset-service/product/get-products?includeEtf=true)r   )r&   productss     r(   get_productsClient.get_products   s!     ((U
 r*   c                 $    U R                  S5      $ )aH  Return rate limits and list of symbols

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-endpoints#exchange-information

:returns: list - List of product dictionaries

.. code-block:: python

    {
        "timezone": "UTC",
        "serverTime": 1508631584636,
        "rateLimits": [
            {
                "rateLimitType": "REQUESTS",
                "interval": "MINUTE",
                "limit": 1200
            },
            {
                "rateLimitType": "ORDERS",
                "interval": "SECOND",
                "limit": 10
            },
            {
                "rateLimitType": "ORDERS",
                "interval": "DAY",
                "limit": 100000
            }
        ],
        "exchangeFilters": [],
        "symbols": [
            {
                "symbol": "ETHBTC",
                "status": "TRADING",
                "baseAsset": "ETH",
                "baseAssetPrecision": 8,
                "quoteAsset": "BTC",
                "quotePrecision": 8,
                "orderTypes": ["LIMIT", "MARKET"],
                "icebergAllowed": false,
                "filters": [
                    {
                        "filterType": "PRICE_FILTER",
                        "minPrice": "0.00000100",
                        "maxPrice": "100000.00000000",
                        "tickSize": "0.00000100"
                    }, {
                        "filterType": "LOT_SIZE",
                        "minQty": "0.00100000",
                        "maxQty": "100000.00000000",
                        "stepSize": "0.00100000"
                    }, {
                        "filterType": "MIN_NOTIONAL",
                        "minNotional": "0.00100000"
                    }
                ]
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

exchangeInfor   r&   s    r(   get_exchange_infoClient.get_exchange_info   s    @ yy((r*   c                 r    U R                  5       nUS    H  nUS   UR                  5       :X  d  M  Us  $    g)aR  Return information about a symbol

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-endpoints#exchange-information

:param symbol: required e.g. BNBBTC
:type symbol: str

:returns: Dict if found, None if not

.. code-block:: python

    {
        "symbol": "ETHBTC",
        "status": "TRADING",
        "baseAsset": "ETH",
        "baseAssetPrecision": 8,
        "quoteAsset": "BTC",
        "quotePrecision": 8,
        "orderTypes": ["LIMIT", "MARKET"],
        "icebergAllowed": false,
        "filters": [
            {
                "filterType": "PRICE_FILTER",
                "minPrice": "0.00000100",
                "maxPrice": "100000.00000000",
                "tickSize": "0.00000100"
            }, {
                "filterType": "LOT_SIZE",
                "minQty": "0.00100000",
                "maxQty": "100000.00000000",
                "stepSize": "0.00100000"
            }, {
                "filterType": "MIN_NOTIONAL",
                "minNotional": "0.00100000"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

symbolssymbolN)r   r>   )r&   r   resitems       r(   get_symbol_infoClient.get_symbol_info  s=    V $$&	NDH~/ # r*   c                 $    U R                  S5      $ )zTest connectivity to the Rest API.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-endpoints#test-connectivity

:returns: Empty array

.. code-block:: python

    {}

:raises: BinanceRequestException, BinanceAPIException

r!   r   r   s    r(   r!   Client.pingS  s     yy  r*   c                 $    U R                  S5      $ )aK  Test connectivity to the Rest API and get the current server time.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-endpoints#check-server-time

:returns: Current server time

.. code-block:: python

    {
        "serverTime": 1499827319559
    }

:raises: BinanceRequestException, BinanceAPIException

timer   r   s    r(   get_server_timeClient.get_server_timec  s      yy  r*   c                     U R                  S5      n[        U[        5      (       a  [        S U 5       5      (       a  U$ [	        S5      e)a  Latest price for all symbols.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#symbol-price-ticker

:returns: List of market tickers

.. code-block:: python

    [
        {
            "symbol": "LTCBTC",
            "price": "4.00000200"
        },
        {
            "symbol": "ETHBTC",
            "price": "0.07946600"
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

ticker/pricec              3   B   #    U  H  n[        U[        5      v   M     g 7fr-   )
isinstancedict).0r   s     r(   	<genexpr>)Client.get_all_tickers.<locals>.<genexpr>  s     -ZQYjt.D.DQYs   zExpected a list of dictionaries)r   r   listall	TypeError)r&   rD   s     r(   get_all_tickersClient.get_all_tickersw  sA    . 99^,h%%#-ZQY-Z*Z*ZO9::r*   c                 `    0 nSU;   a	  US   US'   OSU;   a  US   US'   U R                  SUS9$ )ak  Best price/qty on the order book for all symbols.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#symbol-order-book-ticker

:param symbol: optional
:type symbol: str
:param symbols: optional accepted format  ["BTCUSDT","BNBUSDT"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D
:type symbols: str

:returns: List of order book market entries

.. code-block:: python

    [
        {
            "symbol": "LTCBTC",
            "bidPrice": "4.00000000",
            "bidQty": "431.00000000",
            "askPrice": "4.00000200",
            "askQty": "9.00000000"
        },
        {
            "symbol": "ETHBTC",
            "bidPrice": "0.07946700",
            "bidQty": "9.00000000",
            "askPrice": "100000.00000000",
            "askQty": "1000.00000000"
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

r   r   ticker/bookTickerr<   r   )r&   paramsr<   s      r(   get_orderbook_tickersClient.get_orderbook_tickers  sQ    D v#H-DN& $Y/DOyyd  
 	
r*   c                 "    U R                  SUS9$ )a  Get the Order Book for the market

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#order-book

:param symbol: required
:type symbol: str
:param limit:  Default 100; max 1000
:type limit: int

:returns: API response

.. code-block:: python

    {
        "lastUpdateId": 1027024,
        "bids": [
            [
                "4.00000000",     # PRICE
                "431.00000000",   # QTY
                []                # Can be ignored
            ]
        ],
        "asks": [
            [
                "4.00000200",
                "12.00000000",
                []
            ]
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

depthr   r   r&   r   s     r(   get_order_bookClient.get_order_book  s    F yyvy..r*   c                 "    U R                  SUS9$ )a?  Get recent trades (up to last 500).

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#recent-trades-list

:param symbol: required
:type symbol: str
:param limit:  Default 500; max 1000.
:type limit: int

:returns: API response

.. code-block:: python

    [
        {
            "id": 28457,
            "price": "4.00000100",
            "qty": "12.00000000",
            "time": 1499865549590,
            "isBuyerMaker": true,
            "isBestMatch": true
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

tradesr   r   r   s     r(   get_recent_tradesClient.get_recent_trades  s    8 yyy//r*   c                 "    U R                  SUS9$ )a  Get older trades.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#old-trade-lookup

:param symbol: required
:type symbol: str
:param limit:  Default 500; max 1000.
:type limit: int
:param fromId:  TradeId to fetch from. Default gets most recent trades.
:type fromId: str

:returns: API response

.. code-block:: python

    [
        {
            "id": 28457,
            "price": "4.00000100",
            "qty": "12.00000000",
            "time": 1499865549590,
            "isBuyerMaker": true,
            "isBestMatch": true
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

historicalTradesr   r   r   s     r(   get_historical_tradesClient.get_historical_trades  s    < yyV  
 	
r*   c                 "    U R                  SUS9$ )a  Get compressed, aggregate trades. Trades that fill at the time,
from the same order, with the same price will have the quantity aggregated.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#compressedaggregate-trades-list

:param symbol: required
:type symbol: str
:param fromId:  ID to get aggregate trades from INCLUSIVE.
:type fromId: str
:param startTime: Timestamp in ms to get aggregate trades from INCLUSIVE.
:type startTime: int
:param endTime: Timestamp in ms to get aggregate trades until INCLUSIVE.
:type endTime: int
:param limit:  Default 500; max 1000.
:type limit: int

:returns: API response

.. code-block:: python

    [
        {
            "a": 26129,         # Aggregate tradeId
            "p": "0.01633102",  # Price
            "q": "4.70443515",  # Quantity
            "f": 27781,         # First tradeId
            "l": 27781,         # Last tradeId
            "T": 1498793709153, # Timestamp
            "m": true,          # Was the buyer the maker?
            "M": true           # Was the trade the best price match?
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

	aggTradesr   r   r   s     r(   get_aggregate_tradesClient.get_aggregate_trades#  s    J yy6y22r*   r   c              #     #    Ub  Ub  [        S5      eUc  Uc  U R                  USS9nO[[        U5      n US-   nU R                  XUS9n[        U5      S:  a  O*U[	        [
        R
                  " 5       S-  5      :  a  gUnMO  U H  nUv   M	     US   U R                     n U R                  XS9nUS	S n[        U5      S:X  a  gU H  nUv   M	     US   U R                     nME  7f)
u  Iterate over aggregate trade data from (start_time or last_id) to
the end of the history so far.

If start_time is specified, start with the first trade after
start_time. Meant to initialise a local cache of trade data.

If last_id is specified, start with the trade after it. This is meant
for updating a pre-existing local trade data cache.

Only allows start_str or last_id—not both. Not guaranteed to work
right if you're running more than one of these simultaneously. You
will probably hit your rate limit.

See dateparser docs for valid start and end string formats http://dateparser.readthedocs.io/en/latest/

If using offset strings for dates add "UTC" to date string e.g. "now UTC", "11 hours ago UTC"

:param symbol: Symbol string e.g. ETHBTC
:type symbol: str
:param start_str: Start date string in UTC format or timestamp in milliseconds. The iterator will
return the first trade occurring later than this time.
:type start_str: str|int
:param last_id: aggregate trade ID of the last known aggregate trade.
Not a regular trade ID. See https://binance-docs.github.io/apidocs/spot/en/#compressed-aggregate-trades-list

:returns: an iterator of JSON objects, one per trade. The format of
each object is identical to Client.aggregate_trades().

:type last_id: int
Nz;start_time and last_id may not be simultaneously specified.r   )r   fromIdi6 )r   	startTimeendTime  r   )rS   r   r   lenintr   AGG_ID)r&   r   	start_strlast_idr   start_tsend_tsts           r(   aggregate_trade_iterClient.aggregate_trade_iterJ  s/    >  W%8M 
 ?  22&2K
 *)4 %8F!66%6 7 F 6{Q DIIK$$6 77%H   Rj-G ..f.MF ABZF6{a Rj-G s   C)C+c                 "    U R                  SUS9$ )a  Kline/candlestick bars for a symbol with UI enhancements. Klines are uniquely identified by their open time.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#uiklines

:param symbol: required
:type symbol: str
:param interval: required - The interval for the klines (e.g., 1m, 3m, 5m, etc.)
:type interval: str
:param limit: optional - Default 500; max 1000.
:type limit: int
:param startTime: optional - Start time in milliseconds
:type startTime: int
:param endTime: optional - End time in milliseconds
:type endTime: int

:returns: API response

.. code-block:: python

    [
        [
            1499040000000,      # Open time
            "0.01634790",       # Open
            "0.80000000",       # High
            "0.01575800",       # Low
            "0.01577100",       # Close
            "148976.11427815",  # Volume
            1499644799999,      # Close time
            "2434.19055334",    # Quote asset volume
            308,                # Number of trades
            "1756.87402397",    # Taker buy base asset volume
            "28.46694368",      # Taker buy quote asset volume
            "17928899.62484339" # Can be ignored
        ]
    ]

:raises: BinanceRequestException, BinanceAPIException

uiKlinesr   r   r   s     r(   get_ui_klinesClient.get_ui_klines  s    P yy&y11r*   c                 "    U R                  SUS9$ )aY  Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#klinecandlestick-data

:param symbol: required
:type symbol: str
:param interval: -
:type interval: str
:param limit: - Default 500; max 1000.
:type limit: int
:param startTime:
:type startTime: int
:param endTime:
:type endTime: int

:returns: API response

.. code-block:: python

    [
        [
            1499040000000,      # Open time
            "0.01634790",       # Open
            "0.80000000",       # High
            "0.01575800",       # Low
            "0.01577100",       # Close
            "148976.11427815",  # Volume
            1499644799999,      # Close time
            "2434.19055334",    # Quote asset volume
            308,                # Number of trades
            "1756.87402397",    # Taker buy base asset volume
            "28.46694368",      # Taker buy quote asset volume
            "17928899.62484339" # Can be ignored
        ]
    ]

:raises: BinanceRequestException, BinanceAPIException

klinesr   r   r   s     r(   
get_klinesClient.get_klines  s    P yyy//r*   klines_typec                 R   SU;   a  US   (       d  US	 [         R                  U:X  a  U R                  " S0 UD6$ [         R                  U:X  a  U R                  " S0 UD6$ [         R
                  U:X  a  U R                  " S0 UD6$ [         R                  U:X  a  U R                  " S0 UD6$ [         R                  U:X  a  U R                  " S0 UD6$ [         R                  U:X  a  U R                  " S0 UD6$ [         R                  U:X  a  U R                  " S0 UD6$ [        U5      e)aZ  Get klines of spot (get_klines) or futures (futures_klines) endpoints.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#klinecandlestick-data
https://developers.binance.com/docs/derivatives/option/market-data/Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data

:param klines_type: Historical klines type: SPOT or FUTURES
:type klines_type: HistoricalKlinesType

:return: klines, see get_klines

r    )r   SPOTr   FUTURESfutures_klinesFUTURES_COINfutures_coin_klinesFUTURES_MARK_PRICEfutures_mark_price_klinesFUTURES_INDEX_PRICEfutures_index_price_klinesFUTURES_COIN_MARK_PRICEfutures_coin_mark_price_klinesFUTURES_COIN_INDEX_PRICEfutures_coin_index_price_klinesr   )r&   r   r   s      r(   _klinesClient._klines  s   , vi'8y!$$3??,V,,!))[8&&000!..+=++5f55!44C11;F;;!55D22<V<<!99[H66@@@!::kI77A&AA)+66r*   c                 x    U R                  UUUSS[        [        R                  " 5       S-  5      S9nUS   S   $ )a  Get the earliest valid open timestamp from Binance

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#klinecandlestick-data
https://developers.binance.com/docs/derivatives/option/market-data/Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data

:param symbol: Name of symbol pair e.g. BNBBTC
:type symbol: str
:param interval: Binance Kline interval
:type interval: str
:param klines_type: Historical klines type: SPOT or FUTURES
:type klines_type: HistoricalKlinesType

:return: first valid timestamp

r   r   r   r   r   intervallimitr   r   )r   r   r   )r&   r   r   r   klines        r(   _get_earliest_valid_timestamp$Client._get_earliest_valid_timestamp  sI    : #		d*+  
 Qx{r*   c           	      *    U R                  UUUUUUS9$ )a  Get Historical Klines from Binance

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#klinecandlestick-data
https://developers.binance.com/docs/derivatives/option/market-data/Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data

:param symbol: Name of symbol pair e.g. BNBBTC
:type symbol: str
:param interval: Binance Kline interval
:type interval: str
:param start_str: optional - start date string in UTC format or timestamp in milliseconds
:type start_str: str|int
:param end_str: optional - end date string in UTC format or timestamp in milliseconds (default will fetch everything up to now)
:type end_str: str|int
:param limit: Default 1000; max 1000.
:type limit: int
:param klines_type: Historical klines type: SPOT or FUTURES
:type klines_type: HistoricalKlinesType

:return: list of OHLCV values (Open time, Open, High, Low, Close, Volume, Close time, Quote asset volume, Number of trades, Taker buy base asset volume, Taker buy quote asset volume, Ignore)

)r   end_strr   r   )_historical_klinesr&   r   r   r   r   r   r   s          r(   get_historical_klinesClient.get_historical_klinesB  s/    L &&# ' 
 	
r*   c           	         SnUc  SnSn/ n[        U5      n	[        U5      n
U
b  U R                  XU5      n[        X5      n
[        U5      nU(       a  U
(       a  X::  a  U$ Sn U R	                  UUUUU
US9nU(       a  X-  nU(       a  [        U5      U:  a  USU n U$ [        U5      (       a  [        U5      U:  a   U$ US   S   U	-   n
U(       a  X:  a   U$ US-  nUS	-  S:X  a  [        R                  " S5        M  )
a  Get Historical Klines from Binance (spot or futures)

See dateparser docs for valid start and end string formats https://dateparser.readthedocs.io/en/latest/

If using offset strings for dates add "UTC" to date string e.g. "now UTC", "11 hours ago UTC"

:param symbol: Name of symbol pair e.g. BNBBTC
:type symbol: str
:param interval: Binance Kline interval
:type interval: str
:param start_str: optional - start date string in UTC format or timestamp in milliseconds
:type start_str: str|int
:param end_str: optional - end date string in UTC format or timestamp in milliseconds (default will fetch everything up to now)
:type end_str: None|str|int
:param limit: Default 1000; max 1000.
:type limit: int
:param klines_type: Historical klines type: SPOT or FUTURES
:type klines_type: HistoricalKlinesType

:return: list of OHLCV values (Open time, Open, High, Low, Close, Volume, Close time, Quote asset volume, Number of trades, Taker buy base asset volume, Taker buy quote asset volume, Ignore)

TNr   Fr   r   r   r      r   r   r   maxr   r   r   sleep)r&   r   r   r   r   r   r   initial_limit_setoutput_data	timeframer   first_valid_tsr   idx	temp_datas                  r(   r  Client._historical_klinesq  sS   @ !=E %  -X6	 "), !??+N 84H  (h6#5'!" % I ( !S%5%=)&51( ! y>>S^e%;  !}Q')3H (, 	 1HCQw!|

1I r*   c           	      $    U R                  XX4XVS9$ )a   Get Historical Klines generator from Binance

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#klinecandlestick-data
https://developers.binance.com/docs/derivatives/option/market-data/Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data
https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data

:param symbol: Name of symbol pair e.g. BNBBTC
:type symbol: str
:param interval: Binance Kline interval
:type interval: str
:param start_str: optional - Start date string in UTC format or timestamp in milliseconds
:type start_str: str|int
:param end_str: optional - end date string in UTC format or timestamp in milliseconds (default will fetch everything up to now)
:type end_str: str|int
:param limit: amount of candles to return per request (default 1000)
:type limit: int
:param klines_type: Historical klines type: SPOT or FUTURES
:type klines_type: HistoricalKlinesType

:return: generator of OHLCV values

)r   )_historical_klines_generatorr  s          r(   get_historical_klines_generator&Client.get_historical_klines_generator  s$    N 00i% 1 
 	
r*   c           	   #     #    SnUc  SnSn[        U5      n[        U5      n	U	b  U R                  XU5      n
[        X5      n	[        U5      nU(       a  U	(       a  X::  a  gSn U R	                  UUUUU	US9nU(       a  U H  nUv   M	     [        U5      (       a  [        U5      U:  a  gUS   S   U-   n	U(       a  X:  a  gUS-  nUS	-  S:X  a  [        R                  " S5        M  7f)
a  Get Historical Klines generator from Binance (spot or futures)

See dateparser docs for valid start and end string formats https://dateparser.readthedocs.io/en/latest/

If using offset strings for dates add "UTC" to date string e.g. "now UTC", "11 hours ago UTC"

:param symbol: Name of symbol pair e.g. BNBBTC
:type symbol: str
:param interval: Binance Kline interval
:type interval: str
:param start_str: optional - Start date string in UTC format or timestamp in milliseconds
:type start_str: str|int
:param end_str: optional - end date string in UTC format or timestamp in milliseconds (default will fetch everything up to now)
:type end_str: str|int
:param klines_type: Historical klines type: SPOT or FUTURES
:type klines_type: HistoricalKlinesType

:return: generator of OHLCV values

TNr   Fr   r   r   r   r  r  )r&   r   r   r   r   r   r   r
  r  r   r  r   r  r  os                  r(   r  #Client._historical_klines_generator  s    < !=E % -X6	 "), !??+N 84H  (h6#5,,'!" ' K $AG %
 {##s;'7%'? #2q)I5H (, 1HCQw!|

1C s   C(C*c                 "    U R                  SUS9$ )a$  Current average price for a symbol.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#current-average-price

:param symbol:
:type symbol: str

:returns: API response

.. code-block:: python

    {
        "mins": 5,
        "price": "9.35751834"
    }
avgPricer   r   r   s     r(   get_avg_priceClient.get_avg_priceX  s    " yy&y11r*   c                 "    U R                  SUS9$ )aq  24 hour price change statistics.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#24hr-ticker-price-change-statistics

:param symbol:
:type symbol: str

:returns: API response

.. code-block:: python

    {
        "priceChange": "-94.99999800",
        "priceChangePercent": "-95.960",
        "weightedAvgPrice": "0.29628482",
        "prevClosePrice": "0.10002000",
        "lastPrice": "4.00000200",
        "bidPrice": "4.00000000",
        "askPrice": "4.00000200",
        "openPrice": "99.00000000",
        "highPrice": "100.00000000",
        "lowPrice": "0.10000000",
        "volume": "8913.30000000",
        "openTime": 1499783499040,
        "closeTime": 1499869899040,
        "fristId": 28385,   # First tradeId
        "lastId": 28460,    # Last tradeId
        "count": 76         # Trade count
    }

OR

.. code-block:: python

    [
        {
            "priceChange": "-94.99999800",
            "priceChangePercent": "-95.960",
            "weightedAvgPrice": "0.29628482",
            "prevClosePrice": "0.10002000",
            "lastPrice": "4.00000200",
            "bidPrice": "4.00000000",
            "askPrice": "4.00000200",
            "openPrice": "99.00000000",
            "highPrice": "100.00000000",
            "lowPrice": "0.10000000",
            "volume": "8913.30000000",
            "openTime": 1499783499040,
            "closeTime": 1499869899040,
            "fristId": 28385,   # First tradeId
            "lastId": 28460,    # Last tradeId
            "count": 76         # Trade count
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

ticker/24hrr   r   r   s     r(   
get_tickerClient.get_tickerk  s    v yyVy44r*   c                 "    U R                  SUS9$ )a;  Latest price for a symbol or symbols.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#symbol-price-ticker

:param symbol:
:type symbol: str

:returns: API response

.. code-block:: python

    {
        "symbol": "LTCBTC",
        "price": "4.00000200"
    }

OR

.. code-block:: python

    [
        {
            "symbol": "LTCBTC",
            "price": "4.00000200"
        },
        {
            "symbol": "ETHBTC",
            "price": "0.07946600"
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

r   r   r   r   s     r(   get_symbol_tickerClient.get_symbol_ticker  s    F yyfy55r*   c                 "    U R                  SUS9$ )aN  Latest price for a symbol or symbols.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#rolling-window-price-change-statistics

:param symbol:
:type symbol: str

:returns: API response

.. code-block:: python

    {
        "symbol": "LTCBTC",
        "price": "4.00000200"
    }

OR

.. code-block:: python

    [
        {
            "symbol": "LTCBTC",
            "price": "4.00000200"
        },
        {
            "symbol": "ETHBTC",
            "price": "0.07946600"
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

tickerr   r   r   s     r(   get_symbol_ticker_windowClient.get_symbol_ticker_window  s    F yyy//r*   c                 "    U R                  SUS9$ )a  Latest price for a symbol or symbols.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#symbol-order-book-ticker

:param symbol:
:type symbol: str

:returns: API response

.. code-block:: python

    {
        "symbol": "LTCBTC",
        "bidPrice": "4.00000000",
        "bidQty": "431.00000000",
        "askPrice": "4.00000200",
        "askQty": "9.00000000"
    }

OR

.. code-block:: python

    [
        {
            "symbol": "LTCBTC",
            "bidPrice": "4.00000000",
            "bidQty": "431.00000000",
            "askPrice": "4.00000200",
            "askQty": "9.00000000"
        },
        {
            "symbol": "ETHBTC",
            "bidPrice": "0.07946700",
            "bidQty": "9.00000000",
            "askPrice": "100000.00000000",
            "askQty": "1000.00000000"
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

r   r   r   r   s     r(   get_orderbook_tickerClient.get_orderbook_ticker  s     X yyf  
 	
r*   c                 p    SU;  a   U R                   U R                  5       -   US'   U R                  SSUS9$ )a  Send in a new order

Any order with an icebergQty MUST have timeInForce set to GTC.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-trade

:param symbol: required
:type symbol: str
:param side: required
:type side: str
:param type: required
:type type: str
:param timeInForce: required if limit order
:type timeInForce: str
:param quantity: required
:type quantity: decimal
:param quoteOrderQty: amount the user wants to spend (when buying) or receive (when selling)
    of the quote asset, applicable to MARKET orders
:type quoteOrderQty: decimal
:param price: required
:type price: str
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param icebergQty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
:type icebergQty: decimal
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

Response ACK:

.. code-block:: python

    {
        "symbol":"LTCBTC",
        "orderId": 1,
        "clientOrderId": "myOrder1" # Will be newClientOrderId
        "transactTime": 1499827319559
    }

Response RESULT:

.. code-block:: python

    {
        "symbol": "BTCUSDT",
        "orderId": 28,
        "clientOrderId": "6gCrw2kRUAF9CvJDGP16IP",
        "transactTime": 1507725176595,
        "price": "0.00000000",
        "origQty": "10.00000000",
        "executedQty": "10.00000000",
        "cummulativeQuoteQty": "10.00000000",
        "status": "FILLED",
        "timeInForce": "GTC",
        "type": "MARKET",
        "side": "SELL"
    }

Response FULL:

.. code-block:: python

    {
        "symbol": "BTCUSDT",
        "orderId": 28,
        "clientOrderId": "6gCrw2kRUAF9CvJDGP16IP",
        "transactTime": 1507725176595,
        "price": "0.00000000",
        "origQty": "10.00000000",
        "executedQty": "10.00000000",
        "cummulativeQuoteQty": "10.00000000",
        "status": "FILLED",
        "timeInForce": "GTC",
        "type": "MARKET",
        "side": "SELL",
        "fills": [
            {
                "price": "4000.00000000",
                "qty": "1.00000000",
                "commission": "4.00000000",
                "commissionAsset": "USDT"
            },
            {
                "price": "3999.00000000",
                "qty": "5.00000000",
                "commission": "19.99500000",
                "commissionAsset": "USDT"
            },
            {
                "price": "3998.00000000",
                "qty": "2.00000000",
                "commission": "7.99600000",
                "commissionAsset": "USDT"
            },
            {
                "price": "3997.00000000",
                "qty": "1.00000000",
                "commission": "3.99700000",
                "commissionAsset": "USDT"
            },
            {
                "price": "3995.00000000",
                "qty": "1.00000000",
                "commission": "3.99500000",
                "commissionAsset": "USDT"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException, BinanceOrderMinAmountException, BinanceOrderMinPriceException, BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException, BinanceOrderInactiveSymbolException

newClientOrderIdorderTr   SPOT_ORDER_PREFIXuuid22r   r   s     r(   create_orderClient.create_order$  s>    j V+)-)?)?$++-)OF%&zz'4fz55r*   c                 b    UR                  U R                  US.5        U R                  " S0 UD6$ )a  Send in a new limit order

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-trade

Any order with an icebergQty MUST have timeInForce set to GTC.

:param symbol: required
:type symbol: str
:param side: required
:type side: str
:param quantity: required
:type quantity: decimal
:param price: required
:type price: str
:param timeInForce: default Good till cancelled
:type timeInForce: str
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param icebergQty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
:type icebergQty: decimal
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

See order endpoint for full response options

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException, BinanceOrderMinAmountException, BinanceOrderMinPriceException, BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException, BinanceOrderInactiveSymbolException

typetimeInForcer   )r2   ORDER_TYPE_LIMITr0  r&   r5  r   s      r(   order_limitClient.order_limit  s0    B 	t44[QR  *6**r*   c                 d    UR                  SU R                  05        U R                  " SSU0UD6$ )a  Send in a new limit buy order

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-trade

Any order with an icebergQty MUST have timeInForce set to GTC.

:param symbol: required
:type symbol: str
:param quantity: required
:type quantity: decimal
:param price: required
:type price: str
:param timeInForce: default Good till cancelled
:type timeInForce: str
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param stopPrice: Used with stop orders
:type stopPrice: decimal
:param icebergQty: Used with iceberg orders
:type icebergQty: decimal
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

See order endpoint for full response options

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException, BinanceOrderMinAmountException, BinanceOrderMinPriceException, BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException, BinanceOrderInactiveSymbolException

sider5  r   )r2   SIDE_BUYr8  r7  s      r(   order_limit_buyClient.order_limit_buy  s:    B 	DMM
 	 BKB6BBr*   c                 d    UR                  SU R                  05        U R                  " SSU0UD6$ )aY  Send in a new limit sell order

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-trade

:param symbol: required
:type symbol: str
:param quantity: required
:type quantity: decimal
:param price: required
:type price: str
:param timeInForce: default Good till cancelled
:type timeInForce: str
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param stopPrice: Used with stop orders
:type stopPrice: decimal
:param icebergQty: Used with iceberg orders
:type icebergQty: decimal
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

See order endpoint for full response options

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException, BinanceOrderMinAmountException, BinanceOrderMinPriceException, BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException, BinanceOrderInactiveSymbolException

r;  r5  r   )r2   	SIDE_SELLr8  r7  s      r(   order_limit_sellClient.order_limit_sell  s2    > 	vt~~./BKB6BBr*   c                 `    UR                  SU R                  05        U R                  " S0 UD6$ )a  Send in a new market order

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-trade

:param symbol: required
:type symbol: str
:param side: required
:type side: str
:param quantity: required
:type quantity: decimal
:param quoteOrderQty: amount the user wants to spend (when buying) or receive (when selling)
    of the quote asset
:type quoteOrderQty: decimal
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

See order endpoint for full response options

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException, BinanceOrderMinAmountException, BinanceOrderMinPriceException, BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException, BinanceOrderInactiveSymbolException

r4  r   )r2   ORDER_TYPE_MARKETr0  r   s     r(   order_marketClient.order_market	  s/    8 	vt5567  *6**r*   c                 `    UR                  SU R                  05        U R                  " S0 UD6$ )a  Send in a new market buy order

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-trade

:param symbol: required
:type symbol: str
:param quantity: required
:type quantity: decimal
:param quoteOrderQty: the amount the user wants to spend of the quote asset
:type quoteOrderQty: decimal
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

See order endpoint for full response options

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException, BinanceOrderMinAmountException, BinanceOrderMinPriceException, BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException, BinanceOrderInactiveSymbolException

r;  r   )r2   r<  rE  r   s     r(   order_market_buyClient.order_market_buy(  s-    2 	vt}}-.  *6**r*   c                 `    UR                  SU R                  05        U R                  " S0 UD6$ )a  Send in a new market sell order

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-trade

:param symbol: required
:type symbol: str
:param quantity: required
:type quantity: decimal
:param quoteOrderQty: the amount the user wants to receive of the quote asset
:type quoteOrderQty: decimal
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

See order endpoint for full response options

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException, BinanceOrderMinAmountException, BinanceOrderMinPriceException, BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException, BinanceOrderInactiveSymbolException

r;  r   )r2   r@  rE  r   s     r(   order_market_sellClient.order_market_sellD  s-    2 	vt~~./  *6**r*   c                 p    SU;  a   U R                   U R                  5       -   US'   U R                  SSUS9$ )a  Send in an one-cancels-the-other (OCO) pair, where activation of one order immediately cancels the other.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-list---oco-trade

An OCO has 2 orders called the above order and below order.
One of the orders must be a LIMIT_MAKER/TAKE_PROFIT/TAKE_PROFIT_LIMIT order and the other must be STOP_LOSS or STOP_LOSS_LIMIT order.

Price restrictions:
If the OCO is on the SELL side:
    LIMIT_MAKER/TAKE_PROFIT_LIMIT price > Last Traded Price > STOP_LOSS/STOP_LOSS_LIMIT stopPrice
    TAKE_PROFIT stopPrice > Last Traded Price > STOP_LOSS/STOP_LOSS_LIMIT stopPrice
If the OCO is on the BUY side:
    LIMIT_MAKER/TAKE_PROFIT_LIMIT price < Last Traded Price < stopPrice
    TAKE_PROFIT stopPrice < Last Traded Price < STOP_LOSS/STOP_LOSS_LIMIT stopPrice

Weight: 1

:param symbol: required
:type symbol: str
:param listClientOrderId: Arbitrary unique ID among open order lists. Automatically generated if not sent.
:type listClientOrderId: str
:param side: required - BUY or SELL
:type side: str
:param quantity: required - Quantity for both orders of the order list
:type quantity: decimal
:param aboveType: required - STOP_LOSS_LIMIT, STOP_LOSS, LIMIT_MAKER, TAKE_PROFIT, TAKE_PROFIT_LIMIT
:type aboveType: str
:param aboveClientOrderId: Arbitrary unique ID among open orders for the above order
:type aboveClientOrderId: str
:param aboveIcebergQty: Note that this can only be used if aboveTimeInForce is GTC
:type aboveIcebergQty: decimal
:param abovePrice: Can be used if aboveType is STOP_LOSS_LIMIT, LIMIT_MAKER, or TAKE_PROFIT_LIMIT
:type abovePrice: decimal
:param aboveStopPrice: Can be used if aboveType is STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT
:type aboveStopPrice: decimal
:param aboveTrailingDelta: See Trailing Stop order FAQ
:type aboveTrailingDelta: int
:param aboveTimeInForce: Required if aboveType is STOP_LOSS_LIMIT or TAKE_PROFIT_LIMIT
:type aboveTimeInForce: str
:param aboveStrategyId: Arbitrary numeric value identifying the above order within an order strategy
:type aboveStrategyId: int
:param aboveStrategyType: Arbitrary numeric value identifying the above order strategy (>= 1000000)
:type aboveStrategyType: int
:param belowType: required - STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT
:type belowType: str
:param belowClientOrderId: Arbitrary unique ID among open orders for the below order
:type belowClientOrderId: str
:param belowIcebergQty: Note that this can only be used if belowTimeInForce is GTC
:type belowIcebergQty: decimal
:param belowPrice: Can be used if belowType is STOP_LOSS_LIMIT, LIMIT_MAKER, or TAKE_PROFIT_LIMIT
:type belowPrice: decimal
:param belowStopPrice: Can be used if belowType is STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT or TAKE_PROFIT_LIMIT
:type belowStopPrice: decimal
:param belowTrailingDelta: See Trailing Stop order FAQ
:type belowTrailingDelta: int
:param belowTimeInForce: Required if belowType is STOP_LOSS_LIMIT or TAKE_PROFIT_LIMIT
:type belowTimeInForce: str
:param belowStrategyId: Arbitrary numeric value identifying the below order within an order strategy
:type belowStrategyId: int
:param belowStrategyType: Arbitrary numeric value identifying the below order strategy (>= 1000000)
:type belowStrategyType: int
:param newOrderRespType: Select response format: ACK, RESULT, FULL
:type newOrderRespType: str
:param selfTradePreventionMode: The allowed enums is dependent on what is configured on the symbol
:type selfTradePreventionMode: str
:param recvWindow: The value cannot be greater than 60000
:type recvWindow: int
:param timestamp: required
:type timestamp: int

:returns: API response

    {
        "orderListId": 1,
        "contingencyType": "OCO",
        "listStatusType": "EXEC_STARTED",
        "listOrderStatus": "EXECUTING",
        "listClientOrderId": "lH1YDkuQKWiXVXHPSKYEIp",
        "transactionTime": 1710485608839,
        "symbol": "LTCBTC",
        "orders": [
            {
                "symbol": "LTCBTC",
                "orderId": 10,
                "clientOrderId": "44nZvqpemY7sVYgPYbvPih"
            },
            {
                "symbol": "LTCBTC",
                "orderId": 11,
                "clientOrderId": "NuMp0nVYnciDiFmVqfpBqK"
            }
        ],
        "orderReports": [
            {
                "symbol": "LTCBTC",
                "orderId": 10,
                "orderListId": 1,
                "clientOrderId": "44nZvqpemY7sVYgPYbvPih",
                "transactTime": 1710485608839,
                "price": "1.00000000",
                "origQty": "5.00000000",
                "executedQty": "0.00000000",
                "origQuoteOrderQty": "0.000000",
                "cummulativeQuoteQty": "0.00000000",
                "status": "NEW",
                "timeInForce": "GTC",
                "type": "STOP_LOSS_LIMIT",
                "side": "SELL",
                "stopPrice": "1.00000000",
                "workingTime": -1,
                "icebergQty": "1.00000000",
                "selfTradePreventionMode": "NONE"
            },
            {
                "symbol": "LTCBTC",
                "orderId": 11,
                "orderListId": 1,
                "clientOrderId": "NuMp0nVYnciDiFmVqfpBqK",
                "transactTime": 1710485608839,
                "price": "3.00000000",
                "origQty": "5.00000000",
                "executedQty": "0.00000000",
                "origQuoteOrderQty": "0.000000",
                "cummulativeQuoteQty": "0.00000000",
                "status": "NEW",
                "timeInForce": "GTC",
                "type": "LIMIT_MAKER",
                "side": "SELL",
                "workingTime": 1710485608839,
                "selfTradePreventionMode": "NONE"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException,
        BinanceOrderMinAmountException, BinanceOrderMinPriceException,
        BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException,
        BinanceOrderInactiveSymbolException

listClientOrderIdzorderList/ocoTr   r-  r   s     r(   create_oco_orderClient.create_oco_order`  s>    Z f,*.*@*@4;;=*PF&'zz/4fz==r*   c                 `    UR                  SU R                  05        U R                  " S0 UD6$ )a[  Send in a new OCO buy order

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-list---oco-trade

:param symbol: required
:type symbol: str
:param listClientOrderId: A unique id for the list order. Automatically generated if not sent.
:type listClientOrderId: str
:param quantity: required
:type quantity: decimal
:param limitClientOrderId: A unique id for the limit order. Automatically generated if not sent.
:type limitClientOrderId: str
:param price: required
:type price: str
:param limitIcebergQty: Used to make the LIMIT_MAKER leg an iceberg order.
:type limitIcebergQty: decimal
:param stopClientOrderId: A unique id for the stop order. Automatically generated if not sent.
:type stopClientOrderId: str
:param stopPrice: required
:type stopPrice: str
:param stopLimitPrice: If provided, stopLimitTimeInForce is required.
:type stopLimitPrice: str
:param stopIcebergQty: Used with STOP_LOSS_LIMIT leg to make an iceberg order.
:type stopIcebergQty: decimal
:param stopLimitTimeInForce: Valid values are GTC/FOK/IOC.
:type stopLimitTimeInForce: str
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

See OCO order endpoint for full response options

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException, BinanceOrderMinAmountException, BinanceOrderMinPriceException, BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException, BinanceOrderInactiveSymbolException

r;  r   )r2   r<  rO  r   s     r(   order_oco_buyClient.order_oco_buy  s.    N 	vt}}-.$$.v..r*   c                 `    UR                  SU R                  05        U R                  " S0 UD6$ )a\  Send in a new OCO sell order

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-list---oco-trade

:param symbol: required
:type symbol: str
:param listClientOrderId: A unique id for the list order. Automatically generated if not sent.
:type listClientOrderId: str
:param quantity: required
:type quantity: decimal
:param limitClientOrderId: A unique id for the limit order. Automatically generated if not sent.
:type limitClientOrderId: str
:param price: required
:type price: str
:param limitIcebergQty: Used to make the LIMIT_MAKER leg an iceberg order.
:type limitIcebergQty: decimal
:param stopClientOrderId: A unique id for the stop order. Automatically generated if not sent.
:type stopClientOrderId: str
:param stopPrice: required
:type stopPrice: str
:param stopLimitPrice: If provided, stopLimitTimeInForce is required.
:type stopLimitPrice: str
:param stopIcebergQty: Used with STOP_LOSS_LIMIT leg to make an iceberg order.
:type stopIcebergQty: decimal
:param stopLimitTimeInForce: Valid values are GTC/FOK/IOC.
:type stopLimitTimeInForce: str
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

See OCO order endpoint for full response options

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException, BinanceOrderMinAmountException, BinanceOrderMinPriceException, BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException, BinanceOrderInactiveSymbolException

r;  r   )r2   r@  rO  r   s     r(   order_oco_sellClient.order_oco_sell  s.    N 	vt~~./$$.v..r*   c                 $    U R                  SSUS9$ )a  Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#test-new-order-trade

:param symbol: required
:type symbol: str
:param side: required
:type side: str
:param type: required
:type type: str
:param timeInForce: required if limit order
:type timeInForce: str
:param quantity: required
:type quantity: decimal
:param price: required
:type price: str
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param icebergQty: Used with iceberg orders
:type icebergQty: decimal
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: The number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {}

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException, BinanceOrderMinAmountException, BinanceOrderMinPriceException, BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException, BinanceOrderInactiveSymbolException



order/testTr   r   r   s     r(   create_test_orderClient.create_test_orderE  s    H zz,6z::r*   c                 $    U R                  SSUS9$ )a  Check an order's status. Either orderId or origClientOrderId must be sent.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-order-user_data

:param symbol: required
:type symbol: str
:param orderId: The unique order id
:type orderId: int
:param origClientOrderId: optional
:type origClientOrderId: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "symbol": "LTCBTC",
        "orderId": 1,
        "clientOrderId": "myOrder1",
        "price": "0.1",
        "origQty": "1.0",
        "executedQty": "0.0",
        "status": "NEW",
        "timeInForce": "GTC",
        "type": "LIMIT",
        "side": "BUY",
        "stopPrice": "0.0",
        "icebergQty": "0.0",
        "time": 1499827319559
    }

:raises: BinanceRequestException, BinanceAPIException

r,  Tr   r   r   s     r(   	get_orderClient.get_orderk  s    J yy$Vy44r*   c                 $    U R                  SSUS9$ )a  Get all account orders; active, canceled, or filled.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#all-orders-user_data

:param symbol: required
:type symbol: str
:param orderId: The unique order id
:type orderId: int
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param limit: Default 500; max 1000.
:type limit: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    [
        {
            "symbol": "LTCBTC",
            "orderId": 1,
            "clientOrderId": "myOrder1",
            "price": "0.1",
            "origQty": "1.0",
            "executedQty": "0.0",
            "status": "NEW",
            "timeInForce": "GTC",
            "type": "LIMIT",
            "side": "BUY",
            "stopPrice": "0.0",
            "icebergQty": "0.0",
            "time": 1499827319559
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

	allOrdersTr   r   r   s     r(   get_all_ordersClient.get_all_orders  s    V yydy88r*   c                 $    U R                  SSUS9$ )a,  Cancel an active order. Either orderId or origClientOrderId must be sent.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#cancel-order-trade

:param symbol: required
:type symbol: str
:param orderId: The unique order id
:type orderId: int
:param origClientOrderId: optional
:type origClientOrderId: str
:param newClientOrderId: Used to uniquely identify this cancel. Automatically generated by default.
:type newClientOrderId: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "symbol": "LTCBTC",
        "origClientOrderId": "myOrder1",
        "orderId": 1,
        "clientOrderId": "cancelMyOrder1"
    }

:raises: BinanceRequestException, BinanceAPIException

r,  Tr   r   r   s     r(   cancel_orderClient.cancel_order  s    < ||GT|77r*   c                 $    U R                  SSUS9$ )z
Cancel all open orders on a symbol.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#cancel-all-open-orders-on-a-symbol-trade

:param symbol: required
:type symbol: str

:returns: API response

openOrdersTr   rd  r   s     r(   cancel_all_open_ordersClient.cancel_all_open_orders  s     ||L$V|<<r*   c                 p    SU;  a   U R                   U R                  5       -   US'   U R                  SSUS9$ )a  Cancels an existing order and places a new order on the same symbol.

Filters and Order Count are evaluated before the processing of the cancellation and order placement occurs.

A new order that was not attempted (i.e. when newOrderResult: NOT_ATTEMPTED), will still increase the order count by 1.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#cancel-an-existing-order-and-send-a-new-order-trade

:param symbol: required
:type symbol: str
:param side: required
:type side: enum
:param type: required
:type type: enum
:param cancelReplaceMode: required - STOP_ON_FAILURE or ALLOW_FAILURE
:type cancelReplaceMode: enum
:param timeInForce: optional
:type timeInForce: enum
:param quantity: optional
:type quantity: decimal
:param quoteOrderQty: optional
:type quoteOrderQty: decimal
:param price: optional
:type price: decimal
:param cancelNewClientOrderId: optional - Used to uniquely identify this cancel. Automatically generated by default.
:type cancelNewClientOrderId: str
:param cancelOrigClientOrderId: optional - Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence.
:type cancelOrigClientOrderId: str
:param cancelOrderId: optional - Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence.
:type cancelOrderId: long
:param newClientOrderId: optional - Used to identify the new order.
:type newClientOrderId: str
:param strategyId: optional
:type strategyId: int
:param strategyType: optional - The value cannot be less than 1000000.
:type strategyType: int
:param stopPrice: optional
:type stopPrice: decimal
:param trailingDelta: optional
:type trailingDelta: long
:param icebergQty: optional
:type icebergQty: decimal
:param newOrderRespType: optional - ACK, RESULT or FULL. MARKET and LIMIT orders types default to FULL; all other orders default to ACK
:type newOrderRespType: enum
:param selfTradePreventionMode: optional - EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH or NONE.
:type selfTradePreventionMode: enum
:param cancelRestrictions: optional - ONLY_NEW or ONLY_PARTIALLY_FILLED
:type cancelRestrictions: enum
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: API response

.. code-block:: python

    //Both the cancel order placement and new order placement succeeded.
    {
        "cancelResult": "SUCCESS",
        "newOrderResult": "SUCCESS",
        "cancelResponse": {
            "symbol": "BTCUSDT",
            "origClientOrderId": "DnLo3vTAQcjha43lAZhZ0y",
            "orderId": 9,
            "orderListId": -1,
            "clientOrderId": "osxN3JXAtJvKvCqGeMWMVR",
            "transactTime": 1684804350068,
            "price": "0.01000000",
            "origQty": "0.000100",
            "executedQty": "0.00000000",
            "cummulativeQuoteQty": "0.00000000",
            "status": "CANCELED",
            "timeInForce": "GTC",
            "type": "LIMIT",
            "side": "SELL",
            "selfTradePreventionMode": "NONE"
        },
        "newOrderResponse": {
            "symbol": "BTCUSDT",
            "orderId": 10,
            "orderListId": -1,
            "clientOrderId": "wOceeeOzNORyLiQfw7jd8S",
            "transactTime": 1652928801803,
            "price": "0.02000000",
            "origQty": "0.040000",
            "executedQty": "0.00000000",
            "cummulativeQuoteQty": "0.00000000",
            "status": "NEW",
            "timeInForce": "GTC",
            "type": "LIMIT",
            "side": "BUY",
            "workingTime": 1669277163808,
            "fills": [],
            "selfTradePreventionMode": "NONE"

        }
    }
Similar to POST /api/v3/order, additional mandatory parameters are determined by type.

Response format varies depending on whether the processing of the message succeeded, partially succeeded, or failed.

:raises: BinanceRequestException, BinanceAPIException

r+  zorder/cancelReplaceTr   r-  r   s     r(   cancel_replace_orderClient.cancel_replace_order  s?    P V+)-)?)?$++-)OF%&zz/FzCCr*   c                 $    U R                  SSUS9$ )a?  Get all open orders on a symbol.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#current-open-orders-user_data

:param symbol: optional
:type symbol: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    [
        {
            "symbol": "LTCBTC",
            "orderId": 1,
            "clientOrderId": "myOrder1",
            "price": "0.1",
            "origQty": "1.0",
            "executedQty": "0.0",
            "status": "NEW",
            "timeInForce": "GTC",
            "type": "LIMIT",
            "side": "BUY",
            "stopPrice": "0.0",
            "icebergQty": "0.0",
            "time": 1499827319559
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

rh  Tr   r   r   s     r(   get_open_ordersClient.get_open_ordersX  s    F yyt&y99r*   c                 $    U R                  SSUS9$ )a  Get all open orders on a symbol.
https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-open-order-lists-user_data
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int
:returns: API response
.. code-block:: python
    [
        {
            "orderListId": 31,
            "contingencyType": "OCO",
            "listStatusType": "EXEC_STARTED",
            "listOrderStatus": "EXECUTING",
            "listClientOrderId": "wuB13fmulKj3YjdqWEcsnp",
            "transactionTime": 1565246080644,
            "symbol": "LTCBTC",
            "orders": [
                {
                    "symbol": "LTCBTC",
                    "orderId": 4,
                    "clientOrderId": "r3EH2N76dHfLoSZWIUw1bT"
                },
                {
                    "symbol": "LTCBTC",
                    "orderId": 5,
                    "clientOrderId": "Cv1SnyPD3qhqpbjpYEHbd2"
                }
            ]
        }
    ]
:raises: BinanceRequestException, BinanceAPIException
openOrderListTr   r   r   s     r(   get_open_oco_ordersClient.get_open_oco_orders}  s    @ yy$Vy<<r*   c                 $    U R                  SSUS9$ )au  Get current account information.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#account-information-user_data

:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "makerCommission": 15,
        "takerCommission": 15,
        "buyerCommission": 0,
        "sellerCommission": 0,
        "canTrade": true,
        "canWithdraw": true,
        "canDeposit": true,
        "balances": [
            {
                "asset": "BTC",
                "free": "4723846.89208129",
                "locked": "0.00000000"
            },
            {
                "asset": "LTC",
                "free": "4763368.68006011",
                "locked": "0.00000000"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

accountTr   r   r   s     r(   get_accountClient.get_account  s    J yyDvy66r*   c                     U R                   " S0 UD6nSU;   aB  U(       a6  US    H,  nUS   R                  5       UR                  5       :X  d  M*  Us  $    gUS   $ g)a  Get current asset balance.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#account-information-user_data

:param asset: optional - the asset to get the balance of
:type asset: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: dictionary or None if not found

.. code-block:: python

    {
        "asset": "BTC",
        "free": "4723846.89208129",
        "locked": "0.00000000"
    }

:raises: BinanceRequestException, BinanceAPIException

balancesassetNr   )rw  lower)r&   r{  r   r   bals        r(   get_asset_balanceClient.get_asset_balance  sd    . ((z?C7|))+u{{}<"
 +
  :&r*   c                 $    U R                  SSUS9$ )a  Get trades for a specific symbol.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#account-trade-list-user_data

:param symbol: required
:type symbol: str
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param limit: Default 500; max 1000.
:type limit: int
:param fromId: TradeId to fetch from. Default gets most recent trades.
:type fromId: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    [
        {
            "id": 28457,
            "price": "4.00000100",
            "qty": "12.00000000",
            "commission": "10.10000000",
            "commissionAsset": "BNB",
            "time": 1499865549590,
            "isBuyer": true,
            "isMaker": false,
            "isBestMatch": true
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

myTradesTr   r   r   s     r(   get_my_tradesClient.get_my_trades  s    N yyTy77r*   c                 $    U R                  SSUS9$ )aU  Displays the user's current order count usage for all intervals.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-unfilled-order-count-user_data

:returns: API response

.. code-block:: python
    [

        {
            "rateLimitType": "ORDERS",
            "interval": "SECOND",
            "intervalNum": 10,
            "limit": 10000,
            "count": 0
        },
        {
            "rateLimitType": "ORDERS",
            "interval": "DAY",
            "intervalNum": 1,
            "limit": 20000,
            "count": 0
        }
    ]

rateLimit/orderTr   r   r   s     r(   get_current_order_countClient.get_current_order_count	  s    6 yy*Dvy>>r*   c                 $    U R                  SSUS9$ )a  Displays the list of orders that were expired because of STP.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-prevented-matches-user_data

:param symbol: required
:type symbol: str
:param preventedMatchId: optional
:type preventedMatchId: int
:param orderId: optional
:type orderId: int
:param fromPreventedMatchId: optional
:type fromPreventedMatchId: int
:param limit: optional, Default: 500; Max: 1000
:type limit: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python
    [
        {
            "symbol": "BTCUSDT",
            "preventedMatchId": 1,
            "takerOrderId": 5,
            "makerOrderId": 3,
            "tradeGroupId": 1,
            "selfTradePreventionMode": "EXPIRE_MAKER",
            "price": "1.100000",
            "makerPreventedQuantity": "1.300000",
            "transactTime": 1669101687094
        }
    ]
myPreventedMatchesTr   r   r   s     r(   get_prevented_matchesClient.get_prevented_matches/	  s    F yy-t&yAAr*   c                 $    U R                  SSUS9$ )a`  Retrieves allocations resulting from SOR order placement.

https://developers.binance.com/docs/binance-spot-api-docs/rest-api/account-endpoints#query-allocations-user_data

:param symbol: required
:type symbol: str
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param fromAllocationId: optional
:type fromAllocationId: int
:param orderId: optional
:type orderId: int
:param limit: optional, Default: 500; Max: 1000
:type limit: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python
    [
        {
            "symbol": "BTCUSDT",
            "allocationId": 0,
            "allocationType": "SOR",
            "orderId": 1,
            "orderListId": -1,
            "price": "1.00000000",
            "qty": "5.00000000",
            "quoteQty": "5.00000000",
            "commission": "0.00000000",
            "commissionAsset": "BTC",
            "time": 1687506878118,
            "isBuyer": true,
            "isMaker": false,
            "isAllocator": false
        }
    ]
myAllocationsTr   r   r   s     r(   get_allocationsClient.get_allocationsT	  s    T yy$Vy<<r*   c                 &    U R                  SS5      $ )u4  Get system status detail.

https://developers.binance.com/docs/wallet/others/system-status

:returns: API response

.. code-block:: python

    {
        "status": 0,        # 0: normal，1：system maintenance
        "msg": "normal"     # normal or System maintenance.
    }

:raises: BinanceAPIException

r@   zsystem/statusrx   r   s    r(   get_system_statusClient.get_system_status	  s    " ''??r*   c                 P    U R                   S:X  a  SnOSnU R                  SUSXS9$ )a  Get account status detail.

https://binance-docs.github.io/apidocs/spot/en/#account-status-sapi-user_data
https://developers.binance.com/docs/wallet/account/account-status
:param version: the api version
:param version: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "data": "Normal"
    }

usaccountStatuszaccount/statusr@   Tr   r   rx   )r&   rY   r   rV   s       r(   get_account_statusClient.get_account_status	  s4    & 88t"D#D''tT7'PPr*   c                 &    U R                  SSSUS9$ )ac	  Fetch account api trading status detail.

https://developers.binance.com/docs/wallet/account/account-api-trading-status

:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "data": {          // API trading status detail
            "isLocked": false,   // API trading function is locked or not
            "plannedRecoverTime": 0,  // If API trading function is locked, this is the planned recover time
            "triggerCondition": {
                    "GCR": 150,  // Number of GTC orders
                    "IFER": 150, // Number of FOK/IOC orders
                    "UFR": 300   // Number of orders
            },
            "indicators": {  // The indicators updated every 30 seconds
                 "BTCUSDT": [  // The symbol
                    {
                        "i": "UFR",  // Unfilled Ratio (UFR)
                        "c": 20,     // Count of all orders
                        "v": 0.05,   // Current UFR value
                        "t": 0.995   // Trigger UFR value
                    },
                    {
                        "i": "IFER", // IOC/FOK Expiration Ratio (IFER)
                        "c": 20,     // Count of FOK/IOC orders
                        "v": 0.99,   // Current IFER value
                        "t": 0.99    // Trigger IFER value
                    },
                    {
                        "i": "GCR",  // GTC Cancellation Ratio (GCR)
                        "c": 20,     // Count of GTC orders
                        "v": 0.99,   // Current GCR value
                        "t": 0.99    // Trigger GCR value
                    }
                ],
                "ETHUSDT": [
                    {
                        "i": "UFR",
                        "c": 20,
                        "v": 0.05,
                        "t": 0.995
                    },
                    {
                        "i": "IFER",
                        "c": 20,
                        "v": 0.99,
                        "t": 0.99
                    },
                    {
                        "i": "GCR",
                        "c": 20,
                        "v": 0.99,
                        "t": 0.99
                    }
                ]
            },
            "updateTime": 1547630471725
        }
    }

r@   zaccount/apiTradingStatusTr   r  r   s     r(   get_account_api_trading_status%Client.get_account_api_trading_status	  s'    H ''-t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Fetch api key permissions.

https://developers.binance.com/docs/wallet/account/api-key-permission

:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
       "ipRestrict": false,
       "createTime": 1623840271000,
       "enableWithdrawals": false,   // This option allows you to withdraw via API. You must apply the IP Access Restriction filter in order to enable withdrawals
       "enableInternalTransfer": true,  // This option authorizes this key to transfer funds between your master account and your sub account instantly
       "permitsUniversalTransfer": true,  // Authorizes this key to be used for a dedicated universal transfer API to transfer multiple supported currencies. Each business's own transfer API rights are not affected by this authorization
       "enableVanillaOptions": false,  //  Authorizes this key to Vanilla options trading
       "enableReading": true,
       "enableFutures": false,  //  API Key created before your futures account opened does not support futures API service
       "enableMargin": false,   //  This option can be adjusted after the Cross Margin account transfer is completed
       "enableSpotAndMarginTrading": false, // Spot and margin trading
       "tradingAuthorityExpirationTime": 1628985600000  // Expiration time for spot and margin trading permission
    }

r@   zaccount/apiRestrictionsTr   r  r   s     r(   get_account_api_permissions"Client.get_account_api_permissions	  s&    6 '',d ( 
 	
r*   c                 &    U R                  SSSUS9$ )u!  Get assets that can be converted into BNB

https://developers.binance.com/docs/wallet/asset/assets-can-convert-bnb

:returns: API response

.. code-block:: python

    {
        "details": [
            {
                "asset": "ADA",
                "assetFullName": "ADA",
                "amountFree": "6.21",   //Convertible amount
                "toBTC": "0.00016848",  //BTC amount
                "toBNB": "0.01777302",  //BNB amount（Not deducted commission fee）
                "toBNBOffExchange": "0.01741756", //BNB amount（Deducted commission fee）
                "exchange": "0.00035546" //Commission fee
            }
        ],
        "totalTransferBtc": "0.00016848",
        "totalTransferBNB": "0.01777302",
        "dribbletPercentage": "0.02"     //Commission fee
    }

r   zasset/dust-btcTr   r  r   s     r(   get_dust_assetsClient.get_dust_assets
  s    6 ''0@$V'TTr*   c                 &    U R                  SSSUS9$ )a	  Get log of small amounts exchanged for BNB.

https://developers.binance.com/docs/wallet/asset/dust-log

:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "total": 8,   //Total counts of exchange
        "userAssetDribblets": [
            {
                "totalTransferedAmount": "0.00132256",   // Total transfered BNB amount for this exchange.
                "totalServiceChargeAmount": "0.00002699",    //Total service charge amount for this exchange.
                "transId": 45178372831,
                "userAssetDribbletDetails": [           //Details of  this exchange.
                    {
                        "transId": 4359321,
                        "serviceChargeAmount": "0.000009",
                        "amount": "0.0009",
                        "operateTime": 1615985535000,
                        "transferedAmount": "0.000441",
                        "fromAsset": "USDT"
                    },
                    {
                        "transId": 4359321,
                        "serviceChargeAmount": "0.00001799",
                        "amount": "0.0009",
                        "operateTime": "2018-05-03 17:07:04",
                        "transferedAmount": "0.00088156",
                        "fromAsset": "ETH"
                    }
                ]
            },
            {
                "operateTime":1616203180000,
                "totalTransferedAmount": "0.00058795",
                "totalServiceChargeAmount": "0.000012",
                "transId": 4357015,
                "userAssetDribbletDetails": [
                    {
                        "transId": 4357015,
                        "serviceChargeAmount": "0.00001"
                        "amount": "0.001",
                        "operateTime": 1616203180000,
                        "transferedAmount": "0.00049",
                        "fromAsset": "USDT"
                    },
                    {
                        "transId": 4357015,
                        "serviceChargeAmount": "0.000002"
                        "amount": "0.0001",
                        "operateTime": 1616203180000,
                        "transferedAmount": "0.00009795",
                        "fromAsset": "ETH"
                    }
                ]
            }
        ]
    }

r@   zasset/dribbletTr   r  r   s     r(   get_dust_logClient.get_dust_log0
  s     L ''/?F'SSr*   c                 &    U R                  SSSUS9$ )aP  Convert dust assets to BNB.

https://developers.binance.com/docs/wallet/asset/dust-transfer

:param asset: The asset being converted. e.g: 'ONE'
:type asset: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

.. code-block:: python

    result = client.transfer_dust(asset='ONE')

:returns: API response

.. code-block:: python

    {
        "totalServiceCharge":"0.02102542",
        "totalTransfered":"1.05127099",
        "transferResult":[
            {
                "amount":"0.03000000",
                "fromAsset":"ETH",
                "operateTime":1563368549307,
                "serviceChargeAmount":"0.00500000",
                "tranId":2970932918,
                "transferedAmount":"0.25000000"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

r   z
asset/dustTr   r  r   s     r(   transfer_dustClient.transfer_dustx
  s    H ''d'PPr*   c                 &    U R                  SSSUS9$ )a  Query asset dividend record.

https://developers.binance.com/docs/wallet/asset/assets-divided-record

:param asset: optional
:type asset: str
:param startTime: optional
:type startTime: long
:param endTime: optional
:type endTime: long
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

.. code-block:: python

    result = client.get_asset_dividend_history()

:returns: API response

.. code-block:: python

    {
        "rows":[
            {
                "amount":"10.00000000",
                "asset":"BHFT",
                "divTime":1563189166000,
                "enInfo":"BHFT distribution",
                "tranId":2968885920
            },
            {
                "amount":"10.00000000",
                "asset":"BHFT",
                "divTime":1563189165000,
                "enInfo":"BHFT distribution",
                "tranId":2968885920
            }
        ],
        "total":2
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zasset/assetDividendTr   r  r   s     r(   get_asset_dividend_history!Client.get_asset_dividend_history
  !    Z ''/DdQW'XXr*   c                 &    U R                  SSSUS9$ )a(  User Universal Transfer

https://developers.binance.com/docs/wallet/asset/user-universal-transfer

:param type: required
:type type: str (ENUM)
:param asset: required
:type asset: str
:param amount: required
:type amount: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

.. code-block:: python

    transfer_status = client.make_universal_transfer(params)

:returns: API response

.. code-block:: python

    {
        "tranId":13526853623
    }


:raises: BinanceRequestException, BinanceAPIException

r   asset/transferTr6   r<   r  r   s     r(   make_universal_transferClient.make_universal_transfer
  s&    < ''$T ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query User Universal Transfer History

https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer

:param type: required
:type type: str (ENUM)
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param current: optional - Default 1
:type current: int
:param size: required - Default 10, Max 100
:type size: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

.. code-block:: python

    transfer_status = client.query_universal_transfer_history(params)

:returns: API response

.. code-block:: python

    {
        "total":2,
        "rows":[
            {
                "asset":"USDT",
                "amount":"1",
                "type":"MAIN_UMFUTURE"
                "status": "CONFIRMED",
                "tranId": 11415955596,
                "timestamp":1544433328000
            },
            {
                "asset":"USDT",
                "amount":"2",
                "type":"MAIN_UMFUTURE",
                "status": "CONFIRMED",
                "tranId": 11366865406,
                "timestamp":1544433328000
            }
        ]
    }


:raises: BinanceRequestException, BinanceAPIException

r@   r  Tr  r  r   s     r(    query_universal_transfer_history'Client.query_universal_transfer_history
  s'    h ''#Dv ( 
 	
r*   c                 P    U R                   S:X  a  SnOSnU R                  SUSUS9$ )a  Get trade fee.

https://developers.binance.com/docs/wallet/asset/trade-fee

:param symbol: optional
:type symbol: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    [
        {
            "symbol": "ADABNB",
            "makerCommission": "0.001",
            "takerCommission": "0.001"
        },
        {
            "symbol": "BNBBTC",
            "makerCommission": "0.001",
            "takerCommission": "0.001"
        }
    ]

r  zasset/query/trading-feezasset/tradeFeer@   Tr   r  )r&   r   endpoints      r(   get_trade_feeClient.get_trade_fee'  s4    8 88t0H'H''xF'KKr*   c                 &    U R                  SSSUS9$ )a|  Fetch details on assets.

https://developers.binance.com/docs/wallet/asset

:param asset: optional
:type asset: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
            "CTR": {
                "minWithdrawAmount": "70.00000000", //min withdraw amount
                "depositStatus": false,//deposit status (false if ALL of networks' are false)
                "withdrawFee": 35, // withdraw fee
                "withdrawStatus": true, //withdraw status (false if ALL of networks' are false)
                "depositTip": "Delisted, Deposit Suspended" //reason
            },
            "SKY": {
                "minWithdrawAmount": "0.02000000",
                "depositStatus": true,
                "withdrawFee": 0.01,
                "withdrawStatus": true
            }
    }

r@   zasset/assetDetailTr   r  r   s     r(   get_asset_detailsClient.get_asset_detailsJ  s    > ''/BDv'VVr*   c                 &    U R                  SSSUS9$ )a%  Get symbols delist schedule for spot

https://developers.binance.com/docs/wallet/others/delist-schedule

:param recvWindow: optional - the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python
    [
        {
            "delistTime": 1686161202000,
            "symbols": [
                "ADAUSDT",
                "BNBUSDT"
            ]
        },
        {
            "delistTime": 1686222232000,
            "symbols": [
                "ETHUSDT"
            ]
        }
    ]
r@   spot/delist-scheduleTr   r  r   s     r(   get_spot_delist_scheduleClient.get_spot_delist_schedulek  s&    6 '')4f ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Submit a withdraw request.

https://developers.binance.com/docs/wallet/capital/withdraw

Assumptions:

- You must have Withdraw permissions enabled on your API key
- You must have withdrawn to the address specified through the website and approved the transaction via email

:param coin: required
:type coin: str
:param withdrawOrderId: optional - client id for withdraw
:type withdrawOrderId: str
:param network: optional
:type network: str
:param address: optional
:type address: str
:type addressTag: optional - Secondary address identifier for coins like XRP,XMR etc.
:param amount: required
:type amount: decimal
:param transactionFeeFlag: required - When making internal transfer, true for returning the fee to the destination account; false for returning the fee back to the departure account. Default false.
:type transactionFeeFlag: bool
:param name: optional - Description of the address, default asset value passed will be used
:type name: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "id":"7213fea8e94b4a5593d507237e5a555b"
    }

:raises: BinanceRequestException, BinanceAPIException

r   zcapital/withdraw/applyTr   r  r   s     r(   withdrawClient.withdraw  s'    N '',d ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Fetch deposit history.

https://developers.binance.com/docs/wallet/capital/deposite-history

:param coin: optional
:type coin: str
:type status: optional - 0(0:pending,1:success) optional
:type status: int
:param startTime: optional
:type startTime: long
:param endTime: optional
:type endTime: long
:param offset: optional - default:0
:type offset: long
:param limit: optional
:type limit: long
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    [
        {
            "amount":"0.00999800",
            "coin":"PAXG",
            "network":"ETH",
            "status":1,
            "address":"0x788cabe9236ce061e5a892e1a59395a81fc8d62c",
            "addressTag":"",
            "txId":"0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3",
            "insertTime":1599621997000,
            "transferType":0,
            "confirmTimes":"12/12"
        },
        {
            "amount":"0.50000000",
            "coin":"IOTA",
            "network":"IOTA",
            "status":1,
            "address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW",
            "addressTag":"",
            "txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999",
            "insertTime":1599620082000,
            "transferType":0,
            "confirmTimes":"1/1"
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

r@   zcapital/deposit/hisrecTr   r  r   s     r(   get_deposit_historyClient.get_deposit_history  s'    l ''+T ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Fetch withdraw history.

https://developers.binance.com/docs/wallet/capital/withdraw-history

:param coin: optional
:type coin: str
:type status: 0(0:Email Sent,1:Cancelled 2:Awaiting Approval 3:Rejected 4:Processing 5:Failure 6Completed) optional
:type status: int
:param offset: optional - default:0
:type offset: int
:param limit: optional
:type limit: int
:param startTime: optional - Default: 90 days from current timestamp
:type startTime: int
:param endTime: optional - Default: present timestamp
:type endTime: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    [
        {
            "address": "0x94df8b352de7f46f64b01d3666bf6e936e44ce60",
            "amount": "8.91000000",
            "applyTime": "2019-10-12 11:12:02",
            "coin": "USDT",
            "id": "b6ae22b3aa844210a7041aee7589627c",
            "withdrawOrderId": "WITHDRAWtest123", // will not be returned if there's no withdrawOrderId for this withdraw.
            "network": "ETH",
            "transferType": 0,   // 1 for internal transfer, 0 for external transfer
            "status": 6,
            "txId": "0xb5ef8c13b968a406cc62a93a8bd80f9e9a906ef1b3fcf20a2e48573c17659268"
        },
        {
            "address": "1FZdVHtiBqMrWdjPyRPULCUceZPJ2WLCsB",
            "amount": "0.00150000",
            "applyTime": "2019-09-24 12:43:45",
            "coin": "BTC",
            "id": "156ec387f49b41df8724fa744fa82719",
            "network": "BTC",
            "status": 6,
            "txId": "60fd9007ebfddc753455f95fafa808c4302c836e4d1eebc5a132c36c1d8ac354"
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

r@   zcapital/withdraw/historyTr   r  r   s     r(   get_withdraw_historyClient.get_withdraw_history  s'    h ''-t& ( 
 	
r*   c                 z    U R                   " S0 UD6nU H  nSU;   d  M  US   U:X  d  M  Us  $    [        SU5      e)a  Fetch withdraw history.

https://binance-docs.github.io/apidocs/spot/en/#withdraw-history-supporting-network-user_data

:param withdraw_id: required
:type withdraw_id: str
:param asset: optional
:type asset: str
:type status: 0(0:Email Sent,1:Cancelled 2:Awaiting Approval 3:Rejected 4:Processing 5:Failure 6Completed) optional
:type status: int
:param startTime: optional
:type startTime: long
:param endTime: optional
:type endTime: long
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "id":"7213fea8e94b4a5593d507237e5a555b",
        "withdrawOrderId": None,
        "amount": 0.99,
        "transactionFee": 0.01,
        "address": "0x6915f16f8791d0a1cc2bf47c13a6b2a92000504b",
        "asset": "ETH",
        "txId": "0xdf33b22bdb2b28b1f75ccd201a4a4m6e7g83jy5fc5d5a9d1340961598cfcb0a1",
        "applyTime": 1508198532000,
        "status": 4
    }

:raises: BinanceRequestException, BinanceAPIException

idz"There is no entry with withdraw idr   )r  	Exception)r&   withdraw_idr   resultentrys        r(   get_withdraw_history_idClient.get_withdraw_history_id)  sI    J **4V4Eu}t!;  <fEEr*   coinnetworkc                 D    XS'   U(       a  X#S'   U R                  SSSUS9$ )a6  Fetch a deposit address for a symbol

https://developers.binance.com/docs/wallet/capital/deposite-address

:param coin: required
:type coin: str
:param network: optional
:type network: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "address": "1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv",
        "coin": "BTC",
        "tag": "",
        "url": "https://btc.com/1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv"
    }

:raises: BinanceRequestException, BinanceAPIException

r  r  r@   zcapital/deposit/addressTr   r  )r&   r  r  r   s       r(   get_deposit_addressClient.get_deposit_addressV  s8    4 v '9'',d ( 
 	
r*   c                 .    U R                  SS0 S9nUS   $ )a  Start a new user data stream and return the listen key
If a stream already exists it should return the same key.
If the stream becomes invalid a new key is returned.

Can be used to keep the user stream alive.

https://binance-docs.github.io/apidocs/spot/en/#listen-key-spot

:returns: API response

.. code-block:: python

    {
        "listenKey": "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1"
    }

:raises: BinanceRequestException, BinanceAPIException

userDataStreamFr   	listenKeyrY  r&   r   s     r(   stream_get_listen_keyClient.stream_get_listen_keyy  s+    ( jje"  
 ;r*   c                 ,    SU0nU R                  SSUS9$ )a  PING a user data stream to prevent a time out.

https://binance-docs.github.io/apidocs/spot/en/#listen-key-spot

:param listenKey: required
:type listenKey: str

:returns: API response

.. code-block:: python

    {}

:raises: BinanceRequestException, BinanceAPIException

r  r  Fr   )r   r&   r  r   s      r(   stream_keepaliveClient.stream_keepalive  s+    " y)yye&  
 	
r*   c                 @    SU0nU R                  SSX R                  S9$ )a   Close out a user data stream.

https://binance-docs.github.io/apidocs/spot/en/#listen-key-spot

:param listenKey: required
:type listenKey: str

:returns: API response

.. code-block:: python

    {}

:raises: BinanceRequestException, BinanceAPIException

r  r  Fr<   rY   )r   PRIVATE_API_VERSIONr  s      r(   stream_closeClient.stream_close  s1    " y)||e&:R:R  
 	
r*   c                 &    U R                  SSSUS9$ )aG  Query cross-margin account details

https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Account-Details

:returns: API response

.. code-block:: python

    {
        "borrowEnabled": true,
        "marginLevel": "11.64405625",
        "totalAssetOfBtc": "6.82728457",
        "totalLiabilityOfBtc": "0.58633215",
        "totalNetAssetOfBtc": "6.24095242",
        "tradeEnabled": true,
        "transferEnabled": true,
        "userAssets": [
            {
                "asset": "BTC",
                "borrowed": "0.00000000",
                "free": "0.00499500",
                "interest": "0.00000000",
                "locked": "0.00000000",
                "netAsset": "0.00499500"
            },
            {
                "asset": "BNB",
                "borrowed": "201.66666672",
                "free": "2346.50000000",
                "interest": "0.00000000",
                "locked": "0.00000000",
                "netAsset": "2144.83333328"
            },
            {
                "asset": "ETH",
                "borrowed": "0.00000000",
                "free": "0.00000000",
                "interest": "0.00000000",
                "locked": "0.00000000",
                "netAsset": "0.00000000"
            },
            {
                "asset": "USDT",
                "borrowed": "0.00000000",
                "free": "0.00000000",
                "interest": "0.00000000",
                "locked": "0.00000000",
                "netAsset": "0.00000000"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zmargin/accountTr   r  r   s     r(   get_margin_accountClient.get_margin_account  s     p ''/?F'SSr*   c                 &    U R                  SSSUS9$ )a.  Query isolated margin account details

https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Account-Info

:param symbols: optional up to 5 margin pairs as a comma separated string
:type asset: str

.. code:: python

    account_info = client.get_isolated_margin_account()
    account_info = client.get_isolated_margin_account(symbols="BTCUSDT,ETHUSDT")

:returns: API response

.. code-block:: python

    If "symbols" is not sent:

        {
        "assets":[
            {
                "baseAsset":
                {
                "asset": "BTC",
                "borrowEnabled": true,
                "borrowed": "0.00000000",
                "free": "0.00000000",
                "interest": "0.00000000",
                "locked": "0.00000000",
                "netAsset": "0.00000000",
                "netAssetOfBtc": "0.00000000",
                "repayEnabled": true,
                "totalAsset": "0.00000000"
                },
                "quoteAsset":
                {
                "asset": "USDT",
                "borrowEnabled": true,
                "borrowed": "0.00000000",
                "free": "0.00000000",
                "interest": "0.00000000",
                "locked": "0.00000000",
                "netAsset": "0.00000000",
                "netAssetOfBtc": "0.00000000",
                "repayEnabled": true,
                "totalAsset": "0.00000000"
                },
                "symbol": "BTCUSDT"
                "isolatedCreated": true,
                "marginLevel": "0.00000000",
                "marginLevelStatus": "EXCESSIVE", // "EXCESSIVE", "NORMAL", "MARGIN_CALL", "PRE_LIQUIDATION", "FORCE_LIQUIDATION"
                "marginRatio": "0.00000000",
                "indexPrice": "10000.00000000"
                "liquidatePrice": "1000.00000000",
                "liquidateRate": "1.00000000"
                "tradeEnabled": true
            }
            ],
            "totalAssetOfBtc": "0.00000000",
            "totalLiabilityOfBtc": "0.00000000",
            "totalNetAssetOfBtc": "0.00000000"
        }

    If "symbols" is sent:

        {
        "assets":[
            {
                "baseAsset":
                {
                "asset": "BTC",
                "borrowEnabled": true,
                "borrowed": "0.00000000",
                "free": "0.00000000",
                "interest": "0.00000000",
                "locked": "0.00000000",
                "netAsset": "0.00000000",
                "netAssetOfBtc": "0.00000000",
                "repayEnabled": true,
                "totalAsset": "0.00000000"
                },
                "quoteAsset":
                {
                "asset": "USDT",
                "borrowEnabled": true,
                "borrowed": "0.00000000",
                "free": "0.00000000",
                "interest": "0.00000000",
                "locked": "0.00000000",
                "netAsset": "0.00000000",
                "netAssetOfBtc": "0.00000000",
                "repayEnabled": true,
                "totalAsset": "0.00000000"
                },
                "symbol": "BTCUSDT"
                "isolatedCreated": true,
                "marginLevel": "0.00000000",
                "marginLevelStatus": "EXCESSIVE", // "EXCESSIVE", "NORMAL", "MARGIN_CALL", "PRE_LIQUIDATION", "FORCE_LIQUIDATION"
                "marginRatio": "0.00000000",
                "indexPrice": "10000.00000000"
                "liquidatePrice": "1000.00000000",
                "liquidateRate": "1.00000000"
                "tradeEnabled": true
            }
            ]
        }

r@   margin/isolated/accountTr   r  r   s     r(   get_isolated_margin_account"Client.get_isolated_margin_account  s'    Z '',d ( 
 	
r*   c                 &    U R                  SSSUS9$ )a"  Enable isolated margin account for a specific symbol.

https://developers.binance.com/docs/margin_trading/account/Enable-Isolated-Margin-Account

:param symbol:
:type asset: str

:returns: API response

.. code-block:: python

    {
      "success": true,
      "symbol": "BTCUSDT"
    }


r   r  Tr   r  r   s     r(   enable_isolated_margin_account%Client.enable_isolated_margin_accountk  s&    & ''-t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )ab  Disable isolated margin account for a specific symbol. Each trading pair can only
be deactivated once every 24 hours.

https://developers.binance.com/docs/margin_trading/account/Disable-Isolated-Margin-Account

:param symbol:
:type asset: str

:returns: API response

.. code-block:: python

    {
      "success": true,
      "symbol": "BTCUSDT"
    }

r   r  Tr   r  r   s     r(   disable_isolated_margin_account&Client.disable_isolated_margin_account  s&    & ''/F ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query enabled isolated margin account limit.

https://developers.binance.com/docs/margin_trading/account/Query-Enabled-Isolated-Margin-Account-Limit

:returns: API response

.. code-block:: python
    {
        "enabledAccount": 5,
        "maxAccount": 20
    }

r@   zmargin/isolated/accountLimitTr   r  r   s     r(   )get_enabled_isolated_margin_account_limit0Client.get_enabled_isolated_margin_account_limit  s&     ''14f ( 
 	
r*   c                 &    U R                  SSSUS9$ )a	  
Query the historical information of user's margin account small-value asset conversion BNB.

https://binance-docs.github.io/apidocs/spot/en/#margin-dustlog-user_data

:param startTime: optional
:type startTime: long
:param endTime: optional
:type endTime: long

:returns: API response

.. code-block:: python
    {
        "total": 8, //Total counts of exchange
        "userAssetDribblets": [
            {
                "operateTime": 1615985535000,
                "totalTransferedAmount": "0.00132256", // Total transfered BNB amount for this exchange.
                "totalServiceChargeAmount": "0.00002699", //Total service charge amount for this exchange.
                "transId": 45178372831,
                "userAssetDribbletDetails": [ //Details of  this exchange.
                    {
                        "transId": 4359321,
                        "serviceChargeAmount": "0.000009",
                        "amount": "0.0009",
                        "operateTime": 1615985535000,
                        "transferedAmount": "0.000441",
                        "fromAsset": "USDT"
                    },
                    {
                        "transId": 4359321,
                        "serviceChargeAmount": "0.00001799",
                        "amount": "0.0009",
                        "operateTime": 1615985535000,
                        "transferedAmount": "0.00088156",
                        "fromAsset": "ETH"
                    }
                ]
            },
            {
                "operateTime":1616203180000,
                "totalTransferedAmount": "0.00058795",
                "totalServiceChargeAmount": "0.000012",
                "transId": 4357015,
                "userAssetDribbletDetails": [
                    {
                        "transId": 4357015,
                        "serviceChargeAmount": "0.00001",
                        "amount": "0.001",
                        "operateTime": 1616203180000,
                        "transferedAmount": "0.00049",
                        "fromAsset": "USDT"
                    },
                    {
                        "transId": 4357015,
                        "serviceChargeAmount": "0.000002",
                        "amount": "0.0001",
                        "operateTime": 1616203180000,
                        "transferedAmount": "0.00009795",
                        "fromAsset": "ETH"
                    }
                ]
            }
        ]
    }

r@   zmargin/dribbletTr   r  r   s     r(   get_margin_dustlogClient.get_margin_dustlog  s     J ''/@$V'TTr*   c                 &    U R                  SSSUS9$ )a  Get margin assets that can be converted into BNB.

https://binance-docs.github.io/apidocs/spot/en/#margin-dustlog-user_data

:returns: API response

.. code-block:: python
    {
        "details": [
            {
                "asset": "ADA",
                "assetFullName": "ADA",
                "amountFree": "6.21",
                "toBTC": "0.00016848",
                "toBNB": "0.01777302",
                "toBNBOffExchange": "0.01741756",
                "exchange": "0.00035546"
            }
        ],
        "totalTransferBtc": "0.00016848",
        "totalTransferBNB": "0.01777302",
        "dribbletPercentage": "0.02"
    }

r@   margin/dustTr   r  r   s     r(   get_margin_dust_assetsClient.get_margin_dust_assets  s    4 ''}d'PPr*   c                 &    U R                  SSSUS9$ )aO  Convert dust assets to BNB.

https://binance-docs.github.io/apidocs/spot/en/#dust-transfer-trade

:returns: API response

.. code-block:: python
    {
        "totalServiceCharge":"0.02102542",
        "totalTransfered":"1.05127099",
        "transferResult":[
            {
                "amount":"0.03000000",
                "fromAsset":"ETH",
                "operateTime":1563368549307,
                "serviceChargeAmount":"0.00500000",
                "tranId":2970932918,
                "transferedAmount":"0.25000000"
            },
            {
                "amount":"0.09000000",
                "fromAsset":"LTC",
                "operateTime":1563368549404,
                "serviceChargeAmount":"0.01548000",
                "tranId":2970932918,
                "transferedAmount":"0.77400000"
            }
        ]
    }

r   r  Tr   r  r   s     r(   transfer_margin_dustClient.transfer_margin_dust  s    @ ''t&'QQr*   c                 &    U R                  SSSUS9$ )aM  
https://developers.binance.com/docs/margin_trading/market-data

:param none

:returns: API response

.. code-block:: python
    [
      {
        "collaterals": [
          {
            "minUsdValue": "0",
            "maxUsdValue": "13000000",
            "discountRate": "1"
          },
          {
            "minUsdValue": "13000000",
            "maxUsdValue": "20000000",
            "discountRate": "0.975"
          },
          {
            "minUsdValue": "20000000",
            "discountRate": "0"
          }
        ],
        "assetNames": [
          "BNX"
        ]
      },
      {
        "collaterals": [
          {
            "minUsdValue": "0",
            "discountRate": "1"
          }
        ],
        "assetNames": [
          "BTC",
          "BUSD",
          "ETH",
          "USDT"
        ]
      }
    ]
r@   z!margin/crossMarginCollateralRatioTr   r  r   s     r(   !get_cross_margin_collateral_ratio(Client.get_cross_margin_collateral_ratio0  s'    ^ ''66 ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query the coins which can be small liability exchange

https://developers.binance.com/docs/margin_trading/trade/Get-Small-Liability-Exchange-Coin-List

:returns: API response

.. code-block:: python
    [
        {
          "asset": "ETH",
          "interest": "0.00083334",
          "principal": "0.001",
          "liabilityAsset": "USDT",
          "liabilityQty": 0.3552
        }
    ]

r@   margin/exchange-small-liabilityTr   r  r   s     r(   #get_small_liability_exchange_assets*Client.get_small_liability_exchange_assetsc  s&    & ''4d ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Cross Margin Small Liability Exchange

https://developers.binance.com/docs/margin_trading/trade/Small-Liability-Exchange

:param assetNames: The assets list of small liability exchange
:type assetNames: array

:returns: API response

.. code-block:: python
none

r   r  Tr   r  r   s     r(   exchange_small_liability_assets&Client.exchange_small_liability_assetsz  s&     ''5t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get Small liability Exchange History

https://developers.binance.com/docs/margin_trading/trade/Get-Small-Liability-Exchange-History

:param current: Currently querying page. Start from 1. Default:1
:type current: int
:param size: Default:10, Max:100
:type size: int
:param startTime: Default: 30 days from current timestamp
:type startTime: long
:param endTime: Default: present timestamp
:type endTIme: long

:returns: API response

.. code-block:: python
    {
        "total": 1,
        "rows": [
          {
            "asset": "ETH",
            "amount": "0.00083434",
            "targetAsset": "BUSD",
            "targetAmount": "1.37576819",
            "bizType": "EXCHANGE_SMALL_LIABILITY",
            "timestamp": 1672801339253
          }
        ]
    }

r@   z'margin/exchange-small-liability-historyTr   r  r   s     r(   $get_small_liability_exchange_history+Client.get_small_liability_exchange_history  s'    @ ''<d ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get user the next hourly estimate interest

https://developers.binance.com/docs/margin_trading/borrow-and-repay

:param assets: List of assets, separated by commas, up to 20
:type assets: str
:param isIsolated: for isolated margin or not, "TRUE", "FALSE"
:type isIsolated: bool

:returns: API response

.. code-block:: python
    [
        {
            "asset": "BTC",
            "nextHourlyInterestRate": "0.00000571"
        },
        {
            "asset": "ETH",
            "nextHourlyInterestRate": "0.00000578"
        }
    ]

r@    margin/next-hourly-interest-rateTr   r  r   s     r(   get_future_hourly_interest_rate&Client.get_future_hourly_interest_rate  s&    2 ''5t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )a|  Get cross or isolated margin capital flow

https://developers.binance.com/docs/margin_trading/account/Query-Cross-Isolated-Margin-Capital-Flow

:param asset: optional
:type asset: str
:param symbol: Required when querying isolated data
:type symbol: str
:param type: optional
:type type: string
:param startTime: Only supports querying the data of the last 90 days
:type startTime: long
:param endTime: optional
:type endTime: long
:param formId: If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned
:type formId: long
:param limit: The number of data items returned each time is limited. Default 500; Max 1000.
:type limit: long

:returns: API response

.. code-block:: python
    [
      {
        "id": 123456,
        "tranId": 123123,
        "timestamp": 1691116657000,
        "asset": "USDT,
        "symbol": "BTCUSDT",
        "type": "BORROW",
        "amount": "101"
      },
      {
        "id": 123457,
        "tranId": 123124,
        "timestamp": 1691116658000,
        "asset": "BTC",
        "symbol": "BTCUSDT",
        "type": "REPAY",
        "amount": "10"
      }
    ]

r@   zmargin/capital-flowTr   r  r   s     r(   get_margin_capital_flowClient.get_margin_capital_flow  r  r*   c                 $    U R                  SSUS9$ )a2  Query cross-margin asset

https://binance-docs.github.io/apidocs/spot/en/#query-margin-asset-market_data

:param asset: name of the asset
:type asset: str

.. code-block:: python

    asset_details = client.get_margin_asset(asset='BNB')

:returns: API response

.. code-block:: python

    {
        "assetFullName": "Binance Coin",
        "assetName": "BNB",
        "isBorrowable": false,
        "isMortgageable": true,
        "userMinBorrow": "0.00000000",
        "userMinRepay": "0.00000000"
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zmargin/assetr   r  r   s     r(   get_margin_assetClient.get_margin_asset  s    8 ''~F'KKr*   c                 $    U R                  SSUS9$ )a8  Query cross-margin symbol info

https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-pair-market_data

:param symbol: name of the symbol pair
:type symbol: str

.. code:: python

    pair_details = client.get_margin_symbol(symbol='BTCUSDT')

:returns: API response

.. code-block:: python

    {
        "id":323355778339572400,
        "symbol":"BTCUSDT",
        "base":"BTC",
        "quote":"USDT",
        "isMarginTrade":true,
        "isBuyAllowed":true,
        "isSellAllowed":true
    }


:raises: BinanceRequestException, BinanceAPIException

r@   zmargin/pairr   r  r   s     r(   get_margin_symbolClient.get_margin_symbol  s    < ''}6'JJr*   c                 $    U R                  SSUS9$ )a%  Get All Margin Assets (MARKET_DATA)

https://developers.binance.com/docs/margin_trading/market-data/Get-All-Margin-Assets

.. code:: python

    margin_assets = client.get_margin_all_assets()

:returns: API response

.. code-block:: python

    [
        {
            "assetFullName": "USD coin",
            "assetName": "USDC",
            "isBorrowable": true,
            "isMortgageable": true,
            "userMinBorrow": "0.00000000",
            "userMinRepay": "0.00000000"
        },
        {
            "assetFullName": "BNB-coin",
            "assetName": "BNB",
            "isBorrowable": true,
            "isMortgageable": true,
            "userMinBorrow": "1.00000000",
            "userMinRepay": "0.00000000"
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

r@   zmargin/allAssetsr   r  r   s     r(   get_margin_all_assetsClient.get_margin_all_assets:  s    F ''/A'OOr*   c                 $    U R                  SSUS9$ )a.  Get All Cross Margin Pairs (MARKET_DATA)

https://developers.binance.com/docs/margin_trading/market-data/Get-All-Cross-Margin-Pairs

.. code:: python

    margin_pairs = client.get_margin_all_pairs()

:returns: API response

.. code-block:: python

    [
        {
            "base": "BNB",
            "id": 351637150141315861,
            "isBuyAllowed": true,
            "isMarginTrade": true,
            "isSellAllowed": true,
            "quote": "BTC",
            "symbol": "BNBBTC"
        },
        {
            "base": "TRX",
            "id": 351637923235429141,
            "isBuyAllowed": true,
            "isMarginTrade": true,
            "isSellAllowed": true,
            "quote": "BTC",
            "symbol": "TRXBTC"
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

r@   zmargin/allPairsr   r  r   s     r(   get_margin_all_pairsClient.get_margin_all_pairs_  s    J ''/@v'NNr*   c                 &    U R                  SSSUS9$ )a  Create isolated margin account for symbol

https://binance-docs.github.io/apidocs/spot/en/#create-isolated-margin-account-margin

:param base: Base asset of symbol
:type base: str
:param quote: Quote asset of symbol
:type quote: str

.. code:: python

    pair_details = client.create_isolated_margin_account(base='USDT', quote='BTC')

:returns: API response

.. code-block:: python

    {
        "success": true,
        "symbol": "BTCUSDT"
    }


:raises: BinanceRequestException, BinanceAPIException

r   zmargin/isolated/createTr  r  r   s     r(   create_isolated_margin_account%Client.create_isolated_margin_account  s&    6 '',T ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query isolated margin symbol info

https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-symbol-user_data

:param symbol: name of the symbol pair
:type symbol: str

.. code:: python

    pair_details = client.get_isolated_margin_symbol(symbol='BTCUSDT')

:returns: API response

.. code-block:: python

    {
    "symbol":"BTCUSDT",
    "base":"BTC",
    "quote":"USDT",
    "isMarginTrade":true,
    "isBuyAllowed":true,
    "isSellAllowed":true
    }


:raises: BinanceRequestException, BinanceAPIException

r@   zmargin/isolated/pairTr  r  r   s     r(   get_isolated_margin_symbol!Client.get_isolated_margin_symbol  s&    : '')$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query isolated margin symbol info for all pairs

https://developers.binance.com/docs/margin_trading/market-data/Get-All-Isolated-Margin-Symbol

.. code:: python

    pair_details = client.get_all_isolated_margin_symbols()

:returns: API response

.. code-block:: python

    [
        {
            "base": "BNB",
            "isBuyAllowed": true,
            "isMarginTrade": true,
            "isSellAllowed": true,
            "quote": "BTC",
            "symbol": "BNBBTC"
        },
        {
            "base": "TRX",
            "isBuyAllowed": true,
            "isMarginTrade": true,
            "isSellAllowed": true,
            "quote": "BTC",
            "symbol": "TRXBTC"
        }
    ]


:raises: BinanceRequestException, BinanceAPIException

r@   zmargin/isolated/allPairsTr  r  r   s     r(   get_all_isolated_margin_symbols&Client.get_all_isolated_margin_symbols  s'    H ''-d ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee

https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data

:param vipLevel: User's current specific margin data will be returned if vipLevel is omitted
:type vipLevel: int
:param symbol: optional
:type symbol: str

:returns: API response

.. code-block:: python
    [
        {
            "vipLevel": 0,
            "symbol": "BTCUSDT",
            "leverage": "10",
            "data": [
                {
                    "coin": "BTC",
                    "dailyInterest": "0.00026125",
                    "borrowLimit": "270"
                },
                {
                    "coin": "USDT",
                    "dailyInterest": "0.000475",
                    "borrowLimit": "2100000"
                }
            ]
        }
    ]
r@   zmargin/isolatedMarginDataTr   r  r   s     r(   get_isolated_margin_fee_data#Client.get_isolated_margin_fee_data  s'    B ''.6 ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data

https://developers.binance.com/docs/margin_trading/market-data/Query-Isolated-Margin-Tier-Data

:param symbol: required
:type symbol: str
:param tier: All margin tier data will be returned if tier is omitted
:type tier: int
:param recvWindow: optional: No more than 60000
:type recvWindow:

:returns: API response

.. code-block:: python
    [
        {
            "symbol": "BTCUSDT",
            "tier": 1,
            "effectiveMultiple": "10",
            "initialRiskRatio": "1.111",
            "liquidationRiskRatio": "1.05",
            "baseAssetMaxBorrowable": "9",
            "quoteAssetMaxBorrowable": "70000"
        }
    ]

r@   zmargin/isolatedMarginTierTr   r  r   s     r(   get_isolated_margin_tier_data$Client.get_isolated_margin_tier_data  s&    8 ''.6 ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  

https://developers.binance.com/docs/margin_trading/trade/Margin-Manual-Liquidation



:param type: required
:type symbol: str: When type selected is "ISOLATED", symbol must be filled in

:returns: API response

    [
        {
            "asset": "ETH",
            "interest": "0.00083334",
            "principal": "0.001",
            "liabilityAsset": "USDT",
            "liabilityQty": 0.3552
        }
    ]

r   zmargin/manual-liquidationTr   r  r   s     r(   margin_manual_liquidation Client.margin_manual_liquidation3  s&    . ''/F ( 
 	
r*   c                 &    U R                  SSSUS9$ )am  Toggle BNB Burn On Spot Trade And Margin Interest

https://developers.binance.com/docs/wallet/asset/Toggle-BNB-Burn-On-Spot-Trade-And-Margin-Interest

:param spotBNBBurn: Determines whether to use BNB to pay for trading fees on SPOT
:type spotBNBBurn: bool
:param interestBNBBurn: Determines whether to use BNB to pay for margin loan's interest
:type interestBNBBurn: bool

.. code:: python

    response = client.toggle_bnb_burn_spot_margin()

:returns: API response

.. code-block:: python

    {
       "spotBNBBurn":true,
       "interestBNBBurn": false
    }


:raises: BinanceRequestException, BinanceAPIException

r   bnbBurnTr  r  r   s     r(   toggle_bnb_burn_spot_margin"Client.toggle_bnb_burn_spot_marginN  s    6 ''	$V'TTr*   c                 &    U R                  SSSUS9$ )aW  Get BNB Burn Status

https://developers.binance.com/docs/margin_trading/account/Get-BNB-Burn-Status

.. code:: python

    status = client.get_bnb_burn_spot_margin()

:returns: API response

.. code-block:: python

    {
       "spotBNBBurn":true,
       "interestBNBBurn": false
    }


:raises: BinanceRequestException, BinanceAPIException

r@   r2  Tr  r  r   s     r(   get_bnb_burn_spot_marginClient.get_bnb_burn_spot_margink  s    , ''yF'SSr*   c                 $    U R                  SSUS9$ )a  Query margin priceIndex

https://developers.binance.com/docs/margin_trading/market-data/Query-Margin-PriceIndex

:param symbol: name of the symbol pair
:type symbol: str

.. code:: python

    price_index_details = client.get_margin_price_index(symbol='BTCUSDT')

:returns: API response

.. code-block:: python

    {
        "calcTime": 1562046418000,
        "price": "0.00333930",
        "symbol": "BNBBTC"
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zmargin/priceIndexr   r  r   s     r(   get_margin_price_indexClient.get_margin_price_index  s    2 ''/B'PPr*   c                 0    SUS'   U R                  SSSUS9$ )aL  Execute transfer between cross-margin account and spot account.

https://binance-docs.github.io/apidocs/spot/en/#cross-margin-account-transfer-margin

:param asset: name of the asset
:type asset: str
:param amount: amount to transfer
:type amount: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

.. code-block:: python

    transfer = client.transfer_margin_to_spot(asset='BTC', amount='1.1')

:returns: API response

.. code-block:: python

    {
        "tranId": 100000001
    }

:raises: BinanceRequestException, BinanceAPIException

   r4  r   margin/transferTr  r  r   s     r(   transfer_margin_to_spotClient.transfer_margin_to_spot  /    6 v''%d ( 
 	
r*   c                 0    SUS'   U R                  SSSUS9$ )aL  Execute transfer between spot account and cross-margin account.

https://binance-docs.github.io/apidocs/spot/en/#cross-margin-account-transfer-margin

:param asset: name of the asset
:type asset: str
:param amount: amount to transfer
:type amount: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

.. code-block:: python

    transfer = client.transfer_spot_to_margin(asset='BTC', amount='1.1')

:returns: API response

.. code-block:: python

    {
        "tranId": 100000001
    }

:raises: BinanceRequestException, BinanceAPIException

r   r4  r   r=  Tr  r  r   s     r(   transfer_spot_to_marginClient.transfer_spot_to_margin  r@  r*   c                 :    SUS'   SUS'   U R                  SSSUS9$ )	a  Execute transfer between isolated margin account and spot account.

https://binance-docs.github.io/apidocs/spot/en/#isolated-margin-account-transfer-margin

:param asset: name of the asset
:type asset: str
:param symbol: pair symbol
:type symbol: str
:param amount: amount to transfer
:type amount: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

.. code-block:: python

    transfer = client.transfer_isolated_margin_to_spot(asset='BTC',
                                                        symbol='ETHBTC', amount='1.1')

:returns: API response

.. code-block:: python

    {
        "tranId": 100000001
    }

:raises: BinanceRequestException, BinanceAPIException

ISOLATED_MARGIN	transFromr   transTor   margin/isolated/transferTr  r  r   s     r(    transfer_isolated_margin_to_spot'Client.transfer_isolated_margin_to_spot  s:    < 0{"y''.t& ( 
 	
r*   c                 :    SUS'   SUS'   U R                  SSSUS9$ )	a  Execute transfer between spot account and isolated margin account.

https://binance-docs.github.io/apidocs/spot/en/#isolated-margin-account-transfer-margin

:param asset: name of the asset
:type asset: str
:param symbol: pair symbol
:type symbol: str
:param amount: amount to transfer
:type amount: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

.. code-block:: python

    transfer = client.transfer_spot_to_isolated_margin(asset='BTC',
                                                        symbol='ETHBTC', amount='1.1')

:returns: API response

.. code-block:: python

    {
        "tranId": 100000001
    }

:raises: BinanceRequestException, BinanceAPIException

r   rF  rE  rG  r   rH  Tr  r  r   s     r(    transfer_spot_to_isolated_margin'Client.transfer_spot_to_isolated_margin  s:    < %{-y''.t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get transfers to isolated margin account.

https://binance-docs.github.io/apidocs/spot/en/#get-isolated-margin-transfer-history-user_data

:param asset: name of the asset
:type asset: str
:param symbol: pair required
:type symbol: str
:param transFrom: optional SPOT, ISOLATED_MARGIN
:param transFrom: str SPOT, ISOLATED_MARGIN
:param transTo: optional
:param transTo: str
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param current: Currently querying page. Start from 1. Default:1
:type current: str
:param size: Default:10 Max:100
:type size: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

.. code-block:: python

    transfer = client.transfer_spot_to_isolated_margin(symbol='ETHBTC')

:returns: API response

.. code-block:: python

    {
      "rows": [
        {
          "amount": "0.10000000",
          "asset": "BNB",
          "status": "CONFIRMED",
          "timestamp": 1566898617000,
          "txId": 5240372201,
          "transFrom": "SPOT",
          "transTo": "ISOLATED_MARGIN"
        },
        {
          "amount": "5.00000000",
          "asset": "USDT",
          "status": "CONFIRMED",
          "timestamp": 1566888436123,
          "txId": 5239810406,
          "transFrom": "ISOLATED_MARGIN",
          "transTo": "SPOT"
        }
      ],
      "total": 2
    }

:raises: BinanceRequestException, BinanceAPIException

r@   rH  Tr  r  r   s     r(   #get_isolated_margin_tranfer_history*Client.get_isolated_margin_tranfer_history&  s'    v ''-d ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Apply for a loan in cross-margin or isolated-margin account.

https://binance-docs.github.io/apidocs/spot/en/#margin-account-borrow-margin

:param asset: name of the asset
:type asset: str
:param amount: amount to transfer
:type amount: str
:param isIsolated: set to 'TRUE' for isolated margin (default 'FALSE')
:type isIsolated: str
:param symbol: Isolated margin symbol (default blank for cross-margin)
:type symbol: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

.. code-block:: python

    transaction = client.margin_create_loan(asset='BTC', amount='1.1')

    transaction = client.margin_create_loan(asset='BTC', amount='1.1',
                                            isIsolated='TRUE', symbol='ETHBTC')

:returns: API response

.. code-block:: python

    {
        "tranId": 100000001
    }

:raises: BinanceRequestException, BinanceAPIException

r   margin/loanTr  r  r   s     r(   create_margin_loanClient.create_margin_loane  s     D ''dQW'XXr*   c                 &    U R                  SSSUS9$ )a  Repay loan in cross-margin or isolated-margin account.

If amount is more than the amount borrowed, the full loan will be repaid.

https://binance-docs.github.io/apidocs/spot/en/#margin-account-repay-margin

:param asset: name of the asset
:type asset: str
:param amount: amount to transfer
:type amount: str
:param isIsolated: set to 'TRUE' for isolated margin (default 'FALSE')
:type isIsolated: str
:param symbol: Isolated margin symbol (default blank for cross-margin)
:type symbol: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

.. code-block:: python

    transaction = client.margin_repay_loan(asset='BTC', amount='1.1')

    transaction = client.margin_repay_loan(asset='BTC', amount='1.1',
                                            isIsolated='TRUE', symbol='ETHBTC')

:returns: API response

.. code-block:: python

    {
        "tranId": 100000001
    }

:raises: BinanceRequestException, BinanceAPIException

r   margin/repayTr  r  r   s     r(   repay_margin_loanClient.repay_margin_loan  s&    H ''N4f ( 
 	
r*   c                 r    SU;  a   U R                   U R                  5       -   US'   U R                  SSSUS9$ )a  Post a new order for margin account.

https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-Order

:param symbol: required
:type symbol: str
:param isIsolated: set to 'TRUE' for isolated margin (default 'FALSE')
:type isIsolated: str
:param side: required
:type side: str
:param type: required
:type type: str
:param quantity: required
:type quantity: decimal
:param price: required
:type price: str
:param stopPrice: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.
:type stopPrice: str
:param timeInForce: required if limit order GTC,IOC,FOK
:type timeInForce: str
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param icebergQty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
:type icebergQty: str
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; MARKET and LIMIT order types default to
    FULL, all other orders default to ACK.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

Response ACK:

.. code-block:: python

    {
        "symbol": "BTCUSDT",
        "orderId": 28,
        "clientOrderId": "6gCrw2kRUAF9CvJDGP16IP",
        "transactTime": 1507725176595
    }

Response RESULT:

.. code-block:: python

    {
        "symbol": "BTCUSDT",
        "orderId": 28,
        "clientOrderId": "6gCrw2kRUAF9CvJDGP16IP",
        "transactTime": 1507725176595,
        "price": "1.00000000",
        "origQty": "10.00000000",
        "executedQty": "10.00000000",
        "cummulativeQuoteQty": "10.00000000",
        "status": "FILLED",
        "timeInForce": "GTC",
        "type": "MARKET",
        "side": "SELL"
    }

Response FULL:

.. code-block:: python

    {
        "symbol": "BTCUSDT",
        "orderId": 28,
        "clientOrderId": "6gCrw2kRUAF9CvJDGP16IP",
        "transactTime": 1507725176595,
        "price": "1.00000000",
        "origQty": "10.00000000",
        "executedQty": "10.00000000",
        "cummulativeQuoteQty": "10.00000000",
        "status": "FILLED",
        "timeInForce": "GTC",
        "type": "MARKET",
        "side": "SELL",
        "fills": [
            {
                "price": "4000.00000000",
                "qty": "1.00000000",
                "commission": "4.00000000",
                "commissionAsset": "USDT"
            },
            {
                "price": "3999.00000000",
                "qty": "5.00000000",
                "commission": "19.99500000",
                "commissionAsset": "USDT"
            },
            {
                "price": "3998.00000000",
                "qty": "2.00000000",
                "commission": "7.99600000",
                "commissionAsset": "USDT"
            },
            {
                "price": "3997.00000000",
                "qty": "1.00000000",
                "commission": "3.99700000",
                "commissionAsset": "USDT"
            },
            {
                "price": "3995.00000000",
                "qty": "1.00000000",
                "commission": "3.99500000",
                "commissionAsset": "USDT"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException, BinanceOrderMinAmountException,
    BinanceOrderMinPriceException, BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException,
    BinanceOrderInactiveSymbolException

r+  r   margin/orderTr  )r.  r/  rx   r   s     r(   create_margin_orderClient.create_margin_order  sJ    n V+)-)?)?$++-)OF%&''N4f ( 
 	
r*   c                 &    U R                  SSSUS9$ )a}  Cancel an active order for margin account.

Either orderId or origClientOrderId must be sent.

https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-Order

:param symbol: required
:type symbol: str
:param isIsolated: set to 'TRUE' for isolated margin (default 'FALSE')
:type isIsolated: str
:param orderId:
:type orderId: str
:param origClientOrderId:
:type origClientOrderId: str
:param newClientOrderId: Used to uniquely identify this cancel. Automatically generated by default.
:type newClientOrderId: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    {
        "symbol": "LTCBTC",
        "orderId": 28,
        "origClientOrderId": "myOrder1",
        "clientOrderId": "cancelMyOrder1",
        "transactTime": 1507725176595,
        "price": "1.00000000",
        "origQty": "10.00000000",
        "executedQty": "8.00000000",
        "cummulativeQuoteQty": "8.00000000",
        "status": "CANCELED",
        "timeInForce": "GTC",
        "type": "LIMIT",
        "side": "SELL"
    }

:raises: BinanceRequestException, BinanceAPIException

r   rZ  Tr  r  r   s     r(   cancel_margin_orderClient.cancel_margin_order.  s&    R ''nT ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  
Cancels all active orders on a symbol for margin account.

https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-All-Open-Orders

:param symbol: required
:type symbol: str
:param isIsolated: set to 'TRUE' for isolated margin (default 'FALSE')
:type isIsolated: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int
:returns: API response

:raises: BinanceRequestException, BinanceAPIException
r   margin/openOrdersTr  r  r   s     r(   cancel_all_open_margin_orders$Client.cancel_all_open_margin_orders[  s&      '')$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )u7  Adjust cross margin max leverage

https://developers.binance.com/docs/margin_trading/account

:param maxLeverage: required Can only adjust 3 or 5，Example: maxLeverage=3
:type maxLeverage: int

:returns: API response

    {
        "success": true
    }

:raises: BinanceRequestException, BinanceAPIException

r   zmargin/max-leverageTr  r  r   s     r(   set_margin_max_leverageClient.set_margin_max_leverageo  s&    " '')$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )aX  Query margin transfer history

https://developers.binance.com/docs/margin_trading/transfer

:param asset: optional
:type asset: str
:param type: optional Transfer Type: ROLL_IN, ROLL_OUT
:type type: str
:param archived: optional Default: false. Set to true for archived data from 6 months ago
:type archived: str
:param startTime: earliest timestamp to filter transactions
:type startTime: str
:param endTime: Used to uniquely identify this cancel. Automatically generated by default.
:type endTime: str
:param current: Currently querying page. Start from 1. Default:1
:type current: str
:param size: Default:10 Max:100
:type size: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    {
        "rows": [
            {
                "amount": "0.10000000",
                "asset": "BNB",
                "status": "CONFIRMED",
                "timestamp": 1566898617,
                "txId": 5240372201,
                "type": "ROLL_IN"
            },
            {
                "amount": "5.00000000",
                "asset": "USDT",
                "status": "CONFIRMED",
                "timestamp": 1566888436,
                "txId": 5239810406,
                "type": "ROLL_OUT"
            },
            {
                "amount": "1.00000000",
                "asset": "EOS",
                "status": "CONFIRMED",
                "timestamp": 1566888403,
                "txId": 5239808703,
                "type": "ROLL_IN"
            }
        ],
        "total": 3
    }

:raises: BinanceRequestException, BinanceAPIException

r@   r=  Tr  r  r   s     r(   get_margin_transfer_history"Client.get_margin_transfer_history  s'    r ''$T ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query loan record

txId or startTime must be sent. txId takes precedence.

https://binance-docs.github.io/apidocs/spot/en/#query-loan-record-user_data

:param asset: required
:type asset: str
:param isolatedSymbol: isolated symbol (if querying isolated margin)
:type isolatedSymbol: str
:param txId: the tranId in of the created loan
:type txId: str
:param startTime: earliest timestamp to filter transactions
:type startTime: str
:param endTime: Used to uniquely identify this cancel. Automatically generated by default.
:type endTime: str
:param current: Currently querying page. Start from 1. Default:1
:type current: str
:param size: Default:10 Max:100
:type size: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    {
        "rows": [
            {
                "asset": "BNB",
                "principal": "0.84624403",
                "timestamp": 1555056425000,
                //one of PENDING (pending to execution), CONFIRMED (successfully loaned), FAILED (execution failed, nothing happened to your account);
                "status": "CONFIRMED"
            }
        ],
        "total": 1
    }

:raises: BinanceRequestException, BinanceAPIException

r@   rR  Tr  r  r   s     r(   get_margin_loan_detailsClient.get_margin_loan_details  s     T ''}TPV'WWr*   c                 &    U R                  SSSUS9$ )a  Query repay record

txId or startTime must be sent. txId takes precedence.

https://binance-docs.github.io/apidocs/spot/en/#query-repay-record-user_data

:param asset: required
:type asset: str
:param isolatedSymbol: isolated symbol (if querying isolated margin)
:type isolatedSymbol: str
:param txId: the tranId in of the created loan
:type txId: str
:param startTime:
:type startTime: str
:param endTime: Used to uniquely identify this cancel. Automatically generated by default.
:type endTime: str
:param current: Currently querying page. Start from 1. Default:1
:type current: str
:param size: Default:10 Max:100
:type size: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    {
        "rows": [
            {
                //Total amount repaid
                "amount": "14.00000000",
                "asset": "BNB",
                //Interest repaid
                "interest": "0.01866667",
                //Principal repaid
                "principal": "13.98133333",
                //one of PENDING (pending to execution), CONFIRMED (successfully loaned), FAILED (execution failed, nothing happened to your account);
                "status": "CONFIRMED",
                "timestamp": 1563438204000,
                "txId": 2970933056
            }
        ],
        "total": 1
    }

:raises: BinanceRequestException, BinanceAPIException

r@   rV  Tr  r  r   s     r(   get_margin_repay_detailsClient.get_margin_repay_details  s     ` ''~dQW'XXr*   c                 &    U R                  SSSUS9$ )a/  Query Cross Margin Fee Data (USER_DATA)

https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Fee-Data

:param vipLevel: User's current specific margin data will be returned if vipLevel is omitted
:type vipLevel: int
:param coin
:type coin: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int
:returns: API response (example):
    [
        {
            "vipLevel": 0,
            "coin": "BTC",
            "transferIn": true,
            "borrowable": true,
            "dailyInterest": "0.00026125",
            "yearlyInterest": "0.0953",
            "borrowLimit": "180",
            "marginablePairs": [
                "BNBBTC",
                "TRXBTC",
                "ETHBTC",
                "BTCUSDT"
            ]
        }
    ]
r@   zmargin/crossMarginDataTr  r  r   s     r(   get_cross_margin_dataClient.get_cross_margin_data  s&    < ''+Dv ( 
 	
r*   c                 &    U R                  SSSUS9$ )ad  Get Interest History (USER_DATA)

https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-Interest-History

:param asset:
:type asset: str
:param isolatedSymbol: isolated symbol (if querying isolated margin)
:type isolatedSymbol: str
:param startTime:
:type startTime: str
:param endTime:
:type endTime: str
:param current: Currently querying page. Start from 1. Default:1
:type current: str
:param size: Default:10 Max:100
:type size: int
:param archived: Default: false. Set to true for archived data from 6 months ago
:type archived: bool
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    {
        "rows":[
            {
                "isolatedSymbol": "BNBUSDT", // isolated symbol, will not be returned for crossed margin
                "asset": "BNB",
                "interest": "0.02414667",
                "interestAccuredTime": 1566813600000,
                "interestRate": "0.01600000",
                "principal": "36.22000000",
                "type": "ON_BORROW"
            }
        ],
        "total": 1
    }


r@   margin/interestHistoryTr  r  r   s     r(   get_margin_interest_history"Client.get_margin_interest_historyA  s'    R ''+Dv ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get Force Liquidation Record (USER_DATA)

https://developers.binance.com/docs/margin_trading/trade

:param startTime:
:type startTime: str
:param endTime:
:type endTime: str
:param isolatedSymbol: isolated symbol (if querying isolated margin)
:type isolatedSymbol: str
:param current: Currently querying page. Start from 1. Default:1
:type current: str
:param size: Default:10 Max:100
:type size: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    {
        "rows": [
            {
                "avgPrice": "0.00388359",
                "executedQty": "31.39000000",
                "orderId": 180015097,
                "price": "0.00388110",
                "qty": "31.39000000",
                "side": "SELL",
                "symbol": "BNBBTC",
                "timeInForce": "GTC",
                "isIsolated": true,
                "updatedTime": 1558941374745
            }
        ],
        "total": 1
    }

r@   zmargin/forceLiquidationRecTr  r  r   s     r(    get_margin_force_liquidation_rec'Client.get_margin_force_liquidation_recn  s'    N ''/6 ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query margin accounts order

Either orderId or origClientOrderId must be sent.

For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time.

https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Order

:param symbol: required
:type symbol: str
:param isIsolated: set to 'TRUE' for isolated margin (default 'FALSE')
:type isIsolated: str
:param orderId:
:type orderId: str
:param origClientOrderId:
:type origClientOrderId: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    {
        "clientOrderId": "ZwfQzuDIGpceVhKW5DvCmO",
        "cummulativeQuoteQty": "0.00000000",
        "executedQty": "0.00000000",
        "icebergQty": "0.00000000",
        "isWorking": true,
        "orderId": 213205622,
        "origQty": "0.30000000",
        "price": "0.00493630",
        "side": "SELL",
        "status": "NEW",
        "stopPrice": "0.00000000",
        "symbol": "BNBBTC",
        "time": 1562133008725,
        "timeInForce": "GTC",
        "type": "LIMIT",
        "updateTime": 1562133008725
    }

:raises: BinanceRequestException, BinanceAPIException

r@   rZ  Tr  r  r   s     r(   get_margin_orderClient.get_margin_order  s     X ''~dQW'XXr*   c                 &    U R                  SSSUS9$ )a  Query margin accounts open orders

If the symbol is not sent, orders for all symbols will be returned in an array (cross-margin only).

If querying isolated margin orders, both the isIsolated='TRUE' and symbol=symbol_name must be set.

When all symbols are returned, the number of requests counted against the rate limiter is equal to the number
of symbols currently trading on the exchange.

https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-Orders

:param symbol: optional
:type symbol: str
:param isIsolated: set to 'TRUE' for isolated margin (default 'FALSE')
:type isIsolated: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    [
        {
            "clientOrderId": "qhcZw71gAkCCTv0t0k8LUK",
            "cummulativeQuoteQty": "0.00000000",
            "executedQty": "0.00000000",
            "icebergQty": "0.00000000",
            "isWorking": true,
            "orderId": 211842552,
            "origQty": "0.30000000",
            "price": "0.00475010",
            "side": "SELL",
            "status": "NEW",
            "stopPrice": "0.00000000",
            "symbol": "BNBBTC",
            "time": 1562040170089,
            "timeInForce": "GTC",
            "type": "LIMIT",
            "updateTime": 1562040170089
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

r@   ra  Tr  r  r   s     r(   get_open_margin_ordersClient.get_open_margin_orders  s'    Z ''&t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query all margin accounts orders

If orderId is set, it will get orders >= that orderId. Otherwise most recent orders are returned.

For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time.

https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders

:param symbol: required
:type symbol: str
:param isIsolated: set to 'TRUE' for isolated margin (default 'FALSE')
:type isIsolated: str
:param orderId: optional
:type orderId: str
:param startTime: optional
:type startTime: str
:param endTime: optional
:type endTime: str
:param limit: Default 500; max 1000
:type limit: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    [
        {
            "id": 43123876,
            "price": "0.00395740",
            "qty": "4.06000000",
            "quoteQty": "0.01606704",
            "symbol": "BNBBTC",
            "time": 1556089977693
        },
        {
            "id": 43123877,
            "price": "0.00395740",
            "qty": "0.77000000",
            "quoteQty": "0.00304719",
            "symbol": "BNBBTC",
            "time": 1556089977693
        },
        {
            "id": 43253549,
            "price": "0.00428930",
            "qty": "23.30000000",
            "quoteQty": "0.09994069",
            "symbol": "BNBBTC",
            "time": 1556163963504
        }
    ]


:raises: BinanceRequestException, BinanceAPIException

r@   margin/allOrdersTr  r  r   s     r(   get_all_margin_ordersClient.get_all_margin_orders  s'    r ''%d ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query margin accounts trades

If fromId is set, it will get orders >= that fromId. Otherwise most recent orders are returned.

https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List

:param symbol: required
:type symbol: str
:param isIsolated: set to 'TRUE' for isolated margin (default 'FALSE')
:type isIsolated: str
:param fromId: optional
:type fromId: str
:param startTime: optional
:type startTime: str
:param endTime: optional
:type endTime: str
:param limit: Default 500; max 1000
:type limit: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    [
        {
            "commission": "0.00006000",
            "commissionAsset": "BTC",
            "id": 34,
            "isBestMatch": true,
            "isBuyer": false,
            "isMaker": false,
            "orderId": 39324,
            "price": "0.02000000",
            "qty": "3.00000000",
            "symbol": "BNBBTC",
            "time": 1561973357171
        }, {
            "commission": "0.00002950",
            "commissionAsset": "BTC",
            "id": 32,
            "isBestMatch": true,
            "isBuyer": false,
            "isMaker": true,
            "orderId": 39319,
            "price": "0.00590000",
            "qty": "5.00000000",
            "symbol": "BNBBTC",
            "time": 1561964645345
        }
    ]


:raises: BinanceRequestException, BinanceAPIException

r@   margin/myTradesTr  r  r   s     r(   get_margin_tradesClient.get_margin_trades5  s'    p ''$T ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query max borrow amount for an asset

https://binance-docs.github.io/apidocs/spot/en/#query-max-borrow-user_data

:param asset: required
:type asset: str
:param isolatedSymbol: isolated symbol (if querying isolated margin)
:type isolatedSymbol: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    {
        "amount": "1.69248805"
    }

:raises: BinanceRequestException, BinanceAPIException

r@   margin/maxBorrowableTr  r  r   s     r(   get_max_margin_loanClient.get_max_margin_loanq  s&    * '')$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query max transfer-out amount

https://developers.binance.com/docs/margin_trading/transfer/Query-Max-Transfer-Out-Amount

:param asset: required
:type asset: str
:param isolatedSymbol: isolated symbol (if querying isolated margin)
:type isolatedSymbol: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    {
        "amount": "3.59498107"
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zmargin/maxTransferableTr  r  r   s     r(   get_max_margin_transferClient.get_max_margin_transfer  s&    * ''+Dv ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get tokens or symbols delist schedule for cross margin and isolated margin

https://developers.binance.com/docs/margin_trading/market-data/Get-Delist-Schedule

:param recvWindow: optional - the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python
    [
        {
            "delistTime": 1686161202000,
            "crossMarginAssets": [
                "BTC",
                "USDT"
            ],
            "isolatedMarginSymbols": [
                "ADAUSDT",
                "BNBUSDT"
            ]
        },
        {
            "delistTime": 1686222232000,
            "crossMarginAssets": [
                "ADA"
            ],
            "isolatedMarginSymbols": []
        }
    ]
r@   z/margin/delist-scheduleTr  r  r   s     r(   get_margin_delist_schedule!Client.get_margin_delist_schedule  s'    @ '',T ( 
 	
r*   c                 &    U R                  SSSUS9$ )u#  Post a new OCO trade for margin account.

https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OCO


:param symbol: required
:type symbol: str
:param isIsolated: for isolated margin or not, "TRUE", "FALSE"，default "FALSE"
:type symbol: str
:param listClientOrderId: A unique id for the list order. Automatically generated if not sent.
:type listClientOrderId: str
:param side: required
:type side: str
:param quantity: required
:type quantity: decimal
:param limitClientOrderId: A unique id for the limit order. Automatically generated if not sent.
:type limitClientOrderId: str
:param price: required
:type price: str
:param limitIcebergQty: Used to make the LIMIT_MAKER leg an iceberg order.
:type limitIcebergQty: decimal
:param stopClientOrderId: A unique Id for the stop loss/stop loss limit leg. Automatically generated if not sent.
:type stopClientOrderId: str
:param stopPrice: required
:type stopPrice: str
:param stopLimitPrice: If provided, stopLimitTimeInForce is required.
:type stopLimitPrice: str
:param stopIcebergQty: Used with STOP_LOSS_LIMIT leg to make an iceberg order.
:type stopIcebergQty: decimal
:param stopLimitTimeInForce: Valid values are GTC/FOK/IOC.
:type stopLimitTimeInForce: str
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param sideEffectType: NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY; default NO_SIDE_EFFECT.
:type sideEffectType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "orderListId": 0,
        "contingencyType": "OCO",
        "listStatusType": "EXEC_STARTED",
        "listOrderStatus": "EXECUTING",
        "listClientOrderId": "JYVpp3F0f5CAG15DhtrqLp",
        "transactionTime": 1563417480525,
        "symbol": "LTCBTC",
        "marginBuyBorrowAmount": "5",       // will not return if no margin trade happens
        "marginBuyBorrowAsset": "BTC",    // will not return if no margin trade happens
        "isIsolated": false,       // if isolated margin
        "orders": [
            {
                "symbol": "LTCBTC",
                "orderId": 2,
                "clientOrderId": "Kk7sqHb9J6mJWTMDVW7Vos"
            },
            {
                "symbol": "LTCBTC",
                "orderId": 3,
                "clientOrderId": "xTXKaGYd4bluPVp78IVRvl"
            }
        ],
        "orderReports": [
            {
                "symbol": "LTCBTC",
                "orderId": 2,
                "orderListId": 0,
                "clientOrderId": "Kk7sqHb9J6mJWTMDVW7Vos",
                "transactTime": 1563417480525,
                "price": "0.000000",
                "origQty": "0.624363",
                "executedQty": "0.000000",
                "cummulativeQuoteQty": "0.000000",
                "status": "NEW",
                "timeInForce": "GTC",
                "type": "STOP_LOSS",
                "side": "BUY",
                "stopPrice": "0.960664"
            },
            {
                "symbol": "LTCBTC",
                "orderId": 3,
                "orderListId": 0,
                "clientOrderId": "xTXKaGYd4bluPVp78IVRvl",
                "transactTime": 1563417480525,
                "price": "0.036435",
                "origQty": "0.624363",
                "executedQty": "0.000000",
                "cummulativeQuoteQty": "0.000000",
                "status": "NEW",
                "timeInForce": "GTC",
                "type": "LIMIT_MAKER",
                "side": "BUY"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException, BinanceOrderException, BinanceOrderMinAmountException,
    BinanceOrderMinPriceException, BinanceOrderMinTotalException, BinanceOrderUnknownSymbolException,
    BinanceOrderInactiveSymbolException

r   margin/order/ocoTr  r  r   s     r(   create_margin_oco_orderClient.create_margin_oco_order  s'    T ''&t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )ud
  Cancel an entire Order List for a margin account.

https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-OCO

:param symbol: required
:type symbol: str
:param isIsolated: for isolated margin or not, "TRUE", "FALSE"，default "FALSE"
:type symbol: str
:param orderListId: Either orderListId or listClientOrderId must be provided
:type orderListId: int
:param listClientOrderId: Either orderListId or listClientOrderId must be provided
:type listClientOrderId: str
:param newClientOrderId: Used to uniquely identify this cancel. Automatically generated by default.
:type newClientOrderId: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "orderListId": 0,
        "contingencyType": "OCO",
        "listStatusType": "ALL_DONE",
        "listOrderStatus": "ALL_DONE",
        "listClientOrderId": "C3wyj4WVEktd7u9aVBRXcN",
        "transactionTime": 1574040868128,
        "symbol": "LTCBTC",
        "isIsolated": false,       // if isolated margin
        "orders": [
            {
                "symbol": "LTCBTC",
                "orderId": 2,
                "clientOrderId": "pO9ufTiFGg3nw2fOdgeOXa"
            },
            {
                "symbol": "LTCBTC",
                "orderId": 3,
                "clientOrderId": "TXOvglzXuaubXAaENpaRCB"
            }
        ],
        "orderReports": [
            {
                "symbol": "LTCBTC",
                "origClientOrderId": "pO9ufTiFGg3nw2fOdgeOXa",
                "orderId": 2,
                "orderListId": 0,
                "clientOrderId": "unfWT8ig8i0uj6lPuYLez6",
                "price": "1.00000000",
                "origQty": "10.00000000",
                "executedQty": "0.00000000",
                "cummulativeQuoteQty": "0.00000000",
                "status": "CANCELED",
                "timeInForce": "GTC",
                "type": "STOP_LOSS_LIMIT",
                "side": "SELL",
                "stopPrice": "1.00000000"
            },
            {
                "symbol": "LTCBTC",
                "origClientOrderId": "TXOvglzXuaubXAaENpaRCB",
                "orderId": 3,
                "orderListId": 0,
                "clientOrderId": "unfWT8ig8i0uj6lPuYLez6",
                "price": "3.00000000",
                "origQty": "10.00000000",
                "executedQty": "0.00000000",
                "cummulativeQuoteQty": "0.00000000",
                "status": "CANCELED",
                "timeInForce": "GTC",
                "type": "LIMIT_MAKER",
                "side": "SELL"
            }
        ]
    }

r   margin/orderListTr  r  r   s     r(   cancel_margin_oco_orderClient.cancel_margin_oco_order7  s'    ^ ''(F ( 
 	
r*   c                 &    U R                  SSSUS9$ )u@  Retrieves a specific OCO based on provided optional parameters

https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-OCO

:param isIsolated: for isolated margin or not, "TRUE", "FALSE"，default "FALSE"
:type symbol: str
:param symbol: mandatory for isolated margin, not supported for cross margin
:type symbol: str
:param orderListId: Either orderListId or listClientOrderId must be provided
:type orderListId: int
:param listClientOrderId: Either orderListId or listClientOrderId must be provided
:type listClientOrderId: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    {
        "orderListId": 27,
        "contingencyType": "OCO",
        "listStatusType": "EXEC_STARTED",
        "listOrderStatus": "EXECUTING",
        "listClientOrderId": "h2USkA5YQpaXHPIrkd96xE",
        "transactionTime": 1565245656253,
        "symbol": "LTCBTC",
        "isIsolated": false,       // if isolated margin
        "orders": [
            {
                "symbol": "LTCBTC",
                "orderId": 4,
                "clientOrderId": "qD1gy3kc3Gx0rihm9Y3xwS"
            },
            {
                "symbol": "LTCBTC",
                "orderId": 5,
                "clientOrderId": "ARzZ9I00CPM8i3NhmU9Ega"
            }
        ]
    }

r@   r  Tr  r  r   s     r(   get_margin_oco_orderClient.get_margin_oco_order  s'    T ''%d ( 
 	
r*   c                 &    U R                  SSSUS9$ )un  Retrieves open OCO trades

https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-OCO

:param isIsolated: for isolated margin or not, "TRUE", "FALSE"，default "FALSE"
:type symbol: str
:param symbol: mandatory for isolated margin, not supported for cross margin
:type symbol: str
:param fromId: If supplied, neither startTime or endTime can be provided
:type fromId: int
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param limit: optional Default Value: 500; Max Value: 1000
:type limit: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

    [
        {
            "orderListId": 29,
            "contingencyType": "OCO",
            "listStatusType": "EXEC_STARTED",
            "listOrderStatus": "EXECUTING",
            "listClientOrderId": "amEEAXryFzFwYF1FeRpUoZ",
            "transactionTime": 1565245913483,
            "symbol": "LTCBTC",
            "isIsolated": true,       // if isolated margin
            "orders": [
                {
                    "symbol": "LTCBTC",
                    "orderId": 4,
                    "clientOrderId": "oD7aesZqjEGlZrbtRpy5zB"
                },
                {
                    "symbol": "LTCBTC",
                    "orderId": 5,
                    "clientOrderId": "Jr1h6xirOxgeJOUuYQS7V3"
                }
            ]
        },
        {
            "orderListId": 28,
            "contingencyType": "OCO",
            "listStatusType": "EXEC_STARTED",
            "listOrderStatus": "EXECUTING",
            "listClientOrderId": "hG7hFNxJV6cZy3Ze4AUT4d",
            "transactionTime": 1565245913407,
            "symbol": "LTCBTC",
            "orders": [
                {
                    "symbol": "LTCBTC",
                    "orderId": 2,
                    "clientOrderId": "j6lFOfbmFMRjTYA7rRJ0LP"
                },
                {
                    "symbol": "LTCBTC",
                    "orderId": 3,
                    "clientOrderId": "z0KCjOdditiLS5ekAFtK81"
                }
            ]
        }
    ]

r@   margin/openOrderListTr  r  r   s     r(   get_open_margin_oco_orders!Client.get_open_margin_oco_orders  s'    J '')$V ( 
 	
r*   c                 0    U R                  SSS0 S9nUS   $ )a  Start a new cross-margin data stream and return the listen key
If a stream already exists it should return the same key.
If the stream becomes invalid a new key is returned.

Can be used to keep the stream alive.

https://developers.binance.com/docs/margin_trading/trade-data-stream/Start-Margin-User-Data-Stream

:returns: API response

.. code-block:: python

    {
        "listenKey": "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1"
    }

:raises: BinanceRequestException, BinanceAPIException

r   r  Fr  r  r  r  s     r(   margin_stream_get_listen_key#Client.margin_stream_get_listen_key  s*    ( &&v/?TV&W;r*   c                 .    SU0nU R                  SSSUS9$ )a@  PING a cross-margin data stream to prevent a time out.

https://developers.binance.com/docs/margin_trading/trade-data-stream/Keepalive-Margin-User-Data-Stream

:param listenKey: required
:type listenKey: str

:returns: API response

.. code-block:: python

    {}

:raises: BinanceRequestException, BinanceAPIException

r  r   r  Fr  r  r  s      r(   margin_stream_keepaliveClient.margin_stream_keepalive  s0    " y)''#E ( 
 	
r*   c                 .    SU0nU R                  SSSUS9$ )a+  Close out a cross-margin data stream.

https://developers.binance.com/docs/margin_trading/trade-data-stream/Close-Margin-User-Data-Stream

:param listenKey: required
:type listenKey: str

:returns: API response

.. code-block:: python

    {}

:raises: BinanceRequestException, BinanceAPIException

r  r   r  Fr  r  r  s      r(   margin_stream_closeClient.margin_stream_close0  s0    " y)''&u6 ( 
 	
r*   c                 8    SU0nU R                  SSSUS9nUS   $ )ac  Start a new isolated margin data stream and return the listen key
If a stream already exists it should return the same key.
If the stream becomes invalid a new key is returned.

Can be used to keep the stream alive.

https://developers.binance.com/docs/margin_trading/trade-data-stream/Start-Isolated-Margin-User-Data-Stream

:param symbol: required - symbol for the isolated margin account
:type symbol: str

:returns: API response

.. code-block:: python

    {
        "listenKey":  "T3ee22BIYuWqmvne0HNq2A2WsFlEtLhvWCtItw6ffhhdmjifQ2tRbuKkTHhr"
    }

:raises: BinanceRequestException, BinanceAPIException

r   r   userDataStream/isolatedFr  r  r  )r&   r   r   r   s       r(   %isolated_margin_stream_get_listen_key,Client.isolated_margin_stream_get_listen_keyH  s:    . F#&&-e& ' 
 ;r*   c                 .    XS.nU R                  SSSUS9$ )a  PING an isolated margin data stream to prevent a time out.

https://developers.binance.com/docs/margin_trading/trade-data-stream/Keepalive-Isolated-Margin-User-Data-Stream

:param symbol: required - symbol for the isolated margin account
:type symbol: str
:param listenKey: required
:type listenKey: str

:returns: API response

.. code-block:: python

    {}

:raises: BinanceRequestException, BinanceAPIException

r   r  r   r  Fr  r  r&   r   r  r   s       r(    isolated_margin_stream_keepalive'Client.isolated_margin_stream_keepalivee  s.    & #;'',U ( 
 	
r*   c                 .    XS.nU R                  SSSUS9$ )a  Close out an isolated margin data stream.

https://developers.binance.com/docs/margin_trading/trade-data-stream/Close-Isolated-Margin-User-Data-Stream

:param symbol: required - symbol for the isolated margin account
:type symbol: str
:param listenKey: required
:type listenKey: str

:returns: API response

.. code-block:: python

    {}

:raises: BinanceRequestException, BinanceAPIException

r  r   r  Fr  r  r  s       r(   isolated_margin_stream_close#Client.isolated_margin_stream_close}  s.    & #;''/F ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get available Simple Earn flexible product list

https://binance-docs.github.io/apidocs/spot/en/#get-simple-earn-flexible-product-list-user_data

:param asset: optional
:type asset: str
:param current: optional - Currently querying page. Start from 1. Default:1
:type current: int
:param size: optional - Default:10, Max:100
:type size: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
       "rows":[
           {
               "asset": "BTC",
               "latestAnnualPercentageRate": "0.05000000",
               "tierAnnualPercentageRate": {
               "0-5BTC": 0.05,
               "5-10BTC": 0.03
           },
               "airDropPercentageRate": "0.05000000",
               "canPurchase": true,
               "canRedeem": true,
               "isSoldOut": true,
               "hot": true,
               "minPurchaseAmount": "0.01000000",
               "productId": "BTC001",
               "subscriptionStartTime": "1646182276000",
               "status": "PURCHASING"
           }
       ],
       "total": 1
   }

:raises: BinanceRequestException, BinanceAPIException

r@   zsimple-earn/flexible/listTr  r  r   s     r(   %get_simple_earn_flexible_product_list,Client.get_simple_earn_flexible_product_list  s'    X ''.t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get available Simple Earn flexible product list

https://binance-docs.github.io/apidocs/spot/en/#get-simple-earn-locked-product-list-user_data

:param asset: optional
:type asset: str
:param current: optional - Currently querying page. Start from 1. Default:1
:type current: int
:param size: optional - Default:10, Max:100
:type size: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
       "rows": [
           {
               "projectId": "Axs*90",
               "detail": {
                   "asset": "AXS",
                   "rewardAsset": "AXS",
                   "duration": 90,
                   "renewable": true,
                   "isSoldOut": true,
                   "apr": "1.2069",
                   "status": "CREATED",
                   "subscriptionStartTime": "1646182276000",
                   "extraRewardAsset": "BNB",
                   "extraRewardAPR": "0.23"
               },
               "quota": {
                   "totalPersonalQuota": "2",
                   "minimum": "0.001"
               }
           }
       ],
       "total": 1
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zsimple-earn/locked/listTr  r  r   s     r(   #get_simple_earn_locked_product_list*Client.get_simple_earn_locked_product_list  s'    \ '',T ( 
 	
r*   c                 &    U R                  SSSUS9$ )a$  Subscribe to a simple earn flexible product

https://binance-docs.github.io/apidocs/spot/en/#subscribe-locked-product-trade

:param productId: required
:type productId: str
:param amount: required
:type amount: str
:param autoSubscribe: optional - Default True
:type autoSubscribe: bool
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
       "purchaseId": 40607,
       "success": true
    }

:raises: BinanceRequestException, BinanceAPIException

r   zsimple-earn/flexible/subscribeTr  r  r   s     r(   &subscribe_simple_earn_flexible_product-Client.subscribe_simple_earn_flexible_product  s&    4 ''4T ( 
 	
r*   c                 &    U R                  SSSUS9$ )a@  Subscribe to a simple earn locked product

https://binance-docs.github.io/apidocs/spot/en/#subscribe-locked-product-trade

:param productId: required
:type productId: str
:param amount: required
:type amount: str
:param autoSubscribe: optional - Default True
:type autoSubscribe: bool
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
       "purchaseId": 40607,
       "positionId": "12345",
       "success": true
    }

:raises: BinanceRequestException, BinanceAPIException

r   zsimple-earn/locked/subscribeTr  r  r   s     r(   $subscribe_simple_earn_locked_product+Client.subscribe_simple_earn_locked_product  s&    6 ''24f ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Redeem a simple earn flexible product

https://binance-docs.github.io/apidocs/spot/en/#redeem-flexible-product-trade

:param productId: required
:type productId: str
:param amount: optional
:type amount: str
:param redeemAll: optional - Default False
:type redeemAll: bool
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

   {
       "redeemId": 40607,
       "success": true
   }

:raises: BinanceRequestException, BinanceAPIException

r   zsimple-earn/flexible/redeemTr  r  r   s     r(   #redeem_simple_earn_flexible_product*Client.redeem_simple_earn_flexible_product6  s&    4 ''1$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Redeem a simple earn locked product

https://binance-docs.github.io/apidocs/spot/en/#redeem-locked-product-trade

:param productId: required
:type productId: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

   {
       "redeemId": 40607,
       "success": true
   }

:raises: BinanceRequestException, BinanceAPIException

r   zsimple-earn/locked/redeemTr  r  r   s     r(   !redeem_simple_earn_locked_product(Client.redeem_simple_earn_locked_productT  s&    , ''/6 ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  

https://binance-docs.github.io/apidocs/spot/en/#get-flexible-product-position-user_data

:param asset: optional
:type asset: str
:param current: optional - Currently querying page. Start from 1. Default:1
:type current: int
:param size: optional - Default:10, Max:100
:type size: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

   {
       "rows":[
           {
               "totalAmount": "75.46000000",
               "tierAnnualPercentageRate": {
               "0-5BTC": 0.05,
               "5-10BTC": 0.03
           },
               "latestAnnualPercentageRate": "0.02599895",
               "yesterdayAirdropPercentageRate": "0.02599895",
               "asset": "USDT",
               "airDropAsset": "BETH",
               "canRedeem": true,
               "collateralAmount": "232.23123213",
               "productId": "USDT001",
               "yesterdayRealTimeRewards": "0.10293829",
               "cumulativeBonusRewards": "0.22759183",
               "cumulativeRealTimeRewards": "0.22759183",
               "cumulativeTotalRewards": "0.45459183",
               "autoSubscribe": true
           }
       ],
       "total": 1
   }

:raises: BinanceRequestException, BinanceAPIException

r@   zsimple-earn/flexible/positionTr  r  r   s     r(   )get_simple_earn_flexible_product_position0Client.get_simple_earn_flexible_product_positionn  s'    \ ''24f ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  

https://binance-docs.github.io/apidocs/spot/en/#get-locked-product-position-user_data

:param asset: optional
:type asset: str
:param current: optional - Currently querying page. Start from 1. Default:1
:type current: int
:param size: optional - Default:10, Max:100
:type size: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

   {
       "rows":[
           {
               "positionId": "123123",
               "projectId": "Axs*90",
               "asset": "AXS",
               "amount": "122.09202928",
               "purchaseTime": "1646182276000",
               "duration": "60",
               "accrualDays": "4",
               "rewardAsset": "AXS",
               "APY": "0.23",
               "isRenewable": true,
               "isAutoRenew": true,
               "redeemDate": "1732182276000"
           }
       ],
       "total": 1
   }

:raises: BinanceRequestException, BinanceAPIException

r@   zsimple-earn/locked/positionTr  r  r   s     r(   'get_simple_earn_locked_product_position.Client.get_simple_earn_locked_product_position  s'    R ''0F ( 
 	
r*   c                 &    U R                  SSSUS9$ )a&  

https://binance-docs.github.io/apidocs/spot/en/#simple-account-user_data

:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

   {
       "totalAmountInBTC": "0.01067982",
       "totalAmountInUSDT": "77.13289230",
       "totalFlexibleAmountInBTC": "0.00000000",
       "totalFlexibleAmountInUSDT": "0.00000000",
       "totalLockedInBTC": "0.01067982",
       "totalLockedInUSDT": "77.13289230"
   }

:raises: BinanceRequestException, BinanceAPIException

r@   zsimple-earn/accountTr  r  r   s     r(   get_simple_earn_accountClient.get_simple_earn_account  s&    0 ''(F ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get Fixed and Activity Project List

https://binance-docs.github.io/apidocs/spot/en/#get-fixed-and-activity-project-list-user_data

:param asset: optional
:type asset: str
:param type: required - "ACTIVITY", "CUSTOMIZED_FIXED"
:type type: str
:param status: optional - "ALL", "SUBSCRIBABLE", "UNSUBSCRIBABLE"; default "ALL"
:type status: str
:param sortBy: optional - "START_TIME", "LOT_SIZE", "INTEREST_RATE", "DURATION"; default "START_TIME"
:type sortBy: str
:param current: optional - Currently querying page. Start from 1. Default:1
:type current: int
:param size: optional - Default:10, Max:100
:type size: int
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python

    [
        {
            "asset": "USDT",
            "displayPriority": 1,
            "duration": 90,
            "interestPerLot": "1.35810000",
            "interestRate": "0.05510000",
            "lotSize": "100.00000000",
            "lotsLowLimit": 1,
            "lotsPurchased": 74155,
            "lotsUpLimit": 80000,
            "maxLotsPerUser": 2000,
            "needKyc": False,
            "projectId": "CUSDT90DAYSS001",
            "projectName": "USDT",
            "status": "PURCHASING",
            "type": "CUSTOMIZED_FIXED",
            "withAreaLimitation": False
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

r@   zlending/project/listTr  r  r   s     r(   get_fixed_activity_project_list&Client.get_fixed_activity_project_list  s'    ` '')$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )zChange Fixed/Activity Position to Daily Position

https://binance-docs.github.io/apidocs/spot/en/#change-fixed-activity-position-to-daily-position-user_data

r   zlending/positionChangedTr  r  r   s     r(   'change_fixed_activity_to_daily_position.Client.change_fixed_activity_to_daily_position  s&     ''-d ( 
 	
r*   c                 &    U R                  SSSUS9$ )znGet Staking Product List

https://binance-docs.github.io/apidocs/spot/en/#get-staking-product-list-user_data

r@   zstaking/productListTr  r  r   s     r(   get_staking_product_listClient.get_staking_product_list+  s&     ''(F ( 
 	
r*   c                 &    U R                  SSSUS9$ )znPurchase Staking Product

https://binance-docs.github.io/apidocs/spot/en/#purchase-staking-product-user_data

r   zstaking/purchaseTr  r  r   s     r(   purchase_staking_productClient.purchase_staking_product5  s&     ''&t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )zjRedeem Staking Product

https://binance-docs.github.io/apidocs/spot/en/#redeem-staking-product-user_data

r   zstaking/redeemTr  r  r   s     r(   redeem_staking_productClient.redeem_staking_product?  s&     ''$T ( 
 	
r*   c                 &    U R                  SSSUS9$ )zvGet Staking Product Position

https://binance-docs.github.io/apidocs/spot/en/#get-staking-product-position-user_data

r@   zstaking/positionTr  r  r   s     r(   get_staking_positionClient.get_staking_positionI  s&     ''%d ( 
 	
r*   c                 &    U R                  SSSUS9$ )zmGet Staking Purchase History

https://binance-docs.github.io/apidocs/spot/en/#get-staking-history-user_data

r@   zstaking/purchaseRecordTr  r  r   s     r(   get_staking_purchase_history#Client.get_staking_purchase_historyS  s&     ''+Dv ( 
 	
r*   c                 &    U R                  SSSUS9$ )zSet Auto Staking on Locked Staking or Locked DeFi Staking

https://binance-docs.github.io/apidocs/spot/en/#set-auto-staking-user_data

r   zstaking/setAutoStakingTr  r  r   s     r(   set_auto_stakingClient.set_auto_staking]  s&     '',T ( 
 	
r*   c                 &    U R                  SSSUS9$ )zGet Personal Left Quota of Staking Product

https://binance-docs.github.io/apidocs/spot/en/#get-personal-left-quota-of-staking-product-user_data

r@   zstaking/personalLeftQuotaTr  r  r   s     r(   get_personal_left_quotaClient.get_personal_left_quotag  s&     ''.t& ( 
 	
r*   c                 T    U R                   S:X  d   S5       eU R                  SSSUS9$ )zsGet staking information for a supported asset (or assets)

https://docs.binance.us/#get-staking-asset-information

r  %Endpoint only available on binance.usr@   zstaking/assetTr   r  r   s     r(   get_staking_asset_usClient.get_staking_asset_uss  s6     xx4H!HH''6'RRr*   c                 T    U R                   S:X  d   S5       eU R                  SSSUS9$ )z@Stake a supported asset.

https://docs.binance.us/#stake-asset

r  r  r   zstaking/stakeTr   r  r   s     r(   stake_asset_usClient.stake_asset_us|  s6     xx4H!HH''F'SSr*   c                 T    U R                   S:X  d   S5       eU R                  SSSUS9$ )z@Unstake a staked asset

https://docs.binance.us/#unstake-asset

r  r  r   zstaking/unstakeTr   r  r   s     r(   unstake_asset_usClient.unstake_asset_us  s7     xx4H!HH''0A4f'UUr*   c                 T    U R                   S:X  d   S5       eU R                  SSSUS9$ )zCGet staking balance

https://docs.binance.us/#get-staking-balance

r  r  r@   zstaking/stakingBalanceTr   r  r   s     r(   get_staking_balance_usClient.get_staking_balance_us  s>     xx4H!HH''+T ( 
 	
r*   c                 T    U R                   S:X  d   S5       eU R                  SSSUS9$ )zCGet staking history

https://docs.binance.us/#get-staking-history

r  r  r@   zstaking/historyTr   r  r   s     r(   get_staking_history_usClient.get_staking_history_us  s7     xx4H!HH''/@$V'TTr*   c                 T    U R                   S:X  d   S5       eU R                  SSSUS9$ )zGet staking rewards history for an asset(or assets) within a given time range.

https://docs.binance.us/#get-staking-rewards-history

r  r  r@   zstaking/stakingRewardsHistoryTr   r  r   s     r(   get_staking_rewards_history_us%Client.get_staking_rewards_history_us  s>     xx4H!HH''2Dv ( 
 	
r*   c                 &    U R                  SSSUS9$ )ab  Query Sub-account List.

https://developers.binance.com/docs/sub_account/account-management/Query-Sub-account-List

:param email: optional - Sub-account email
:type email: str
:param isFreeze: optional
:type isFreeze: str
:param page: optional - Default value: 1
:type page: int
:param limit: optional - Default value: 1, Max value: 200
:type limit: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "subAccounts":[
            {
                "email":"testsub@gmail.com",
                "isFreeze":false,
                "createTime":1544433328000
            },
            {
                "email":"virtual@oxebmvfonoemail.com",
                "isFreeze":false,
                "createTime":1544433328000
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zsub-account/listTr   r  r   s     r(   get_sub_account_listClient.get_sub_account_list  s     L ''/A4f'UUr*   c                 &    U R                  SSSUS9$ )aH  Query Sub-account Transfer History.

https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Spot-Asset-Transfer-History

:param fromEmail: optional
:type fromEmail: str
:param toEmail: optional
:type toEmail: str
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param page: optional - Default value: 1
:type page: int
:param limit: optional - Default value: 500
:type limit: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    [
        {
            "from":"aaa@test.com",
            "to":"bbb@test.com",
            "asset":"BTC",
            "qty":"10",
            "status": "SUCCESS",
            "tranId": 6489943656,
            "time":1544433328000
        },
        {
            "from":"bbb@test.com",
            "to":"ccc@test.com",
            "asset":"ETH",
            "qty":"2",
            "status": "SUCCESS",
            "tranId": 6489938713,
            "time":1544433328000
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

r@   z sub-account/sub/transfer/historyTr   r  r   s     r(    get_sub_account_transfer_history'Client.get_sub_account_transfer_history  s'    ` ''5t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )a.  Query Sub-account Futures Transfer History.

https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Futures-Asset-Transfer-History

:param email: required
:type email: str
:param futuresType: required
:type futuresType: int
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param page: optional
:type page: int
:param limit: optional
:type limit: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "success":true,
        "futuresType": 2,
        "transfers":[
            {
                "from":"aaa@test.com",
                "to":"bbb@test.com",
                "asset":"BTC",
                "qty":"1",
                "time":1544433328000
            },
            {
                "from":"bbb@test.com",
                "to":"ccc@test.com",
                "asset":"ETH",
                "qty":"2",
                "time":1544433328000
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

r@   $sub-account/futures/internalTransferTr   r  r   s     r(   (get_sub_account_futures_transfer_history/Client.get_sub_account_futures_transfer_history  s'    ` ''94f ( 
 	
r*   c                 &    U R                  SSSUS9$ )am  Execute sub-account Futures transfer

https://developers.binance.com/docs/sub_account/asset-management/Sub-account-Futures-Asset-Transfer

:param fromEmail: required - Sender email
:type fromEmail: str
:param toEmail: required - Recipient email
:type toEmail: str
:param futuresType: required
:type futuresType: int
:param asset: required
:type asset: str
:param amount: required
:type amount: decimal
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

   {
        "success":true,
        "txnId":"2934662589"
    }

:raises: BinanceRequestException, BinanceAPIException

r   r  Tr   r  r   s     r(   #create_sub_account_futures_transfer*Client.create_sub_account_futures_transfer?  s&    < '':Dv ( 
 	
r*   c                 (    U R                  SSSUSS9$ )a  Fetch sub-account assets

https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Assets-V4

:param email: required
:type email: str
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "balances":[
            {
                "asset":"ADA",
                "free":10000,
                "locked":0
            },
            {
                "asset":"BNB",
                "free":10003,
                "locked":0
            },
            {
                "asset":"BTC",
                "free":11467.6399,
                "locked":0
            },
            {
                "asset":"ETH",
                "free":10004.995,
                "locked":0
            },
            {
                "asset":"USDT",
                "free":11652.14213,
                "locked":0
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zsub-account/assetsT   r  r  r   s     r(   get_sub_account_assetsClient.get_sub_account_assetsa  s)    ^ '''FA ( 
 	
r*   c                 &    U R                  SSSUS9$ )aS  Query Sub-account Spot Assets Summary (For Master Account)

https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Spot-Assets-Summary

:param email: optional - Sub account email
:type email: str
:param page: optional - default 1
:type page: int
:param size: optional - default 10, max 20
:type size: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

   {
        "totalCount":2,
        "masterAccountTotalAsset": "0.23231201",
        "spotSubUserAssetBtcVoList":[
            {
                "email":"sub123@test.com",
                "totalAsset":"9999.00000000"
            },
            {
                "email":"test456@test.com",
                "totalAsset":"0.00000000"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zsub-account/spotSummaryTr   r  r   s     r(   query_subaccount_spot_summary$Client.query_subaccount_spot_summary  s'    H '',d ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get Sub-account Deposit Address (For Master Account)

https://developers.binance.com/docs/sub_account/asset-management/Get-Sub-account-Deposit-Address

:param email: required - Sub account email
:type email: str
:param coin: required
:type coin: str
:param network: optional
:type network: str
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

   {
        "address":"TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV",
        "coin":"USDT",
        "tag":"",
        "url":"https://tronscan.org/#/address/TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV"
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zcapital/deposit/subAddressTr   r  r   s     r(   get_subaccount_deposit_address%Client.get_subaccount_deposit_address  s&    8 ''/F ( 
 	
r*   c                 &    U R                  SSSUS9$ )aO  Get Sub-account Deposit History (For Master Account)

https://developers.binance.com/docs/sub_account/asset-management/Get-Sub-account-Deposit-History

:param email: required - Sub account email
:type email: str
:param coin: optional
:type coin: str
:param status: optional - (0:pending,6: credited but cannot withdraw, 1:success)
:type status: int
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param limit: optional
:type limit: int
:param offset: optional - default:0
:type offset: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

   [
        {
            "amount":"0.00999800",
            "coin":"PAXG",
            "network":"ETH",
            "status":1,
            "address":"0x788cabe9236ce061e5a892e1a59395a81fc8d62c",
            "addressTag":"",
            "txId":"0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3",
            "insertTime":1599621997000,
            "transferType":0,
            "confirmTimes":"12/12"
        },
        {
            "amount":"0.50000000",
            "coin":"IOTA",
            "network":"IOTA",
            "status":1,
            "address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW",
            "addressTag":"",
            "txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999",
            "insertTime":1599620082000,
            "transferType":0,
            "confirmTimes":"1/1"
        }
   ]

:raises: BinanceRequestException, BinanceAPIException

r@   zcapital/deposit/subHisrecTr   r  r   s     r(   get_subaccount_deposit_history%Client.get_subaccount_deposit_history  s'    p ''.6 ( 
 	
r*   c                 &    U R                  SSSUS9$ )ab  Get Sub-account's Status on Margin/Futures (For Master Account)

https://developers.binance.com/docs/sub_account/account-management/Get-Sub-accounts-Status-on-Margin-Or-Futures

:param email: optional - Sub account email
:type email: str
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

   [
        {
            "email":"123@test.com",      // user email
            "isSubUserEnabled": true,    // true or false
            "isUserActive": true,        // true or false
            "insertTime": 1570791523523  // sub account create time
            "isMarginEnabled": true,     // true or false for margin
            "isFutureEnabled": true      // true or false for futures.
            "mobile": 1570791523523      // user mobile number
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

r@   zsub-account/statusTr   r  r   s     r(   $get_subaccount_futures_margin_status+Client.get_subaccount_futures_margin_status  s     : ''/CTPV'WWr*   c                 &    U R                  SSSUS9$ )a  Enable Margin for Sub-account (For Master Account)

https://binance-docs.github.io/apidocs/spot/en/#enable-margin-for-sub-account-for-master-account

:param email: required - Sub account email
:type email: str
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

   {

        "email":"123@test.com",

        "isMarginEnabled": true

    }

:raises: BinanceRequestException, BinanceAPIException

r   zsub-account/margin/enableTr   r  r   s     r(   enable_subaccount_marginClient.enable_subaccount_margin7  s&    2 ''/F ( 
 	
r*   c                 &    U R                  SSSUS9$ )a>  Get Detail on Sub-account's Margin Account (For Master Account)

https://developers.binance.com/docs/sub_account/asset-management/Get-Detail-on-Sub-accounts-Margin-Account

:param email: required - Sub account email
:type email: str
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
          "email":"123@test.com",
          "marginLevel": "11.64405625",
          "totalAssetOfBtc": "6.82728457",
          "totalLiabilityOfBtc": "0.58633215",
          "totalNetAssetOfBtc": "6.24095242",
          "marginTradeCoeffVo":
                {
                    "forceLiquidationBar": "1.10000000",  // Liquidation margin ratio
                    "marginCallBar": "1.50000000",        // Margin call margin ratio
                    "normalBar": "2.00000000"             // Initial margin ratio
                },
          "marginUserAssetVoList": [
              {
                  "asset": "BTC",
                  "borrowed": "0.00000000",
                  "free": "0.00499500",
                  "interest": "0.00000000",
                  "locked": "0.00000000",
                  "netAsset": "0.00499500"
              },
              {
                  "asset": "BNB",
                  "borrowed": "201.66666672",
                  "free": "2346.50000000",
                  "interest": "0.00000000",
                  "locked": "0.00000000",
                  "netAsset": "2144.83333328"
              },
              {
                  "asset": "ETH",
                  "borrowed": "0.00000000",
                  "free": "0.00000000",
                  "interest": "0.00000000",
                  "locked": "0.00000000",
                  "netAsset": "0.00000000"
              },
              {
                  "asset": "USDT",
                  "borrowed": "0.00000000",
                  "free": "0.00000000",
                  "interest": "0.00000000",
                  "locked": "0.00000000",
                  "netAsset": "0.00000000"
              }
          ]
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zsub-account/margin/accountTr   r  r   s     r(   get_subaccount_margin_details$Client.get_subaccount_margin_detailsT  s'    B ''/F ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get Summary of Sub-account's Margin Account (For Master Account)

https://developers.binance.com/docs/sub_account/asset-management/Get-Summary-of-Sub-accounts-Margin-Account

:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "totalAssetOfBtc": "4.33333333",
        "totalLiabilityOfBtc": "2.11111112",
        "totalNetAssetOfBtc": "2.22222221",
        "subAccountList":[
            {
                "email":"123@test.com",
                "totalAssetOfBtc": "2.11111111",
                "totalLiabilityOfBtc": "1.11111111",
                "totalNetAssetOfBtc": "1.00000000"
            },
            {
                "email":"345@test.com",
                "totalAssetOfBtc": "2.22222222",
                "totalLiabilityOfBtc": "1.00000001",
                "totalNetAssetOfBtc": "1.22222221"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

r@   z!sub-account/margin/accountSummaryTr   r  r   s     r(   get_subaccount_margin_summary$Client.get_subaccount_margin_summary  s'    F ''66 ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Enable Futures for Sub-account (For Master Account)

https://developers.binance.com/docs/sub_account/account-management/Enable-Futures-for-Sub-account

:param email: required - Sub account email
:type email: str
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {

        "email":"123@test.com",

        "isFuturesEnabled": true  // true or false

    }

:raises: BinanceRequestException, BinanceAPIException

r   zsub-account/futures/enableTr   r  r   s     r(   enable_subaccount_futures Client.enable_subaccount_futures  s&    2 ''0$V ( 
 	
r*   c                 (    U R                  SSSUSS9$ )a  Get Detail on Sub-account's Futures Account (For Master Account)

https://developers.binance.com/docs/sub_account/asset-management/Get-Detail-on-Sub-accounts-Futures-Account

:param email: required - Sub account email
:type email: str
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "email": "abc@test.com",
        "asset": "USDT",
        "assets":[
            {
                "asset": "USDT",
                "initialMargin": "0.00000000",
                "maintenanceMargin": "0.00000000",
                "marginBalance": "0.88308000",
                "maxWithdrawAmount": "0.88308000",
                "openOrderInitialMargin": "0.00000000",
                "positionInitialMargin": "0.00000000",
                "unrealizedProfit": "0.00000000",
                "walletBalance": "0.88308000"
             }
        ],
        "canDeposit": true,
        "canTrade": true,
        "canWithdraw": true,
        "feeTier": 2,
        "maxWithdrawAmount": "0.88308000",
        "totalInitialMargin": "0.00000000",
        "totalMaintenanceMargin": "0.00000000",
        "totalMarginBalance": "0.88308000",
        "totalOpenOrderInitialMargin": "0.00000000",
        "totalPositionInitialMargin": "0.00000000",
        "totalUnrealizedProfit": "0.00000000",
        "totalWalletBalance": "0.88308000",
        "updateTime": 1576756674610
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zsub-account/futures/accountTr<  r  r  r   s     r(   get_subaccount_futures_details%Client.get_subaccount_futures_details  s)    ` ''0$VQ ( 
 	
r*   c                 (    U R                  SSSUSS9$ )a  Get Summary of Sub-account's Futures Account (For Master Account)

https://developers.binance.com/docs/sub_account/asset-management/Get-Summary-of-Sub-accounts-Futures-Account-V2

:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "totalInitialMargin": "9.83137400",
        "totalMaintenanceMargin": "0.41568700",
        "totalMarginBalance": "23.03235621",
        "totalOpenOrderInitialMargin": "9.00000000",
        "totalPositionInitialMargin": "0.83137400",
        "totalUnrealizedProfit": "0.03219710",
        "totalWalletBalance": "22.15879444",
        "asset": "USDT",
        "subAccountList":[
            {
                "email": "123@test.com",
                "totalInitialMargin": "9.00000000",
                "totalMaintenanceMargin": "0.00000000",
                "totalMarginBalance": "22.12659734",
                "totalOpenOrderInitialMargin": "9.00000000",
                "totalPositionInitialMargin": "0.00000000",
                "totalUnrealizedProfit": "0.00000000",
                "totalWalletBalance": "22.12659734",
                "asset": "USDT"
            },
            {
                "email": "345@test.com",
                "totalInitialMargin": "0.83137400",
                "totalMaintenanceMargin": "0.41568700",
                "totalMarginBalance": "0.90575887",
                "totalOpenOrderInitialMargin": "0.00000000",
                "totalPositionInitialMargin": "0.83137400",
                "totalUnrealizedProfit": "0.03219710",
                "totalWalletBalance": "0.87356177",
                "asset": "USDT"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

r@   z"sub-account/futures/accountSummaryTr<  r  r  r   s     r(   get_subaccount_futures_summary%Client.get_subaccount_futures_summary  s*    d ''7FTU ( 
 	
r*   c                 (    U R                  SSSUSS9$ )a?  Get Futures Position-Risk of Sub-account (For Master Account)

https://developers.binance.com/docs/sub_account/account-management/Get-Futures-Position-Risk-of-Sub-account-V2

:param email: required - Sub account email
:type email: str
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    [
        {
            "entryPrice": "9975.12000",
            "leverage": "50",              // current initial leverage
            "maxNotional": "1000000",      // notional value limit of current initial leverage
            "liquidationPrice": "7963.54",
            "markPrice": "9973.50770517",
            "positionAmount": "0.010",
            "symbol": "BTCUSDT",
            "unrealizedProfit": "-0.01612295"
        }
    ]

:raises: BinanceRequestException, BinanceAPIException

r@   z sub-account/futures/positionRiskTr<  r  r  r   s     r(   #get_subaccount_futures_positionrisk*Client.get_subaccount_futures_positionriskG  s)    < ''5t&RS ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Futures Transfer for Sub-account (For Master Account)

https://developers.binance.com/docs/sub_account/asset-management

:param email: required - Sub account email
:type email: str
:param asset: required - The asset being transferred, e.g., USDT
:type asset: str
:param amount: required - The amount to be transferred
:type amount: float
:param type: required - 1: transfer from subaccount's spot account to its USDT-margined futures account
                        2: transfer from subaccount's USDT-margined futures account to its spot account
                        3: transfer from subaccount's spot account to its COIN-margined futures account
                        4: transfer from subaccount's COIN-margined futures account to its spot account
:type type: int

:returns: API response

.. code-block:: python

    {
        "txnId":"2966662589"
    }

:raises: BinanceRequestException, BinanceAPIException

r   zsub-account/futures/transferTr   r  r   s     r(    make_subaccount_futures_transfer'Client.make_subaccount_futures_transferi  s&    8 ''2Dv ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Margin Transfer for Sub-account (For Master Account)

https://developers.binance.com/docs/sub_account/asset-management/Margin-Transfer-for-Sub-account

:param email: required - Sub account email
:type email: str
:param asset: required - The asset being transferred, e.g., USDT
:type asset: str
:param amount: required - The amount to be transferred
:type amount: float
:param type: required - 1: transfer from subaccount's spot account to margin account
                        2: transfer from subaccount's margin account to its spot account
:type type: int

:returns: API response

.. code-block:: python

    {
        "txnId":"2966662589"
    }

:raises: BinanceRequestException, BinanceAPIException

r   zsub-account/margin/transferTr   r  r   s     r(   make_subaccount_margin_transfer&Client.make_subaccount_margin_transfer  s&    4 ''14f ( 
 	
r*   c                 &    U R                  SSSUS9$ )aD  Transfer to Sub-account of Same Master (For Sub-account)

https://developers.binance.com/docs/sub_account/asset-management/Transfer-to-Sub-account-of-Same-Master

:param toEmail: required - Sub account email
:type toEmail: str
:param asset: required - The asset being transferred, e.g., USDT
:type asset: str
:param amount: required - The amount to be transferred
:type amount: float
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "txnId":"2966662589"
    }

:raises: BinanceRequestException, BinanceAPIException

r   zsub-account/transfer/subToSubTr   r  r   s     r(   &make_subaccount_to_subaccount_transfer-Client.make_subaccount_to_subaccount_transfer  s&    2 ''3T ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Transfer to Master (For Sub-account)

https://developers.binance.com/docs/sub_account/asset-management/Transfer-to-Master

:param asset: required - The asset being transferred, e.g., USDT
:type asset: str
:param amount: required - The amount to be transferred
:type amount: float
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "txnId":"2966662589"
    }

:raises: BinanceRequestException, BinanceAPIException

r   z sub-account/transfer/subToMasterTr   r  r   s     r(   "make_subaccount_to_master_transfer)Client.make_subaccount_to_master_transfer  s&    . ''66 ( 
 	
r*   c                 &    U R                  SSSUS9$ )a]  Sub-account Transfer History (For Sub-account)

https://developers.binance.com/docs/sub_account/asset-management/Sub-account-Transfer-History

:param asset: required - The asset being transferred, e.g., USDT
:type asset: str
:param type: optional - 1: transfer in, 2: transfer out
:type type: int
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param limit: optional - Default 500
:type limit: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    [
      {
        "counterParty":"master",
        "email":"master@test.com",
        "type":1,  // 1 for transfer in, 2 for transfer out
        "asset":"BTC",
        "qty":"1",
        "status":"SUCCESS",
        "tranId":11798835829,
        "time":1544433325000
      },
      {
        "counterParty":"subAccount",
        "email":"sub2@test.com",
        "type":2,
        "asset":"ETH",
        "qty":"2",
        "status":"SUCCESS",
        "tranId":11798829519,
        "time":1544433326000
      }
    ]

:raises: BinanceRequestException, BinanceAPIException

r@   z#sub-account/transfer/subUserHistoryTr   r  r   s     r(   get_subaccount_transfer_history&Client.get_subaccount_transfer_history  s'    ` ''8$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Universal Transfer (For Master Account)

https://developers.binance.com/docs/sub_account/asset-management/Universal-Transfer

:param fromEmail: optional
:type fromEmail: str
:param toEmail: optional
:type toEmail: str
:param fromAccountType: required - "SPOT","USDT_FUTURE","COIN_FUTURE"
:type fromAccountType: str
:param toAccountType: required - "SPOT","USDT_FUTURE","COIN_FUTURE"
:type toAccountType: str
:param asset: required - The asset being transferred, e.g., USDT
:type asset: str
:param amount: required
:type amount: float
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "tranId":11945860693
    }

:raises: BinanceRequestException, BinanceAPIException

r   sub-account/universalTransferTr   r  r   s     r(   "make_subaccount_universal_transfer)Client.make_subaccount_universal_transfer  s&    > ''3T ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Universal Transfer (For Master Account)

https://developers.binance.com/docs/sub_account/asset-management/Query-Universal-Transfer-History

:param fromEmail: optional
:type fromEmail: str
:param toEmail: optional
:type toEmail: str
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param page: optional
:type page: int
:param limit: optional
:type limit: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    [
      {
        "tranId":11945860693,
        "fromEmail":"master@test.com",
        "toEmail":"subaccount1@test.com",
        "asset":"BTC",
        "amount":"0.1",
        "fromAccountType":"SPOT",
        "toAccountType":"COIN_FUTURE",
        "status":"SUCCESS",
        "createTimeStamp":1544433325000
      },
      {
        "tranId":11945857955,
        "fromEmail":"master@test.com",
        "toEmail":"subaccount2@test.com",
        "asset":"ETH",
        "amount":"0.2",
        "fromAccountType":"SPOT",
        "toAccountType":"USDT_FUTURE",
        "status":"SUCCESS",
        "createTimeStamp":1544433326000
      }
    ]

:raises: BinanceRequestException, BinanceAPIException

r@   rA  Tr   r  r   s     r(   get_universal_transfer_history%Client.get_universal_transfer_history6  s'    h ''2Dv ( 
 	
r*   c                 &    U R                  SS5      $ )zTest connectivity to the Rest API

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api

r@   r!   rb   r   s    r(   futures_pingClient.futures_pingp       ((77r*   c                 &    U R                  SS5      $ )zTest connectivity to the Rest API and get the current server time.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time

r@   r   rH  r   s    r(   futures_timeClient.futures_timex  rK  r*   c                 &    U R                  SS5      $ )zCurrent exchange trading rules and symbol information

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information

r@   r   rH  r   s    r(   futures_exchange_infoClient.futures_exchange_info       ((??r*   c                 $    U R                  SSUS9$ )zGet the Order Book for the market

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Order-Book

r@   r   r   rH  r   s     r(   futures_order_bookClient.futures_order_book  s     ((f(EEr*   c                 $    U R                  SSUS9$ )zGet recent trades (up to last 500).

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List

r@   r   r   rH  r   s     r(   futures_recent_tradesClient.futures_recent_trades       ((v(FFr*   c                 $    U R                  SSUS9$ )zGet older market historical trades.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup

r@   r   r   rH  r   s     r(   futures_historical_trades Client.futures_historical_trades       ((0B(PPr*   c                 $    U R                  SSUS9$ )a
  Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same
price will have the quantity aggregated.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List

r@   r   r   rH  r   s     r(   futures_aggregate_tradesClient.futures_aggregate_trades  s     ((&(IIr*   c                 $    U R                  SSUS9$ )zKline/candlestick bars for a symbol. Klines are uniquely identified by their open time.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data

r@   r   r   rH  r   s     r(   r   Client.futures_klines  rY  r*   c                 $    U R                  SSUS9$ )zKline/candlestick bars for the mark price of a symbol. Klines are uniquely identified by their open time.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data

r@   markPriceKlinesr   rH  r   s     r(   r    Client.futures_mark_price_klines  s     ((0A(OOr*   c                 $    U R                  SSUS9$ )zKline/candlestick bars for the index price of a symbol. Klines are uniquely identified by their open time.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data

r@   indexPriceKlinesr   rH  r   s     r(   r   !Client.futures_index_price_klines  r]  r*   c                 $    U R                  SSUS9$ )zPremium index kline bars of a symbol.l. Klines are uniquely identified by their open time.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data

r@   premiumIndexKlinesr   rH  r   s     r(   futures_premium_index_klines#Client.futures_premium_index_klines  s     ((0D6(RRr*   c                 $    U R                  SSUS9$ )zKline/candlestick bars for a specific contract type. Klines are uniquely identified by their open time.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data

r@   continuousKlinesr   rH  r   s     r(   futures_continuous_klines Client.futures_continuous_klines  r]  r*   r   c           	      F    U R                  UUUUU[        R                  S9$ )a  Get historical futures klines from Binance

:param symbol: Name of symbol pair e.g. BNBBTC
:type symbol: str
:param interval: Binance Kline interval
:type interval: str
:param start_str: Start date string in UTC format or timestamp in milliseconds
:type start_str: str|int
:param end_str: optional - end date string in UTC format or timestamp in milliseconds (default will fetch everything up to now)
:type end_str: str|int
:param limit: Default None (fetches full range in batches of max 1000 per request). To limit the number of rows, pass an integer.
:type limit: int

:return: list of OHLCV values (Open time, Open, High, Low, Close, Volume, Close time, Quote asset volume, Number of trades, Taker buy base asset volume, Taker buy quote asset volume, Ignore)

r   r   r   )r  r   r   r&   r   r   r   r   r   s         r(   futures_historical_klines Client.futures_historical_klines  s4    & &&,44 ' 
 	
r*   c           	      F    U R                  UUUUU[        R                  S9$ )a  Get historical futures mark price klines from Binance

:param symbol: Name of symbol pair e.g. BNBBTC
:type symbol: str
:param interval: Binance Kline interval
:type interval: str
:param start_str: Start date string in UTC format or timestamp in milliseconds
:type start_str: str|int
:param end_str: optional - end date string in UTC format or timestamp in milliseconds (default will fetch everything up to now)
:type end_str: str|int
:param limit: Default None (fetches full range in batches of max 1000 per request). To limit the number of rows, pass an integer.
:type limit: int

:return: list of OHLCV values (Open time, Open, High, Low, Close, Volume, Close time, Quote asset volume, Number of trades, Taker buy base asset volume, Taker buy quote asset volume, Ignore)

rr  )r  r   r   rs  s         r(   $futures_historical_mark_price_klines+Client.futures_historical_mark_price_klines  s4    & &&,?? ' 
 	
r*   c                 D    U R                  UUUU[        R                  S9$ )a  Get historical futures klines generator from Binance

:param symbol: Name of symbol pair e.g. BNBBTC
:type symbol: str
:param interval: Binance Kline interval
:type interval: str
:param start_str: Start date string in UTC format or timestamp in milliseconds
:type start_str: str|int
:param end_str: optional - end date string in UTC format or timestamp in milliseconds (default will fetch everything up to now)
:type end_str: str|int

:return: generator of OHLCV values

)r   r   )r  r   r   )r&   r   r   r   r   s        r(   #futures_historical_klines_generator*Client.futures_historical_klines_generator	  s1    $ 00,44 1 
 	
r*   c                 $    U R                  SSUS9$ )zGet Mark Price and Funding Rate

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price

r@   premiumIndexr   rH  r   s     r(   futures_mark_priceClient.futures_mark_price#       ((V(LLr*   c                 $    U R                  SSUS9$ )zGet funding rate history

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History

r@   fundingRater   rH  r   s     r(   futures_funding_rateClient.futures_funding_rate+       ((F(KKr*   c                 $    U R                  SSUS9$ )zGet present long to short ratio for top accounts of a specific symbol.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio
r@   topLongShortAccountRatior   rg   r   s     r(   #futures_top_longshort_account_ratio*Client.futures_top_longshort_account_ratio3  s$    
 ---F . 
 	
r*   c                 $    U R                  SSUS9$ )zGet present long to short ratio for top positions of a specific symbol.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio
r@   topLongShortPositionRatior   r  r   s     r(   $futures_top_longshort_position_ratio+Client.futures_top_longshort_position_ratio<  s$    
 --.V . 
 	
r*   c                 $    U R                  SSUS9$ )zGet present global long to short ratio of a specific symbol.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Long-Short-Ratio
r@   globalLongShortAccountRatior   r  r   s     r(   futures_global_longshort_ratio%Client.futures_global_longshort_ratioE  s$    
 --0v . 
 	
r*   c                 $    U R                  SSUS9$ )zGet taker buy to sell volume ratio of a specific symbol

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Taker-BuySell-Volume
r@   takerlongshortRatior   r  r   s     r(   futures_taker_longshort_ratio$Client.futures_taker_longshort_ratioN  s$    
 --(v . 
 	
r*   c                 $    U R                  SSUS9$ )zGet future basis of a specific symbol

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Basis
r@   basisr   r  r   s     r(   futures_basisClient.futures_basisW  s#    
 --7 . 
 	
r*   c                 $    U R                  SSUS9$ )z24 hour rolling window price change statistics.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics

r@   r  r   rH  r   s     r(   futures_tickerClient.futures_ticker`  r  r*   c                 $    U R                  SSUS9$ )zLatest price for a symbol or symbols.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Price-Ticker

r@   r   r   rH  r   s     r(   futures_symbol_tickerClient.futures_symbol_tickerh  r  r*   c                 $    U R                  SSUS9$ )zBest price/qty on the order book for a symbol or symbols.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker

r@   r   r   rH  r   s     r(   futures_orderbook_tickerClient.futures_orderbook_tickerp  s     ((0C&(QQr*   c                 $    U R                  SSUS9$ )zGet latest price for a symbol or symbols

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Delivery-Price

r@   zdelivery-pricer   r  r   s     r(   futures_delivery_priceClient.futures_delivery_pricex  s     --e5EF-SSr*   c                 $    U R                  SSUS9$ )zGet index price constituents

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Constituents

r@   constituentsr   rH  r   s     r(    futures_index_price_constituents'Client.futures_index_price_constituents  r  r*   c                 $    U R                  SSUS9$ )zGet Insurance Fund Balance Snapshot

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Insurance-Fund-Balance

r@   insuranceBalancer   rH  r   s     r(   'futures_insurance_fund_balance_snapshot.Client.futures_insurance_fund_balance_snapshot  r]  r*   c                 &    U R                  SSSUS9$ )zGet all liquidation orders

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders

r@   forceOrdersTr  rH  r   s     r(   futures_liquidation_orders!Client.futures_liquidation_orders       ((dQW(XXr*   c                 &    U R                  SSSUS9$ )aG  Get quantitative trading rules for order placement, such as Unfilled Ratio (UFR), Good-Til-Canceled Ratio (GCR),
Immediate-or-Cancel (IOC) & Fill-or-Kill (FOK) Expire Ratio (IFER), among others.
https://www.binance.com/en/support/faq/binance-futures-trading-quantitative-rules-4f462ebe6ff445d4a170be7d9e897272

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators

:param symbol: optional
:type symbol: str

:returns: API response

.. code-block:: python

    {
        "indicators": { // indicator: quantitative rules indicators, value: user's indicators value, triggerValue: trigger indicator value threshold of quantitative rules.
            "BTCUSDT": [
                {
                    "isLocked": true,
                    "plannedRecoverTime": 1545741270000,
                    "indicator": "UFR",  // Unfilled Ratio (UFR)
                    "value": 0.05,  // Current value
                    "triggerValue": 0.995  // Trigger value
                },
                {
                    "isLocked": true,
                    "plannedRecoverTime": 1545741270000,
                    "indicator": "IFER",  // IOC/FOK Expiration Ratio (IFER)
                    "value": 0.99,  // Current value
                    "triggerValue": 0.99  // Trigger value
                },
                {
                    "isLocked": true,
                    "plannedRecoverTime": 1545741270000,
                    "indicator": "GCR",  // GTC Cancellation Ratio (GCR)
                    "value": 0.99,  // Current value
                    "triggerValue": 0.99  // Trigger value
                },
                {
                    "isLocked": true,
                    "plannedRecoverTime": 1545741270000,
                    "indicator": "DR",  // Dust Ratio (DR)
                    "value": 0.99,  // Current value
                    "triggerValue": 0.99  // Trigger value
                }
            ],
            "ETHUSDT": [
                {
                    "isLocked": true,
                    "plannedRecoverTime": 1545741270000,
                    "indicator": "UFR",
                    "value": 0.05,
                    "triggerValue": 0.995
                },
                {
                    "isLocked": true,
                    "plannedRecoverTime": 1545741270000,
                    "indicator": "IFER",
                    "value": 0.99,
                    "triggerValue": 0.99
                },
                {
                    "isLocked": true,
                    "plannedRecoverTime": 1545741270000,
                    "indicator": "GCR",
                    "value": 0.99,
                    "triggerValue": 0.99
                }
                {
                    "isLocked": true,
                    "plannedRecoverTime": 1545741270000,
                    "indicator": "DR",
                    "value": 0.99,
                    "triggerValue": 0.99
                }
            ]
        },
        "updateTime": 1545741270000
    }

:raises: BinanceRequestException, BinanceAPIException

r@   apiTradingStatusTr  rH  r   s     r(   futures_api_trading_status!Client.futures_api_trading_status  s'    f ((%d ) 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get Futures commission rate

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate

:param symbol: required
:type symbol: str

:returns: API response

.. code-block:: python

    {
        "symbol": "BTCUSDT",
        "makerCommissionRate": "0.0002",  // 0.02%
        "takerCommissionRate": "0.0004"   // 0.04%
    }

:raises: BinanceRequestException, BinanceAPIException

r@   commissionRateTr  rH  r   s     r(   futures_commission_rateClient.futures_commission_rate  s&    * ((#Dv ) 
 	
r*   c                 &    U R                  SSSUS9$ )zGet Position ADL Quantile Estimate

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation

r@   adlQuantileTr  rH  r   s     r(   futures_adl_quantile_estimate$Client.futures_adl_quantile_estimate  r  r*   c                 $    U R                  SSUS9$ )zGet present open interest of a specific symbol.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest

r@   openInterestr   rH  r   s     r(   futures_open_interestClient.futures_open_interest  r  r*   c                 $    U R                  SSUS9$ )zGet index_info

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information

r@   	indexInfor   rH  r   s     r(   futures_index_infoClient.futures_index_info  s     ((&(IIr*   c                 $    U R                  SSUS9$ )zGet open interest statistics of a specific symbol.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest-Statistics

r@   openInterestHistr   r  r   s     r(   futures_open_interest_hist!Client.futures_open_interest_hist        --e5Gf-UUr*   c                 &    U R                  SSSUS9$ )zNotional and Leverage Brackets

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets

r@   leverageBracketTr   rH  r   s     r(   futures_leverage_bracketClient.futures_leverage_bracket(  s     ((0A4f(UUr*   c                 &    U R                  SSSUS9$ )zExecute transfer between spot account and futures account.

https://binance-docs.github.io/apidocs/futures/en/#new-future-account-transfer

r   futures/transferTr   r  r   s     r(   futures_account_transferClient.futures_account_transfer0  s     ''0BDv'VVr*   c                 &    U R                  SSSUS9$ )zGet future account transaction history list

https://binance-docs.github.io/apidocs/futures/en/#get-future-account-transaction-history-list-user_data

r@   r  Tr   r  r   s     r(   transfer_historyClient.transfer_history8  s     ''/A4f'UUr*   c                 &    U R                  SSSUS9$ )Nr@   zfutures/loan/borrow/historyTr   r  r   s     r(   futures_loan_borrow_history"Client.futures_loan_borrow_history@  s$    ''0$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )Nr@   zfutures/loan/repay/historyTr   r  r   s     r(   futures_loan_repay_history!Client.futures_loan_repay_historyE  s$    ''/F ( 
 	
r*   c                 (    U R                  SSSUSS9$ )Nr@   zfutures/loan/walletTr<  r  r  r   s     r(   futures_loan_walletClient.futures_loan_walletJ  s&    ''($VQ ( 
 	
r*   c                 &    U R                  SSSUS9$ )Nr@   z%futures/loan/adjustCollateral/historyTr   r  r   s     r(   'futures_cross_collateral_adjust_history.Client.futures_cross_collateral_adjust_historyO  s$    '':Dv ( 
 	
r*   c                 &    U R                  SSSUS9$ )Nr@   zfutures/loan/liquidationHistoryTr   r  r   s     r(   ,futures_cross_collateral_liquidation_history3Client.futures_cross_collateral_liquidation_historyT  s$    ''4d ( 
 	
r*   c                 &    U R                  SSSUS9$ )Nr@   zfutures/loan/interestHistoryTr   r  r   s     r(   futures_loan_interest_history$Client.futures_loan_interest_historyY  s$    ''14f ( 
 	
r*   c                 r    SU;  a   U R                   U R                  5       -   US'   U R                  SSSUS9$ )zlSend in a new order.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api

r+  r   r,  Tr   CONTRACT_ORDER_PREFIXr/  rb   r   s     r(   futures_create_orderClient.futures_create_order^  sB     V+)-)C)Cdkkm)SF%&(($V(LLr*   c                 |    SU;  a   U R                   U R                  5       -   US'   SUS'   U R                  SSSUS9$ )zzSend in a new futures limit order.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api

r+  LIMITr4  r   r,  Tr   r  r   s     r(   futures_limit_orderClient.futures_limit_orderh  sK     V+)-)C)Cdkkm)SF%& v(($V(LLr*   c                 |    SU;  a   U R                   U R                  5       -   US'   SUS'   U R                  SSSUS9$ )z{Send in a new futures market order.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api

r+  MARKETr4  r   r,  Tr   r  r   s     r(   futures_market_orderClient.futures_market_orders  sK     V+)-)C)Cdkkm)SF%&!v(($V(LLr*   c                     SU;  a   U R                   U R                  5       -   US'   SUS'   SUS'   U R                  SSSUS	9$ )
z~Send in a new futures limit buy order.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api

r+  BUYr;  r  r4  r   r,  Tr   r  r   s     r(   futures_limit_buy_orderClient.futures_limit_buy_order  sT     V+)-)C)Cdkkm)SF%&v v(($V(LLr*   c                     SU;  a   U R                   U R                  5       -   US'   SUS'   SUS'   U R                  SSSUS	9$ )
zSend in a new futures limit sell order.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api

r+  SELLr;  r  r4  r   r,  Tr   r  r   s     r(   futures_limit_sell_orderClient.futures_limit_sell_order  sT     V+)-)C)Cdkkm)SF%&v v(($V(LLr*   c                     SU;  a   U R                   U R                  5       -   US'   SUS'   SUS'   U R                  SSSUS	9$ )
zSend in a new futures market buy order.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api

r+  r  r;  r  r4  r   r,  Tr   r  r   s     r(   futures_market_buy_orderClient.futures_market_buy_order  sT     V+)-)C)Cdkkm)SF%&v!v(($V(LLr*   c                     SU;  a   U R                   U R                  5       -   US'   SUS'   SUS'   U R                  SSSUS	9$ )
zSend in a new futures market sell order.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api

r+  r  r;  r  r4  r   r,  Tr   r  r   s     r(   futures_market_sell_order Client.futures_market_sell_order  sT     V+)-)C)Cdkkm)SF%&v!v(($V(LLr*   c                 &    U R                  SSSUS9$ )zModify an existing order. Currently only LIMIT order modification is supported.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order

r   r,  Tr   rH  r   s     r(   futures_modify_orderClient.futures_modify_order       ((F(KKr*   c                 &    U R                  SSSUS9$ )zTesting order request, this order will not be submitted to matching engine

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/New-Order-Test

r   rX  Tr   rH  r   s     r(   futures_create_test_order Client.futures_create_test_order       ((t&(QQr*   c                     US    H+  nSU;  d  M  U R                   U R                  5       -   US'   M-     [        U5      nUR                  SS5      nUSS US'   U R	                  SSSUSS	9$ )
a(  Send in new orders.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders

To avoid modifying the existing signature generation and parameter order logic,
the url encoding is done on the special query param, batchOrders, in the early stage.

batchOrdersr+  %27%22   Nr   T)r<   r7   )r  r/  r	   replacerb   r&   r   r,  query_strings       r(   futures_place_batch_order Client.futures_place_batch_order  s     M*E!.,0,F,F,V() + !(#++E59 ,RS 1}((M4f4 ) 
 	
r*   c                 &    U R                  SSSUS9$ )z|Check an order's status.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Order

r@   r,  Tr   rH  r   s     r(   futures_get_orderClient.futures_get_order  r  r*   c                 &    U R                  SSSUS9$ )zGet all open orders on a symbol.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders

r@   rh  Tr   rH  r   s     r(   futures_get_open_ordersClient.futures_get_open_orders       ((d(PPr*   c                 &    U R                  SSSUS9$ )zGet all futures account orders; active, canceled, or filled.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/All-Orders

r@   r`  Tr   rH  r   s     r(   futures_get_all_ordersClient.futures_get_all_orders  s     ((T(OOr*   c                 &    U R                  SSSUS9$ )zCancel an active futures order.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order

r   r,  Tr   rH  r   s     r(   futures_cancel_orderClient.futures_cancel_order  s     ((7Dv(NNr*   c                 &    U R                  SSSUS9$ )zCancel all open futures orders

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders

r   allOpenOrdersTr   rH  r   s     r(   futures_cancel_all_open_orders%Client.futures_cancel_all_open_orders  s     ((?Dv(VVr*   c                     UR                  S5      (       a  [        [        US   5      5      US'   UR                  S5      (       a  [        [        US   5      5      US'   U R                  SSSSUS9$ )zCancel multiple futures orders

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders

orderidlistorigclientorderidlistr   r  T)r7   r<   )r@   r
   r   rb   r   s     r(   futures_cancel_ordersClient.futures_cancel_orders  s     ::m$$$)*6-+@A%F=! ::-...3*62I+JK/F*+ ((mT6 ) 
 	
r*   c                 &    U R                  SSSUS9$ )a  Cancel all open orders of the specified symbol at the end of the specified countdown.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders

:param symbol: required
:type symbol: str
:param countdownTime: required
:type countdownTime: int
:param recvWindow: optional - the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python
{
    "symbol": "BTCUSDT",
    "countdownTime": "100000"
}

r   countdownCancelAllTr   rH  r   s     r(   futures_countdown_cancel_all#Client.futures_countdown_cancel_all  s&    * ((($V ) 
 	
r*   c                 (    U R                  SSSSUS9$ )zGet futures account balance

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3

r@   balanceTr  r   rH  r   s     r(   futures_account_balanceClient.futures_account_balance%        ((	4(PPr*   c                 (    U R                  SSSSUS9$ )zGet current account information.

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2

r@   rv  Tr<  r   rH  r   s     r(   futures_accountClient.futures_account-  r5  r*   c                 &    U R                  SSSUS9$ )zChange user's initial leverage of specific symbol market

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage

r   leverageTr   rH  r   s     r(   futures_change_leverageClient.futures_change_leverage5  s     ((T(OOr*   c                 &    U R                  SSSUS9$ )zChange the margin type for a symbol

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type

r   
marginTypeTr   rH  r   s     r(   futures_change_margin_type!Client.futures_change_margin_type=  r  r*   c                 &    U R                  SSSUS9$ )zChange the position margin for a symbol

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin

r   positionMarginTr   rH  r   s     r(   futures_change_position_margin%Client.futures_change_position_marginE  s     ((1A4f(UUr*   c                 &    U R                  SSSUS9$ )zGet position margin change history

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History

r@   positionMargin/historyTr   rH  r   s     r(   futures_position_margin_history&Client.futures_position_margin_historyM  s&     ((+T ) 
 	
r*   c                 (    U R                  SSSSUS9$ )zGet position information

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-Information-V3

r@   positionRiskTr  r   rH  r   s     r(   futures_position_information#Client.futures_position_informationW  s      ((af(UUr*   c                 &    U R                  SSSUS9$ )zGet trades for the authenticated account and symbol.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Account-Trade-List

r@   
userTradesTr   rH  r   s     r(   futures_account_tradesClient.futures_account_trades_  r  r*   c                 &    U R                  SSSUS9$ )zGet income history for authenticated account

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Income-History

r@   incomeTr   rH  r   s     r(   futures_income_historyClient.futures_income_historyg  s     (($V(LLr*   c                 &    U R                  SSSUS9$ )zChange position mode for authenticated account

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode

r   positionSide/dualTr   rH  r   s     r(   futures_change_position_mode#Client.futures_change_position_modeo  s      ((1DdQW(XXr*   c                 &    U R                  SSSUS9$ )zGet position mode for authenticated account

https://binance-docs.github.io/apidocs/futures/en/#get-current-position-mode-user_data

r@   rV  Tr   rH  r   s     r(   futures_get_position_mode Client.futures_get_position_modew  s      ((0CTPV(WWr*   multiAssetsMarginc                 @    SU(       a  SOS0nU R                  SSSUS9$ )zChange user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on Every symbol

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Multi-Assets-Mode

r\  truefalser   Tr   rH  )r&   r\  r   s      r(    futures_change_multi_assets_mode'Client.futures_change_multi_assets_mode  s/     &1BvP((1DdQW(XXr*   c                 &    U R                  SSS0 S9$ )zGet user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on Every symbol

https://binance-docs.github.io/apidocs/futures/en/#get-current-multi-assets-mode-user_data

r@   r\  Tr   rH  r   s    r(   futures_get_multi_assets_mode$Client.futures_get_multi_assets_mode  s      ((0CTPR(SSr*   c                 0    U R                  SSS0 S9nUS   $ Nr   r  Fr  rH  r  s     r(   futures_stream_get_listen_key$Client.futures_stream_get_listen_key  s'    ''EPR'S;r*   c                 .    SU0nU R                  SSSUS9$ Nr  r   Fr  rH  r  s      r(   futures_stream_keepaliveClient.futures_stream_keepalive  s'    y)((EPV(WWr*   c                 .    SU0nU R                  SSSUS9$ Nr  r   Fr  rH  r  s      r(   futures_stream_closeClient.futures_stream_close  s-    y)((k%f ) 
 	
r*   c                 (    U R                  SSSSUS9$ )zGet futures account configuration
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Config
r@   accountConfigTr   r6   rY   r<   rH  r   s     r(   futures_account_configClient.futures_account_config  s'     ((?4 ) 
 	
r*   c                 (    U R                  SSSSUS9$ )zGet current account symbol configuration
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Symbol-Config
r@   symbolConfigTr   rs  rH  r   s     r(   futures_symbol_configClient.futures_symbol_config  s'     ((>$ ) 
 	
r*   c                 &    U R                  SS5      $ )zTest connectivity to the Rest API

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api

 r@   r!   rl   r   s    r(   futures_coin_pingClient.futures_coin_ping       --eV<<r*   c                 &    U R                  SS5      $ )zTest connectivity to the Rest API and get the current server time.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time

r@   r   r{  r   s    r(   futures_coin_timeClient.futures_coin_time  r~  r*   c                 &    U R                  SS5      $ )zCurrent exchange trading rules and symbol information

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Exchange-Information

r@   r   r{  r   s    r(   futures_coin_exchange_info!Client.futures_coin_exchange_info  s     --e^DDr*   c                 $    U R                  SSUS9$ )zGet the Order Book for the market

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Order-Book

r@   r   r   r{  r   s     r(   futures_coin_order_bookClient.futures_coin_order_book  s     --eW6-JJr*   c                 $    U R                  SSUS9$ )zGet recent trades (up to last 500).

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List

r@   r   r   r{  r   s     r(   futures_coin_recent_trades!Client.futures_coin_recent_trades       --eXF-KKr*   c                 $    U R                  SSUS9$ )zGet older market historical trades.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Old-Trades-Lookup

r@   r   r   r{  r   s     r(   futures_coin_historical_trades%Client.futures_coin_historical_trades  r  r*   c                 $    U R                  SSUS9$ )a
  Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same
price will have the quantity aggregated.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List

r@   r   r   r{  r   s     r(   futures_coin_aggregate_trades$Client.futures_coin_aggregate_trades  s     --e[v-NNr*   c                 $    U R                  SSUS9$ )zKline/candlestick bars for a symbol. Klines are uniquely identified by their open time.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Kline-Candlestick-Data

r@   r   r   r{  r   s     r(   r   Client.futures_coin_klines  r  r*   c                 $    U R                  SSUS9$ )zKline/candlestick bars for a specific contract type. Klines are uniquely identified by their open time.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data

r@   rn  r   r{  r   s     r(   futures_coin_continous_klines$Client.futures_coin_continous_klines  r  r*   c                 $    U R                  SSUS9$ )zKline/candlestick bars for the index price of a pair..

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data

r@   rg  r   r{  r   s     r(   r   &Client.futures_coin_index_price_klines  r  r*   c                 $    U R                  SSUS9$ )zKline/candlestick bars for the index price of a pair..

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Premium-Index-Kline-Data

r@   rj  r   r{  r   s     r(   !futures_coin_premium_index_klines(Client.futures_coin_premium_index_klines   s     --e5IPV-WWr*   c                 $    U R                  SSUS9$ )zKline/candlestick bars for the index price of a pair..

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data

r@   rd  r   r{  r   s     r(   r   %Client.futures_coin_mark_price_klines	   s     --e5FV-TTr*   c                 $    U R                  SSUS9$ )zGet Mark Price and Funding Rate

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Index-Price-and-Mark-Price

r@   r}  r   r{  r   s     r(   futures_coin_mark_priceClient.futures_coin_mark_price        --e^&-QQr*   c                 $    U R                  SSUS9$ )zGet funding rate history

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Rate-History-of-Perpetual-Futures

r@   r  r   r{  r   s     r(   futures_coin_funding_rate Client.futures_coin_funding_rate        --e]-PPr*   c                 $    U R                  SSUS9$ )z24 hour rolling window price change statistics.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics

r@   r  r   r{  r   s     r(   futures_coin_tickerClient.futures_coin_ticker!   r  r*   c                 $    U R                  SSUS9$ )zLatest price for a symbol or symbols.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Price-Ticker

r@   r   r   r{  r   s     r(   futures_coin_symbol_ticker!Client.futures_coin_symbol_ticker)   r  r*   c                 $    U R                  SSUS9$ )zBest price/qty on the order book for a symbol or symbols.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker

r@   r   r   r{  r   s     r(   futures_coin_orderbook_ticker$Client.futures_coin_orderbook_ticker1   s     --e5Hv-VVr*   c                 $    U R                  SSUS9$ )zGet present long to short ratio for top positions of a specific symbol.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Top-Trader-Long-Short-Ratio
r@   r  r   rp   r   s     r(   )futures_coin_top_longshort_position_ratio0Client.futures_coin_top_longshort_position_ratio9   s    
 225:U\b2ccr*   c                 $    U R                  SSUS9$ )zGet present long to short ratio for top positions of a specific symbol.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Top-Long-Short-Account-Ratio
r@   r  r   r  r   s     r(   (futures_coin_top_longshort_account_ratio/Client.futures_coin_top_longshort_account_ratio@   s    
 225:T[a2bbr*   c                 $    U R                  SSUS9$ )zGet present long to short ratio for top positions of a specific symbol.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Long-Short-Ratio
r@   r  r   r  r   s     r(   #futures_coin_global_longshort_ratio*Client.futures_coin_global_longshort_ratioG   s    
 225:W^d2eer*   c                 $    U R                  SSUS9$ )zGet present long to short ratio for top positions of a specific symbol.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Taker-Buy-Sell-Volume
r@   takerBuySellVolr   r  r   s     r(   "futures_coin_taker_buy_sell_volume)Client.futures_coin_taker_buy_sell_volumeN   s    
 225:KRX2YYr*   c                 $    U R                  SSUS9$ )zGet future basis of a specific symbol

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Basis
r@   r  r   r  r   s     r(   futures_coin_basisClient.futures_coin_basisU   s    
 225'2OOr*   c                 $    U R                  SSUS9$ )zGet index price constituents

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Index-Constituents

r@   r  r   r{  r   s     r(   %futures_coin_index_price_constituents,Client.futures_coin_index_price_constituents\   r  r*   c                 &    U R                  SSSUS9$ )zGet all liquidation orders

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Users-Force-Orders

r@   r  Tr  r{  r   s     r(   futures_coin_liquidation_orders&Client.futures_coin_liquidation_ordersd   s%     --=F . 
 	
r*   c                 $    U R                  SSUS9$ )zGet present open interest of a specific symbol.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest

r@   r  r   r{  r   s     r(   futures_coin_open_interest!Client.futures_coin_open_interestn   r  r*   c                 $    U R                  SSUS9$ )zGet open interest statistics of a specific symbol.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Open-Interest-Statistics

r@   r  r   r  r   s     r(   futures_coin_open_interest_hist&Client.futures_coin_open_interest_histv   s$     22%F 3 
 	
r*   c                 (    U R                  SSSSUS9$ )zNotional and Leverage Brackets

https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Notional-Bracket-for-Symbol

r@   r  r<  TrY   r6   r<   r{  r   s     r(   futures_coin_leverage_bracket$Client.futures_coin_leverage_bracket   s(     --$a6 . 
 	
r*   c                 &    U R                  SSSUS9$ )z}Get future account transaction history list

https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer

r@   r  Tr   r  r   s     r(   new_transfer_historyClient.new_transfer_history   s     ''/?F'SSr*   c                 &    U R                  SSSUS9$ )zWQuery Funding Wallet

https://developers.binance.com/docs/wallet/asset/funding-wallet

r   zasset/get-funding-assetTr   r  r   s     r(   funding_walletClient.funding_wallet   s&     ''-t& ( 
 	
r*   c                 (    U R                  SSSUSS9$ )zgGet user assets, just for positive data

https://developers.binance.com/docs/wallet/asset/user-assets

r   zasset/getUserAssetTr  r  r  r   s     r(   get_user_assetClient.get_user_asset   s(     ''($VQ ( 
 	
r*   c                 &    U R                  SSSUS9$ )zUnviversal transfer api accross different binance account types

https://developers.binance.com/docs/wallet/asset/user-universal-transfer
r   r  Tr  r  r   s     r(   universal_transferClient.universal_transfer   s&    
 ''$T ( 
 	
r*   c                 r    SU;  a   U R                   U R                  5       -   US'   U R                  SSSUS9$ )zlSend in a new order.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api

r+  r   r,  Tr   )r  r/  rl   r   s     r(   futures_coin_create_order Client.futures_coin_create_order   sB     V+)-)C)Cdkkm)SF%&--fgt&-QQr*   c                     US    H+  nSU;  d  M  U R                   U R                  5       -   US'   M-     [        U5      nUR                  SS5      nUSS US'   U R	                  SSSUS	9$ )
a(  Send in new orders.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Place-Multiple-Orders

To avoid modifying the existing signature generation and parameter order logic,
the url encoding is done on the special query param, batchOrders, in the early stage.

r  r+  r  r  r  Nr   Tr   )r  r/  r	   r  rl   r  s       r(   futures_coin_place_batch_order%Client.futures_coin_place_batch_order   s     M*E!.,0,F,F,V() + !(#++E59 ,RS 1}--fmTPV-WWr*   c                 &    U R                  SSSUS9$ )zModify an existing order. Currently only LIMIT order modification is supported.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Modify-Order

r   r,  Tr   r{  r   s     r(   futures_coin_modify_order Client.futures_coin_modify_order        --eWd-PPr*   c                 &    U R                  SSSUS9$ )z|Check an order's status.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Query-Order

r@   r,  Tr   r{  r   s     r(   futures_coin_get_orderClient.futures_coin_get_order   r  r*   c                 &    U R                  SSSUS9$ )zGet all open orders on a symbol.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Current-All-Open-Orders

r@   rh  Tr   r{  r   s     r(   futures_coin_get_open_orders#Client.futures_coin_get_open_orders        --e\4f-UUr*   c                 &    U R                  SSSUS9$ )zGet all futures account orders; active, canceled, or filled.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/All-Orders

r@   r`  Tr  r{  r   s     r(   futures_coin_get_all_orders"Client.futures_coin_get_all_orders   %     --;t& . 
 	
r*   c                 &    U R                  SSSUS9$ )zCancel an active futures order.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Cancel-Order

r   r,  Tr  r{  r   s     r(   futures_coin_cancel_order Client.futures_coin_cancel_order   s%     --gd . 
 	
r*   c                 (    U R                  SSSSUS9$ )zCancel all open futures orders

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Cancel-All-Open-Orders

r   r%  T)r6   r7   r<   r{  r   s     r(   #futures_coin_cancel_all_open_orders*Client.futures_coin_cancel_all_open_orders   s'     --odF . 
 	
r*   c                     UR                  S5      (       a  [        [        US   5      5      US'   UR                  S5      (       a  [        [        US   5      5      US'   U R                  SSSUS9$ )zCancel multiple futures orders

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Cancel-Multiple-Orders

r)  origclientOrderidlistr*  r   r  Tr   )r@   r
   r   rl   r   s     r(   futures_coin_cancel_orders!Client.futures_coin_cancel_orders!  s     ::m$$$)*6-+@A%F=! ::-...3*62I+JK/F*+ --mT . 
 	
r*   c                 &    U R                  SSSUS9$ )a  Cancel all open orders of the specified symbol at the end of the specified countdown.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders

:param symbol: required
:type symbol: str
:param countdownTime: required
:type countdownTime: int
:param recvWindow: optional - the number of milliseconds the request is valid for
:type recvWindow: int

:returns: API response

.. code-block:: python
{
    "symbol": "BTCUSDT",
    "countdownTime": "100000"
}

r   r.  Tr   r{  r   s     r(   !futures_coin_countdown_cancel_all(Client.futures_coin_countdown_cancel_all!  s&    * --($V . 
 	
r*   c                 &    U R                  SSSUS9$ )zGet current open order.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Query-Current-Open-Order

r@   	openOrderTr  r{  r   s     r(   futures_coin_get_open_order"Client.futures_coin_get_open_order,!  r  r*   c                 &    U R                  SSSUS9$ )zGet futures account balance

https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Futures-Account-Balance

r@   r2  Tr  r{  r   s     r(   futures_coin_account_balance#Client.futures_coin_account_balance6!  %     --9T . 
 	
r*   c                 &    U R                  SSSUS9$ )zGet current account information.

https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Account-Information

r@   rv  Tr  r{  r   s     r(   futures_coin_accountClient.futures_coin_account@!  r  r*   c                 &    U R                  SSSUS9$ )zChange user's initial leverage of specific symbol market

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Change-Initial-Leverage

r   r:  Tr  r{  r   s     r(   futures_coin_change_leverage#Client.futures_coin_change_leverageJ!  s%     --Jt& . 
 	
r*   c                 &    U R                  SSSUS9$ )zChange the margin type for a symbol

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Change-Margin-Type

r   r>  Tr  r{  r   s     r(   futures_coin_change_margin_type&Client.futures_coin_change_margin_typeT!  s%     --LF . 
 	
r*   c                 &    U R                  SSSUS9$ )zChange the position margin for a symbol

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin

r   rB  Tr   r{  r   s     r(   #futures_coin_change_position_margin*Client.futures_coin_change_position_margin^!  s&     --$d . 
 	
r*   c                 &    U R                  SSSUS9$ )zGet position margin change history

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Get-Position-Margin-Change-History

r@   rF  Tr   r{  r   s     r(   $futures_coin_position_margin_history+Client.futures_coin_position_margin_historyh!  s&     --+T . 
 	
r*   c                 &    U R                  SSSUS9$ )zGet position information

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Position-Information

r@   rJ  Tr   r{  r   s     r(   !futures_coin_position_information(Client.futures_coin_position_informationr!  s     --e^TPV-WWr*   c                 &    U R                  SSSUS9$ )zGet trades for the authenticated account and symbol.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Account-Trade-List

r@   rN  Tr   r{  r   s     r(   futures_coin_account_trades"Client.futures_coin_account_tradesz!  r  r*   c                 &    U R                  SSSUS9$ )zGet income history for authenticated account

https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Income-History

r@   rR  Tr   r{  r   s     r(   futures_coin_income_history"Client.futures_coin_income_history!  s     --eXt&-QQr*   c                 &    U R                  SSSUS9$ )zChange user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Change-Position-Mode

r   rV  Tr   r{  r   s     r(   !futures_coin_change_position_mode(Client.futures_coin_change_position_mode!  s&     --'F . 
 	
r*   c                 &    U R                  SSSUS9$ )zGet user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol

https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Current-Position-Mode

r@   rV  Tr   r{  r   s     r(   futures_coin_get_position_mode%Client.futures_coin_get_position_mode!  s&     --&6 . 
 	
r*   c                 0    U R                  SSS0 S9nUS   $ rf  r{  r  s     r(   "futures_coin_stream_get_listen_key)Client.futures_coin_stream_get_listen_key!  s'    ,,V[UW,X;r*   c                 .    SU0nU R                  SSSUS9$ rj  r{  r  s      r(   futures_coin_stream_keepalive$Client.futures_coin_stream_keepalive!  s-    y)--;u6 . 
 	
r*   c                 .    SU0nU R                  SSSUS9$ rn  r{  r  s      r(   futures_coin_stream_close Client.futures_coin_stream_close!  s-    y)--k%f . 
 	
r*   c                 &    U R                  SSSUS9$ )a$  Get Download Id For Futures Order History

https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History

:param startTime: required - Start timestamp in ms
:type startTime: int
:param endTime: required - End timestamp in ms
:type endTime: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "avgCostTimestampOfLast30d": 7241837,  # Average time taken for data download in the past 30 days
        "downloadId": "546975389218332672"
    }

Note:
    - Request Limitation is 10 times per month, shared by front end download page and rest api
    - The time between startTime and endTime can not be longer than 1 year

:raises: BinanceRequestException, BinanceAPIException

r@   
order/asynTr  r{  r   s     r(   +futures_coin_account_order_history_download2Client.futures_coin_account_order_history_download!  s%    8 --<6 . 
 	
r*   c                 &    U R                  SSSUS9$ )u8  Get futures order history download link by Id

https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id

:param downloadId: required - Download ID obtained from futures_coin_download_id
:type downloadId: str
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "downloadId": "545923594199212032",
        "status": "completed",     # Enum：completed，processing
        "url": "www.binance.com",  # The link is mapped to download id
        "notified": true,          # ignore
        "expirationTimestamp": 1645009771000,  # The link would expire after this timestamp
        "isExpired": null
    }

    # OR (Response when server is processing)
    {
        "downloadId": "545923594199212032",
        "status": "processing",
        "url": "",
        "notified": false,
        "expirationTimestamp": -1,
        "isExpired": null
    }

Note:
    - Download link expiration: 24h

:raises: BinanceRequestException, BinanceAPIException

r@   order/asyn/idTr   r{  r   s     r(   /futures_coin_accout_order_history_download_link6Client.futures_coin_accout_order_history_download_link!  s     N --e_dQW-XXr*   c                 &    U R                  SSSUS9$ )a  Get Download Id For Futures Trade History (USER_DATA)

https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History

:param startTime: required - Start timestamp in ms
:type startTime: int
:param endTime: required - End timestamp in ms
:type endTime: int

:returns: API response

.. code-block:: python

    {
        "avgCostTimestampOfLast30d": 7241837,  # Average time taken for data download in the past 30 days
        "downloadId": "546975389218332672"
    }

Note:
    - Request Limitation is 5 times per month, shared by front end download page and rest api
    - The time between startTime and endTime can not be longer than 1 year

:raises: BinanceRequestException, BinanceAPIException

r@   
trade/asynTr   r{  r   s     r(   +futures_coin_account_trade_history_download2Client.futures_coin_account_trade_history_download!  s    4 --e\4f-UUr*   c                 &    U R                  SSSUS9$ )u  Get futures trade download link by Id

https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id

:param downloadId: required - Download ID obtained from futures_coin_trade_download_id
:type downloadId: str

:returns: API response

.. code-block:: python

    {
        "downloadId": "545923594199212032",
        "status": "completed",     # Enum：completed，processing
        "url": "www.binance.com",  # The link is mapped to download id
        "notified": true,          # ignore
        "expirationTimestamp": 1645009771000,  # The link would expire after this timestamp
        "isExpired": null
    }

    # OR (Response when server is processing)
    {
        "downloadId": "545923594199212032",
        "status": "processing",
        "url": "",
        "notified": false,
        "expirationTimestamp": -1,
        "isExpired": null
    }

Note:
    - Download link expiration: 24h

:raises: BinanceRequestException, BinanceAPIException

r@   trade/asyn/idTr   r{  r   s     r(   0futures_coin_account_trade_history_download_link7Client.futures_coin_account_trade_history_download_link"  s     J --e_dQW-XXr*   c                 &    U R                  SSSUS9$ )a  Get information of coins (available for deposit and withdraw) for user.

https://developers.binance.com/docs/wallet/capital

:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
        "coin": "BTC",
        "depositAllEnable": true,
        "withdrawAllEnable": true,
        "name": "Bitcoin",
        "free": "0",
        "locked": "0",
        "freeze": "0",
        "withdrawing": "0",
        "ipoing": "0",
        "ipoable": "0",
        "storage": "0",
        "isLegalMoney": false,
        "trading": true,
        "networkList": [
            {
                "network": "BNB",
                "coin": "BTC",
                "withdrawIntegerMultiple": "0.00000001",
                "isDefault": false,
                "depositEnable": true,
                "withdrawEnable": true,
                "depositDesc": "",
                "withdrawDesc": "",
                "specialTips": "Both a MEMO and an Address are required to successfully deposit your BEP2-BTCB tokens to Binance.",
                "name": "BEP2",
                "resetAddressStatus": false,
                "addressRegex": "^(bnb1)[0-9a-z]{38}$",
                "memoRegex": "^[0-9A-Za-z-_]{1,120}$",
                "withdrawFee": "0.0000026",
                "withdrawMin": "0.0000052",
                "withdrawMax": "0",
                "minConfirm": 1,
                "unLockConfirm": 0
            },
            {
                "network": "BTC",
                "coin": "BTC",
                "withdrawIntegerMultiple": "0.00000001",
                "isDefault": true,
                "depositEnable": true,
                "withdrawEnable": true,
                "depositDesc": "",
                "withdrawDesc": "",
                "specialTips": "",
                "name": "BTC",
                "resetAddressStatus": false,
                "addressRegex": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$|^(bc1)[0-9A-Za-z]{39,59}$",
                "memoRegex": "",
                "withdrawFee": "0.0005",
                "withdrawMin": "0.001",
                "withdrawMax": "0",
                "minConfirm": 1,
                "unLockConfirm": 2
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

r@   zcapital/config/getallTr   r  r   s     r(   get_all_coins_infoClient.get_all_coins_info:"  s'    R ''*Dv ( 
 	
r*   c                 &    U R                  SSSUS9$ )ad  Get daily account snapshot of specific type.

https://developers.binance.com/docs/wallet/account/daily-account-snapshoot

:param type: required. Valid values are SPOT/MARGIN/FUTURES.
:type type: string
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param limit: optional
:type limit: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response

.. code-block:: python

    {
       "code":200, // 200 for success; others are error codes
       "msg":"", // error message
       "snapshotVos":[
          {
             "data":{
                "balances":[
                   {
                      "asset":"BTC",
                      "free":"0.09905021",
                      "locked":"0.00000000"
                   },
                   {
                      "asset":"USDT",
                      "free":"1.89109409",
                      "locked":"0.00000000"
                   }
                ],
                "totalAssetOfBtc":"0.09942700"
             },
             "type":"spot",
             "updateTime":1576281599000
          }
       ]
    }

OR

.. code-block:: python

    {
       "code":200, // 200 for success; others are error codes
       "msg":"", // error message
       "snapshotVos":[
          {
             "data":{
                "marginLevel":"2748.02909813",
                "totalAssetOfBtc":"0.00274803",
                "totalLiabilityOfBtc":"0.00000100",
                "totalNetAssetOfBtc":"0.00274750",
                "userAssets":[
                   {
                      "asset":"XRP",
                      "borrowed":"0.00000000",
                      "free":"1.00000000",
                      "interest":"0.00000000",
                      "locked":"0.00000000",
                      "netAsset":"1.00000000"
                   }
                ]
             },
             "type":"margin",
             "updateTime":1576281599000
          }
       ]
    }

OR

.. code-block:: python

    {
       "code":200, // 200 for success; others are error codes
       "msg":"", // error message
       "snapshotVos":[
          {
             "data":{
                "assets":[
                   {
                      "asset":"USDT",
                      "marginBalance":"118.99782335",
                      "walletBalance":"120.23811389"
                   }
                ],
                "position":[
                   {
                      "entryPrice":"7130.41000000",
                      "markPrice":"7257.66239673",
                      "positionAmt":"0.01000000",
                      "symbol":"BTCUSDT",
                      "unRealizedProfit":"1.24029054"
                   }
                ]
             },
             "type":"futures",
             "updateTime":1576281599000
          }
       ]
    }

:raises: BinanceRequestException, BinanceAPIException

r@   accountSnapshotTr   r  r   s     r(   get_account_snapshotClient.get_account_snapshot"  s     b ''/@$V'TTr*   c                 &    U R                  SSSUS9$ )zDisable Fast Withdraw Switch

https://binance-docs.github.io/apidocs/spot/en/#disable-fast-withdraw-switch-user_data

:param recvWindow: optional
:type recvWindow: int

:returns: API response

:raises: BinanceRequestException, BinanceAPIException

r   disableFastWithdrawSwitchTr   r  r   s     r(   disable_fast_withdraw_switch#Client.disable_fast_withdraw_switch"  s&     ''/F ( 
 	
r*   c                 &    U R                  SSSUS9$ )zEnable Fast Withdraw Switch

https://binance-docs.github.io/apidocs/spot/en/#enable-fast-withdraw-switch-user_data

:param recvWindow: optional
:type recvWindow: int

:returns: API response

:raises: BinanceRequestException, BinanceAPIException

r   enableFastWithdrawSwitchTr   r  r   s     r(   enable_fast_withdraw_switch"Client.enable_fast_withdraw_switch#  s&     ''.6 ( 
 	
r*   c                 &    U R                  SS5      $ )ziTest connectivity

https://developers.binance.com/docs/derivatives/option/market-data/Test-Connectivity

r@   r!   rt   r   s    r(   options_pingClient.options_ping##  rK  r*   c                 &    U R                  SS5      $ )zUGet server time

https://developers.binance.com/docs/derivatives/option/market-data

r@   r   rM  r   s    r(   options_timeClient.options_time+#  rK  r*   c                 &    U R                  SS5      $ )zrGet current trading pair info

https://binance-docs.github.io/apidocs/voptions/en/#get-current-trading-pair-info

r@   
optionInforM  r   s    r(   options_infoClient.options_info3#  s     ((==r*   c                 &    U R                  SS5      $ )zGet current limit info and trading pair info

https://developers.binance.com/docs/derivatives/option/market-data/Exchange-Information

r@   r   rM  r   s    r(   options_exchange_infoClient.options_exchange_info;#  rR  r*   c                 $    U R                  SSUS9$ )u   Get the spot index price

https://developers.binance.com/docs/derivatives/option/market-data/Symbol-Price-Ticker

:param underlying: required - Spot pair（Option contract underlying asset）- BTCUSDT
:type underlying: str

r@   indexr   rM  r   s     r(   options_index_priceClient.options_index_priceC#  s     ((f(EEr*   c                 $    U R                  SSUS9$ )zGet the latest price

https://developers.binance.com/docs/derivatives/option/market-data/24hr-Ticker-Price-Change-Statistics

:param symbol: optional - Option trading pair - BTC-200730-9000-C
:type symbol: str

r@   r$  r   rM  r   s     r(   options_priceClient.options_priceN#  s     ((v(FFr*   c                 $    U R                  SSUS9$ )zGet the latest mark price

https://developers.binance.com/docs/derivatives/option/market-data/Option-Mark-Price

:param symbol: optional - Option trading pair - BTC-200730-9000-C
:type symbol: str

r@   markr   rM  r   s     r(   options_mark_priceClient.options_mark_priceY#  s     ((V(DDr*   c                 $    U R                  SSUS9$ )a(  Depth information

https://developers.binance.com/docs/derivatives/option/market-data/Order-Book

:param symbol: required - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param limit: optional - Default:100 Max:1000.Optional value:[10, 20, 50, 100, 500, 1000] - 100
:type limit: int

r@   r   r   rM  r   s     r(   options_order_bookClient.options_order_bookd#  s     ((f(EEr*   c                 $    U R                  SSUS9$ )a  Candle data

https://developers.binance.com/docs/derivatives/option/market-data/Kline-Candlestick-Data

:param symbol: required - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param interval: required - Time interval - 5m
:type interval: str
:param startTime: optional - Start Time - 1592317127349
:type startTime: int
:param endTime: optional - End Time - 1592317127349
:type endTime: int
:param limit: optional - Number of records Default:500 Max:1500 - 500
:type limit: int

r@   r   r   rM  r   s     r(   options_klinesClient.options_klinesq#  s    " ((v(FFr*   c                 $    U R                  SSUS9$ )a$  Recently completed Option trades

https://developers.binance.com/docs/derivatives/option/market-data/Recent-Trades-List

:param symbol: required - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param limit: optional - Number of records Default:100 Max:500 - 100
:type limit: int

r@   r   r   rM  r   s     r(   options_recent_tradesClient.options_recent_trades#  s     ((v(FFr*   c                 $    U R                  SSUS9$ )a  Query trade history

https://developers.binance.com/docs/derivatives/option/market-data/Old-Trades-Lookup

:param symbol: required - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param fromId: optional - The deal ID from which to return. The latest deal record is returned by default - 1592317127349
:type fromId: int
:param limit: optional - Number of records Default:100 Max:500 - 100
:type limit: int

r@   r   r   rM  r   s     r(   options_historical_trades Client.options_historical_trades#  s     ((0B(PPr*   c                 &    U R                  SSSUS9$ )zAccount asset info (USER_DATA)

https://developers.binance.com/docs/derivatives/option/account

:param recvWindow: optional
:type recvWindow: int

r@   rv  Tr  rM  r   s     r(   options_account_infoClient.options_account_info#  s     ((	$V(TTr*   c                 &    U R                  SSSUS9$ )a  Get account funding flows

https://developers.binance.com/docs/derivatives/option/account/Account-Funding-Flow

:param currency: required
:type currency: str
:param recordId: optional
:type recordId: int
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param limit: optional
:type limit: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response
r@   billTr  rM  r   s     r(   options_get_billClient.options_get_bill#  s    ( ((t&(QQr*   c                 &    U R                  SSSUS9$ )a  Funds transfer (USER_DATA)

https://binance-docs.github.io/apidocs/voptions/en/#funds-transfer-user_data

:param currency: required - Asset type - USDT
:type currency: str
:param type: required - IN: Transfer from spot account to option account OUT: Transfer from option account to spot account - IN
:type type: str (ENUM)
:param amount: required - Amount - 10000
:type amount: float
:param recvWindow: optional
:type recvWindow: int

r   transferTr  rM  r   s     r(   options_funds_transferClient.options_funds_transfer#  s     ((Dv(VVr*   c                 &    U R                  SSSUS9$ )a  Option holdings info (USER_DATA)

https://developers.binance.com/docs/derivatives/option/trade/Option-Position-Information

:param symbol: optional - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param recvWindow: optional
:type recvWindow: int

r@   positionTr  rM  r   s     r(   options_positionsClient.options_positions#  s     ((
4f(UUr*   c                 &    U R                  SSSUS9$ )ak  
Get account exercise records.

https://developers.binance.com/docs/derivatives/option/trade/User-Exercise-Record

:param symbol: optional
:type symbol: str
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param limit: optional
:type limit: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response
r@   exerciseRecordTr  rM  r   s     r(   options_exercise_recordClient.options_exercise_record#  s     & ((0@TZ([[r*   c                 &    U R                  SSSUS9$ )al  Account funding flow (USER_DATA)

https://binance-docs.github.io/apidocs/voptions/en/#account-funding-flow-user_data

:param currency: required - Asset type - USDT
:type currency: str
:param recordId: optional - Return the recordId and subsequent data, the latest data is returned by default - 100000
:type recordId: int
:param startTime: optional - Start Time - 1593511200000
:type startTime: int
:param endTime: optional - End Time - 1593511200000
:type endTime: int
:param limit: optional - Number of result sets returned Default:100 Max:1000 - 100
:type limit: int
:param recvWindow: optional
:type recvWindow: int

r   ru  Tr  rM  r   s     r(   options_billClient.options_bill#  s    & ((6(RRr*   c                 r    SU;  a   U R                   U R                  5       -   US'   U R                  SSSUS9$ )u  Option order (TRADE)

https://developers.binance.com/docs/derivatives/option/trade

:param symbol: required - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param side: required - Buy/sell direction: SELL, BUY - BUY
:type side: str (ENUM)
:param type: required - Order Type: LIMIT, MARKET - LIMIT
:type type: str (ENUM)
:param quantity: required - Order Quantity - 3
:type quantity: float
:param price: optional - Order Price - 1000
:type price: float
:param timeInForce: optional - Time in force method（Default GTC) - GTC
:type timeInForce: str (ENUM)
:param reduceOnly: optional - Reduce Only (Default false) - false
:type reduceOnly: bool
:param postOnly: optional - Post Only (Default false) - false
:type postOnly: bool
:param newOrderRespType: optional - "ACK", "RESULT", Default "ACK" - ACK
:type newOrderRespType: str (ENUM)
:param clientOrderId: optional - User-defined order ID cannot be repeated in pending orders - 10000
:type clientOrderId: str
:param recvWindow: optional
:type recvWindow: int

clientOrderIdr   r,  Tr  r  r/  rt   r   s     r(   options_place_orderClient.options_place_order$  sA    : &(&*&@&@4;;=&PF?#((F(SSr*   c                     US    H+  nSU;  d  M  U R                   U R                  5       -   US'   M-     U R                  SSSUS9$ )aU  Place Multiple Option orders (TRADE)

https://developers.binance.com/docs/derivatives/option/trade/Place-Multiple-Orders

:param orders: required - order list. Max 5 orders - [{"symbol":"BTC-210115-35000-C","price":"100","quantity":"0.0001","side":"BUY","type":"LIMIT"}]
:type orders: list
:param recvWindow: optional
:type recvWindow: int

r  r+  r   Tr  r  )r&   r   r,  s      r(   options_place_batch_order Client.options_place_batch_order,$  sZ     M*E!.,0,F,F,V() + ((M$V ) 
 	
r*   c                 &    U R                  SSSUS9$ )a  Cancel Option order (TRADE)

https://developers.binance.com/docs/derivatives/option/trade/Cancel-Option-Order

:param symbol: required - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param orderId: optional - Order ID - 4611875134427365377
:type orderId: str
:param clientOrderId: optional - User-defined order ID - 10000
:type clientOrderId: str
:param recvWindow: optional
:type recvWindow: int

r   r,  Tr  rM  r   s     r(   options_cancel_orderClient.options_cancel_order>$  s     ((74f(UUr*   c                 &    U R                  SSSUS9$ )a  Cancel Multiple Option orders (TRADE)

https://developers.binance.com/docs/derivatives/option/trade/Cancel-Multiple-Option-Orders

:param symbol: required - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param orderIds: optional - Order ID - [4611875134427365377,4611875134427365378]
:type orderId: list
:param clientOrderIds: optional - User-defined order ID - ["my_id_1","my_id_2"]
:type clientOrderIds: list
:param recvWindow: optional
:type recvWindow: int

r   r  Tr  rM  r   s     r(   options_cancel_batch_order!Client.options_cancel_batch_orderO$  s%     ((mDv ) 
 	
r*   c                 &    U R                  SSSUS9$ )a  Cancel all Option orders (TRADE)

https://developers.binance.com/docs/derivatives/option/trade/Cancel-all-Option-orders-on-specific-symbol

:param symbol: required - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param recvWindow: optional
:type recvWindow: int

r   r%  Tr  rM  r   s     r(   options_cancel_all_orders Client.options_cancel_all_ordersb$  s%     ((od ) 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query Option order (TRADE)

https://developers.binance.com/docs/derivatives/option/trade/Query-Single-Order

:param symbol: required - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param orderId: optional - Order ID - 4611875134427365377
:type orderId: str
:param clientOrderId: optional - User-defined order ID - 10000
:type clientOrderId: str
:param recvWindow: optional
:type recvWindow: int

r@   r,  Tr  rM  r   s     r(   options_query_orderClient.options_query_orderq$  s     ((6(RRr*   c                 &    U R                  SSSUS9$ )a  Query current pending Option orders (TRADE)

https://developers.binance.com/docs/derivatives/option/trade/Query-Current-Open-Option-Orders

:param symbol: required - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param orderId: optional - Returns the orderId and subsequent orders, the most recent order is returned by default - 100000
:type orderId: str
:param startTime: optional - Start Time - 1593511200000
:type startTime: int
:param endTime: optional - End Time - 1593511200000
:type endTime: int
:param limit: optional - Number of result sets returned Default:100 Max:1000 - 100
:type limit: int
:param recvWindow: optional
:type recvWindow: int

r@   rh  Tr  rM  r   s     r(   options_query_pending_orders#Client.options_query_pending_orders$      & ((TPV(WWr*   c                 &    U R                  SSSUS9$ )a  Query Option order history (TRADE)

https://developers.binance.com/docs/derivatives/option/trade/Query-Option-Order-History

:param symbol: required - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param orderId: optional - Returns the orderId and subsequent orders, the most recent order is returned by default - 100000
:type orderId: str
:param startTime: optional - Start Time - 1593511200000
:type startTime: int
:param endTime: optional - End Time - 1593511200000
:type endTime: int
:param limit: optional - Number of result sets returned Default:100 Max:1000 - 100
:type limit: int
:param recvWindow: optional
:type recvWindow: int

r@   historyOrdersTr  rM  r   s     r(   options_query_order_history"Client.options_query_order_history$  s%    & ((?4f ) 
 	
r*   c                 &    U R                  SSSUS9$ )aj  Option Trade List (USER_DATA)

https://developers.binance.com/docs/derivatives/option/trade/Account-Trade-List

:param symbol: required - Option trading pair - BTC-200730-9000-C
:type symbol: str
:param fromId: optional - Trade id to fetch from. Default gets most recent trades. - 4611875134427365376
:type fromId: int
:param startTime: optional - Start Time - 1593511200000
:type startTime: int
:param endTime: optional - End Time - 1593511200000
:type endTime: int
:param limit: optional - Number of result sets returned Default:100 Max:1000 - 100
:type limit: int
:param recvWindow: optional
:type recvWindow: int

r@   rN  Tr  rM  r   s     r(   options_user_tradesClient.options_user_trades$  r  r*   c                 &    U R                  SSSUS9$ )a  New Block Trade Order (TRADE)

https://developers.binance.com/docs/derivatives/option/market-maker-block-trade

:param liquidity: required - Taker or Maker
:type liquidity: str
:param symbol: required - Option trading pair, e.g BTC-200730-9000-C
:type symbol: str
:param side: required - BUY or SELL
:type side: str
:param price: required - Order Price
:type price: float
:param quantity: required - Order Quantity
:type quantity: float
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: API response

.. code-block:: python
    {
        "blockTradeSettlementKey": "3668822b8-1baa-6a2f-adb8-d3de6289b361",
        "expireTime": 1730171888109,
        "liquidity": "TAKER",
        "status": "RECEIVED",
        "legs": [
            {
                "symbol": "BNB-241101-700-C",
                "side": "BUY",
                "quantity": "1.2",
                "price": "2.8"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException
r   block/order/createTr  rM  r   s     r(    options_create_block_trade_order'Client.options_create_block_trade_order$  s'    L (((F ) 
 	
r*   c                 &    U R                  SSSUS9$ )a  Cancel Block Trade Order (TRADE)

https://developers.binance.com/docs/derivatives/option/market-maker-block-trade/Cancel-Block-Trade-Order

:param blockOrderMatchingKey: required - Block Order Matching Key
:type blockOrderMatchingKey: str
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: API response

.. code-block:: python
    {}

:raises: BinanceRequestException, BinanceAPIException
r   r  Tr  rM  r   s     r(    options_cancel_block_trade_order'Client.options_cancel_block_trade_order$  s&    " ((*4f ) 
 	
r*   c                 &    U R                  SSSUS9$ )a  Extend Block Trade Order (TRADE)

Extends a block trade expire time by 30 mins from the current time.

https://developers.binance.com/docs/derivatives/option/market-maker-block-trade/Extend-Block-Trade-Order

:param blockOrderMatchingKey: required - Block Order Matching Key
:type blockOrderMatchingKey: str
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: API response

.. code-block:: python
    {
        "blockTradeSettlementKey": "3668822b8-1baa-6a2f-adb8-d3de6289b361",
        "expireTime": 1730172007000,
        "liquidity": "TAKER",
        "status": "RECEIVED",
        "createTime": 1730170088111,
        "legs": [
            {
                "symbol": "BNB-241101-700-C",
                "side": "BUY",
                "quantity": "1.2",
                "price": "2.8"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException
r   r  Tr  rM  r   s     r(    options_extend_block_trade_order'Client.options_extend_block_trade_order%  s'    B (('6 ) 
 	
r*   c                 &    U R                  SSSUS9$ )a[  Query Block Trade Order (TRADE)

Check block trade order status.

https://developers.binance.com/docs/derivatives/option/market-maker-block-trade/Query-Block-Trade-Order

:param blockOrderMatchingKey: optional - Returns specific block trade for this key
:type blockOrderMatchingKey: str
:param endTime: optional
:type endTime: int
:param startTime: optional
:type startTime: int
:param underlying: optional
:type underlying: str
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: API response

.. code-block:: python
    [
        {
            "blockTradeSettlementKey": "7d046e6e-a429-4335-ab9d-6a681febcde5",
            "expireTime": 1730172115801,
            "liquidity": "TAKER",
            "status": "RECEIVED",
            "createTime": 1730170315803,
            "legs": [
                {
                    "symbol": "BNB-241101-700-C",
                    "side": "BUY",
                    "quantity": "1.2",
                    "price": "2.8"
                }
            ]
        }
    ]

:raises: BinanceRequestException, BinanceAPIException
r@   zblock/order/ordersTr  rM  r   s     r(   options_get_block_trade_orders%Client.options_get_block_trade_orders+%  s'    R (('6 ) 
 	
r*   c                 &    U R                  SSSUS9$ )as  Accept Block Trade Order (TRADE)

Accept a block trade order.

https://developers.binance.com/docs/derivatives/option/market-maker-block-trade/Accept-Block-Trade-Order

:param blockOrderMatchingKey: required - Block Order Matching Key
:type blockOrderMatchingKey: str
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: API response

.. code-block:: python
    {
        "blockTradeSettlementKey": "7d046e6e-a429-4335-ab9d-6a681febcde5",
        "expireTime": 1730172115801,
        "liquidity": "MAKER",
        "status": "ACCEPTED",
        "createTime": 1730170315803,
        "legs": [
            {
                "symbol": "BNB-241101-700-C",
                "side": "SELL",
                "quantity": "1.2",
                "price": "2.8"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException
r   block/order/executeTr  rM  r   s     r(    options_accept_block_trade_order'Client.options_accept_block_trade_orderX%  s'    B (()$V ) 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query Block Trade Details (USER_DATA)

Query block trade details; returns block trade details from counterparty's perspective.

https://developers.binance.com/docs/derivatives/option/market-maker-block-trade/Query-Block-Trade-Detail

:param blockOrderMatchingKey: required - Block Order Matching Key
:type blockOrderMatchingKey: str
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: API response

.. code-block:: python
    {
        "blockTradeSettlementKey": "12b96c28-ba05-8906-c89t-703215cfb2e6",
        "expireTime": 1730171860460,
        "liquidity": "MAKER",
        "status": "RECEIVED",
        "createTime": 1730170060462,
        "legs": [
            {
                "symbol": "BNB-241101-700-C",
                "side": "SELL",
                "quantity": "1.66",
                "price": "20"
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException
r@   r  Tr  rM  r   s     r(   options_get_block_trade_order$Client.options_get_block_trade_order}%  s'    B (((F ) 
 	
r*   c                 &    U R                  SSSUS9$ )aT  Account Block Trade List (USER_DATA)

Gets block trades for a specific account.

https://developers.binance.com/docs/derivatives/option/market-maker-block-trade/Account-Block-Trade-List

:param endTime: optional
:type endTime: int
:param startTime: optional
:type startTime: int
:param underlying: optional
:type underlying: str
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: API response

.. code-block:: python
    [
        {
            "parentOrderId": "4675011431944499201",
            "crossType": "USER_BLOCK",
            "legs": [
                {
                    "createTime": 1730170445600,
                    "updateTime": 1730170445600,
                    "symbol": "BNB-241101-700-C",
                    "orderId": "4675011431944499203",
                    "orderPrice": 2.8,
                    "orderQuantity": 1.2,
                    "orderStatus": "FILLED",
                    "executedQty": 1.2,
                    "executedAmount": 3.36,
                    "fee": 0.336,
                    "orderType": "PREV_QUOTED",
                    "orderSide": "BUY",
                    "id": "1125899906900937837",
                    "tradeId": 1,
                    "tradePrice": 2.8,
                    "tradeQty": 1.2,
                    "tradeTime": 1730170445600,
                    "liquidity": "TAKER",
                    "commission": 0.336
                }
            ],
            "blockTradeSettlementKey": "7d085e6e-a229-2335-ab9d-6a581febcd25"
        }
    ]

:raises: BinanceRequestException, BinanceAPIException
r@   zblock/user-tradesTr  rM  r   s     r(    options_account_get_block_trades'Client.options_account_get_block_trades%  s'    h ((&t& ) 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get Fiat Deposit/Withdraw History

https://binance-docs.github.io/apidocs/spot/en/#get-fiat-deposit-withdraw-history-user_data

:param transactionType: required - 0-deposit,1-withdraw
:type transactionType: str
:param beginTime: optional
:type beginTime: int
:param endTime: optional
:type endTime: int
:param page: optional - default 1
:type page: int
:param rows: optional - default 100, max 500
:type rows: int
:param recvWindow: optional
:type recvWindow: int

r@   zfiat/ordersTr  r  r   s     r(   !get_fiat_deposit_withdraw_history(Client.get_fiat_deposit_withdraw_history%  s    & ''}TPV'WWr*   c                 &    U R                  SSSUS9$ )a  Get Fiat Payments History

https://binance-docs.github.io/apidocs/spot/en/#get-fiat-payments-history-user_data

:param transactionType: required - 0-buy,1-sell
:type transactionType: str
:param beginTime: optional
:type beginTime: int
:param endTime: optional
:type endTime: int
:param page: optional - default 1
:type page: int
:param rows: optional - default 100, max 500
:type rows: int
:param recvWindow: optional
:type recvWindow: int

r@   zfiat/paymentsTr  r  r   s     r(   get_fiat_payments_history Client.get_fiat_payments_history%  s%    & ''?4f ( 
 	
r*   c                 &    U R                  SSSUS9$ )uu  Get C2C Trade History

https://binance-docs.github.io/apidocs/spot/en/#get-c2c-trade-history-user_data

:param tradeType: required - BUY, SELL
:type tradeType: str
:param startTimestamp: optional
:type startTime: int
:param endTimestamp: optional
:type endTimestamp: int
:param page: optional - default 1
:type page: int
:param rows: optional - default 100, max 100
:type rows: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response

    {
        "code": "000000",
        "message": "success",
        "data": [
            {
                "orderNumber":"20219644646554779648",
                "advNo": "11218246497340923904",
                "tradeType": "SELL",
                "asset": "BUSD",
                "fiat": "CNY",
                "fiatSymbol": "￥",
                "amount": "5000.00000000",  // Quantity (in Crypto)
                "totalPrice": "33400.00000000",
                "unitPrice": "6.68", // Unit Price (in Fiat)
                "orderStatus": "COMPLETED",  // PENDING, TRADING, BUYER_PAYED, DISTRIBUTING, COMPLETED, IN_APPEAL, CANCELLED, CANCELLED_BY_SYSTEM
                "createTime": 1619361369000,
                "commission": "0",   // Transaction Fee (in Crypto)
                "counterPartNickName": "ab***",
                "advertisementRole": "TAKER"
            }
        ],
        "total": 1,
        "success": true
    }

r@   z#c2c/orderMatch/listUserOrderHistoryTr  r  r   s     r(   get_c2c_trade_historyClient.get_c2c_trade_history
&  s'    \ ''8F ( 
 	
r*   c                 &    U R                  SSSUS9$ )a<  Get C2C Trade History

https://binance-docs.github.io/apidocs/spot/en/#pay-endpoints

:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param limit: optional - default 100, max 100
:type limit: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zpay/transactionsTr  r  r   s     r(   get_pay_trade_historyClient.get_pay_trade_history>&  s&    " ''%d ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get C2C Trade History

https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History

:param startTime: required - Start Time - 1593511200000
:type startTime: int
:param endTime: required - End Time - 1593511200000
:type endTime: int
:param limit: optional - default 100, max 100
:type limit: int
:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zconvert/tradeFlowTr  r  r   s     r(   get_convert_trade_history Client.get_convert_trade_historyU&  s&    " ''&t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )aB  Request a quote for the requested token pairs

https://developers.binance.com/docs/convert/trade

:param fromAsset: required - Asset to convert from - BUSD
:type fromAsset: str
:param toAsset: required - Asset to convert to - BTC
:type toAsset: str
:param fromAmount: EITHER - When specified, it is the amount you will be debited after the conversion
:type fromAmount: decimal
:param toAmount: EITHER - When specified, it is the amount you will be credited after the conversion
:type toAmount: decimal

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r   convert/getQuoteTr  r  r   s     r(   convert_request_quoteClient.convert_request_quotej&  s&    ( ''&t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )zAccept the offered quote by quote ID.

https://developers.binance.com/docs/convert/trade/Accept-Quote

:param quoteId: required - 457235734584567
:type quoteId: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r   convert/acceptQuoteTr  r  r   s     r(   convert_accept_quoteClient.convert_accept_quote&  s&     '')$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )zQuery account balance.

https://developers.binance.com/docs/derivatives/portfolio-margin/account

:param asset: required
:type asset: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   r2  Tr  r|   r   s     r(   papi_get_balanceClient.papi_get_balance&  s     %%eYt&%QQr*   c                 &    U R                  SSSUS9$ )zQuery User Rate Limit

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-User-Rate-Limit


:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   r  Tr  r  r   s     r(   papi_get_rate_limitClient.papi_get_rate_limit&  s      %%e->tRX%YYr*   c                 0    U R                  SSS0 S9nUS   $ )a  Start a new user data stream for Portfolio Margin account.

https://developers.binance.com/docs/derivatives/portfolio-margin/user-data-streams/Start-User-Data-Stream

:returns: API response

    {
        "listenKey": "pM_XXXXXXX"
    }

The stream will close after 60 minutes unless a keepalive is sent.
If the account has an active listenKey, that listenKey will be returned and its validity will be extended for 60 minutes.

Weight: 1

r   r  Fr  r  r  s     r(   papi_stream_get_listen_key!Client.papi_stream_get_listen_key&  s(    " $$V[R$P;r*   c                 .    SU0nU R                  SSSUS9$ )a7  Keepalive a user data stream to prevent a time out.

https://developers.binance.com/docs/derivatives/portfolio-margin/user-data-streams/Keepalive-User-Data-Stream

:returns: API response

    {}

User data streams will close after 60 minutes. It's recommended to send a ping about every 60 minutes.

Weight: 1

r  r   Fr  r  r  s      r(   papi_stream_keepaliveClient.papi_stream_keepalive&  s(     y)%%e[V%TTr*   c                 .    SU0nU R                  SSSUS9$ )zClose out a user data stream.

https://developers.binance.com/docs/derivatives/portfolio-margin/user-data-streams/Close-User-Data-Stream

:returns: API response

    {}

Weight: 1

r  r   Fr  r  r  s      r(   papi_stream_closeClient.papi_stream_close&  s)     y)%%hEPV%WWr*   c                 &    U R                  SSSUS9$ )zQuery account information.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Account-Information

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   rv  Tr  r  r   s     r(   papi_get_accountClient.papi_get_account&  s     %%eYt&%QQr*   c                 &    U R                  SSSUS9$ )zQuery margin max borrow.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Margin-Max-Borrow

:param asset: required
:type asset: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   r  Tr  r  r   s     r(   papi_get_margin_max_borrowable%Client.papi_get_margin_max_borrowable&  s&     %%)$V & 
 	
r*   c                 &    U R                  SSSUS9$ )zQuery margin max borrow.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-Margin-Max-Withdraw

:param asset: required
:type asset: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zmargin/maxWithdrawTr  r  r   s     r(   papi_get_margin_max_withdraw#Client.papi_get_margin_max_withdraw'  &     %%'6 & 
 	
r*   c                 &    U R                  SSSUS9$ )zQuery margin max borrow.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-UM-Position-Information

:param symbol: required
:type symbol: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zum/positionRiskTr  r  r   s     r(   papi_get_um_position_risk Client.papi_get_um_position_risk'  &     %%$T & 
 	
r*   c                 &    U R                  SSSUS9$ )zQuery margin max borrow.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-CM-Position-Information

:param asset: required
:type asset: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zcm/positionRiskTr  r  r   s     r(   papi_get_cm_position_risk Client.papi_get_cm_position_risk/'  r  r*   c                 &    U R                  SSSUS9$ )a"  Query margin max borrow.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-UM-Initial-Leverage

:param asset: required
:type asset: str

:param leverage: required
:type leverage: int

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r   zum/leverageTr  r  r   s     r(   papi_set_um_leverageClient.papi_set_um_leverageA'      " %%fmDv%VVr*   c                 &    U R                  SSSUS9$ )a"  Query margin max borrow.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-CM-Initial-Leverage

:param asset: required
:type asset: str

:param leverage: required
:type leverage: int

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r   zcm/leverageTr  r  r   s     r(   papi_set_cm_leverageClient.papi_set_cm_leverageT'  r  r*   c                 &    U R                  SSSUS9$ )a>  Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-UM-Position-Mode

:param dualSidePosition: required
:type dualSidePosition: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r   um/positionSide/dualTr  r  r   s     r(   !papi_change_um_position_side_dual(Client.papi_change_um_position_side_dualg'  &     %%*4f & 
 	
r*   c                 &    U R                  SSSUS9$ )a>  Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-CM-Position-Mode

:param dualSidePosition: required
:type dualSidePosition: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r   cm/positionSide/dualTr  r  r   s     r(   !papi_change_cm_position_side_dual(Client.papi_change_cm_position_side_dualy'  r   r*   c                 &    U R                  SSSUS9$ )a  Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Current-Position-Mode

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   r  Tr  r  r   s     r(   papi_get_um_position_side_dual%Client.papi_get_um_position_side_dual'  &     %%)$V & 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Current-Position-Mode

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   r  Tr  r  r   s     r(   papi_get_cm_position_side_dual%Client.papi_get_cm_position_side_dual'  r  r*   c                 &    U R                  SSSUS9$ )a  Query UM notional and leverage brackets.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/UM-Notional-and-Leverage-Brackets

:param symbol: optional
:type symbol: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zum/leverageBracketTr  r  r   s     r(   papi_get_um_leverage_bracket#Client.papi_get_um_leverage_bracket'  r  r*   c                 &    U R                  SSSUS9$ )a  Query CM notional and leverage brackets.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/CM-Notional-and-Leverage-Brackets

:param symbol: optional
:type symbol: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zcm/leverageBracketTr  r  r   s     r(   papi_get_cm_leverage_bracket#Client.papi_get_cm_leverage_bracket'  r  r*   c                 &    U R                  SSSUS9$ )a6  Portfolio Margin UM Trading Quantitative Rules Indicators.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Portfolio-Margin-UM-Trading-Quantitative-Rules-Indicators

:param symbol: optional
:type symbol: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zum/apiTradingStatusTr  r  r   s     r(   papi_get_um_api_trading_status%Client.papi_get_um_api_trading_status'  s&     %%(F & 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get User Commission Rate for UM.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-User-Commission-Rate-for-UM

:param symbol: required
:type symbol: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zum/commissionRateTr  r  r   s     r(   papi_get_um_comission_rate!Client.papi_get_um_comission_rate'  &     %%&t& & 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get User Commission Rate for CM.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-User-Commission-Rate-for-CM

:param symbol: required
:type symbol: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zcm/commissionRateTr  r  r   s     r(   papi_get_cm_comission_rate!Client.papi_get_cm_comission_rate'  r  r*   c                 &    U R                  SSSUS9$ )zQuery margin loan record.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-Margin-Loan-Record

:param asset: required
:type asset: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zmargin/marginLoanTr  r  r   s     r(   papi_get_margin_margin_loan"Client.papi_get_margin_margin_loan(  r  r*   c                 &    U R                  SSSUS9$ )zQuery margin repay record.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-Margin-repay-Record

:param asset: required
:type asset: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zmargin/repayLoanTr  r  r   s     r(   papi_get_margin_repay_loan!Client.papi_get_margin_repay_loan(  s&     %%%d & 
 	
r*   c                 &    U R                  SSSUS9$ )zQuery Auto-repay-futures Status.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Auto-repay-futures-Status

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   repay-futures-switchTr  r  r   s     r(   papi_get_repay_futures_switch$Client.papi_get_repay_futures_switch'(  r  r*   c                 &    U R                  SSSUS9$ )a
  Change Auto-repay-futures Status.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Change-Auto-repay-futures-Status

:param autoRepay: required
:type autoRepay: str

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r   r#  Tr  r  r   s     r(   papi_repay_futures_switch Client.papi_repay_futures_switch6(  r   r*   c                 &    U R                  SSSUS9$ )zGet Margin Borrow/Loan Interest History.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Margin-BorrowLoan-Interest-History

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zmargin/marginInterestHistoryTr  r  r   s     r(    papi_get_margin_interest_history'Client.papi_get_margin_interest_historyH(  s&     %%1$V & 
 	
r*   c                 &    U R                  SSSUS9$ )zRepay futures Negative Balance.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Repay-futures-Negative-Balance

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r   zrepay-futures-negative-balanceTr  r  r   s     r(   #papi_repay_futures_negative_balance*Client.papi_repay_futures_negative_balanceW(  s&     %%4T & 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query interest history of negative balance for portfolio margin.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-Portfolio-Margin-Negative-Balance-Interest-History

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zportfolio/interest-historyTr  r  r   s     r(   #papi_get_portfolio_interest_history*Client.papi_get_portfolio_interest_historyf(  s&     %%/6 & 
 	
r*   c                 &    U R                  SSSUS9$ )zQuery user negative balance auto exchange record.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Query-User-Negative-Balance-Auto-Exchange-Record

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   z*portfolio/negative-balance-exchange-recordTr  r  r   s     r(   3papi_get_portfolio_negative_balance_exchange_record:Client.papi_get_portfolio_negative_balance_exchange_recordv(  s'     %%?SY & 
 	
r*   c                 &    U R                  SSSUS9$ )zFund collection for Portfolio Margin.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Fund-Auto-collection

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r   zauto-collectionTr  r  r   s     r(   papi_fund_auto_collection Client.papi_fund_auto_collection(  s&     %%%d & 
 	
r*   c                 &    U R                  SSSUS9$ )zTransfers specific asset from Futures Account to Margin account.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Fund-Collection-by-Asset

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r   zasset-collectionTr  r  r   s     r(   papi_fund_asset_collection!Client.papi_fund_asset_collection(  s&     %%&t& & 
 	
r*   c                 &    U R                  SSSUS9$ )zTransfer BNB in and out of UM.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/BNB-transfer

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r   zbnb-transferTr  r  r   s     r(   papi_bnb_transferClient.papi_bnb_transfer(  s     %%fnTPV%WWr*   c                 &    U R                  SSSUS9$ )zGet UM Income History.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Income-History

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   z	um/incomeTr  r  r   s     r(   papi_get_um_income_history!Client.papi_get_um_income_history(       %%e[F%SSr*   c                 &    U R                  SSSUS9$ )zGet CM Income History.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Income-History

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   z	cm/incomeTr  r  r   s     r(   papi_get_cm_income_history!Client.papi_get_cm_income_history(  rA  r*   c                 &    U R                  SSSUS9$ )zGet current UM account asset and position information.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Account-Detail

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   
um/accountTr  r  r   s     r(   papi_get_um_accountClient.papi_get_um_account(       %%e\$V%TTr*   c                 (    U R                  SSSSUS9$ )zGet current UM account asset and position information.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Account-Detail-V2

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   rF  r<  Tr  r  r   s     r(   papi_get_um_account_v2Client.papi_get_um_account_v2(  s'     %%<4f & 
 	
r*   c                 &    U R                  SSSUS9$ )zGet current CM account asset and position information.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-CM-Account-Detail

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   z
cm/accountTr  r  r   s     r(   papi_get_cm_accountClient.papi_get_cm_account(  rI  r*   c                 &    U R                  SSSUS9$ )zQuery UM Futures account configuration.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Futures-Account-Config

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zum/accountConfigTr  r  r   s     r(   papi_get_um_account_config!Client.papi_get_um_account_config(  &     %%%d & 
 	
r*   c                 &    U R                  SSSUS9$ )zGet current UM account symbol configuration.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Futures-Symbol-Config

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zum/symbolConfigTr  r  r   s     r(   papi_get_um_symbol_config Client.papi_get_um_symbol_config)  s&     %%$T & 
 	
r*   c                 &    U R                  SSSUS9$ )zGet download id for UM futures trade history.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Download-Id-For-UM-Futures-Trade-History

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zum/trade/asynTr  r  r   s     r(   papi_get_um_trade_asynClient.papi_get_um_trade_asyn)       %%e_TPV%WWr*   c                 &    U R                  SSSUS9$ )zGet UM futures trade download link by Id.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Futures-Trade-Download-Link-by-Id

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zum/trade/asyn/idTr  r  r   s     r(   papi_get_um_trade_asyn_id Client.papi_get_um_trade_asyn_id)  rS  r*   c                 &    U R                  SSSUS9$ )zGet download id for UM futures order history.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Download-Id-For-UM-Futures-Order-History

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zum/order/asynTr  r  r   s     r(   papi_get_um_order_asynClient.papi_get_um_order_asyn-)  rZ  r*   c                 &    U R                  SSSUS9$ )zGet UM futures order download link by Id.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Futures-Order-Download-Link-by-Id

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zum/order/asyn/idTr  r  r   s     r(   papi_get_um_order_asyn_id Client.papi_get_um_order_asyn_id:)  rS  r*   c                 &    U R                  SSSUS9$ )zGet download id for UM futures transaction history.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-Download-Id-For-UM-Futures-Transaction-History

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zum/income/asynTr  r  r   s     r(   papi_get_um_income_asynClient.papi_get_um_income_asynI)  s      %%e-=dQW%XXr*   c                 &    U R                  SSSUS9$ )zGet UM futures Transaction download link by Id.

https://developers.binance.com/docs/derivatives/portfolio-margin/account/Get-UM-Futures-Transaction-Download-Link-by-Id

:param recvWindow: optional
:type recvWindow: int

:returns: API response

r@   zum/income/asyn/idTr  r  r   s     r(   papi_get_um_income_asyn_id!Client.papi_get_um_income_asyn_idV)  s&     %%&t& & 
 	
r*   c                 &    U R                  SSSUS9$ )zTest connectivity to the Rest API.

https://developers.binance.com/docs/derivatives/portfolio-margin/market-data

:returns: API response

r@   r!   Fr  r  r   s     r(   	papi_pingClient.papi_pingg)  s     %%eVE%OOr*   c                 r    SU;  a   U R                   U R                  5       -   US'   U R                  SSSUS9$ )zuPlace new UM order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade

:returns: API response

r+  r   um/orderTr  r  r/  r|   r   s     r(   papi_create_um_orderClient.papi_create_um_orders)  B     V+)-)C)Cdkkm)SF%&%%fjF%SSr*   c                 r    SU;  a   U R                   U R                  5       -   US'   U R                  SSSUS9$ )zPlace new UM Conditional order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-UM-Conditional-Order

:returns: API response

r+  r   um/conditional/orderTr  ro  r   s     r(    papi_create_um_conditional_order'Client.papi_create_um_conditional_order)  J     V+)-)C)Cdkkm)SF%&%%*4f & 
 	
r*   c                 r    SU;  a   U R                   U R                  5       -   US'   U R                  SSSUS9$ )zPlace new CM order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Order

:returns: API response

r+  r   cm/orderTr  ro  r   s     r(   papi_create_cm_orderClient.papi_create_cm_order)  rr  r*   c                 r    SU;  a   U R                   U R                  5       -   US'   U R                  SSSUS9$ )zPlace new CM Conditional order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-CM-Conditional-Order

:returns: API response

r+  r   cm/conditional/orderTr  ro  r   s     r(    papi_create_cm_conditional_order'Client.papi_create_cm_conditional_order)  rw  r*   c                 r    SU;  a   U R                   U R                  5       -   US'   U R                  SSSUS9$ )zNew Margin Order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/New-Margin-Order

:returns: API response

r+  r   rZ  Tr  ro  r   s     r(   papi_create_margin_orderClient.papi_create_margin_order)  sC     V+)-)C)Cdkkm)SF%&%%fnTPV%WWr*   c                 &    U R                  SSSUS9$ )zApply for a margin loan.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Borrow

:returns: API response

r   
marginLoanTr  r  r   s     r(   papi_margin_loanClient.papi_margin_loan)       %%fl4f%UUr*   c                 &    U R                  SSSUS9$ )zRepay for a margin loan.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Repay

:returns: API response

r   	repayLoanTr  r  r   s     r(   papi_repay_loanClient.papi_repay_loan)  s     %%fk$V%TTr*   c                 &    U R                  SSSUS9$ )zSend in a new OCO for a margin account.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-New-OCO

:returns: API response

r   r  Tr  r  r   s     r(   papi_margin_order_ocoClient.papi_margin_order_oco)  s&     %%&t& & 
 	
r*   c                 &    U R                  SSSUS9$ )zCancel an active UM LIMIT order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-UM-Order

:returns: API response

r   rn  Tr  r  r   s     r(   papi_cancel_um_orderClient.papi_cancel_um_order)       %%h
4f%UUr*   c                 &    U R                  SSSUS9$ )zCancel an active UM LIMIT order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-UM-Open-Orders

:returns: API response

r   zum/allOpenOrdersTr  r  r   s     r(   papi_cancel_um_all_open_orders%Client.papi_cancel_um_all_open_orders)  &     %%(F & 
 	
r*   c                 &    U R                  SSSUS9$ )zCancel UM Conditional Order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-UM-Conditional-Order

:returns: API response

r   rt  Tr  r  r   s     r(    papi_cancel_um_conditional_order'Client.papi_cancel_um_conditional_order)  &     %%,T & 
 	
r*   c                 &    U R                  SSSUS9$ )zCancel All UM Open Conditional Orders.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-UM-Open-Conditional-Orders

:returns: API response

r   zum/conditional/allOpenOrdersTr  r  r   s     r(   *papi_cancel_um_conditional_all_open_orders1Client.papi_cancel_um_conditional_all_open_orders)  &     %%4T & 
 	
r*   c                 &    U R                  SSSUS9$ )zCancel an active CM LIMIT order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-CM-Order

:returns: API response

r   ry  Tr  r  r   s     r(   papi_cancel_cm_orderClient.papi_cancel_cm_order*  r  r*   c                 &    U R                  SSSUS9$ )zCancel an active CM LIMIT order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-CM-Open-Orders

:returns: API response

r   zcm/allOpenOrdersTr  r  r   s     r(   papi_cancel_cm_all_open_orders%Client.papi_cancel_cm_all_open_orders*  r  r*   c                 &    U R                  SSSUS9$ )zCancel CM Conditional Order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-CM-Conditional-Order

:returns: API response

r   r}  Tr  r  r   s     r(    papi_cancel_cm_conditional_order'Client.papi_cancel_cm_conditional_order*  r  r*   c                 &    U R                  SSSUS9$ )zCancel All CM Open Conditional Orders.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-All-CM-Open-Conditional-Orders

:returns: API response

r   zcm/conditional/allOpenOrdersTr  r  r   s     r(   *papi_cancel_cm_conditional_all_open_orders1Client.papi_cancel_cm_conditional_all_open_orders#*  r  r*   c                 &    U R                  SSSUS9$ )zCancel Margin Account Order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-Margin-Account-Order

:returns: API response

r   rZ  Tr  r  r   s     r(   papi_cancel_margin_orderClient.papi_cancel_margin_order/*  s%     %%nT & 
 	
r*   c                 &    U R                  SSSUS9$ )zCancel Margin Account OCO Orders.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-Margin-Account-OCO-Orders

:returns: API response

r   r  Tr  r  r   s     r(   papi_cancel_margin_order_list$Client.papi_cancel_margin_order_list;*  r  r*   c                 &    U R                  SSSUS9$ )zCancel Margin Account All Open Orders on a Symbol.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Cancel-Margin-Account-All-Open-Orders-on-a-Symbol

:returns: API response

r   zmargin/allOpenOrdersTr  r  r   s     r(   "papi_cancel_margin_all_open_orders)Client.papi_cancel_margin_all_open_ordersG*  r  r*   c                 &    U R                  SSSUS9$ )zOrder modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Modify-UM-Order

:returns: API response

r   rn  Tr  r  r   s     r(   papi_modify_um_orderClient.papi_modify_um_orderS*       %%eZ6%RRr*   c                 &    U R                  SSSUS9$ )zOrder modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Modify-CM-Order

:returns: API response

r   ry  Tr  r  r   s     r(   papi_modify_cm_orderClient.papi_modify_cm_order]*  r  r*   c                 &    U R                  SSSUS9$ )zCheck an UM order's status.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-UM-Order

:returns: API response

r@   rn  Tr  r  r   s     r(   papi_get_um_orderClient.papi_get_um_orderg*  r  r*   c                 &    U R                  SSSUS9$ )zGet all account UM orders; active, canceled, or filled.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Orders

:returns: API response

r@   zum/allOrdersTr  r  r   s     r(   papi_get_um_all_ordersClient.papi_get_um_all_ordersq*       %%e^Dv%VVr*   c                 &    U R                  SSSUS9$ )zQuery current UM open order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-UM-Open-Order

:returns: API response

r@   zum/openOrderTr  r  r   s     r(   papi_get_um_open_orderClient.papi_get_um_open_order{*  r  r*   c                 &    U R                  SSSUS9$ )zGet all open orders on a symbol.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Orders

:returns: API response

r@   zum/openOrdersTr  r  r   s     r(   papi_get_um_open_ordersClient.papi_get_um_open_orders*       %%e_TPV%WWr*   c                 &    U R                  SSSUS9$ )zQuery All UM Conditional Orders.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-UM-Conditional-Orders

:returns: API response

r@   zum/conditional/allOrdersTr  r  r   s     r(   "papi_get_um_conditional_all_orders)Client.papi_get_um_conditional_all_orders*  &     %%-d & 
 	
r*   c                 &    U R                  SSSUS9$ )zGet all open conditional orders on a symbol.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Conditional-Orders

:returns: API response

r@   zum/conditional/openOrdersTr  r  r   s     r(   #papi_get_um_conditional_open_orders*Client.papi_get_um_conditional_open_orders*  &     %%.t& & 
 	
r*   c                 &    U R                  SSSUS9$ )zQuery Current UM Open Conditional Order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-UM-Open-Conditional-Order

:returns: API response

r@   zum/conditional/openOrderTr  r  r   s     r(   "papi_get_um_conditional_open_order)Client.papi_get_um_conditional_open_order*  r  r*   c                 &    U R                  SSSUS9$ )zGet all open conditional orders on a symbol.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-UM-Conditional-Order-History

:returns: API response

r@   zum/conditional/orderHistoryTr  r  r   s     r(   %papi_get_um_conditional_order_history,Client.papi_get_um_conditional_order_history*  &     %%0F & 
 	
r*   c                 &    U R                  SSSUS9$ )zCheck an CM order's status.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-CM-Order

:returns: API response

r@   ry  Tr  r  r   s     r(   papi_get_cm_orderClient.papi_get_cm_order*  r  r*   c                 &    U R                  SSSUS9$ )zGet all account CM orders; active, canceled, or filled.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Orders

:returns: API response

r@   zcm/allOrdersTr  r  r   s     r(   papi_get_cm_all_ordersClient.papi_get_cm_all_orders*  r  r*   c                 &    U R                  SSSUS9$ )zQuery current CM open order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-CM-Open-Order

:returns: API response

r@   zcm/openOrderTr  r  r   s     r(   papi_get_cm_open_orderClient.papi_get_cm_open_order*  r  r*   c                 &    U R                  SSSUS9$ )zGet all open orders on a symbol.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-CM-Open-Orders

:returns: API response

r@   zcm/openOrdersTr  r  r   s     r(   papi_get_cm_open_ordersClient.papi_get_cm_open_orders*  r  r*   c                 &    U R                  SSSUS9$ )zQuery All CM Conditional Orders.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-CM-Conditional-Orders

:returns: API response

r@   zcm/conditional/allOrdersTr  r  r   s     r(   "papi_get_cm_conditional_all_orders)Client.papi_get_cm_conditional_all_orders*  r  r*   c                 &    U R                  SSSUS9$ )zGet all open conditional orders on a symbol.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Current-CM-Open-Conditional-Orders

:returns: API response

r@   zcm/conditional/openOrdersTr  r  r   s     r(   #papi_get_cm_conditional_open_orders*Client.papi_get_cm_conditional_open_orders*  r  r*   c                 &    U R                  SSSUS9$ )zQuery Current UM Open Conditional Order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-CM-Open-Conditional-Order

:returns: API response

r@   zcm/conditional/openOrderTr  r  r   s     r(   "papi_get_cm_conditional_open_order)Client.papi_get_cm_conditional_open_order*  r  r*   c                 &    U R                  SSSUS9$ )zGet all open conditional orders on a symbol.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-CM-Conditional-Order-History

:returns: API response

r@   zcm/conditional/orderHistoryTr  r  r   s     r(   %papi_get_cm_conditional_order_history,Client.papi_get_cm_conditional_order_history+  r  r*   c                 &    U R                  SSSUS9$ )zQuery User's UM Force Orders.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Users-UM-Force-Orders

:returns: API response

r@   zum/forceOrdersTr  r  r   s     r(   papi_get_um_force_ordersClient.papi_get_um_force_orders+        %%e-=dQW%XXr*   c                 &    U R                  SSSUS9$ )zQuery User's CM Force Orders.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Users-CM-Force-Orders

:returns: API response

r@   zcm/forceOrdersTr  r  r   s     r(   papi_get_cm_force_ordersClient.papi_get_cm_force_orders!+  r  r*   c                 &    U R                  SSSUS9$ )zGet order modification history.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-UM-Modify-Order-History

:returns: API response

r@   zum/orderAmendmentTr  r  r   s     r(   papi_get_um_order_amendment"Client.papi_get_um_order_amendment++  &     %%&t& & 
 	
r*   c                 &    U R                  SSSUS9$ )zGet order modification history.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-CM-Modify-Order-History

:returns: API response

r@   zcm/orderAmendmentTr  r  r   s     r(   papi_get_cm_order_amendment"Client.papi_get_cm_order_amendment7+  r  r*   c                 &    U R                  SSSUS9$ )zQuery user's margin force orders.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Users-Margin-Force-Orders

:returns: API response

r@   zmargin/forceOrdersTr  r  r   s     r(   papi_get_margin_force_orders#Client.papi_get_margin_force_ordersC+  s&     %%'6 & 
 	
r*   c                 &    U R                  SSSUS9$ )zGet trades for a specific account and UM symbol.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/UM-Account-Trade-List

:returns: API response

r@   zum/userTradesTr  r  r   s     r(   papi_get_um_user_tradesClient.papi_get_um_user_tradesO+  r  r*   c                 &    U R                  SSSUS9$ )zGet trades for a specific account and CM symbol.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/CM-Account-Trade-List

:returns: API response

r@   zcm/userTradesTr  r  r   s     r(   papi_get_cm_user_tradesClient.papi_get_cm_user_tradesY+  r  r*   c                 &    U R                  SSSUS9$ )zQuery UM Position ADL Quantile Estimation.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/UM-Position-ADL-Quantile-Estimation

:returns: API response

r@   zum/adlQuantileTr  r  r   s     r(   papi_get_um_adl_quantileClient.papi_get_um_adl_quantilec+  r  r*   c                 &    U R                  SSSUS9$ )zQuery CM Position ADL Quantile Estimation.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/CM-Position-ADL-Quantile-Estimation

:returns: API response

r@   zcm/adlQuantileTr  r  r   s     r(   papi_get_cm_adl_quantileClient.papi_get_cm_adl_quantilem+  r  r*   c                 &    U R                  SSSUS9$ )zChange user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off ) on EVERY symbol.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Toggle-BNB-Burn-On-UM-Futures-Trade

:returns: API response

r   
um/feeBurnTr  r  r   s     r(   papi_set_um_fee_burnClient.papi_set_um_fee_burnw+  r  r*   c                 &    U R                  SSSUS9$ )zGet user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off).

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Get-UM-Futures-BNB-Burn-Status

:returns: API response

r@   r  Tr  r  r   s     r(   papi_get_um_fee_burnClient.papi_get_um_fee_burn+  s     %%e\$V%TTr*   c                 &    U R                  SSSUS9$ )zQuery Margin Account Order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Margin-Account-Order

:returns: API response

r@   rZ  Tr  r  r   s     r(   papi_get_margin_orderClient.papi_get_margin_order+  r  r*   c                 &    U R                  SSSUS9$ )zQuery Current Margin Open Order.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Current-Margin-Open-Order

:returns: API response

r@   ra  Tr  r  r   s     r(   papi_get_margin_open_orders"Client.papi_get_margin_open_orders+  r  r*   c                 &    U R                  SSSUS9$ )zQuery All Margin Account Orders.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-All-Margin-Account-Orders

:returns: API response

r@   r  Tr  r  r   s     r(   papi_get_margin_all_orders!Client.papi_get_margin_all_orders+  &     %%%d & 
 	
r*   c                 &    U R                  SSSUS9$ )zRetrieves a specific OCO based on provided optional parameters.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Margin-Account-OCO

:returns: API response

r@   r  Tr  r  r   s     r(   papi_get_margin_order_list!Client.papi_get_margin_order_list+  r  r*   c                 &    U R                  SSSUS9$ )zQuery all OCO for a specific margin account based on provided optional parameters.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Margin-Account-all-OCO

:returns: API response

r@   margin/allOrderListTr  r  r   s     r(   papi_get_margin_all_order_list%Client.papi_get_margin_all_order_list+  s&     %%(F & 
 	
r*   c                 &    U R                  SSSUS9$ )zQuery Margin Account's Open OCO.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Query-Margin-Account-Open-OCO

:returns: API response

r@   r  Tr  r  r   s     r(   papi_get_margin_open_order_list&Client.papi_get_margin_open_order_list+  s&     %%)$V & 
 	
r*   c                 &    U R                  SSSUS9$ )zMargin Account Trade List.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Trade-List

:returns: API response

r@   r  Tr  r  r   s     r(   papi_get_margin_my_trades Client.papi_get_margin_my_trades+  s&     %%$T & 
 	
r*   c                 &    U R                  SSSUS9$ )zRepay debt for a margin loan.

https://developers.binance.com/docs/derivatives/portfolio-margin/trade/Margin-Account-Repay-Debt

:returns: API response

r   zmargin/repay-debtTr  r  r   s     r(   papi_get_margin_repay_debt!Client.papi_get_margin_repay_debt+  s&     %%'6 & 
 	
r*   c                 \    U R                   (       a  U R                   R                  5         g g r-   )r0   closer   s    r(   close_connectionClient.close_connection+  s    <<LL  r*   c                 $    U R                  5         g r-   )r0  r   s    r(   __del__Client.__del__+  s    r*   c                 t    SU;  a   U R                   U R                  5       -   US'   U R                  SSU5      $ )a  Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine.
https://binance-docs.github.io/apidocs/websocket_api/en/#test-new-order-trade
:param symbol: required
:type symbol: str
:param side: required
:type side: str
:param type: required
:type type: str
:param timeInForce: required if limit order
:type timeInForce: str
:param quantity: required
:type quantity: decimal
:param price: required
:type price: str
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param icebergQty: Used with iceberg orders
:type icebergQty: decimal
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: The number of milliseconds the request is valid for
:type recvWindow: int
:returns: WS response
.. code-block:: python
    {}
r+  z
order.testTr.  r/  _ws_api_request_syncr   s     r(   ws_create_test_orderClient.ws_create_test_order+  s=    8 V+)-)?)?$++-)OF%&((tVDDr*   c                 t    SU;  a   U R                   U R                  5       -   US'   U R                  SSU5      $ )a  Create an order via WebSocket.
https://binance-docs.github.io/apidocs/websocket_api/en/#place-new-order-trade
:param id: The request ID to be used. By default uuid22() is used.
:param symbol: The symbol to create an order for
:param side: BUY or SELL
:param type: Order type (e.g., LIMIT, MARKET)
:param quantity: The amount to buy or sell
:param kwargs: Additional order parameters
r+  order.placeTr6  r   s     r(   ws_create_orderClient.ws_create_order,  s=     V+)-)?)?$++-)OF%&((fEEr*   c                 b    UR                  U R                  US.5        U R                  " S0 UD6$ )aS  Send in a new limit order
Any order with an icebergQty MUST have timeInForce set to GTC.
:param symbol: required
:type symbol: str
:param side: required
:type side: str
:param quantity: required
:type quantity: decimal
:param price: required
:type price: str
:param timeInForce: default Good till cancelled
:type timeInForce: str
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param icebergQty: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.
:type icebergQty: decimal
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int
:returns: WS response
See order endpoint for full response options
r3  r   )r2   r6  r<  r7  s      r(   ws_order_limitClient.ws_order_limit$,  s7    0 	))&
 	 ##-f--r*   c                 d    UR                  SU R                  05        U R                  " SSU0UD6$ )a7  Send in a new limit buy order
Any order with an icebergQty MUST have timeInForce set to GTC.
:param symbol: required
:type symbol: str
:param quantity: required
:type quantity: decimal
:param price: required
:type price: str
:param timeInForce: default Good till cancelled
:type timeInForce: str
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param stopPrice: Used with stop orders
:type stopPrice: decimal
:param icebergQty: Used with iceberg orders
:type icebergQty: decimal
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int
:returns: WS response
See order endpoint for full response options
r;  r5  r   )r2   r<  r?  r7  s      r(   ws_order_limit_buyClient.ws_order_limit_buyB,  s9    0 	DMM
 	 ""E{EfEEr*   c                 d    UR                  SU R                  05        U R                  " SSU0UD6$ )a  Send in a new limit sell order
:param symbol: required
:type symbol: str
:param quantity: required
:type quantity: decimal
:param price: required
:type price: str
:param timeInForce: default Good till cancelled
:type timeInForce: str
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param stopPrice: Used with stop orders
:type stopPrice: decimal
:param icebergQty: Used with iceberg orders
:type icebergQty: decimal
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int
:returns: WS response
See order endpoint for full response options
r;  r5  r   )r2   r@  r?  r7  s      r(   ws_order_limit_sellClient.ws_order_limit_sell_,  s2    . 	vt~~./""E{EfEEr*   c                 `    UR                  SU R                  05        U R                  " S0 UD6$ )a  Send in a new market order
:param symbol: required
:type symbol: str
:param side: required
:type side: str
:param quantity: required
:type quantity: decimal
:param quoteOrderQty: amount the user wants to spend (when buying) or receive (when selling)
    of the quote asset
:type quoteOrderQty: decimal
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int
:returns: WS response
See order endpoint for full response options
r4  r   )r2   rD  r<  r   s     r(   ws_order_marketClient.ws_order_markety,  s/    ( 	vt5567##-f--r*   c                 `    UR                  SU R                  05        U R                  " S0 UD6$ )al  Send in a new market buy order
:param symbol: required
:type symbol: str
:param quantity: required
:type quantity: decimal
:param quoteOrderQty: the amount the user wants to spend of the quote asset
:type quoteOrderQty: decimal
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int
:returns: WS response
See order endpoint for full response options
r;  r   )r2   r<  rH  r   s     r(   ws_order_market_buyClient.ws_order_market_buy,  s-    " 	vt}}-.##-f--r*   c                 `    UR                  SU R                  05        U R                  " S0 UD6$ )ao  Send in a new market sell order
:param symbol: required
:type symbol: str
:param quantity: required
:type quantity: decimal
:param quoteOrderQty: the amount the user wants to receive of the quote asset
:type quoteOrderQty: decimal
:param newClientOrderId: A unique id for the order. Automatically generated if not sent.
:type newClientOrderId: str
:param newOrderRespType: Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
:type newOrderRespType: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int
:returns: WS response
See order endpoint for full response options
r;  r   )r2   r@  rH  r   s     r(   ws_order_market_sellClient.ws_order_market_sell,  s-    " 	vt~~./##-f--r*   c                 (    U R                  SSU5      $ )a  Check an order's status. Either orderId or origClientOrderId must be sent.
https://binance-docs.github.io/apidocs/websocket_api/en/#query-order-user_data
:param symbol: required
:type symbol: str
:param orderId: The unique order id
:type orderId: int
:param origClientOrderId: optional
:type origClientOrderId: str
:param recvWindow: the number of milliseconds the request is valid for
:type recvWindow: int
order.statusTr7  r   s     r(   ws_get_orderClient.ws_get_order,  s     ((vFFr*   c                 (    U R                  SSU5      $ )a[  Cancel an active order.
https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#cancel-order-trade

:param symbol: required - Trading symbol, e.g. 'BTCUSDT'
:type symbol: str
:param orderId: optional - The unique order id
:type orderId: int
:param origClientOrderId: optional - The original client order id
:type origClientOrderId: str
:param newClientOrderId: optional - Used to uniquely identify this cancel. Automatically generated if not sent
:type newClientOrderId: str
:param cancelRestrictions: optional - ONLY_NEW - Cancel will succeed if the order status is NEW. ONLY_PARTIALLY_FILLED - Cancel will succeed if order status is PARTIALLY_FILLED.
:type cancelRestrictions: str
:param recvWindow: optional - The number of milliseconds the request is valid for
:type recvWindow: int

Either orderId or origClientOrderId must be sent.

Weight: 1

Returns:
.. code-block:: python
    {
        "id": "5633b6a2-90a9-4192-83e7-925c90b6a2fd",
        "method": "order.cancel",
        "params": {
            "symbol": "BTCUSDT",
            "origClientOrderId": "4d96324ff9d44481926157",
            "apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
            "signature": "33d5b721f278ae17a52f004a82a6f68a70c68e7dd6776ed0be77a455ab855282",
            "timestamp": 1660801715830
        }
    }
order.cancelTrR  r   s     r(   ws_cancel_orderClient.ws_cancel_order,  s    F ((vFFr*   c                 (    U R                  SSU5      $ )a  Cancels an existing order and places a new order on the same symbol.
https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#cancel-and-replace-order-trade

:param symbol: required - Trading symbol, e.g. 'BTCUSDT'
:type symbol: str
:param cancelReplaceMode: required - The mode of cancel-replace: STOP_ON_FAILURE - If the cancel request fails, new order placement will not be attempted. ALLOW_FAILURE - New order placement will be attempted even if cancel request fails
:type cancelReplaceMode: str
:param cancelOrderId: optional - The order ID to cancel
:type cancelOrderId: int
:param cancelOrigClientOrderId: optional - The original client order ID to cancel
:type cancelOrigClientOrderId: str
:param cancelNewClientOrderId: optional - Used to uniquely identify this cancel. Automatically generated if not sent
:type cancelNewClientOrderId: str
:param side: required - BUY or SELL
:type side: str
:param type: required - Order type, e.g. LIMIT, MARKET
:type type: str
:param timeInForce: optional - GTC, IOC, FOK
:type timeInForce: str
:param price: optional - Order price
:type price: str
:param quantity: optional - Order quantity
:type quantity: str
:param quoteOrderQty: optional - Quote quantity
:type quoteOrderQty: str
:param newClientOrderId: optional - Used to uniquely identify this new order
:type newClientOrderId: str
:param newOrderRespType: optional - ACK, RESULT, or FULL
:type newOrderRespType: str
:param stopPrice: optional - Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders
:type stopPrice: str
:param trailingDelta: optional - Used with TAKE_PROFIT, TAKE_PROFIT_LIMIT, STOP_LOSS, STOP_LOSS_LIMIT orders
:type trailingDelta: int
:param icebergQty: optional - Used with iceberg orders
:type icebergQty: str
:param strategyId: optional - Arbitrary numeric value identifying the order within an order strategy
:type strategyId: int
:param strategyType: optional - Arbitrary numeric value identifying the order strategy
:type strategyType: int
:param selfTradePreventionMode: optional - The allowed enums is dependent on what is configured on the symbol
:type selfTradePreventionMode: str
:param cancelRestrictions: optional - ONLY_NEW - Cancel will succeed if order status is NEW. ONLY_PARTIALLY_FILLED - Cancel will succeed if order status is PARTIALLY_FILLED
:type cancelRestrictions: str
:param recvWindow: optional - The number of milliseconds the request is valid for
:type recvWindow: int

Either cancelOrderId or cancelOrigClientOrderId must be provided.
Price is required for LIMIT orders.
Either quantity or quoteOrderQty must be provided.

Weight: 1

Returns:
.. code-block:: python
   {
        "id": "99de6b92-0eda-4154-9c8d-a51d93c6f92e",
        "status": 200,
        "result": {
            "cancelResult": "SUCCESS",
            "newOrderResult": "SUCCESS",
            "cancelResponse": {
                "symbol": "BTCUSDT",
                "origClientOrderId": "4d96324ff9d44481926157",
                "orderId": 12569099453,
                "orderListId": -1,
                "clientOrderId": "91fe37ce9e69c90d6358c0",
                "price": "23416.10000000",
                "origQty": "0.00847000",
                "executedQty": "0.00001000",
                "cummulativeQuoteQty": "0.23416100",
                "status": "CANCELED",
                "timeInForce": "GTC",
                "type": "LIMIT",
                "side": "SELL",
                "selfTradePreventionMode": "NONE"
            },
            "newOrderResponse": {
                "symbol": "BTCUSDT",
                "orderId": 12569099454,
                "orderListId": -1,
                "clientOrderId": "bX5wROblo6YeDwa9iTLeyY",
                "transactTime": 1660801715639
            }
        }
    }
zorder.cancelReplaceTrR  r   s     r(   ws_cancel_and_replace_order"Client.ws_cancel_and_replace_order,  s    n (()>fMMr*   c                 (    U R                  SSU5      $ )a  Get all open orders on a symbol or all symbols.
https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#current-open-orders-user_data

:param symbol: optional - Symbol to get open orders for
:type symbol: str
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: API response

Response format:
[
    {
        "symbol": "BTCUSDT",
        "orderId": 12569099453,
        "orderListId": -1,
        "clientOrderId": "4d96324ff9d44481926157",
        "price": "23416.10000000",
        "origQty": "0.00847000",
        "executedQty": "0.00720000",
        "cummulativeQuoteQty": "168.59532000",
        "status": "PARTIALLY_FILLED",
        "timeInForce": "GTC",
        "type": "LIMIT",
        "side": "SELL",
        "stopPrice": "0.00000000",
        "icebergQty": "0.00000000",
        "time": 1660801715639,
        "updateTime": 1660801717945,
        "isWorking": true,
        "workingTime": 1660801715639,
        "origQuoteOrderQty": "0.00000000",
        "selfTradePreventionMode": "NONE"
    }
]

Weight: Adjusted based on parameters:
- With symbol: 6
- Without symbol: 12
zopenOrders.statusTrR  r   s     r(   ws_get_open_ordersClient.ws_get_open_ordersD-  s    R (()<dFKKr*   c                 (    U R                  SSU5      $ )aP  Cancel all open orders on a symbol or all symbols.
https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#cancel-open-orders-trade

:param symbol: optional - Symbol to cancel orders for
:type symbol: str
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: Websocket message

Response format:
[
    {
        "symbol": "BTCUSDT",
        "origClientOrderId": "4d96324ff9d44481926157",
        "orderId": 12569099453,
        "orderListId": -1,
        "clientOrderId": "91fe37ce9e69c90d6358c0",
        "price": "23416.10000000",
        "origQty": "0.00847000",
        "executedQty": "0.00847000",
        "cummulativeQuoteQty": "198.33521500",
        "status": "CANCELED",
        "timeInForce": "GTC",
        "type": "LIMIT",
        "side": "SELL",
        "stopPrice": "0.00000000",
        "trailingDelta": 0,
        "trailingTime": -1,
        "icebergQty": "0.00000000",
        "strategyId": 37463720,
        "strategyType": 1000000,
        "selfTradePreventionMode": "NONE"
    }
]

Weight: 1
zopenOrders.cancelAllTrR  r   s     r(   ws_cancel_all_open_orders Client.ws_cancel_all_open_orderso-  s    N (()?vNNr*   c                 (    U R                  SSU5      $ )a  Create a new OCO (One-Cancels-the-Other) order.
https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#place-new-order-list---oco-trade

:param symbol: required - Trading symbol
:type symbol: str
:param side: required - BUY or SELL
:type side: str
:param quantity: required - Order quantity
:type quantity: decimal
:param price: required - Order price for limit leg
:type price: decimal
:param stopPrice: required - Stop trigger price for stop leg
:type stopPrice: decimal
:param stopLimitPrice: optional - Stop limit price for stop leg
:type stopLimitPrice: decimal
:param stopLimitTimeInForce: optional - Time in force for stop leg
:type stopLimitTimeInForce: str
:param listClientOrderId: optional - Unique ID for the entire orderList
:type listClientOrderId: str
:param limitClientOrderId: optional - Unique ID for the limit order
:type limitClientOrderId: str
:param stopClientOrderId: optional - Unique ID for the stop order
:type stopClientOrderId: str
:param limitStrategyId: optional - Arbitrary numeric value identifying the limit order within an order strategy
:type limitStrategyId: int
:param limitStrategyType: optional - Arbitrary numeric value identifying the limit order strategy
:type limitStrategyType: int
:param stopStrategyId: optional - Arbitrary numeric value identifying the stop order within an order strategy
:type stopStrategyId: int
:param stopStrategyType: optional - Arbitrary numeric value identifying the stop order strategy
:type stopStrategyType: int
:param limitIcebergQty: optional - Iceberg quantity for the limit leg
:type limitIcebergQty: decimal
:param stopIcebergQty: optional - Iceberg quantity for the stop leg
:type stopIcebergQty: decimal
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: Websocket message

Response format:
.. code-block:: python
    {
        "id": "56374a46-3261-486b-a211-99ed972eb648",
        "status": 200,
        "result":
        {
            "orderListId": 2,
            "contingencyType": "OCO",
            "listStatusType": "EXEC_STARTED",
            "listOrderStatus": "EXECUTING",
            "listClientOrderId": "cKPMnDCbcLQILtDYM4f4fX",
            "transactionTime": 1711062760648,
            "symbol": "LTCBNB",
            "orders":
            [
            {
                "symbol": "LTCBNB",
                "orderId": 2,
                "clientOrderId": "0m6I4wfxvTUrOBSMUl0OPU"
            },
            {
                "symbol": "LTCBNB",
                "orderId": 3,
                "clientOrderId": "Z2IMlR79XNY5LU0tOxrWyW"
            }
            ],
            "orderReports":
            [
            {
                "symbol": "LTCBNB",
                "orderId": 2,
                "orderListId": 2,
                "clientOrderId": "0m6I4wfxvTUrOBSMUl0OPU",
                "transactTime": 1711062760648,
                "price": "1.50000000",
                "origQty": "1.000000",
                "executedQty": "0.000000",
                "origQuoteOrderQty": "0.000000",
                "cummulativeQuoteQty": "0.00000000",
                "status": "NEW",
                "timeInForce": "GTC",
                "type": "STOP_LOSS_LIMIT",
                "side": "BUY",
                "stopPrice": "1.50000001",
                "workingTime": -1,
                "selfTradePreventionMode": "NONE"
            },
            {
                "symbol": "LTCBNB",
                "orderId": 3,
                "orderListId": 2,
                "clientOrderId": "Z2IMlR79XNY5LU0tOxrWyW",
                "transactTime": 1711062760648,
                "price": "1.49999999",
                "origQty": "1.000000",
                "executedQty": "0.000000",
                "origQuoteOrderQty": "0.000000",
                "cummulativeQuoteQty": "0.00000000",
                "status": "NEW",
                "timeInForce": "GTC",
                "type": "LIMIT_MAKER",
                "side": "BUY",
                "workingTime": 1711062760648,
                "selfTradePreventionMode": "NONE"
            }
            ]
        },
        "rateLimits":
        [
            {
            "rateLimitType": "ORDERS",
            "interval": "SECOND",
            "intervalNum": 10,
            "limit": 50,
            "count": 2
            },
            {
            "rateLimitType": "ORDERS",
            "interval": "DAY",
            "intervalNum": 1,
            "limit": 160000,
            "count": 2
            },
            {
            "rateLimitType": "REQUEST_WEIGHT",
            "interval": "MINUTE",
            "intervalNum": 1,
            "limit": 6000,
            "count": 1
            }
        ]
    }

Weight: 2
zorderList.place.ocoTrR  r   s     r(   ws_create_oco_orderClient.ws_create_oco_order-  s    R (()>fMMr*   c                 (    U R                  SSU5      $ )ae  Create a new OTO (One-Triggers-Other) order list.
https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#place-new-order-list---oto-trade

An OTO order list consists of two orders:
1. Primary order that must be filled first
2. Secondary order that is placed only after the primary order is filled

:param symbol: required - Trading symbol
:type symbol: str
:param orders: required - Array of order objects containing:
    [
        {  # Primary order
            "type": required - Order type (e.g. LIMIT, MARKET),
            "side": required - BUY or SELL,
            "price": required for LIMIT orders,
            "quantity": required - Order quantity,
            "timeInForce": required for LIMIT orders,
            "icebergQty": optional,
            "strategyId": optional,
            "strategyType": optional,
            "selfTradePreventionMode": optional
        },
        {  # Secondary order - same parameters as primary
            ...
        }
    ]
:type orders: list
:param listClientOrderId: optional - Unique ID for the entire order list
:type listClientOrderId: str
:param limitClientOrderId: optional - Client order ID for the LIMIT leg
:type limitClientOrderId: str
:param limitStrategyId: optional - Strategy ID for the LIMIT leg
:type limitStrategyId: int
:param limitStrategyType: optional - Strategy type for the LIMIT leg
:type limitStrategyType: int
:param stopClientOrderId: optional - Client order ID for the STOP_LOSS/STOP_LOSS_LIMIT leg
:type stopClientOrderId: str
:param stopStrategyId: optional - Strategy ID for the STOP_LOSS/STOP_LOSS_LIMIT leg
:type stopStrategyId: int
:param stopStrategyType: optional - Strategy type for the STOP_LOSS/STOP_LOSS_LIMIT leg
:type stopStrategyType: int
:param newOrderRespType: optional - Set the response JSON
:type newOrderRespType: str

Response example:
.. code-block:: python
    {
        "id": "c5899911-d3f4-47ae-8835-97da553d27d0",
        "status": 200,
        "result": {
            "orderListId": 1,
            "contingencyType": "OTO",
            "listStatusType": "EXEC_STARTED",
            "listOrderStatus": "EXECUTING",
            "listClientOrderId": "C3wyRVh3aqKyI2RpBZYmFz",
            "transactionTime": 1669632210676,
            "symbol": "BTCUSDT",
            "orders": [
                {
                    "symbol": "BTCUSDT",
                    "orderId": 12569099453,
                    "clientOrderId": "bX5wROblo6YeDwa9iTLeyY"
                },
                {
                    "symbol": "BTCUSDT",
                    "orderId": 12569099454,
                    "clientOrderId": "Tnu2IP0J5Y4mxw3IxZYeFi"
                }
            ],
            "orderReports": [
                {
                    "symbol": "BTCUSDT",
                    "orderId": 12569099453,
                    "orderListId": 1,
                    "clientOrderId": "bX5wROblo6YeDwa9iTLeyY",
                    "transactTime": 1669632210676,
                    "price": "23416.10000000",
                    "origQty": "0.00847000",
                    "executedQty": "0.00847000",
                    "cummulativeQuoteQty": "198.33521500",
                    "status": "FILLED",
                    "timeInForce": "GTC",
                    "type": "LIMIT",
                    "side": "SELL",
                    "stopPrice": "0.00000000",
                    "workingTime": 1669632210676,
                    "selfTradePreventionMode": "NONE"
                },
                {
                    "symbol": "BTCUSDT",
                    "orderId": 12569099454,
                    "orderListId": 1,
                    "clientOrderId": "Tnu2IP0J5Y4mxw3IxZYeFi",
                    "transactTime": 1669632210676,
                    "price": "0.00000000",
                    "origQty": "0.00847000",
                    "executedQty": "0.00000000",
                    "cummulativeQuoteQty": "0.00000000",
                    "status": "NEW",
                    "timeInForce": "GTC",
                    "type": "MARKET",
                    "side": "BUY",
                    "stopPrice": "0.00000000",
                    "workingTime": -1,
                    "selfTradePreventionMode": "NONE"
                }
            ]
        },
        "rateLimits": [
            {
                "rateLimitType": "ORDERS",
                "interval": "SECOND",
                "intervalNum": 10,
                "limit": 50,
                "count": 1
            },
            {
                "rateLimitType": "ORDERS",
                "interval": "DAY",
                "intervalNum": 1,
                "limit": 160000,
                "count": 1
            },
            {
                "rateLimitType": "REQUEST_WEIGHT",
                "interval": "MINUTE",
                "intervalNum": 1,
                "limit": 6000,
                "count": 1
            }
        ]
    }

Weight: 1
zorderList.place.otoTrR  r   s     r(   ws_create_oto_orderClient.ws_create_oto_order#.  s    P (()>fMMr*   c                 (    U R                  SSU5      $ )a  

Returns: Websocket message
.. code-block:: python
    {
        "id": "1712544408508",
        "status": 200,
        "result": {
            "orderListId": 629,
            "contingencyType": "OTO",
            "listStatusType": "EXEC_STARTED",
            "listOrderStatus": "EXECUTING",
            "listClientOrderId": "GaeJHjZPasPItFj4x7Mqm6",
            "transactionTime": 1712544408537,
            "symbol": "1712544378871",
            "orders": [
            {
                "symbol": "1712544378871",
                "orderId": 23,
                "clientOrderId": "OVQOpKwfmPCfaBTD0n7e7H"
            },
            {
                "symbol": "1712544378871",
                "orderId": 24,
                "clientOrderId": "YcCPKCDMQIjNvLtNswt82X"
            },
            {
                "symbol": "1712544378871",
                "orderId": 25,
                "clientOrderId": "ilpIoShcFZ1ZGgSASKxMPt"
            }
            ],
            "orderReports": [
            {
                "symbol": "LTCBNB",
                "orderId": 23,
                "orderListId": 629,
                "clientOrderId": "OVQOpKwfmPCfaBTD0n7e7H",
                "transactTime": 1712544408537,
                "price": "1.500000",
                "origQty": "1.000000",
                "executedQty": "0.000000",
                "origQuoteOrderQty": "0.000000",
                "cummulativeQuoteQty": "0.000000",
                "status": "NEW",
                "timeInForce": "GTC",
                "type": "LIMIT",
                "side": "BUY",
                "workingTime": 1712544408537,
                "selfTradePreventionMode": "NONE"
            },
            {
                "symbol": "LTCBNB",
                "orderId": 24,
                "orderListId": 629,
                "clientOrderId": "YcCPKCDMQIjNvLtNswt82X",
                "transactTime": 1712544408537,
                "price": "0.000000",
                "origQty": "5.000000",
                "executedQty": "0.000000",
                "origQuoteOrderQty": "0.000000",
                "cummulativeQuoteQty": "0.000000",
                "status": "PENDING_NEW",
                "timeInForce": "GTC",
                "type": "STOP_LOSS",
                "side": "SELL",
                "stopPrice": "0.500000",
                "workingTime": -1,
                "selfTradePreventionMode": "NONE"
            },
            {
                "symbol": "LTCBNB",
                "orderId": 25,
                "orderListId": 629,
                "clientOrderId": "ilpIoShcFZ1ZGgSASKxMPt",
                "transactTime": 1712544408537,
                "price": "5.000000",
                "origQty": "5.000000",
                "executedQty": "0.000000",
                "origQuoteOrderQty": "0.000000",
                "cummulativeQuoteQty": "0.000000",
                "status": "PENDING_NEW",
                "timeInForce": "GTC",
                "type": "LIMIT_MAKER",
                "side": "SELL",
                "workingTime": -1,
                "selfTradePreventionMode": "NONE"
            }
            ]
        },
        "rateLimits": [
            {
            "rateLimitType": "ORDERS",
            "interval": "MINUTE",
            "intervalNum": 1,
            "limit": 10000000,
            "count": 18
            },
            {
            "rateLimitType": "REQUEST_WEIGHT",
            "interval": "MINUTE",
            "intervalNum": 1,
            "limit": 1000,
            "count": 65
            }
        ]
}

Weight: 1
zorderList.place.otocoTrR  r   s     r(   ws_create_otoco_orderClient.ws_create_otoco_order.  s    ^ (()@$OOr*   c                 (    U R                  SSU5      $ )a  Query information about a specific OCO order list.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#query-order-list-user_data

:param orderListId: int - The identifier for the OCO order list (optional)
:param origClientOrderId: str - The client-specified OCO order list ID (optional)

:returns: API response containing OCO order list information including:
.. code-block:: python
    {
        "id": "b53fd5ff-82c7-4a04-bd64-5f9dc42c2100",
        "status": 200,
        "result": {
            "orderListId": 1274512,
            "contingencyType": "OCO",
            "listStatusType": "EXEC_STARTED",
            "listOrderStatus": "EXECUTING",
            "listClientOrderId": "08985fedd9ea2cf6b28996",
            "transactionTime": 1660801713793,
            "symbol": "BTCUSDT",
            "orders": [
            {
                "symbol": "BTCUSDT",
                "orderId": 12569138901,
                "clientOrderId": "BqtFCj5odMoWtSqGk2X9tU"
            },
            {
                "symbol": "BTCUSDT",
                "orderId": 12569138902,
                "clientOrderId": "jLnZpj5enfMXTuhKB1d0us"
            }
            ]
        },
        "rateLimits": [
            {
            "rateLimitType": "REQUEST_WEIGHT",
            "interval": "MINUTE",
            "intervalNum": 1,
            "limit": 6000,
            "count": 4
            }
        ]
    }

Notes:
    - Either orderListId or origClientOrderId must be provided
    - Weight: 4
    - Data Source: Database

zorderList.statusTrR  r   s     r(   ws_get_oco_orderClient.ws_get_oco_order/  s    f (();T6JJr*   c                 (    U R                  SSU5      $ )a	  Cancel an OCO (One-Cancels-the-Other) order list.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#cancel-order-list-trade

:param symbol: required - Trading symbol
:type symbol: str
:param orderListId: optional - The ID of the OCO order list to cancel
:type orderListId: int
:param listClientOrderId: optional - The client-specified ID of the OCO order list
:type listClientOrderId: str
:param newClientOrderId: optional - Client ID to identify the cancel request
:type newClientOrderId: str
:param apiKey: required - Your API key
:type apiKey: str
:param recvWindow: optional - Number of milliseconds the request is valid for
:type recvWindow: int
:param signature: required - HMAC SHA256 signature
:type signature: str
:param timestamp: required - Current timestamp in milliseconds
:type timestamp: int

**Notes**:
    - Either orderListId or listClientOrderId must be provided
    - newClientOrderId will be auto-generated if not provided

Response example:
.. code-block:: python
    {
        "id": "c5899911-d3f4-47ae-8835-97da553d27d0",
        "status": 200,
        "result": {
            "orderListId": 1274512,
            "contingencyType": "OCO",
            "listStatusType": "ALL_DONE",
            "listOrderStatus": "ALL_DONE",
            "listClientOrderId": "6023531d7edaad348f5aff",
            "transactionTime": 1660801720215,
            "symbol": "BTCUSDT",
            "orders": [
                {
                    "symbol": "BTCUSDT",
                    "orderId": 12569138901,
                    "clientOrderId": "BqtFCj5odMoWtSqGk2X9tU"
                },
                {
                    "symbol": "BTCUSDT",
                    "orderId": 12569138902,
                    "clientOrderId": "jLnZpj5enfMXTuhKB1d0us"
                }
            ],
            "orderReports": [
                {
                    "symbol": "BTCUSDT",
                    "orderId": 12569138901,
                    "orderListId": 1274512,
                    "clientOrderId": "BqtFCj5odMoWtSqGk2X9tU",
                    "transactTime": 1660801720215,
                    "price": "23416.10000000",
                    "origQty": "0.00847000",
                    "executedQty": "0.00000000",
                    "cummulativeQuoteQty": "0.00000000",
                    "status": "CANCELED",
                    "timeInForce": "GTC",
                    "type": "STOP_LOSS_LIMIT",
                    "side": "SELL",
                    "stopPrice": "23416.10000000",
                    "selfTradePreventionMode": "NONE"
                },
                {
                    "symbol": "BTCUSDT",
                    "orderId": 12569138902,
                    "orderListId": 1274512,
                    "clientOrderId": "jLnZpj5enfMXTuhKB1d0us",
                    "transactTime": 1660801720215,
                    "price": "23416.10000000",
                    "origQty": "0.00847000",
                    "executedQty": "0.00000000",
                    "cummulativeQuoteQty": "0.00000000",
                    "status": "CANCELED",
                    "timeInForce": "GTC",
                    "type": "LIMIT_MAKER",
                    "side": "SELL",
                    "selfTradePreventionMode": "NONE"
                }
            ]
        },
        "rateLimits": [
            {
                "rateLimitType": "REQUEST_WEIGHT",
                "interval": "MINUTE",
                "intervalNum": 1,
                "limit": 6000,
                "count": 1
            }
        ]
    }

zorderList.cancelTrR  r   s     r(   ws_cancel_oco_orderClient.ws_cancel_oco_orderS/  s    F (();T6JJr*   c                 (    U R                  SSU5      $ )aS  Query current open OCO (One-Cancels-the-Other) order lists.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#current-open-order-lists-user_data

:param recvWindow: optional - Number of milliseconds after timestamp the request is valid for. Default 5000, max 60000
:type recvWindow: int
:param apiKey: required - Your API key
:type apiKey: str
:param signature: required - HMAC SHA256 signature
:type signature: str
:param timestamp: required - Current timestamp in milliseconds
:type timestamp: int

:returns: API response in JSON format with open OCO orders

    {
        "id": "c5899911-d3f5-47b3-9b67-4c1342f2a7e1",
        "status": 200,
        "result": [
            {
                "orderListId": 1274512,
                "contingencyType": "OCO",
                "listStatusType": "EXEC_STARTED",
                "listOrderStatus": "EXECUTING",
                "listClientOrderId": "08985fedd9ea2cf6b28996",
                "transactionTime": 1660801713793,
                "symbol": "BTCUSDT",
                "orders": [
                    {
                        "symbol": "BTCUSDT",
                        "orderId": 12569138901,
                        "clientOrderId": "BqtFCj5odMoWtSqGk2X9tU"
                    },
                    {
                        "symbol": "BTCUSDT",
                        "orderId": 12569138902,
                        "clientOrderId": "jLnZpj5enfMXTuhKB1d0us"
                    }
                ]
            }
        ],
        "rateLimits": [
            {
                "rateLimitType": "REQUEST_WEIGHT",
                "interval": "MINUTE",
                "intervalNum": 1,
                "limit": 6000,
                "count": 10
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

Weight: 10
Data Source: Memory
zopenOrderLists.statusTrR  r   s     r(   ws_get_oco_open_ordersClient.ws_get_oco_open_orders/  s    t (()@$OOr*   c                 (    U R                  SSU5      $ )ar  Place a new order using Smart Order Routing (SOR).

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#place-new-order-using-sor-trade

:param symbol: required - Trading symbol, e.g. BTCUSDT
:type symbol: str
:param side: required - Order side: BUY or SELL
:type side: str
:param type: required - Order type: LIMIT or MARKET
:type type: str
:param quantity: required - Order quantity
:type quantity: float
:param timeInForce: required for LIMIT orders - Time in force: GTC, IOC, FOK
:type timeInForce: str
:param price: required for LIMIT orders - Order price
:type price: float
:param newClientOrderId: optional - Unique order ID. Automatically generated if not sent
:type newClientOrderId: str
:param newOrderRespType: optional - Response format: ACK, RESULT, FULL. MARKET and LIMIT orders use FULL by default
:type newOrderRespType: str
:param strategyId: optional - Arbitrary numeric value identifying the order within an order strategy
:type strategyId: int
:param strategyType: optional - Arbitrary numeric value identifying the order strategy. Values < 1000000 are reserved
:type strategyType: int
:param selfTradePreventionMode: optional - Supported values depend on exchange configuration: EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE
:type selfTradePreventionMode: str
:param recvWindow: optional - Number of milliseconds after timestamp the request is valid for. Default 5000, max 60000
:type recvWindow: int

:returns: Websocket message

.. code-block:: python
    {
        "id": "3a4437e2-41a3-4c19-897c-9cadc5dce8b6",
        "status": 200,
        "result": [
            {
                "symbol": "BTCUSDT",
                "orderId": 2,
                "orderListId": -1,
                "clientOrderId": "sBI1KM6nNtOfj5tccZSKly",
                "transactTime": 1689149087774,
                "price": "31000.00000000",
                "origQty": "0.50000000",
                "executedQty": "0.50000000",
                "cummulativeQuoteQty": "14000.00000000",
                "status": "FILLED",
                "timeInForce": "GTC",
                "type": "LIMIT",
                "side": "BUY",
                "workingTime": 1689149087774,
                "fills": [
                    {
                        "matchType": "ONE_PARTY_TRADE_REPORT",
                        "price": "28000.00000000",
                        "qty": "0.50000000",
                        "commission": "0.00000000",
                        "commissionAsset": "BTC",
                        "tradeId": -1,
                        "allocId": 0
                    }
                ],
                "workingFloor": "SOR",
                "selfTradePreventionMode": "NONE",
                "usedSor": true
            }
        ],
        "rateLimits": [
            {
                "rateLimitType": "REQUEST_WEIGHT",
                "interval": "MINUTE",
                "intervalNum": 1,
                "limit": 6000,
                "count": 1
            }
        ]
    }

Notes:
    - SOR only supports LIMIT and MARKET orders
    - quoteOrderQty is not supported
    - Weight: 1
    - Data Source: Matching Engine
zsor.order.placeTrR  r   s     r(   ws_create_sor_orderClient.ws_create_sor_order/  s    j (():D&IIr*   c                 (    U R                  SSU5      $ )a^
  Test new order creation using Smart Order Routing (SOR).
Creates and validates a new order but does not send it into the matching engine.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#test-new-order-using-sor-trade

:param symbol: required - Trading symbol, e.g. BTCUSDT
:type symbol: str
:param side: required - Order side: BUY or SELL
:type side: str
:param type: required - Order type: LIMIT or MARKET
:type type: str
:param quantity: required - Order quantity
:type quantity: float
:param timeInForce: required for LIMIT orders - Time in force: GTC, IOC, FOK
:type timeInForce: str
:param price: required for LIMIT orders - Order price
:type price: float
:param newClientOrderId: optional - Unique order ID. Generated automatically if not sent
:type newClientOrderId: str
:param strategyId: optional - Arbitrary numeric value identifying the order within an order strategy
:type strategyId: int
:param strategyType: optional - Arbitrary numeric value identifying the order strategy. Values < 1000000 are reserved
:type strategyType: int
:param selfTradePreventionMode: optional - EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE
:type selfTradePreventionMode: str
:param computeCommissionRates: optional - Calculate commission rates. Default: False
:type computeCommissionRates: bool

:returns: Websocket message

Without computeCommissionRates:

.. code-block:: python

    {
        "id": "3a4437e2-41a3-4c19-897c-9cadc5dce8b6",
        "status": 200,
        "result": {},
        "rateLimits": [
            {
                "rateLimitType": "REQUEST_WEIGHT",
                "interval": "MINUTE",
                "intervalNum": 1,
                "limit": 6000,
                "count": 1
            }
        ]
    }

With computeCommissionRates:

.. code-block:: python

    {
        "id": "3a4437e2-41a3-4c19-897c-9cadc5dce8b6",
        "status": 200,
        "result": {
            "standardCommissionForOrder": {
                "maker": "0.00000112",
                "taker": "0.00000114"
            },
            "taxCommissionForOrder": {
                "maker": "0.00000112",
                "taker": "0.00000114"
            },
            "discount": {
                "enabledForAccount": true,
                "enabledForSymbol": true,
                "discountAsset": "BNB",
                "discount": "0.25"
            }
        },
        "rateLimits": [...]
    }

Notes:
    - SOR only supports LIMIT and MARKET orders
    - quoteOrderQty is not supported
    - Weight: 1 (without computeCommissionRates), 20 (with computeCommissionRates)
    - Data Source: Memory
zsor.order.testTrR  r   s     r(   ws_create_test_sor_orderClient.ws_create_test_sor_orderK0  s    d (()94HHr*   c                 (    U R                  SSU5      $ )a  Get current account information.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#account-information-user_data

:param omitZeroBalances: optional - When set to true, emits only the non-zero balances of an account. Default: false
:type omitZeroBalances: bool
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: Websocket message

.. code-block:: python

    {
        "makerCommission": 15,
        "takerCommission": 15,
        "buyerCommission": 0,
        "sellerCommission": 0,
        "canTrade": true,
        "canWithdraw": true,
        "canDeposit": true,
        "commissionRates": {
            "maker": "0.00150000",
            "taker": "0.00150000",
            "buyer": "0.00000000",
            "seller": "0.00000000"
        },
        "brokered": false,
        "requireSelfTradePrevention": false,
        "preventSor": false,
        "updateTime": 1660801833000,
        "accountType": "SPOT",
        "balances": [
            {
                "asset": "BNB",
                "free": "0.00000000",
                "locked": "0.00000000"
            },
            {
                "asset": "BTC",
                "free": "1.34471120",
                "locked": "0.08600000"
            }
        ],
        "permissions": [
            "SPOT"
        ],
        "uid": 354937868
    }

Notes:
    - Weight: 20
    - Data Source: Memory => Database
account.statusTrR  r   s     r(   ws_get_accountClient.ws_get_account0  s    n (()94HHr*   c                 (    U R                  SSU5      $ )a  Query your current unfilled order count for all intervals.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#account-unfilled-order-count-user_data

:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: Websocket response

.. code-block:: python

    {
        "result": [
            {
                "rateLimitType": "ORDERS",
                "interval": "SECOND",
                "intervalNum": 10,
                "limit": 50,
                "count": 0
            },
            {
                "rateLimitType": "ORDERS",
                "interval": "DAY",
                "intervalNum": 1,
                "limit": 160000,
                "count": 0
            }
        ],
        "id": "d3783d8d-f8d1-4d2c-b8a0-b7596af5a664"
    }

:raises: BinanceRequestException, BinanceAPIException

Notes:
    - Weight: 40
    - Data Source: Memory
zaccount.rateLimits.ordersTrR  r   s     r(   !ws_get_account_rate_limits_orders(Client.ws_get_account_rate_limits_orders0  s    L (()DdFSSr*   c                 (    U R                  SSU5      $ )u	  Query information about all your orders – active, canceled, filled – filtered by time range.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#account-order-history-user_data

:param symbol: STRING - Required
:type symbol: str
:param orderId: optional - Order ID to begin at
:type orderId: int
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param limit: optional - Default 500; max 1000
:type limit: int
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: Websocket response

.. code-block:: python

    {
        "id": "734235c2-13d2-4574-be68-723e818c08f3",
        "status": 200,
        "result": [
            {
                "symbol": "BTCUSDT",
                "orderId": 12569099453,
                "orderListId": -1,
                "clientOrderId": "4d96324ff9d44481926157",
                "price": "23416.10000000",
                "origQty": "0.00847000",
                "executedQty": "0.00847000",
                "cummulativeQuoteQty": "198.33521500",
                "status": "FILLED",
                "timeInForce": "GTC",
                "type": "LIMIT",
                "side": "SELL",
                "stopPrice": "0.00000000",
                "icebergQty": "0.00000000",
                "time": 1660801715639,
                "updateTime": 1660801717945,
                "isWorking": true,
                "workingTime": 1660801715639,
                "origQuoteOrderQty": "0.00000000",
                "selfTradePreventionMode": "NONE",
                "preventedMatchId": 0,            // Only appears if order expired due to STP
                "preventedQuantity": "1.200000"   // Only appears if order expired due to STP
            }
        ]
    }

Notes:
    - Weight: 20
    - Data Source: Database
    - If startTime and/or endTime are specified, orderId is ignored
    - Orders are filtered by time of the last execution status update
    - If orderId is specified, return orders with order ID >= orderId
    - If no condition is specified, the most recent orders are returned
    - For some historical orders the cummulativeQuoteQty response field may be negative
    - The time between startTime and endTime can't be longer than 24 hours
r`  TrR  r   s     r(   ws_get_all_ordersClient.ws_get_all_orders 1  s    ~ ((dFCCr*   c                 (    U R                  SSU5      $ )a  Query information about your trades, filtered by time range.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#account-trade-history-user_data

:param symbol: STRING - Required
:type symbol: str
:param orderId: optional - Get trades for a specific order
:type orderId: int
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param fromId: optional - Trade ID to fetch from
:type fromId: int
:param limit: optional - Default 500; max 1000
:type limit: int
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: Websocket response

    .. code-block:: python

        [
            {
                "symbol": "BTCUSDT",
                "id": 1650422481,
                "orderId": 12569099453,
                "orderListId": -1,
                "price": "23416.10000000",
                "qty": "0.00635000",
                "quoteQty": "148.69223500",
                "commission": "0.00000000",
                "commissionAsset": "BNB",
                "time": 1660801715793,
                "isBuyer": false,
                "isMaker": true,
                "isBestMatch": true
            }
        ]

Notes:
    - Weight: 20
    - Data Source: Memory => Database
    - If fromId is specified, return trades with trade ID >= fromId
    - If startTime and/or endTime are specified, trades are filtered by execution time (time)
    - fromId cannot be used together with startTime and endTime
    - If orderId is specified, only trades related to that order are returned
    - startTime and endTime cannot be used together with orderId
    - If no condition is specified, the most recent trades are returned
    - The time between startTime and endTime can't be longer than 24 hours
r  TrR  r   s     r(   ws_get_my_tradesClient.ws_get_my_tradesA1  s    j ((T6BBr*   c                 (    U R                  SSU5      $ )a  Displays the list of orders that were expired due to STP (Self-Trade Prevention).

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#account-prevented-matches-user_data

:param symbol: STRING - Required
:type symbol: str
:param preventedMatchId: optional - Get specific prevented match by ID
:type preventedMatchId: int
:param orderId: optional - Get prevented matches for specific order
:type orderId: int
:param fromPreventedMatchId: optional - Get prevented matches from this ID
:type fromPreventedMatchId: int
:param limit: optional - Default 500; max 1000
:type limit: int
:param recvWindow: optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: Websocket response

.. code-block:: python
    {
        "symbol": "BTCUSDT",            # Trading pair
        "preventedMatchId": 1,          # Unique ID for prevented match
        "takerOrderId": 5,              # Order ID of the taker order
        "makerSymbol": "BTCUSDT",       # Symbol of maker order
        "makerOrderId": 3,              # Order ID of maker order
        "tradeGroupId": 1,              # Trade group ID
        "selfTradePreventionMode": "EXPIRE_MAKER", # STP mode used
        "price": "1.100000",            # Price level where match was prevented
        "makerPreventedQuantity": "1.300000", # Quantity that was prevented
        "transactTime": 1669101687094   # Time of prevention
    }

Supported parameter combinations:
    - symbol + preventedMatchId
    - symbol + orderId
    - symbol + orderId + fromPreventedMatchId (limit defaults to 500)
    - symbol + orderId + fromPreventedMatchId + limit

Weight:
    - 2 if symbol is invalid
    - 2 when querying by preventedMatchId
    - 20 when querying by orderId

Data Source: Database
r  TrR  r   s     r(   ws_get_prevented_matchesClient.ws_get_prevented_matchesx1  s    ^ (()=tVLLr*   c                 (    U R                  SSU5      $ )a)  Get information about orders that were expired due to STP (Self-Trade Prevention).

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#account-prevented-matches-user_data

:param symbol: STRING - Required - Trading symbol
:type symbol: str
:param preventedMatchId: LONG - Optional - Get specific prevented match by ID
:type preventedMatchId: int
:param orderId: LONG - Optional - Get prevented matches for specific order
:type orderId: int
:param fromPreventedMatchId: LONG - Optional - Get prevented matches from this ID
:type fromPreventedMatchId: int
:param limit: INT - Optional - Default 500; max 1000
:type limit: int
:param recvWindow: LONG - Optional - The value cannot be greater than 60000
:type recvWindow: int
:param timestamp: LONG - Required
:type timestamp: int

:returns: API response

.. code-block:: python
    {
        "symbol": "BTCUSDT",
        "preventedMatchId": 1,
        "takerOrderId": 5,
        "makerSymbol": "BTCUSDT",
        "makerOrderId": 3,
        "tradeGroupId": 1,
        "selfTradePreventionMode": "EXPIRE_MAKER",
        "price": "1.100000",
        "makerPreventedQuantity": "1.300000",
        "transactTime": 1669101687094
    }

Supported parameter combinations:
    - symbol + preventedMatchId
    - symbol + orderId
    - symbol + orderId + fromPreventedMatchId (limit defaults to 500)
    - symbol + orderId + fromPreventedMatchId + limit

Weight:
    - 2 if symbol is invalid
    - 2 when querying by preventedMatchId
    - 20 when querying by orderId

Data Source: Database
r  TrR  r   s     r(   ws_get_allocationsClient.ws_get_allocations1  s    b (($GGr*   c                 (    U R                  SSU5      $ )a  Get current account commission rates for a symbol.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#account-commission-rates-user_data

:param symbol: STRING - Required - Trading symbol
:type symbol: str
:param recvWindow: LONG - Optional - The value cannot be greater than 60000
:type recvWindow: int

:returns: API response dict with commission rates:

    {
        "symbol": "BTCUSDT",
        "standardCommission": {           # Standard commission rates on trades
            "maker": "0.00000010",
            "taker": "0.00000020",
            "buyer": "0.00000030",
            "seller": "0.00000040"
        },
        "taxCommission": {               # Tax commission rates on trades
            "maker": "0.00000112",
            "taker": "0.00000114",
            "buyer": "0.00000118",
            "seller": "0.00000116"
        },
        "discount": {                    # Discount on standard commissions when paying in BNB
            "enabledForAccount": true,
            "enabledForSymbol": true,
            "discountAsset": "BNB",
            "discount": "0.75000000"     # Standard commission reduction rate when paying in BNB
        }
    }

:raises: BinanceRequestException, BinanceAPIException

Weight: 20

Data Source: Database
zaccount.commissionTrR  r   s     r(   ws_get_commission_ratesClient.ws_get_commission_rates1  s    P (()=tVLLr*   c                 (    U R                  SSU5      $ )a  Get current order book for a symbol.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#order-book

Note that this request returns limited market depth. If you need to continuously monitor
order book updates, consider using WebSocket Streams:
- <symbol>@depth<levels>
- <symbol>@depth

You can use `depth` request together with `<symbol>@depth` streams to maintain a local order book.

:param symbol: STRING - Required - Trading symbol
:type symbol: str
:param limit: INT - Optional - Default 100; max 5000
:type limit: int

:returns: Websocket message

    {
        "lastUpdateId": 2731179239,
        "bids": [                // Bid levels sorted from highest to lowest price
            [
                "0.01379900",   // Price level
                "3.43200000"    // Quantity
            ],
            ...
        ],
        "asks": [                // Ask levels sorted from lowest to highest price
            [
                "0.01380000",   // Price level
                "5.91700000"    // Quantity
            ],
            ...
        ]
    }

Weight: Adjusted based on limit:
    - 1-100: 5
    - 101-500: 25
    - 501-1000: 50
    - 1001-5000: 250

Data Source: Memory
r   FrR  r   s     r(   ws_get_order_bookClient.ws_get_order_book2  s    Z ((%@@r*   c                 (    U R                  SSU5      $ )a`  Get recent trades for a symbol.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#recent-trades

If you need access to real-time trading activity, please consider using WebSocket Streams:
- <symbol>@trade

:param symbol: STRING - Required - Trading symbol
:type symbol: str
:param limit: INT - Optional - Default 500; max 1000
:type limit: int

:returns: API response

.. code-block:: python
    {
        "id": "409a20bd-253d-41db-a6dd-687862a5882f",
        "status": 200,
        "result": [
            {
                "id": 194686783,              # Trade ID
                "price": "0.01361000",        # Price
                "qty": "0.01400000",          # Quantity
                "quoteQty": "0.00019054",     # Quote quantity
                "time": 1660009530807,        # Trade time
                "isBuyerMaker": true,         # Was the buyer the maker?
                "isBestMatch": true           # Was this the best price match?
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

Weight: 25
Data Source: Memory
ztrades.recentFrR  r   s     r(   ws_get_recent_tradesClient.ws_get_recent_trades52  s    J ((%HHr*   c                 (    U R                  SSU5      $ )at  Get historical trades.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#historical-trades

:param symbol: STRING - Required - Trading symbol
:type symbol: str
:param fromId: INT - Optional - Trade ID to begin at
:type fromId: int
:param limit: INT - Optional - Default 500; max 1000
:type limit: int

:returns: Websocket message

.. code-block:: python

    {
        "id": "cffc9c7d-4efc-4ce0-b587-6b87448f052a",
        "result": [
            {
                "id": 0,                      # Trade ID
                "price": "0.00005000",        # Price
                "qty": "40.00000000",         # Quantity
                "quoteQty": "0.00200000",     # Quote quantity
                "time": 1500004800376,        # Trade time
                "isBuyerMaker": true,         # Was the buyer the maker?
                "isBestMatch": true           # Was this the best price match?
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

Notes:
    - If fromId is not specified, the most recent trades are returned

Weight: 25
Data Source: Database
ztrades.historicalFrR  r   s     r(   ws_get_historical_tradesClient.ws_get_historical_trades\2  s    N (()<eVLLr*   c                 (    U R                  SSU5      $ )ae  Get aggregate trades.

An aggregate trade represents one or more individual trades that fill at the same time,
from the same taker order, with the same price.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#aggregate-trades

:param symbol: STRING - Required - Trading symbol
:type symbol: str
:param fromId: INT - Optional - Aggregate trade ID to begin at
:type fromId: int
:param startTime: INT - Optional - Start time in milliseconds
:type startTime: int
:param endTime: INT - Optional - End time in milliseconds
:type endTime: int
:param limit: INT - Optional - Default 500; max 1000
:type limit: int

:returns: API response

.. code-block:: python

    {
        "id": "...",
        "status": 200,
        "result": [
            {
                "a": 50000000,        # Aggregate trade ID
                "p": "0.00274100",    # Price
                "q": "57.19000000",   # Quantity
                "f": 59120167,        # First trade ID
                "l": 59120170,        # Last trade ID
                "T": 1565877971222,   # Timestamp
                "m": true,            # Was the buyer the maker?
                "M": true             # Was the trade the best price match?
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

Notes:
    - If fromId is specified, return aggtrades with aggregate trade ID >= fromId.
    Use fromId and limit to page through all aggtrades.
    - If startTime and/or endTime are specified, aggtrades are filtered by execution time (T).
    fromId cannot be used together with startTime and endTime.
    - If no condition is specified, the most recent aggregate trades are returned.
    - For real-time updates, consider using WebSocket Streams: <symbol>@aggTrade
    - For historical data, consider using data.binance.vision

Weight: 2
Data Source: Database
ztrades.aggregateFrR  r   s     r(   ws_get_aggregate_tradesClient.ws_get_aggregate_trades2  s    l (();UFKKr*   c                 (    U R                  SSU5      $ )a#	  Get klines (candlestick bars).

Klines are uniquely identified by their open & close time.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#klines

:param symbol: STRING - Required - Trading symbol
:type symbol: str
:param interval: ENUM - Required - Kline interval
:type interval: str
:param startTime: INT - Optional - Start time in milliseconds
:type startTime: int
:param endTime: INT - Optional - End time in milliseconds
:type endTime: int
:param timeZone: STRING - Optional - Default: 0 (UTC)
:type timeZone: str
:param limit: INT - Optional - Default 500; max 1000
:type limit: int

Supported kline intervals:
    - seconds: 1s
    - minutes: 1m, 3m, 5m, 15m, 30m
    - hours: 1h, 2h, 4h, 6h, 8h, 12h
    - days: 1d, 3d
    - weeks: 1w
    - months: 1M

Notes:
    - If startTime/endTime not specified, returns most recent klines
    - Supported timeZone values:
        - Hours and minutes (e.g. "-1:00", "05:45")
        - Only hours (e.g. "0", "8", "4")
        - Accepted range is strictly [-12:00 to +14:00] inclusive
    - If timeZone provided, kline intervals interpreted in that timezone instead of UTC
    - startTime and endTime always interpreted in UTC, regardless of timeZone
    - For real-time updates, consider using WebSocket Streams: <symbol>@kline_<interval>
    - For historical data, consider using data.binance.vision

Weight: 2
Data Source: Database

:returns: API response

.. code-block:: python

    {
        "id": "1dbbeb56-8eea-466a-8f6e-86bdcfa2fc0b",
        "status": 200,
        "result": [
            [
                1655971200000,      # Kline open time
                "0.01086000",       # Open price
                "0.01086600",       # High price
                "0.01083600",       # Low price
                "0.01083800",       # Close price
                "2290.53800000",    # Volume
                1655974799999,      # Kline close time
                "24.85074442",      # Quote asset volume
                2283,               # Number of trades
                "1171.64000000",    # Taker buy base asset volume
                "12.71225884",      # Taker buy quote asset volume
                "0"                 # Unused field, ignore
            ]
        ]
    }

:raises: BinanceRequestException, BinanceAPIException
r   FrR  r   s     r(   ws_get_klinesClient.ws_get_klines2  s    J ((5&AAr*   c                 (    U R                  SSU5      $ )a  Get klines (candlestick bars) optimized for presentation.

This request is similar to klines, having the same parameters and response.
uiKlines return modified kline data, optimized for presentation of candlestick charts.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#ui-klines

:param symbol: STRING - Required - Trading symbol
:type symbol: str
:param interval: ENUM - Required - Kline interval
:type interval: str
:param startTime: INT - Optional - Start time in milliseconds
:type startTime: int
:param endTime: INT - Optional - End time in milliseconds
:type endTime: int
:param timeZone: STRING - Optional - Default: 0 (UTC)
:type timeZone: str
:param limit: INT - Optional - Default 500; max 1000
:type limit: int

Supported kline intervals:
    - seconds: 1s
    - minutes: 1m, 3m, 5m, 15m, 30m
    - hours: 1h, 2h, 4h, 6h, 8h, 12h
    - days: 1d, 3d
    - weeks: 1w
    - months: 1M

Notes:
    - If startTime/endTime not specified, returns most recent klines
    - Supported timeZone values:
        - Hours and minutes (e.g. "-1:00", "05:45")
        - Only hours (e.g. "0", "8", "4")
        - Accepted range is strictly [-12:00 to +14:00] inclusive
    - If timeZone provided, kline intervals are interpreted in that timezone instead of UTC
    - startTime and endTime are always interpreted in UTC, regardless of timeZone

:returns: API response

.. code-block:: python

    {
        "id": "b137468a-fb20-4c06-bd6b-625148eec958",
        "result": [
            [
                1655971200000,      # Kline open time
                "0.01086000",       # Open price
                "0.01086600",       # High price
                "0.01083600",       # Low price
                "0.01083800",       # Close price
                "2290.53800000",    # Volume
                1655974799999,      # Kline close time
                "24.85074442",      # Quote asset volume
                2283,               # Number of trades
                "1171.64000000",    # Taker buy base asset volume
                "12.71225884",      # Taker buy quote asset volume
                "0"                 # Unused field, ignore
            ]
        ]
    }

:raises: BinanceRequestException, BinanceAPIException
r   FrR  r   s     r(   ws_get_uiKlinesClient.ws_get_uiKlines3  s    @ ((UFCCr*   c                 (    U R                  SSU5      $ )a  Get current average price for a symbol.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#current-average-price

:param symbol: STRING - Required - Trading symbol
:type symbol: str

:returns: Websocket message

.. code-block:: python
    {
        "mins": 5,                    # Average price interval (in minutes)
        "price": "9.35751834",        # Average price
        "closeTime": 1694061154503    # Last trade time
    }

Weight: 2
r  FrR  r   s     r(   ws_get_avg_priceClient.ws_get_avg_priceF3  s    & ((UFCCr*   c                 (    U R                  SSU5      $ )a
  Get 24-hour rolling window price change statistics.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#24hr-ticker-price-change-statistics

:param symbol: STRING - Optional - Query ticker for a single symbol
:type symbol: str
:param symbols: ARRAY of STRING - Optional - Query ticker for multiple symbols
:type symbols: list
:param type: ENUM - Optional - Ticker type: FULL (default) or MINI
:type type: str

Note:
    - symbol and symbols cannot be used together
    - If no symbol is specified, returns information about all symbols currently trading on the exchange

Weight:
    Adjusted based on the number of requested symbols:
    - 1-20 symbols: 2
    - 21-100 symbols: 40
    - 101 or more symbols: 80
    - all symbols: 80

:returns: Websocket message

For a single symbol with type=FULL:
.. code-block:: python
    {
        "symbol": "BNBBTC",
        "priceChange": "0.00013900",         # Absolute price change
        "priceChangePercent": "1.020",       # Relative price change in percent
        "weightedAvgPrice": "0.01382453",    # Quote volume divided by volume
        "prevClosePrice": "0.01362800",      # Previous day's close price
        "lastPrice": "0.01376700",           # Latest price
        "lastQty": "1.78800000",            # Latest quantity
        "bidPrice": "0.01376700",           # Best bid price
        "bidQty": "4.64600000",            # Best bid quantity
        "askPrice": "0.01376800",           # Best ask price
        "askQty": "14.31400000",           # Best ask quantity
        "openPrice": "0.01362800",          # Open price 24 hours ago
        "highPrice": "0.01414900",          # Highest price in the last 24 hours
        "lowPrice": "0.01346600",           # Lowest price in the last 24 hours
        "volume": "69412.40500000",         # Trading volume in base asset
        "quoteVolume": "959.59411487",      # Trading volume in quote asset
        "openTime": 1660014164909,          # Open time for 24hr rolling window
        "closeTime": 1660100564909,         # Close time for 24hr rolling window
        "firstId": 194696115,               # First trade ID
        "lastId": 194968287,                # Last trade ID
        "count": 272173                     # Number of trades
    }

For a single symbol with type=MINI:
.. code-block:: python
    {
        "symbol": "BNBBTC",
        "openPrice": "0.01362800",
        "highPrice": "0.01414900",
        "lowPrice": "0.01346600",
        "lastPrice": "0.01376700",
        "volume": "69412.40500000",
        "quoteVolume": "959.59411487",
        "openTime": 1660014164909,
        "closeTime": 1660100564909,
        "firstId": 194696115,
        "lastId": 194968287,
        "count": 272173
    }

zticker.24hrFrR  r   s     r(   ws_get_tickerClient.ws_get_ticker[3  s    J ((vFFr*   c                 (    U R                  SSU5      $ )a9  Price change statistics for a trading day.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#trading-day-ticker

:param symbol: STRING - Optional - Query ticker of a single symbol
:type symbol: str
:param symbols: ARRAY of STRING - Optional - Query ticker for multiple symbols
:type symbols: list
:param timeZone: STRING - Optional - Default: 0 (UTC)
    Supported values:
    - Hours and minutes (e.g. "-1:00", "05:45")
    - Only hours (e.g. "0", "8", "4")
    - Accepted range is strictly [-12:00 to +14:00] inclusive
:type timeZone: str
:param type: ENUM - Optional - FULL (default) or MINI
:type type: str

:returns: Websocket message

Response FULL type example:
{
    "symbol": "BTCUSDT",
    "priceChange": "-83.13000000",           # Absolute price change
    "priceChangePercent": "-0.317",          # Relative price change in percent
    "weightedAvgPrice": "26234.58803036",    # quoteVolume / volume
    "openPrice": "26304.80000000",
    "highPrice": "26397.46000000",
    "lowPrice": "26088.34000000",
    "lastPrice": "26221.67000000",
    "volume": "18495.35066000",              # Volume in base asset
    "quoteVolume": "485217905.04210480",
    "openTime": 1695686400000,
    "closeTime": 1695772799999,
    "firstId": 3220151555,
    "lastId": 3220849281,
    "count": 697727
}

Response MINI type example:
{
    "symbol": "BTCUSDT",
    "openPrice": "26304.80000000",
    "highPrice": "26397.46000000",
    "lowPrice": "26088.34000000",
    "lastPrice": "26221.67000000",
    "volume": "18495.35066000",              # Volume in base asset
    "quoteVolume": "485217905.04210480",     # Volume in quote asset
    "openTime": 1695686400000,
    "closeTime": 1695772799999,
    "firstId": 3220151555,                   # Trade ID of the first trade in the interval
    "lastId": 3220849281,                    # Trade ID of the last trade in the interval
    "count": 697727                          # Number of trades in the interval
}

Weight:
    - 4 for each requested symbol
    - Weight caps at 200 once number of symbols > 50
zticker.tradingDayFrR  r   s     r(   ws_get_trading_day_ticker Client.ws_get_trading_day_ticker3  s    v (()<eVLLr*   c                 (    U R                  SSU5      $ )a	  Get rolling window price change statistics.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#rolling-window-price-change-statistics

:param symbol: STRING - Optional - Query ticker of a single symbol
:type symbol: str
:param symbols: ARRAY of STRING - Optional - Query ticker for multiple symbols
:type symbols: list
:param windowSize: STRING - Required - Supported windowSize values:
    - 1h, 2h, 4h, 6h, 12h
    - 1d, 2d, 3d, 4d, 5d, 6d, 7d, 14d, 30d
:type windowSize: str
:param type: ENUM - Optional - FULL (default) or MINI
:type type: str

:returns: Websocket message

With symbol parameter:
.. code-block:: python
    {
        "symbol": "BTCUSDT",
        "priceChange": "-83.13000000",         # Absolute price change
        "priceChangePercent": "-0.317",        # Relative price change in percent
        "weightedAvgPrice": "26234.58803036",  # quoteVolume / volume
        "openPrice": "26304.80000000",
        "highPrice": "26397.46000000",
        "lowPrice": "26088.34000000",
        "lastPrice": "26221.67000000",
        "volume": "18495.35066000",            # Volume in base asset
        "quoteVolume": "485217905.04210480",   # Volume in quote asset
        "openTime": 1695686400000,
        "closeTime": 1695772799999,
        "firstId": 3220151555,                 # Trade ID of first trade in the interval
        "lastId": 3220849281,                  # Trade ID of last trade in the interval
        "count": 697727                        # Number of trades in the interval
    }

With symbols parameter:
.. code-block:: python
    [
        {
            # Same fields as above
        },
        {
            # Same fields as above for next symbol
        }
    ]

For MINI type response:
.. code-block:: python
    {
        "symbol": "BTCUSDT",
        "openPrice": "26304.80000000",
        "highPrice": "26397.46000000",
        "lowPrice": "26088.34000000",
        "lastPrice": "26221.67000000",
        "volume": "18495.35066000",
        "quoteVolume": "485217905.04210480",
        "openTime": 1695686400000,
        "closeTime": 1695772799999,
        "firstId": 3220151555,
        "lastId": 3220849281,
        "count": 697727
    }

Weight:
    - 4 for each requested symbol
    - Weight caps at 200 once number of symbols > 50
r$  FrR  r   s     r(   ws_get_symbol_ticker_window"Client.ws_get_symbol_ticker_window3  s    L ((5&AAr*   c                 (    U R                  SSU5      $ )a-  Get latest price for a symbol or symbols.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#symbol-price-ticker

:param symbol: STRING - Optional - Query ticker of a single symbol
:type symbol: str
:param symbols: ARRAY of STRING - Optional - Query ticker for multiple symbols
:type symbols: list

:returns: Websocket message

With symbol parameter:
    {
        "symbol": "BNBBTC",
        "price": "0.01361000"
    }

    With symbols parameter:
    [
        {
            "symbol": "BNBBTC",
            "price": "0.01361000"
        },
        {
            "symbol": "BTCUSDT",
            "price": "23440.91000000"
        }
    ]

Weight:
    - 1 for a single symbol
    - 2 for up to 20 symbols
    - 40 for 21 to 100 symbols
    - 40 for all symbols
ticker.priceFrR  r   s     r(   ws_get_symbol_tickerClient.ws_get_symbol_ticker'4  s    H ((GGr*   c                 (    U R                  SSU5      $ )a  Get the best price/quantity on the order book for a symbol or symbols.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#symbol-order-book-ticker

:param symbol: STRING - Optional - Query ticker of a single symbol
:type symbol: str
:param symbols: ARRAY of STRING - Optional - Query ticker for multiple symbols
:type symbols: list

:returns: Websocket response

    With symbol parameter:
    {
        "symbol": "BNBBTC",
        "bidPrice": "0.01358000",
        "bidQty": "0.95200000",
        "askPrice": "0.01358100",
        "askQty": "11.91700000"
    }

    With symbols parameter:
    [
        {
            "symbol": "BNBBTC",
            "bidPrice": "0.01358000",
            "bidQty": "0.95200000",
            "askPrice": "0.01358100",
            "askQty": "11.91700000"
        },
        {
            "symbol": "BTCUSDT",
            "bidPrice": "23440.90000000",
            "bidQty": "0.00200000",
            "askPrice": "23440.91000000",
            "askQty": "0.00200000"
        }
    ]

Weight:
    - 2 for a single symbol
    - 4 for up to 100 symbols
    - 40 for 101 or more symbols
ticker.bookFrR  r   s     r(   ws_get_orderbook_tickerClient.ws_get_orderbook_tickerM4  s    X ((vFFr*   c                 (    U R                  SSU5      $ )a'  Test connectivity to the WebSocket API.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#test-connectivity

:returns: API response

    {
        "id": "922bcc6e-9de8-440d-9e84-7c80933a8d0d",
        "status": 200,
        "result": {},
        "rateLimits": [
            {
                "rateLimitType": "REQUEST_WEIGHT",
                "interval": "MINUTE",
                "intervalNum": 1,
                "limit": 6000,
                "count": 1
            }
        ]
    }


Weight: 1
r!   FrR  r   s     r(   ws_pingClient.ws_ping{4  s    2 ((??r*   c                 (    U R                  SSU5      $ )a  Test connectivity to the WebSocket API and get the current server time.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#check-server-time

:returns: API response with server time

    {
        "id": "187d3cb2-942d-484c-8271-4e2141bbadb1",
        "status": 200,
        "result": {
            "serverTime": 1656400526260
        },
        "rateLimits": [
            {
                "rateLimitType": "REQUEST_WEIGHT",
                "interval": "MINUTE",
                "intervalNum": 1,
                "limit": 6000,
                "count": 1
            }
        ]
    }

Weight: 1
Data Source: Memory
r   FrR  r   s     r(   ws_get_timeClient.ws_get_time4  s    6 ((??r*   c                 (    U R                  SSU5      $ )a  Query current exchange trading rules, rate limits, and symbol information.

https://developers.binance.com/docs/binance-spot-api-docs/testnet/web-socket-api/public-api-requests#exchange-information

:param symbol: str - Filter by single symbol (optional)
:param symbols: list - Filter by multiple symbols (optional)
:param permissions: list or str - Filter symbols by permissions (optional)

:returns: API response containing exchange information including:
    - Rate limits
    - Exchange filters
    - Symbol information including:
        - Status
        - Base/quote assets
        - Order types allowed
        - Filters (price, lot size, etc)
        - Trading permissions
        - Self-trade prevention modes

    Example response:
    {
        "timezone": "UTC",
        "serverTime": 1655969291181,
        "rateLimits": [
            {
                "rateLimitType": "REQUEST_WEIGHT",
                "interval": "MINUTE",
                "intervalNum": 1,
                "limit": 6000
            },
            ...
        ],
        "exchangeFilters": [],
        "symbols": [
            {
                "symbol": "BTCUSDT",
                "status": "TRADING",
                "baseAsset": "BTC",
                "baseAssetPrecision": 8,
                ...
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

Notes:
    - Only one of symbol, symbols, permissions parameters can be specified
    - Without parameters, displays all symbols with ["SPOT", "MARGIN", "LEVERAGED"] permissions
    - To list all active symbols, explicitly request all permissions
    - Permissions accepts either a list or single permission name (e.g. "SPOT")

Weight: 20
Data Source: Memory
r   FrR  r   s     r(   ws_get_exchange_infoClient.ws_get_exchange_info4  s    p ((GGr*   c                 (    U R                  SSU5      $ )z
Get the order book for a symbol
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api
r   F_ws_futures_api_request_syncr   s     r(   ws_futures_get_order_book Client.ws_futures_get_order_book4  s    
 00%HHr*   c                 (    U R                  SSU5      $ )z
Latest price for a symbol or symbols
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker
r  Fr  r   s     r(   ws_futures_get_all_tickers!Client.ws_futures_get_all_tickers4  s    
 00OOr*   c                 (    U R                  SSU5      $ )z
Best price/qty on the order book for a symbol or symbols.
https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker
r  Fr  r   s     r(    ws_futures_get_order_book_ticker'Client.ws_futures_get_order_book_ticker4  s    
 00vNNr*   c                 t    SU;  a   U R                   U R                  5       -   US'   U R                  SSU5      $ )zo
Send in a new order
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api
r+  r;  T)r  r/  r  r   s     r(   ws_futures_create_orderClient.ws_futures_create_order5  s=    
 V+)-)C)Cdkkm)SF%&00fMMr*   c                 (    U R                  SSU5      $ )zv
Edit an order
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order
zorder.modifyTr  r   s     r(   ws_futures_edit_orderClient.ws_futures_edit_order5      
 00vNNr*   c                 (    U R                  SSU5      $ )zx
cancel an order
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order
rV  Tr  r   s     r(   ws_futures_cancel_orderClient.ws_futures_cancel_order5  r  r*   c                 (    U R                  SSU5      $ )zt
Get an order
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Query-Order
rQ  Tr  r   s     r(   ws_futures_get_orderClient.ws_futures_get_order5  r  r*   c                 (    U R                  SSU5      $ )z
Get current position information(only symbol that has position or open orders will be returned).
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Info-V2
zv2/account.positionTr  r   s     r(   ws_futures_v2_account_position%Client.ws_futures_v2_account_position#5  s    
 001FfUUr*   c                 (    U R                  SSU5      $ )z
Get current position information.
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information
zaccount.positionTr  r   s     r(   ws_futures_account_position"Client.ws_futures_account_position*5  s    
 001CT6RRr*   c                 (    U R                  SSU5      $ )z
Get current account information.
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api#api-description
zv2/account.balanceTr  r   s     r(   ws_futures_v2_account_balance$Client.ws_futures_v2_account_balance15  s    
 001EtVTTr*   c                 (    U R                  SSU5      $ )z
Get current account information.
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance
zaccount.balanceTr  r   s     r(   ws_futures_account_balance!Client.ws_futures_account_balance85  s    
 001BD&QQr*   c                 (    U R                  SSU5      $ )a  
Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail.
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Account-Information-V2
zv2/account.statusTr  r   s     r(   ws_futures_v2_account_status#Client.ws_futures_v2_account_status?5  s    
 001DdFSSr*   c                 (    U R                  SSU5      $ )a  
Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail.
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Account-Information
r{  Tr  r   s     r(   ws_futures_account_status Client.ws_futures_account_statusF5  s    
 001A4PPr*   c                 &    U R                  SSSUS9$ )a  Verify which tokens are available for you to create Stablecoin-Denominated gift cards
https://developers.binance.com/docs/gift_card/market-data/Fetch-Token-Limit

:param baseToken: The token you want to pay, example: BUSD
:type baseToken: str
:return: api response
.. code-block:: python
    {
        "code": "000000",
        "message": "success",
        "data": [
            {
                "coin": "BNB",
                "fromMin": "0.01",
                "fromMax": "1"
            }
        ],
        "success": true
    }
r@   zgiftcard/buyCode/token-limitTr  r  r   s     r(   gift_card_fetch_token_limit"Client.gift_card_fetch_token_limitP5  s&    * ''1$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt the card code.

Important Note:
The RSA Public key fetched is valid only for the current day.

https://developers.binance.com/docs/gift_card/market-data/Fetch-RSA-Public-Key
:param recvWindow: The receive window for the request in milliseconds (optional)
:type recvWindow: int
:return: api response
.. code-block:: python
    {
        "code": "000000",
        "message": "success",
        "data": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXBBVKLAc1GQ5FsIFFqOHrPTox5noBONIKr+IAedTR9FkVxq6e65updEbfdhRNkMOeYIO2i0UylrjGC0X8YSoIszmrVHeV0l06Zh1oJuZos1+7N+WLuz9JvlPaawof3GUakTxYWWCa9+8KIbLKsoKMdfS96VT+8iOXO3quMGKUmQIDAQAB",
        "success": true
    }
r@   z$giftcard/cryptography/rsa-public-keyTr  r  r   s     r(   gift_card_fetch_rsa_public_key%Client.gift_card_fetch_rsa_public_keyi5  s&    $ ''9$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.

Important Note:
If you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able
to verify any Gift Card Number for that hour.

https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number

:param referenceNo: Enter the Gift Card Number
:type referenceNo: str
:return: api response
.. code-block:: python
    {
        "code": "000000",
        "message": "success",
        "data": {
            "valid": true,
            "token": "BNB",     # coin
            "amount": "0.00000001"  # amount
        },
        "success": true
    }
r@   zgiftcard/verifyTr  r  r   s     r(   gift_card_verifyClient.gift_card_verify5  s&    0 ''$T ( 
 	
r*   c                 &    U R                  SSSUS9$ )a]  This API is for redeeming a Binance Gift Card. Once redeemed, the coins will be deposited in your funding wallet.

Important Note:
If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to
redeem any Binance Gift Cards that day.

Code Format Options:
- Plaintext
- Encrypted (Recommended for better security)

For encrypted format:
1. Fetch RSA public key from the RSA public key endpoint
2. Encrypt the code using algorithm: RSA/ECB/OAEPWithSHA-256AndMGF1Padding

https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card
:param code: Redemption code of Binance Gift Card to be redeemed, supports both Plaintext & Encrypted code
:type code: str
:param externalUid: External unique ID representing a user on the partner platform.
                  Helps identify redemption behavior and control risks/limits.
                  Max 400 characters. (optional)
:type externalUid: str
:param recvWindow: The receive window for the request in milliseconds (optional)
:type recvWindow: int
:return: api response
.. code-block:: python
    {
        "code": "000000",
        "message": "success",
        "data": {
            "referenceNo": "0033002328060227",
            "identityNo": "10317392647411060736",
            "token": "BNB",
            "amount": "0.00000001"
        },
        "success": true
    }
r   zgiftcard/redeemCodeTr  r  r   s     r(   gift_card_redeemClient.gift_card_redeem5  s'    L '')$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )uI  
This API is for creating a Binance Gift Card.

To get started with, please make sure:

- You have a Binance account
- You have passed KYB
- You have a sufﬁcient balance(Gift Card amount and fee amount) in your Binance funding wallet
- You need Enable Withdrawals for the API Key which requests this endpoint.

https://developers.binance.com/docs/gift_card/market-data

:param token: The token type contained in the Binance Gift Card
:type token: str
:param amount: The amount of the token contained in the Binance Gift Card
:type amount: float
:return: api response
.. code-block:: python
    {
        "code": "000000",
        "message": "success",
        "data": {
            "referenceNo": "0033002144060553",
            "code": "6H9EKF5ECCWFBHGE",
            "expiredTime": 1727417154000
        },
        "success": true
    }
r   zgiftcard/createCodeTr  r  r   s     r(   gift_card_createClient.gift_card_create5  s&    < '')$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )uC  This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus 1 USDT fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.

Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.

To get started with, please make sure:
- You have a Binance account
- You have passed KYB
- You have a sufﬁcient balance(Gift Card amount and fee amount) in your Binance funding wallet
- You need Enable Withdrawals for the API Key which requests this endpoint.

https://developers.binance.com/docs/gift_card/market-data/Create-a-dual-token-gift-card
:param baseToken: The token you want to pay, example: BUSD
:type baseToken: str
:param faceToken: The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint.
:type faceToken: str
:param discount: Stablecoin-denominated card discount percentage, Example: 1 for 1% discount. Scale should be less than 6.
:type discount: float
:return: api response
.. code-block:: python
    {
        "code": "000000",
        "message": "success",
        "data": {
            "referenceNo": "0033002144060553",
            "code": "6H9EKF5ECCWFBHGE",
            "expiredTime": 1727417154000
        },
        "success": true
    }
r   zgiftcard/buyCodeTr  r  r   s     r(   gift_card_create_dual_token"Client.gift_card_create_dual_token5  s&    > ''&t& ( 
 	
r*   c                 &    U R                  SSSUS9$ )a0  Get future hourly interest rate (USER_DATA)

https://developers.binance.com/docs/margin_trading/borrow-and-repay

:param assets: required - List of assets, separated by commas, up to 20
:type assets: str
:param isIsolated: required - for isolated margin or not, "TRUE", "FALSE"
:type isIsolated: bool

:returns: API response

.. code-block:: python
    [
        {
            "asset": "BTC",
            "nextHourlyInterestRate": "0.00000571"
        },
        {
            "asset": "ETH",
            "nextHourlyInterestRate": "0.00000578"
        }
    ]
r@   r  Tr  r  r   s     r(    margin_next_hourly_interest_rate'Client.margin_next_hourly_interest_rate6  s&    0 ''5d ( 
 	
r*   c                 &    U R                  SSSUS9$ )u6  Get Interest History (USER_DATA)

https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-Interest-History

:param asset: optional
:type asset: str
:param isolatedSymbol: optional - isolated symbol
:type isolatedSymbol: str
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param current: optional - Currently querying page. Start from 1. Default:1
:type current: int
:param size: optional - Default:10 Max:100
:type size: int

:returns: API response

.. code-block:: python
    {
        "rows": [
            {
            "txId": 1352286576452864727,
            "interestAccuredTime": 1672160400000,
            "asset": "USDT",
            "rawAsset": “USDT”,  // will not be returned for isolated margin
            "principal": "45.3313",
            "interest": "0.00024995",
            "interestRate": "0.00013233",
            "type": "ON_BORROW",
            "isolatedSymbol": "BNBUSDT"  // isolated symbol, will not be returned for crossed margin
            }
        ],
        "total": 1
        }

r@   rt  Tr  r  r   s     r(   margin_interest_historyClient.margin_interest_history*6  s'    N ''+Dv ( 
 	
r*   c                 &    U R                  SSSUS9$ )a,  Margin Account Borrow/Repay (MARGIN)

https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-Account-Borrow-Repay

:param asset: required
:type asset: str
:param amount: required
:type amount: float
:param isIsolated: optional - for isolated margin or not, "TRUE", "FALSE", default "FALSE"
:type isIsolated: str
:param symbol: optional - isolated symbol
:type symbol: str
:param type: str
:type type: str - BORROW or REPAY

:returns: API response
.. code-block:: python
    {
        //transaction id
        "tranId": 100000001
    }

r   margin/borrow-repayTr  r  r   s     r(   margin_borrow_repayClient.margin_borrow_repayU6  s&    0 '')$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )u  Query Query borrow/repay records in Margin account (USER_DATA)

https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Borrow-Repay

:param asset: required
:type asset: str
:param isolatedSymbol: optional - isolated symbol
:type isolatedSymbol: str
:param txId: optional - the tranId in POST /sapi/v1/margin/loan
:type txId: int
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int
:param current: optional - Currently querying page. Start from 1. Default:1
:type current: int
:param size: optional - Default:10 Max:100
:type size: int

:returns: API response

.. code-block:: python
{
    "rows": [
        {
            "type": "AUTO", // AUTO,MANUAL for Cross Margin Borrow; MANUAL，AUTO，BNB_AUTO_REPAY，POINT_AUTO_REPAY for Cross Margin Repay; AUTO，MANUAL for Isolated Margin Borrow/Repay;
            "isolatedSymbol": "BNBUSDT",     // isolated symbol, will not be returned for crossed margin
            "amount": "14.00000000",   // Total amount borrowed/repaid
            "asset": "BNB",
            "interest": "0.01866667",    // Interest repaid
            "principal": "13.98133333",   // Principal repaid
            "status": "CONFIRMED",   //one of PENDING (pending execution), CONFIRMED (successfully execution), FAILED (execution failed, nothing happened to your account);
            "timestamp": 1563438204000,
            "txId": 2970933056
        }
    ],
    "total": 1
}

r@   r  Tr  r  r   s     r(   margin_get_borrow_repay_records&Client.margin_get_borrow_repay_recordsq6  s'    R ''(F ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query Margin Interest Rate History (USER_DATA)

https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History

:param asset: required
:type asset: str
:param vipLevel: optional
:type vipLevel: int
:param startTime: optional
:type startTime: int
:param endTime: optional
:type endTime: int

:returns: API response

.. code-block:: python
[
    {
        "asset": "BTC",
        "dailyInterestRate": "0.00025000",
        "timestamp": 1611544731000,
        "vipLevel": 1
    },
    {
        "asset": "BTC",
        "dailyInterestRate": "0.00035000",
        "timestamp": 1610248118000,
        "vipLevel": 1
    }
]

r@   zmargin/interestRateHistoryTr  r  r   s     r(   margin_interest_rate_history#Client.margin_interest_rate_history6  s'    B ''/6 ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Query Max Borrow (USER_DATA)

https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Max-Borrow

:param asset: required
:type asset: str
:param isolatedSymbol: optional - isolated symbol
:type isolatedSymbol: str

:returns: API response

.. code-block:: python

{
    "amount": "1.69248805", // account's currently max borrowable amount with sufficient system availability
    "borrowLimit": "60" // max borrowable amount limited by the account level
}

r@   r  Tr  r  r   s     r(   margin_max_borrowableClient.margin_max_borrowable6  s&    ( '')$V ( 
 	
r*   c                 &    U R                  SSSUS9$ )a  Get Future TickLevel Orderbook Historical Data Download Link.

https://developers.binance.com/docs/derivatives/futures-data/market-data

:param symbol: STRING - Required - Symbol name, e.g. BTCUSDT or BTCUSD_PERP
:type symbol: str
:param dataType: ENUM - Required - Data type:
    - T_DEPTH for ticklevel orderbook data
    - S_DEPTH for orderbook snapshot data
:type dataType: str
:param startTime: LONG - Required - Start time in milliseconds
:type startTime: int
:param endTime: LONG - Required - End time in milliseconds
:type endTime: int
:param recvWindow: LONG - Optional - Number of milliseconds after timestamp the request is valid for
:type recvWindow: int
:param timestamp: LONG - Required - Current timestamp in milliseconds
:type timestamp: int

:returns: API response

.. code-block:: python

    {
        "data": [
            {
                "day": "2023-06-30",
                "url": ""
            }
        ]
    }

:raises: BinanceRequestException, BinanceAPIException

Notes:
    - The span between startTime and endTime can't be more than 7 days
    - The download link will be valid for 1 day
    - Only VIP users can query this endpoint
    - Weight: 200
r@   zfutures/data/histDataLinkTr  r  r   s     r(   futures_historical_data_link#Client.futures_historical_data_link6  s"    R ''/JSW^d'eer*   c                 (    U R                  SSSUSS9$ )a  
Placeholder function for GET /sapi/v1/loan/vip/ongoing/orders.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

GET /sapi/v1/loan/vip/ongoing/orders

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/vip/ongoing/ordersTr   r6   r<   rY   r  r   s     r(   %margin_v1_get_loan_vip_ongoing_orders,Client.margin_v1_get_loan_vip_ongoing_orders
7  $     ''/HQU\blm'nnr*   c                 (    U R                  SSSUSS9$ )a4  
Placeholder function for GET /sapi/v1/mining/payment/other.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api/Extra-Bonus-List

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmining/payment/otherTr   r  r  r   s     r(   "margin_v1_get_mining_payment_other)Client.margin_v1_get_mining_payment_other7  #     ''/EdY_ij'kkr*   c                 (    U R                  SSSUSS9$ )at  
Placeholder function for GET /dapi/v1/income/asyn/id.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   income/asyn/idTr   r  r{  r   s     r(   "futures_coin_v1_get_income_asyn_id)Client.futures_coin_v1_get_income_asyn_id&7  #     --e5EdY_ij-kkr*   c                 (    U R                  SSSUSS9$ )aB  
Placeholder function for GET /sapi/v1/simple-earn/flexible/history/subscriptionRecord.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/simple_earn/history

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z/simple-earn/flexible/history/subscriptionRecordTr   r  r  r   s     r(   >margin_v1_get_simple_earn_flexible_history_subscription_recordEClient.margin_v1_get_simple_earn_flexible_history_subscription_record47  s.     ''/`imtz  EF'  G  	Gr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/lending/auto-invest/one-off.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zlending/auto-invest/one-offTr   r  r  r   s     r(   *margin_v1_post_lending_auto_invest_one_off1Client.margin_v1_post_lending_auto_invest_one_offB7  $     ''0MVZagqr'ssr*   c                 (    U R                  SSSUSS9$ )as  
Placeholder function for POST /sapi/v1/broker/subAccountApi/commission/coinFutures.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/fee/Change-Sub-Account-CM-Futures-Commission

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   +broker/subAccountApi/commission/coinFuturesTr   r  r  r   s     r(   =margin_v1_post_broker_sub_account_api_commission_coin_futuresDClient.margin_v1_post_broker_sub_account_api_commission_coin_futuresN7  s.     ''0]fjqw  BC'  D  	Dr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /api/v3/orderList/otoco.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zorderList/otocoTv3r  r   r   s     r(   v3_post_order_list_otocoClient.v3_post_order_list_otoco\7  s"       ):4f^b ccr*   c                 (    U R                  SSSUSS9$ )af  
Placeholder function for GET /fapi/v1/order/asyn.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r.  Tr   r  rH  r   s     r(   futures_v1_get_order_asyn Client.futures_v1_get_order_asynh7  "     ((TPV`a(bbr*   c                 (    U R                  SSSUSS9$ )a@  
Placeholder function for GET /sapi/v1/asset/custody/transfer-history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/asset/query-user-delegation

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zasset/custody/transfer-historyTr   r  r  r   s     r(   ,margin_v1_get_asset_custody_transfer_history3Client.margin_v1_get_asset_custody_transfer_historyv7  $     ''/OX\cist'uur*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/broker/subAccount/blvt.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zbroker/subAccount/blvtTr   r  r  r   s     r(   &margin_v1_post_broker_sub_account_blvt-Client.margin_v1_post_broker_sub_account_blvt7  $     ''0HQU\blm'nnr*   c                 (    U R                  SSSUSS9$ )a=  
Placeholder function for POST /sapi/v1/sol-staking/sol/redeem.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/sol-staking/staking/Redeem-SOL

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zsol-staking/sol/redeemTr   r  r  r   s     r(   %margin_v1_post_sol_staking_sol_redeem,Client.margin_v1_post_sol_staking_sol_redeem7  $     ''0HQU\blm'nnr*   c                 &    U R                  SSSUS9$ )ab  
Placeholder function for GET /eapi/v1/countdownCancelAll.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/option/market-maker-endpoints/Get-Auto-Cancel-All-Open-Orders-Config

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r.  Tr  rM  r   s     r(   #options_v1_get_countdown_cancel_all*Client.options_v1_get_countdown_cancel_all7  s      ((0DTX^(__r*   c                 (    U R                  SSSUSS9$ )aE  
Placeholder function for GET /sapi/v1/margin/tradeCoeff.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/margin_trading/account/Get-Summary-Of-Margin-Account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmargin/tradeCoeffTr   r  r  r   s     r(    margin_v1_get_margin_trade_coeff'Client.margin_v1_get_margin_trade_coeff7  #     ''/B4V\fg'hhr*   c                 (    U R                  SSSUSS9$ )aW  
Placeholder function for GET /dapi/v1/orderAmendment.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Get-Order-Modify-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   orderAmendmentTr   r  r{  r   s     r(   #futures_coin_v1_get_order_amendment*Client.futures_coin_v1_get_order_amendment7  r  r*   c                 (    U R                  SSSUSS9$ )aU  
Placeholder function for GET /sapi/v1/margin/available-inventory.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/margin_trading/market-data/Query-margin-avaliable-inventory

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmargin/available-inventoryTr   r  r  r   s     r(   (margin_v1_get_margin_available_inventory/Client.margin_v1_get_margin_available_inventory7  $     ''/KTX_eop'qqr*   c                 (    U R                  SSSUSS9$ )a  
Placeholder function for POST /sapi/v1/account/apiRestrictions/ipRestriction/ipList.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   ,account/apiRestrictions/ipRestriction/ipListTr   r  r  r   s     r(   >margin_v1_post_account_api_restrictions_ip_restriction_ip_listEClient.margin_v1_post_account_api_restrictions_ip_restriction_ip_list7  s.     ''0^gkrx  CD'  E  	Er*   c                 (    U R                  SSSUSS9$ )a.  
Placeholder function for GET /sapi/v2/eth-staking/account.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/eth-staking/account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zeth-staking/accountTr<  r  r  r   s     r(   !margin_v2_get_eth_staking_account(Client.margin_v2_get_eth_staking_account7  #     ''/DTX^hi'jjr*   c                 (    U R                  SSSUSS9$ )a.  
Placeholder function for GET /sapi/v1/loan/income.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/stable-rate/market-data

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/incomeTr   r  r  r   s     r(   margin_v1_get_loan_income Client.margin_v1_get_loan_income7  s"     ''}TPV`a'bbr*   c                 (    U R                  SSSUSS9$ )aI  
Placeholder function for GET /dapi/v1/pmAccountInfo.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/coin-margined-futures/portfolio-margin-endpoints

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   pmAccountInfoTr   r  r{  r   s     r(   #futures_coin_v1_get_pm_account_info*Client.futures_coin_v1_get_pm_account_info7  s"     --e_TX^hi-jjr*   c                 (    U R                  SSSUSS9$ )az  
Placeholder function for GET /sapi/v1/managed-subaccount/queryTransLogForInvestor.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-Account-Transfer-Log-Investor

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z+managed-subaccount/queryTransLogForInvestorTr   r  r  r   s     r(   =margin_v1_get_managed_subaccount_query_trans_log_for_investorDClient.margin_v1_get_managed_subaccount_query_trans_log_for_investor8  .     ''/\eipv  AB'  C  	Cr*   c                 (    U R                  SSSUSS9$ )aW  
Placeholder function for POST /sapi/v1/dci/product/auto_compound/edit-status.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z%dci/product/auto_compound/edit-statusTr   r  r  r   s     r(   4margin_v1_post_dci_product_auto_compound_edit_status;Client.margin_v1_post_dci_product_auto_compound_edit_status8  s$     ''0W`dkq{|'}}r*   c                 (    U R                  SSSUSS9$ )af  
Placeholder function for GET /fapi/v1/trade/asyn.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r6  Tr   r  rH  r   s     r(   futures_v1_get_trade_asyn Client.futures_v1_get_trade_asyn(8  r1  r*   c                 (    U R                  SSSUSS9$ )a1  
Placeholder function for GET /sapi/v1/loan/vip/request/interestRate.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/vip_loan/market-data

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/vip/request/interestRateTr   r  r  r   s     r(   ,margin_v1_get_loan_vip_request_interest_rate3Client.margin_v1_get_loan_vip_request_interest_rate68  $     ''/NW[bhrs'ttr*   c                 (    U R                  SSSUSS9$ )aW  
Placeholder function for GET /fapi/v1/fundingInfo.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   fundingInfoFr   r  rH  r   s     r(   futures_v1_get_funding_info"Client.futures_v1_get_funding_infoD8  s"     ((eRXbc(ddr*   c                 (    U R                  SSSUSS9$ )a^  
Placeholder function for GET /sapi/v2/loan/flexible/repay/rate.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/flexible/repay/rateTr<  r  r  r   s     r(   &margin_v2_get_loan_flexible_repay_rate-Client.margin_v2_get_loan_flexible_repay_rateR8  $     ''/IRV]cmn'oor*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/lending/auto-invest/plan/id.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zlending/auto-invest/plan/idTr   r  r  r   s     r(   )margin_v1_get_lending_auto_invest_plan_id0Client.margin_v1_get_lending_auto_invest_plan_id`8  s$     ''/LUY`fpq'rrr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/loan/adjust/ltv.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zloan/adjust/ltvTr   r  r  r   s     r(   margin_v1_post_loan_adjust_ltv%Client.margin_v1_post_loan_adjust_ltvl8  #     ''0A$U[ef'ggr*   c                 (    U R                  SSSUSS9$ )a;  
Placeholder function for GET /sapi/v1/mining/statistics/user/status.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api/Statistic-List

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmining/statistics/user/statusTr   r  r  r   s     r(   +margin_v1_get_mining_statistics_user_status2Client.margin_v1_get_mining_statistics_user_statusx8  ri  r*   c                 (    U R                  SSSUSS9$ )ab  
Placeholder function for GET /sapi/v1/broker/transfer/futures.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Futures

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   broker/transfer/futuresTr   r  r  r   s     r(   %margin_v1_get_broker_transfer_futures,Client.margin_v1_get_broker_transfer_futures8  r  r*   c                 (    U R                  SSSUSS9$ )aK  
Placeholder function for POST /sapi/v1/algo/spot/newOrderTwap.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/algo/spot-algo/Time-Weighted-Average-Price-New-Order

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zalgo/spot/newOrderTwapTr   r  r  r   s     r(   'margin_v1_post_algo_spot_new_order_twap.Client.margin_v1_post_algo_spot_new_order_twap8  r=  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/lending/auto-invest/target-asset/list.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z%lending/auto-invest/target-asset/listTr   r  r  r   s     r(   3margin_v1_get_lending_auto_invest_target_asset_list:Client.margin_v1_get_lending_auto_invest_target_asset_list8  $     ''/V_cjpz{'||r*   c                 (    U R                  SSSUSS9$ )a;  
Placeholder function for GET /sapi/v1/capital/deposit/address/list.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/capital/deposite-address

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zcapital/deposit/address/listTr   r  r  r   s     r(   *margin_v1_get_capital_deposit_address_list1Client.margin_v1_get_capital_deposit_address_list8  $     ''/MVZagqr'ssr*   c                 (    U R                  SSSUSS9$ )a  
Placeholder function for POST /sapi/v1/broker/subAccount/bnbBurn/marginInterest.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Margin-Interest

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z(broker/subAccount/bnbBurn/marginInterestTr   r  r  r   s     r(   :margin_v1_post_broker_sub_account_bnb_burn_margin_interestAClient.margin_v1_post_broker_sub_account_bnb_burn_margin_interest8  s*     ''0Zcgnt~'  A  	Ar*   c                 (    U R                  SSSUSS9$ )aG  
Placeholder function for POST /sapi/v2/loan/flexible/repay.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zloan/flexible/repayTr<  r  r  r   s     r(   "margin_v2_post_loan_flexible_repay)Client.margin_v2_post_loan_flexible_repay8  s#     ''0EdY_ij'kkr*   c                 (    U R                  SSSUSS9$ )a^  
Placeholder function for GET /sapi/v2/loan/flexible/loanable/data.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Assets-Data

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/flexible/loanable/dataTr<  r  r  r   s     r(   )margin_v2_get_loan_flexible_loanable_data0Client.margin_v2_get_loan_flexible_loanable_data8  $     ''/LUY`fpq'rrr*   c                 (    U R                  SSSUSS9$ )ad  
Placeholder function for POST /sapi/v1/broker/subAccountApi/permission.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account/Change-Sub-Account-Api-Permission

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zbroker/subAccountApi/permissionTr   r  r  r   s     r(   0margin_v1_post_broker_sub_account_api_permission7Client.margin_v1_post_broker_sub_account_api_permission8  $     ''0QZ^ekuv'wwr*   c                 (    U R                  SSSUSS9$ )aV  
Placeholder function for POST /sapi/v1/broker/subAccountApi.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account/Create-Api-Key-for-Sub-Account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   broker/subAccountApiTr   r  r  r   s     r(   %margin_v1_post_broker_sub_account_api,Client.margin_v1_post_broker_sub_account_api8  #     ''0FtZ`jk'llr*   c                 (    U R                  SSSUSS9$ )aH  
Placeholder function for GET /sapi/v1/dci/product/positions.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zdci/product/positionsTr   r  r  r   s     r(   #margin_v1_get_dci_product_positions*Client.margin_v1_get_dci_product_positions9  #     ''/FtZ`jk'llr*   c                 (    U R                  SSSUSS9$ )a4  
Placeholder function for POST /sapi/v1/convert/limit/cancelOrder.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/convert/trade/Cancel-Order

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zconvert/limit/cancelOrderTr   r  r  r   s     r(   )margin_v1_post_convert_limit_cancel_order0Client.margin_v1_post_convert_limit_cancel_order9  $     ''0KTX_eop'qqr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /api/v3/orderList/oto.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zorderList/otoTr+  r  r   r   s     r(   v3_post_order_list_otoClient.v3_post_order_list_oto9  !       F\` aar*   c                 (    U R                  SSSUSS9$ )aL  
Placeholder function for GET /sapi/v1/mining/hash-transfer/config/details/list.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-List

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z(mining/hash-transfer/config/details/listTr   r  r  r   s     r(   6margin_v1_get_mining_hash_transfer_config_details_list=Client.margin_v1_get_mining_hash_transfer_config_details_list*9  $     ''/Ybfms}~'r*   c                 (    U R                  SSSUSS9$ )aI  
Placeholder function for GET /sapi/v1/mining/hash-transfer/profit/details.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-Detail

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z#mining/hash-transfer/profit/detailsTr   r  r  r   s     r(   1margin_v1_get_mining_hash_transfer_profit_details8Client.margin_v1_get_mining_hash_transfer_profit_details89  $     ''/T]ahnxy'zzr*   c                 (    U R                  SSSUSS9$ )aE  
Placeholder function for GET /sapi/v1/broker/subAccount.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account/Query-Sub-Account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   broker/subAccountTr   r  r  r   s     r(    margin_v1_get_broker_sub_account'Client.margin_v1_get_broker_sub_accountF9  rD  r*   c                 (    U R                  SSSUSS9$ )ac  
Placeholder function for GET /sapi/v1/portfolio/balance.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Classic-Portfolio-Margin-Balance-Info

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zportfolio/balanceTr   r  r  r   s     r(   margin_v1_get_portfolio_balance&Client.margin_v1_get_portfolio_balanceT9  rD  r*   c                 (    U R                  SSSUSS9$ )aY  
Placeholder function for POST /sapi/v1/sub-account/eoptions/enable.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/account-management/Enable-Options-for-Sub-account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zsub-account/eoptions/enableTr   r  r  r   s     r(   *margin_v1_post_sub_account_eoptions_enable1Client.margin_v1_post_sub_account_eoptions_enableb9  $     ''0MVZagqr'ssr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /papi/v1/ping.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r!   Tr   r  r  r   s     r(   papi_v1_post_pingClient.papi_v1_post_pingp9  s!     %%ffTXY%ZZr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/loan/loanable/data.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/loanable/dataTr   r  r  r   s     r(    margin_v1_get_loan_loanable_data'Client.margin_v1_get_loan_loanable_data|9  s#     ''/CDW]gh'iir*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/eth-staking/wbeth/unwrap.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zeth-staking/wbeth/unwrapTr   r  r  r   s     r(   'margin_v1_post_eth_staking_wbeth_unwrap.Client.margin_v1_post_eth_staking_wbeth_unwrap9  s$     ''0JSW^dno'ppr*   c                 (    U R                  SSSUSS9$ )aA  
Placeholder function for GET /sapi/v1/eth-staking/eth/history/stakingHistory.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/eth-staking/history

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z&eth-staking/eth/history/stakingHistoryTr   r  r  r   s     r(   5margin_v1_get_eth_staking_eth_history_staking_history<Client.margin_v1_get_eth_staking_eth_history_staking_history9  $     ''/W`dkq{|'}}r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/staking/stakingRecord.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zstaking/stakingRecordTr   r  r  r   s     r(   $margin_v1_get_staking_staking_record+Client.margin_v1_get_staking_staking_record9  s#     ''/FtZ`jk'llr*   c                 (    U R                  SSSUSS9$ )ac  
Placeholder function for GET /sapi/v1/broker/rebate/recentRecord.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/fee/Query-Spot-Commission-Rebate-Recent-Record

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zbroker/rebate/recentRecordTr   r  r  r   s     r(   )margin_v1_get_broker_rebate_recent_record0Client.margin_v1_get_broker_rebate_recent_record9  rL  r*   c                 (    U R                  SSSUSS9$ )aa  
Placeholder function for GET /sapi/v1/loan/vip/collateral/account.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/vip_loan/user-information/Check-Locked-Value-of-VIP-Collateral-Account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/vip/collateral/accountTr   r  r  r   s     r(   )margin_v1_get_loan_vip_collateral_account0Client.margin_v1_get_loan_vip_collateral_account9  r  r*   c                 (    U R                  SSSUSS9$ )aA  
Placeholder function for GET /sapi/v1/algo/spot/openOrders.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/algo/spot-algo/Query-Current-Algo-Open-Orders

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zalgo/spot/openOrdersTr   r  r  r   s     r(   #margin_v1_get_algo_spot_open_orders*Client.margin_v1_get_algo_spot_open_orders9  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/loan/repay.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z
loan/repayTr   r  r  r   s     r(   margin_v1_post_loan_repay Client.margin_v1_post_loan_repay9  s"     ''TPV`a'bbr*   c                 (    U R                  SSSUSS9$ )aR  
Placeholder function for GET /dapi/v1/fundingInfo.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Get-Funding-Info

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   rk  Fr   r  r{  r   s     r(    futures_coin_v1_get_funding_info'Client.futures_coin_v1_get_funding_info9  s"     --e]5W]gh-iir*   c                 (    U R                  SSSUSS9$ )ao  
Placeholder function for GET /sapi/v1/margin/leverageBracket.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/margin_trading/market-data/Query-Liability-Coin-Leverage-Bracket-in-Cross-Margin-Pro-Mode

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmargin/leverageBracketTr   r  r  r   s     r(   %margin_v1_get_margin_leverage_bracket,Client.margin_v1_get_margin_leverage_bracket9  $     ''/GPT[akl'mmr*   c                 (    U R                  SSSUSS9$ )ap  
Placeholder function for GET /sapi/v2/portfolio/collateralRate.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/portfolio-margin-pro/market-data/Portfolio-Margin-Pro-Tiered-Collateral-Rate

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zportfolio/collateralRateTr<  r  r  r   s     r(   'margin_v2_get_portfolio_collateral_rate.Client.margin_v2_get_portfolio_collateral_rate :  rq  r*   c                 (    U R                  SSSUSS9$ )aQ  
Placeholder function for POST /sapi/v2/loan/flexible/adjust/ltv.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Adjust-LTV

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zloan/flexible/adjust/ltvTr<  r  r  r   s     r(   'margin_v2_post_loan_flexible_adjust_ltv.Client.margin_v2_post_loan_flexible_adjust_ltv:  $     ''0JSW^dno'ppr*   c                 (    U R                  SSSUSS9$ )a-  
Placeholder function for GET /sapi/v1/convert/orderStatus.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/convert/trade/Order-Status

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   convert/orderStatusTr   r  r  r   s     r(   "margin_v1_get_convert_order_status)Client.margin_v1_get_convert_order_status:  rT  r*   c                 (    U R                  SSSUSS9$ )an  
Placeholder function for GET /sapi/v1/broker/subAccountApi/ipRestriction.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account/Get-IPRestriction-for-Sub-Account-Api-Key

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   "broker/subAccountApi/ipRestrictionTr   r  r  r   s     r(   3margin_v1_get_broker_sub_account_api_ip_restriction:Client.margin_v1_get_broker_sub_account_api_ip_restriction*:  $     ''/S\`gmwx'yyr*   c                 (    U R                  SSSUSS9$ )a+  
Placeholder function for POST /sapi/v1/dci/product/subscribe.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/dual_investment/trade

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zdci/product/subscribeTr   r  r  r   s     r(   $margin_v1_post_dci_product_subscribe+Client.margin_v1_post_dci_product_subscribe8:  $     ''0GPT[akl'mmr*   c                 (    U R                  SSSUSS9$ )at  
Placeholder function for GET /fapi/v1/income/asyn/id.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r  Tr   r  rH  r   s     r(   futures_v1_get_income_asyn_id$Client.futures_v1_get_income_asyn_idF:  #     ((0@TZde(ffr*   c                 &    U R                  SSSUS9$ )ac  
Placeholder function for POST /eapi/v1/countdownCancelAll.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/option/market-maker-endpoints/Set-Auto-Cancel-All-Open-Orders-Config

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r.  Tr  rM  r   s     r(   $options_v1_post_countdown_cancel_all+Client.options_v1_post_countdown_cancel_allT:  s      ((1EdY_(``r*   c                 (    U R                  SSSUSS9$ )aW  
Placeholder function for POST /sapi/v1/mining/hash-transfer/config/cancel.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api/Cancel-hashrate-resale-configuration

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z"mining/hash-transfer/config/cancelTr   r  r  r   s     r(   1margin_v1_post_mining_hash_transfer_config_cancel8Client.margin_v1_post_mining_hash_transfer_config_cancelb:  $     ''0T]ahnxy'zzr*   c                 (    U R                  SSSUSS9$ )a]  
Placeholder function for GET /sapi/v1/broker/subAccount/depositHist.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/asset/Get-Sub-Account-Deposit-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zbroker/subAccount/depositHistTr   r  r  r   s     r(   -margin_v1_get_broker_sub_account_deposit_hist4Client.margin_v1_get_broker_sub_account_deposit_histp:  ri  r*   c                 (    U R                  SSSUSS9$ )a0  
Placeholder function for GET /sapi/v1/mining/payment/list.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api/Earnings-List

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmining/payment/listTr   r  r  r   s     r(   !margin_v1_get_mining_payment_list(Client.margin_v1_get_mining_payment_list~:  rT  r*   c                 (    U R                  SSSUSS9$ )aI  
Placeholder function for GET /fapi/v1/pmAccountInfo.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/portfolio-margin-endpoints

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   rY  Tr   r  rH  r   s     r(   futures_v1_get_pm_account_info%Client.futures_v1_get_pm_account_info:  "     ((SYcd(eer*   c                 (    U R                  SSSUSS9$ )a\  
Placeholder function for GET /dapi/v1/adlQuantile.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r  Tr   r  r{  r   s     r(    futures_coin_v1_get_adl_quantile'Client.futures_coin_v1_get_adl_quantile:  "     --e]4V\fg-hhr*   c                 &    U R                  SSSUS9$ )a[  
Placeholder function for GET /eapi/v1/income/asyn/id.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/option/account/Get-Option-Transaction-History-Download-Link-by-Id

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r  Tr  rM  r   s     r(   options_v1_get_income_asyn_id$Client.options_v1_get_income_asyn_id:  s      ((0@TZ([[r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /api/v3/cancelReplace.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   cancelReplaceTr+  r  r   r   s     r(   v3_post_cancel_replaceClient.v3_post_cancel_replace:  r  r*   c                 (    U R                  SSSUSS9$ )aK  
Placeholder function for POST /sapi/v1/account/enableFastWithdrawSwitch.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/account/enable-fast-withdraw-switch

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z account/enableFastWithdrawSwitchTr   r  r  r   s     r(   2margin_v1_post_account_enable_fast_withdraw_switch9Client.margin_v1_post_account_enable_fast_withdraw_switch:  s$     ''0R[_flvw'xxr*   c                 (    U R                  SSSUSS9$ )aU  
Placeholder function for POST /sapi/v1/broker/transfer/futures.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/asset/Sub-Account-Transfer-Futures

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r}  Tr   r  r  r   s     r(   &margin_v1_post_broker_transfer_futures-Client.margin_v1_post_broker_transfer_futures:  $     ''0IRV]cmn'oor*   c                 (    U R                  SSSUSS9$ )a1  
Placeholder function for POST /sapi/v1/sol-staking/sol/stake.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/sol-staking/staking

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zsol-staking/sol/stakeTr   r  r  r   s     r(   $margin_v1_post_sol_staking_sol_stake+Client.margin_v1_post_sol_staking_sol_stake:  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/loan/borrow.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zloan/borrowTr   r  r  r   s     r(   margin_v1_post_loan_borrow!Client.margin_v1_post_loan_borrow:  s"     ''dQWab'ccr*   c                 (    U R                  SSSUSS9$ )aU  
Placeholder function for GET /sapi/v1/managed-subaccount/info.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-List

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmanaged-subaccount/infoTr   r  r  r   s     r(   %margin_v1_get_managed_subaccount_info,Client.margin_v1_get_managed_subaccount_info:  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/lending/auto-invest/plan/edit-status.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z$lending/auto-invest/plan/edit-statusTr   r  r  r   s     r(   3margin_v1_post_lending_auto_invest_plan_edit_status:Client.margin_v1_post_lending_auto_invest_plan_edit_status;  s$     ''0V_cjpz{'||r*   c                 (    U R                  SSSUSS9$ )aY  
Placeholder function for GET /sapi/v1/sol-staking/sol/history/unclaimedRewards.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/sol-staking/history/Get-Unclaimed-rewards

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z(sol-staking/sol/history/unclaimedRewardsTr   r  r  r   s     r(   7margin_v1_get_sol_staking_sol_history_unclaimed_rewards>Client.margin_v1_get_sol_staking_sol_history_unclaimed_rewards;  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/asset/convert-transfer/queryByPage.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z"asset/convert-transfer/queryByPageTr   r  r  r   s     r(   3margin_v1_post_asset_convert_transfer_query_by_page:Client.margin_v1_post_asset_convert_transfer_query_by_page ;  $     ''0T]ahnxy'zzr*   c                 (    U R                  SSSUSS9$ )a`  
Placeholder function for GET /sapi/v1/sol-staking/sol/history/boostRewardsHistory.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/sol-staking/history/Get-Boost-rewards-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z+sol-staking/sol/history/boostRewardsHistoryTr   r  r  r   s     r(   ;margin_v1_get_sol_staking_sol_history_boost_rewards_historyBClient.margin_v1_get_sol_staking_sol_history_boost_rewards_history,;  r_  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/lending/auto-invest/one-off/status.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z"lending/auto-invest/one-off/statusTr   r  r  r   s     r(   0margin_v1_get_lending_auto_invest_one_off_status7Client.margin_v1_get_lending_auto_invest_one_off_status:;  $     ''/S\`gmwx'yyr*   c                 (    U R                  SSSUSS9$ )a4  
Placeholder function for POST /sapi/v1/broker/subAccount.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r  Tr   r  r  r   s     r(   !margin_v1_post_broker_sub_account(Client.margin_v1_post_broker_sub_accountF;  s#     ''0CDW]gh'iir*   c                 (    U R                  SSSUSS9$ )ab  
Placeholder function for GET /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/asset/cloud-mining-payment-and-refund-history

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z.asset/ledger-transfer/cloud-mining/queryByPageTr   r  r  r   s     r(   >margin_v1_get_asset_ledger_transfer_cloud_mining_query_by_pageEClient.margin_v1_get_asset_ledger_transfer_cloud_mining_query_by_pageT;  .     ''/_hlsy  DE'  F  	Fr*   c                 (    U R                  SSSUSS9$ )a5  
Placeholder function for GET /sapi/v1/mining/pub/coinList.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api/Acquiring-CoinName

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmining/pub/coinListTr   r  r  r   s     r(   "margin_v1_get_mining_pub_coin_list)Client.margin_v1_get_mining_pub_coin_listb;  rT  r*   c                 (    U R                  SSSUSS9$ )ai  
Placeholder function for GET /sapi/v2/loan/flexible/repay/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   loan/flexible/repay/historyTr<  r  r  r   s     r(   )margin_v2_get_loan_flexible_repay_history0Client.margin_v2_get_loan_flexible_repay_historyp;  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /api/v3/sor/order.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z	sor/orderTr+  r  r   r   s     r(   v3_post_sor_orderClient.v3_post_sor_order~;  s!       TX\ ]]r*   c                 (    U R                  SSSUSS9$ )aL  
Placeholder function for POST /sapi/v1/capital/deposit/credit-apply.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/capital/one-click-arrival-deposite-apply

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zcapital/deposit/credit-applyTr   r  r  r   s     r(   +margin_v1_post_capital_deposit_credit_apply2Client.margin_v1_post_capital_deposit_credit_apply;  s$     ''0NW[bhrs'ttr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for PUT /fapi/v1/batchOrder.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   
batchOrderTr   r  rH  r   s     r(   futures_v1_put_batch_order!Client.futures_v1_put_batch_order;  s"     ((TPV`a(bbr*   c                 (    U R                  SSSUSS9$ )a7  
Placeholder function for GET /sapi/v1/mining/statistics/user/list.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api/Account-List

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmining/statistics/user/listTr   r  r  r   s     r(   )margin_v1_get_mining_statistics_user_list0Client.margin_v1_get_mining_statistics_user_list;  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /fapi/v1/batchOrder.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   rJ	  Tr   r  rH  r   s     r(   futures_v1_post_batch_order"Client.futures_v1_post_batch_order;  s"     ((dQWab(ccr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /api/v3/ticker/tradingDay.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zticker/tradingDayFr+  r  r   r   s     r(   v3_get_ticker_trading_day Client.v3_get_ticker_trading_day;  s#       (;EPV`d eer*   c                 (    U R                  SSSUSS9$ )aA  
Placeholder function for GET /sapi/v1/mining/worker/detail.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api/Request-for-Detail-Miner-List

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmining/worker/detailTr   r  r  r   s     r(   "margin_v1_get_mining_worker_detail)Client.margin_v1_get_mining_worker_detail;  r  r*   c                 (    U R                  SSSUSS9$ )at  
Placeholder function for GET /sapi/v1/managed-subaccount/fetch-future-asset.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-Futures-Asset-Details

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z%managed-subaccount/fetch-future-assetTr   r  r  r   s     r(   3margin_v1_get_managed_subaccount_fetch_future_asset:Client.margin_v1_get_managed_subaccount_fetch_future_asset;  s$     ''/V_cjpz{'||r*   c                 (    U R                  SSSUSS9$ )aQ  
Placeholder function for GET /sapi/v1/margin/rateLimit/order.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/margin_trading/trade/Query-Current-Margin-Order-Count-Usage

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmargin/rateLimit/orderTr   r  r  r   s     r(   %margin_v1_get_margin_rate_limit_order,Client.margin_v1_get_margin_rate_limit_order;  r  r*   c                 (    U R                  SSSUSS9$ )a6  
Placeholder function for GET /sapi/v1/localentity/vasp.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/travel-rule/onboarded-vasp-list

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zlocalentity/vaspTr   r  r  r   s     r(   margin_v1_get_localentity_vasp%Client.margin_v1_get_localentity_vasp;  #     ''/A$U[ef'ggr*   c                 (    U R                  SSSUSS9$ )aU  
Placeholder function for GET /sapi/v1/sol-staking/sol/history/rateHistory.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/sol-staking/history/Get-BNSOL-Rate-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z#sol-staking/sol/history/rateHistoryTr   r  r  r   s     r(   2margin_v1_get_sol_staking_sol_history_rate_history9Client.margin_v1_get_sol_staking_sol_history_rate_history<  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/broker/subAccountApi/ipRestriction.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r  Tr   r  r  r   s     r(   4margin_v1_post_broker_sub_account_api_ip_restriction;Client.margin_v1_post_broker_sub_account_api_ip_restriction<  r-	  r*   c                 (    U R                  SSSUSS9$ )aW  
Placeholder function for GET /sapi/v1/broker/transfer.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/asset/Query-Sub-Account-Transfer-History-Spot

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   broker/transferTr   r  r  r   s     r(   margin_v1_get_broker_transfer$Client.margin_v1_get_broker_transfer<  s#     ''/@TZde'ffr*   c                 (    U R                  SSSUSS9$ )a.  
Placeholder function for GET /sapi/v1/sol-staking/account.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/sol-staking/account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zsol-staking/accountTr   r  r  r   s     r(   !margin_v1_get_sol_staking_account(Client.margin_v1_get_sol_staking_account*<  rT  r*   c                 (    U R                  SSSUSS9$ )a  
Placeholder function for GET /sapi/v1/account/info.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zaccount/infoTr   r  r  r   s     r(   margin_v1_get_account_info!Client.margin_v1_get_account_info8<  s"     ''~dQWab'ccr*   c                 (    U R                  SSSUSS9$ )ah  
Placeholder function for POST /sapi/v1/portfolio/repay-futures-switch.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Change-Auto-repay-futures-Status

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zportfolio/repay-futures-switchTr   r  r  r   s     r(   -margin_v1_post_portfolio_repay_futures_switch4Client.margin_v1_post_portfolio_repay_futures_switchF<  $     ''0PY]djtu'vvr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/loan/vip/borrow.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zloan/vip/borrowTr   r  r  r   s     r(   margin_v1_post_loan_vip_borrow%Client.margin_v1_post_loan_vip_borrowT<  rx  r*   c                 (    U R                  SSSUSS9$ )aN  
Placeholder function for GET /sapi/v2/loan/flexible/ltv/adjustment/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z$loan/flexible/ltv/adjustment/historyTr<  r  r  r   s     r(   2margin_v2_get_loan_flexible_ltv_adjustment_history9Client.margin_v2_get_loan_flexible_ltv_adjustment_history`<  s$     ''/U^bioyz'{{r*   c                 &    U R                  SSSUS9$ )a[  
Placeholder function for DELETE /eapi/v1/allOpenOrdersByUnderlying.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/option/trade/Cancel-All-Option-Orders-By-Underlying

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   allOpenOrdersByUnderlyingTr  rM  r   s     r(   /options_v1_delete_all_open_orders_by_underlying6Client.options_v1_delete_all_open_orders_by_underlyingn<  s!     ((3NW[bh(iir*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/broker/subAccount/futuresSummary.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@    broker/subAccount/futuresSummaryTr   r  r  r   s     r(   0margin_v1_get_broker_sub_account_futures_summary7Client.margin_v1_get_broker_sub_account_futures_summary|<  $     ''/QZ^ekuv'wwr*   c                 (    U R                  SSSUSS9$ )a_  
Placeholder function for GET /sapi/v1/broker/subAccount/spotSummary.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/asset/Query-Sub-Account-Spot-Asset-Info

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zbroker/subAccount/spotSummaryTr   r  r  r   s     r(   -margin_v1_get_broker_sub_account_spot_summary4Client.margin_v1_get_broker_sub_account_spot_summary<  ri  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/sub-account/blvt/enable.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zsub-account/blvt/enableTr   r  r  r   s     r(   &margin_v1_post_sub_account_blvt_enable-Client.margin_v1_post_sub_account_blvt_enable<  s$     ''0IRV]cmn'oor*   c                 (    U R                  SSSUSS9$ )aE  
Placeholder function for GET /sapi/v1/algo/spot/historicalOrders.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/algo/spot-algo/Query-Historical-Algo-Orders

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zalgo/spot/historicalOrdersTr   r  r  r   s     r(   )margin_v1_get_algo_spot_historical_orders0Client.margin_v1_get_algo_spot_historical_orders<  rL  r*   c                 (    U R                  SSSUSS9$ )aN  
Placeholder function for GET /sapi/v1/loan/vip/repay/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/vip_loan/user-information/Get-VIP-Loan-Repayment-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/vip/repay/historyTr   r  r  r   s     r(   $margin_v1_get_loan_vip_repay_history+Client.margin_v1_get_loan_vip_repay_history<  r  r*   c                 (    U R                  SSSUSS9$ )a;  
Placeholder function for GET /sapi/v1/loan/borrow/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/stable-rate/user-information

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/borrow/historyTr   r  r  r   s     r(   !margin_v1_get_loan_borrow_history(Client.margin_v1_get_loan_borrow_history<  rT  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/lending/auto-invest/redeem.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zlending/auto-invest/redeemTr   r  r  r   s     r(   )margin_v1_post_lending_auto_invest_redeem0Client.margin_v1_post_lending_auto_invest_redeem<  $     ''0LUY`fpq'rrr*   c                 (    U R                  SSSUSS9$ )am  
Placeholder function for GET /dapi/v1/income/asyn.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   income/asynTr   r  r{  r   s     r(   futures_coin_v1_get_income_asyn&Client.futures_coin_v1_get_income_asyn<  r	  r*   c                 (    U R                  SSSUSS9$ )a:  
Placeholder function for POST /sapi/v1/managed-subaccount/deposit.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/managed-sub-account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zmanaged-subaccount/depositTr   r  r  r   s     r(   )margin_v1_post_managed_subaccount_deposit0Client.margin_v1_post_managed_subaccount_deposit<  $     ''0LUY`fpq'rrr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/lending/daily/purchase.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zlending/daily/purchaseTr   r  r  r   s     r(   %margin_v1_post_lending_daily_purchase,Client.margin_v1_post_lending_daily_purchase<  r9  r*   c                 (    U R                  SSSUSS9$ )ae  
Placeholder function for GET /fapi/v1/trade/asyn/id.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r:  Tr   r  rH  r   s     r(   futures_v1_get_trade_asyn_id#Client.futures_v1_get_trade_asyn_id =  r	  r*   c                 (    U R                  SSSUSS9$ )at  
Placeholder function for DELETE /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/api-management/Delete-IP-List-For-a-Sub-account-API-Key

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   .sub-account/subAccountApi/ipRestriction/ipListTr   r  r  r   s     r(   Cmargin_v1_delete_sub_account_sub_account_api_ip_restriction_ip_listJClient.margin_v1_delete_sub_account_sub_account_api_ip_restriction_ip_list=  s.     ''2bkov|  GH'  I  	Ir*   c                 (    U R                  SSSUSS9$ )a>  
Placeholder function for GET /sapi/v1/copyTrading/futures/userStatus.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/copy_trading/future-copy-trading

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zcopyTrading/futures/userStatusTr   r  r  r   s     r(   .margin_v1_get_copy_trading_futures_user_status5Client.margin_v1_get_copy_trading_futures_user_status=  r5  r*   c                 &    U R                  SSSUS9$ )a6  
Placeholder function for GET /eapi/v1/marginAccount.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/option/market-maker-endpoints

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   marginAccountTr  rM  r   s     r(   options_v1_get_margin_account$Client.options_v1_get_margin_account*=  s     ((SY(ZZr*   c                 &    U R                  SSSUS9$ )z
Get config for MMP.

https://developers.binance.com/docs/derivatives/option/market-maker-endpoints/Get-Market-Maker-Protection-Config

:param underlying: required
:type underlying: str
:param recvWindow: optional
:type recvWindow: int
r@   mmpTr  rM  r   s     r(   *options_get_market_maker_protection_config1Client.options_get_market_maker_protection_config8=  s     ((d(PPr*   c                 &    U R                  SSSUS9$ )a  
Set config for MMP.

https://developers.binance.com/docs/derivatives/option/market-maker-endpoints/Set-Market-Maker-Protection-Config

:param underlying: required
:type underlying: str
:param windowTimeInMilliseconds: required
:type windowTimeInMilliseconds: int
:param frozenTimeInMilliseconds: required
:type frozenTimeInMilliseconds: int
:param qtyLimit: required
:type qtyLimit: decimal
:param deltaLimit: required
:type deltaLimit: decimal
:param recvWindow: optional
:type recvWindow: int
r   mmpSetTr  rM  r   s     r(   +options_post_market_maker_protection_config2Client.options_post_market_maker_protection_configE=  s    & (($V(TTr*   c                 &    U R                  SSSUS9$ )z
Reset MMP, start MMP order again.

https://developers.binance.com/docs/derivatives/option/market-maker-endpoints/Reset-Market-Maker-Protection-Config

:param underlying: required
:type underlying: str
:param recvWindow: optional
:type recvWindow: int
r   mmpResetTr  rM  r   s     r(   ,options_reset_market_maker_protection_config3Client.options_reset_market_maker_protection_configZ=  s     ((Dv(VVr*   c                 (    U R                  SSSUSS9$ )a6  
Placeholder function for POST /sapi/v1/localentity/withdraw/apply.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/travel-rule/withdraw

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zlocalentity/withdraw/applyTr   r  r  r   s     r(   )margin_v1_post_localentity_withdraw_apply0Client.margin_v1_post_localentity_withdraw_applyg=  r	  r*   c                 (    U R                  SSSUSS9$ )a:  
Placeholder function for GET /sapi/v1/asset/wallet/balance.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/asset/query-user-wallet-balance

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zasset/wallet/balanceTr   r  r  r   s     r(   "margin_v1_get_asset_wallet_balance)Client.margin_v1_get_asset_wallet_balanceu=  r  r*   c                 (    U R                  SSSUSS9$ )a0  
Placeholder function for POST /sapi/v1/broker/transfer.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/asset

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   rj	  Tr   r  r  r   s     r(   margin_v1_post_broker_transfer%Client.margin_v1_post_broker_transfer=  s#     ''0A$U[ef'ggr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/lending/customizedFixed/purchase.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z lending/customizedFixed/purchaseTr   r  r  r   s     r(   0margin_v1_post_lending_customized_fixed_purchase7Client.margin_v1_post_lending_customized_fixed_purchase=  s$     ''0R[_flvw'xxr*   c                 (    U R                  SSSUSS9$ )aP  
Placeholder function for POST /sapi/v1/algo/futures/newOrderTwap.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/algo/future-algo/Time-Weighted-Average-Price-New-Order

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zalgo/futures/newOrderTwapTr   r  r  r   s     r(   *margin_v1_post_algo_futures_new_order_twap1Client.margin_v1_post_algo_futures_new_order_twap=  r  r*   c                 (    U R                  SSSUSS9$ )a1  
Placeholder function for POST /sapi/v2/eth-staking/eth/stake.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/eth-staking/staking

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zeth-staking/eth/stakeTr<  r  r  r   s     r(   $margin_v2_post_eth_staking_eth_stake+Client.margin_v2_post_eth_staking_eth_stake=  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/loan/flexible/repay/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r@	  Tr   r  r  r   s     r(   *margin_v1_post_loan_flexible_repay_history1Client.margin_v1_post_loan_flexible_repay_history=  r%  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/lending/auto-invest/index/info.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zlending/auto-invest/index/infoTr   r  r  r   s     r(   ,margin_v1_get_lending_auto_invest_index_info3Client.margin_v1_get_lending_auto_invest_index_info=  $     ''/OX\cist'uur*   c                 (    U R                  SSSUSS9$ )a_  
Placeholder function for GET /sapi/v1/sol-staking/sol/history/redemptionHistory.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/sol-staking/history/Get-SOL-redemption-history

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z)sol-staking/sol/history/redemptionHistoryTr   r  r  r   s     r(   8margin_v1_get_sol_staking_sol_history_redemption_history?Client.margin_v1_get_sol_staking_sol_history_redemption_history=  *     ''/Zcgnt~'  A  	Ar*   c                 (    U R                  SSSUSS9$ )ag  
Placeholder function for GET /sapi/v1/broker/rebate/futures/recentRecord.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/fee/Query-Futures-Commission-Rebate-Record

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z"broker/rebate/futures/recentRecordTr   r  r  r   s     r(   1margin_v1_get_broker_rebate_futures_recent_record8Client.margin_v1_get_broker_rebate_futures_recent_record=  r  r*   c                 (    U R                  SSSUSS9$ )ae  
Placeholder function for GET /sapi/v3/broker/subAccount/futuresSummary.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/asset/Query-Sub-Account-Futures-Asset-Info

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r	  Tr  r  r  r   s     r(   0margin_v3_get_broker_sub_account_futures_summary7Client.margin_v3_get_broker_sub_account_futures_summary=  $     ''/QZ^ekuv'wwr*   c                 (    U R                  SSSUSS9$ )a  
Placeholder function for GET /sapi/v1/lending/auto-invest/target-asset/roi/list.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z)lending/auto-invest/target-asset/roi/listTr   r  r  r   s     r(   7margin_v1_get_lending_auto_invest_target_asset_roi_list>Client.margin_v1_get_lending_auto_invest_target_asset_roi_list=  s*     ''/Zcgnt~'  A  	Ar*   c                 (    U R                  SSSUSS9$ )aY  
Placeholder function for GET /sapi/v1/broker/universalTransfer.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/asset/Query-Universal-Transfer-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   broker/universalTransferTr   r  r  r   s     r(   'margin_v1_get_broker_universal_transfer.Client.margin_v1_get_broker_universal_transfer>  rq  r*   c                 (    U R                  SSSUSS9$ )aR  
Placeholder function for PUT /fapi/v1/batchOrders.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Multiple-Orders

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r  Tr   r  rH  r   s     r(   futures_v1_put_batch_orders"Client.futures_v1_put_batch_orders>  "     ((dQWab(ccr*   c                 &    U R                  SSSUS9$ )ak  
Placeholder function for POST /eapi/v1/countdownCancelAllHeartBeat.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/option/market-maker-endpoints/Auto-Cancel-All-Open-Orders-Heartbeat

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   countdownCancelAllHeartBeatTr  rM  r   s     r(   /options_v1_post_countdown_cancel_all_heart_beat6Client.options_v1_post_countdown_cancel_all_heart_beat#>  s!     ((1NW[bh(iir*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/loan/collateral/data.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/collateral/dataTr   r  r  r   s     r(   "margin_v1_get_loan_collateral_data)Client.margin_v1_get_loan_collateral_data1>  s#     ''/EdY_ij'kkr*   c                 (    U R                  SSSUSS9$ )aU  
Placeholder function for GET /sapi/v1/loan/repay/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/repay/historyTr   r  r  r   s     r(    margin_v1_get_loan_repay_history'Client.margin_v1_get_loan_repay_history=>  #     ''/CDW]gh'iir*   c                 (    U R                  SSSUSS9$ )a2  
Placeholder function for POST /sapi/v1/convert/limit/placeOrder.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/convert/trade/Place-Order

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zconvert/limit/placeOrderTr   r  r  r   s     r(   (margin_v1_post_convert_limit_place_order/Client.margin_v1_post_convert_limit_place_orderK>  r  r*   c                 (    U R                  SSSUSS9$ )a=  
Placeholder function for GET /fapi/v1/convert/exchangeInfo.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/convert

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   convert/exchangeInfoFr   r  rH  r   s     r(   $futures_v1_get_convert_exchange_info+Client.futures_v1_get_convert_exchange_infoY>  s#     ((0Fu[akl(mmr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /api/v3/allOrderList.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   allOrderListTr+  r  r   r   s     r(   v3_get_all_order_listClient.v3_get_all_order_listg>  s!       t&Z^ __r*   c                 (    U R                  SSSUSS9$ )a{  
Placeholder function for DELETE /sapi/v1/broker/subAccountApi/ipRestriction/ipList.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account/Delete-IPRestriction-for-Sub-Account-Api-Key

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   )broker/subAccountApi/ipRestriction/ipListTr   r  r  r   s     r(   >margin_v1_delete_broker_sub_account_api_ip_restriction_ip_listEClient.margin_v1_delete_broker_sub_account_api_ip_restriction_ip_lists>  s.     ''2]fjqw  BC'  D  	Dr*   c                 (    U R                  SSSUSS9$ )a<  
Placeholder function for POST /sapi/v1/sub-account/virtualSubAccount.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/account-management

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zsub-account/virtualSubAccountTr   r  r  r   s     r(   .margin_v1_post_sub_account_virtual_sub_account5Client.margin_v1_post_sub_account_virtual_sub_account>  s$     ''0OX\cist'uur*   c                 (    U R                  SSSUSS9$ )aG  
Placeholder function for PUT /sapi/v1/localentity/deposit/provide-info.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z localentity/deposit/provide-infoTr   r  r  r   s     r(   .margin_v1_put_localentity_deposit_provide_info5Client.margin_v1_put_localentity_deposit_provide_info>  r	  r*   c                 (    U R                  SSSUSS9$ )aS  
Placeholder function for POST /sapi/v1/portfolio/mint.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Mint-BFUSD-Portfolio-Margin

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zportfolio/mintTr   r  r  r   s     r(   margin_v1_post_portfolio_mint$Client.margin_v1_post_portfolio_mint>  #     ''0@TZde'ffr*   c                 (    U R                  SSSUSS9$ )aW  
Placeholder function for GET /fapi/v1/orderAmendment.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   rF  Tr   r  rH  r   s     r(   futures_v1_get_order_amendment%Client.futures_v1_get_order_amendment>  r  r*   c                 (    U R                  SSSUSS9$ )aE  
Placeholder function for POST /sapi/v1/sol-staking/sol/claim.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/sol-staking/staking/Claim-Boost-rewards

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zsol-staking/sol/claimTr   r  r  r   s     r(   $margin_v1_post_sol_staking_sol_claim+Client.margin_v1_post_sol_staking_sol_claim>  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/lending/daily/redeem.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zlending/daily/redeemTr   r  r  r   s     r(   #margin_v1_post_lending_daily_redeem*Client.margin_v1_post_lending_daily_redeem>  s#     ''0FtZ`jk'llr*   c                 (    U R                  SSSUSS9$ )aC  
Placeholder function for POST /sapi/v1/mining/hash-transfer/config.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-Request

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zmining/hash-transfer/configTr   r  r  r   s     r(   *margin_v1_post_mining_hash_transfer_config1Client.margin_v1_post_mining_hash_transfer_config>  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/lending/auto-invest/rebalance/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z%lending/auto-invest/rebalance/historyTr   r  r  r   s     r(   3margin_v1_get_lending_auto_invest_rebalance_history:Client.margin_v1_get_lending_auto_invest_rebalance_history>  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/loan/repay/collateral/rate.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/repay/collateral/rateTr   r  r  r   s     r(   (margin_v1_get_loan_repay_collateral_rate/Client.margin_v1_get_loan_repay_collateral_rate>  s$     ''/KTX_eop'qqr*   c                 (    U R                  SSSUSS9$ )am  
Placeholder function for GET /fapi/v1/income/asyn.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r	  Tr   r  rH  r   s     r(   futures_v1_get_income_asyn!Client.futures_v1_get_income_asyn>  r	  r*   c                 (    U R                  SSSUSS9$ )a8  
Placeholder function for GET /sapi/v1/mining/payment/uid.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api/Mining-Account-Earning

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmining/payment/uidTr   r  r  r   s     r(    margin_v1_get_mining_payment_uid'Client.margin_v1_get_mining_payment_uid?  r	  r*   c                 (    U R                  SSSUSS9$ )ag  
Placeholder function for GET /sapi/v2/loan/flexible/borrow/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/flexible/borrow/historyTr<  r  r  r   s     r(   *margin_v2_get_loan_flexible_borrow_history1Client.margin_v2_get_loan_flexible_borrow_history?  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/capital/contract/convertible-coins.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   "capital/contract/convertible-coinsTr   r  r  r   s     r(   0margin_v1_get_capital_contract_convertible_coins7Client.margin_v1_get_capital_contract_convertible_coins#?  r4	  r*   c                 (    U R                  SSSUSS9$ )a	  
Placeholder function for POST /sapi/v1/broker/subAccountApi/permission/vanillaOptions.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z.broker/subAccountApi/permission/vanillaOptionsTr   r  r  r   s     r(   @margin_v1_post_broker_sub_account_api_permission_vanilla_optionsGClient.margin_v1_post_broker_sub_account_api_permission_vanilla_options/?  .     ''0`imtz  EF'  G  	Gr*   c                 (    U R                  SSSUSS9$ )aE  
Placeholder function for GET /sapi/v1/lending/auto-invest/redeem/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/travel-rule/withdraw-history

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z"lending/auto-invest/redeem/historyTr   r  r  r   s     r(   0margin_v1_get_lending_auto_invest_redeem_history7Client.margin_v1_get_lending_auto_invest_redeem_history;?  r  r*   c                 (    U R                  SSSUSS9$ )aB  
Placeholder function for GET /sapi/v2/localentity/withdraw/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/travel-rule/withdraw-history-v2

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   localentity/withdraw/historyTr<  r  r  r   s     r(   *margin_v2_get_localentity_withdraw_history1Client.margin_v2_get_localentity_withdraw_historyI?  r  r*   c                 (    U R                  SSSUSS9$ )a_  
Placeholder function for GET /sapi/v1/eth-staking/eth/history/redemptionHistory.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/eth-staking/history/Get-ETH-redemption-history

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z)eth-staking/eth/history/redemptionHistoryTr   r  r  r   s     r(   8margin_v1_get_eth_staking_eth_history_redemption_history?Client.margin_v1_get_eth_staking_eth_history_redemption_historyW?  r	  r*   c                 (    U R                  SSSUSS9$ )aM  
Placeholder function for GET /fapi/v1/feeBurn.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   feeBurnTr   r  rH  r   s     r(   futures_v1_get_fee_burnClient.futures_v1_get_fee_burne?  s!     ((	$V]^(__r*   c                 (    U R                  SSSUSS9$ )a   
Placeholder function for GET /sapi/v1/lending/auto-invest/index/user-summary.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z&lending/auto-invest/index/user-summaryTr   r  r  r   s     r(   4margin_v1_get_lending_auto_invest_index_user_summary;Client.margin_v1_get_lending_auto_invest_index_user_summarys?  s$     ''/W`dkq{|'}}r*   c                 (    U R                  SSSUSS9$ )a4  
Placeholder function for POST /sapi/v2/loan/flexible/borrow.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/flexible-rate/trade

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zloan/flexible/borrowTr<  r  r  r   s     r(   #margin_v2_post_loan_flexible_borrow*Client.margin_v2_post_loan_flexible_borrow?  r  r*   c                 (    U R                  SSSUSS9$ )a,  
Placeholder function for POST /sapi/v1/loan/vip/repay.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/vip_loan/trade/VIP-Loan-Repay

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zloan/vip/repayTr   r  r  r   s     r(   margin_v1_post_loan_vip_repay$Client.margin_v1_post_loan_vip_repay?  r
  r*   c                 (    U R                  SSSUSS9$ )aU  
Placeholder function for GET /dapi/v1/commissionRate.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/coin-margined-futures/account/rest-api/User-Commission-Rate

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r  Tr   r  r{  r   s     r(   #futures_coin_v1_get_commission_rate*Client.futures_coin_v1_get_commission_rate?  r  r*   c                 (    U R                  SSSUSS9$ )aM  
Placeholder function for GET /sapi/v1/convert/assetInfo.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zconvert/assetInfoTr   r  r  r   s     r(    margin_v1_get_convert_asset_info'Client.margin_v1_get_convert_asset_info?  rD  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /api/v3/sor/order/test.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zsor/order/testTr+  r  r   r   s     r(   v3_post_sor_order_testClient.v3_post_sor_order_test?  s"       )9$V]a bbr*   c                 (    U R                  SSSUSS9$ )aL  
Placeholder function for POST /sapi/v1/broker/universalTransfer.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/asset/Universal-Transfer

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r	  Tr   r  r  r   s     r(   (margin_v1_post_broker_universal_transfer/Client.margin_v1_post_broker_universal_transfer?  r  r*   c                 (    U R                  SSSUSS9$ )aM  
Placeholder function for POST /sapi/v1/account/disableFastWithdrawSwitch.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/account/disable-fast-withdraw-switch

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z!account/disableFastWithdrawSwitchTr   r  r  r   s     r(   3margin_v1_post_account_disable_fast_withdraw_switch:Client.margin_v1_post_account_disable_fast_withdraw_switch?  s$     ''0S\`gmwx'yyr*   c                 (    U R                  SSSUSS9$ )a^  
Placeholder function for GET /fapi/v1/assetIndex.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Multi-Assets-Mode-Asset-Index

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   
assetIndexFr   r  rH  r   s     r(   futures_v1_get_asset_index!Client.futures_v1_get_asset_index?  s"     ((UQWab(ccr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/account/apiRestrictions/ipRestriction.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   %account/apiRestrictions/ipRestrictionTr   r  r  r   s     r(   5margin_v1_get_account_api_restrictions_ip_restriction<Client.margin_v1_get_account_api_restrictions_ip_restriction?  r  r*   c                 (    U R                  SSSUSS9$ )ax  
Placeholder function for POST /sapi/v1/broker/subAccount/bnbBurn/spot.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account/Enable-Or-Disable-BNB-Burn-for-Sub-Account-Spot-Margin

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zbroker/subAccount/bnbBurn/spotTr   r  r  r   s     r(   /margin_v1_post_broker_sub_account_bnb_burn_spot6Client.margin_v1_post_broker_sub_account_bnb_burn_spot?  rv	  r*   c                 (    U R                  SSSUSS9$ )aB  
Placeholder function for PUT /dapi/v1/order.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Modify-Order

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r,  Tr   r  r{  r   s     r(   futures_coin_v1_put_order Client.futures_coin_v1_put_order@  s"     --eWTPV`a-bbr*   c                 (    U R                  SSSUSS9$ )aR  
Placeholder function for PUT /dapi/v1/batchOrders.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/coin-margined-futures/trade/rest-api/Modify-Multiple-Orders

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r  Tr   r  r{  r   s     r(    futures_coin_v1_put_batch_orders'Client.futures_coin_v1_put_batch_orders@  r	  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/margin/delist-schedule.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmargin/delist-scheduleTr   r  r  r   s     r(   $margin_v1_get_margin_delist_schedule+Client.margin_v1_get_margin_delist_schedule#@  s$     ''/GPT[akl'mmr*   c                 (    U R                  SSSUSS9$ )a  
Placeholder function for POST /sapi/v1/broker/subAccountApi/permission/universalTransfer.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account/Enable-Universal-Transfer-Permission-For-SubAccount-Api-Key

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z1broker/subAccountApi/permission/universalTransferTr   r  r  r   s     r(   Cmargin_v1_post_broker_sub_account_api_permission_universal_transferJClient.margin_v1_post_broker_sub_account_api_permission_universal_transfer/@  s.     ''0clpw}  HI'  J  	Jr*   c                 (    U R                  SSSUSS9$ )ac  
Placeholder function for GET /sapi/v1/loan/ltv/adjustment/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/ltv/adjustment/historyTr   r  r  r   s     r(   )margin_v1_get_loan_ltv_adjustment_history0Client.margin_v1_get_loan_ltv_adjustment_history=@  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/localentity/withdraw/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r8
  Tr   r  r  r   s     r(   *margin_v1_get_localentity_withdraw_history1Client.margin_v1_get_localentity_withdraw_historyK@  s$     ''/MVZagqr'ssr*   c                 (    U R                  SSSUSS9$ )am  
Placeholder function for POST /sapi/v2/sub-account/subAccountApi/ipRestriction.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/api-management/Add-IP-Restriction-for-Sub-Account-API-key

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   'sub-account/subAccountApi/ipRestrictionTr<  r  r  r   s     r(   9margin_v2_post_sub_account_sub_account_api_ip_restriction@Client.margin_v2_post_sub_account_sub_account_api_ip_restrictionW@  $     ''0Ybfms}~'r*   c                 (    U R                  SSSUSS9$ )aR  
Placeholder function for GET /fapi/v1/rateLimit/order.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r  Tr   r  rH  r   s     r(   futures_v1_get_rate_limit_order&Client.futures_v1_get_rate_limit_ordere@  s#     ((0A$U[ef(ggr*   c                 (    U R                  SSSUSS9$ )am  
Placeholder function for GET /sapi/v1/broker/subAccountApi/commission/futures.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/fee/Query-Sub-Account-UM-Futures-Commission

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   'broker/subAccountApi/commission/futuresTr   r  r  r   s     r(   7margin_v1_get_broker_sub_account_api_commission_futures>Client.margin_v1_get_broker_sub_account_api_commission_futuress@  $     ''/Xaelr|}'~~r*   c                 (    U R                  SSSUSS9$ )aA  
Placeholder function for GET /sapi/v1/sol-staking/sol/history/stakingHistory.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/sol-staking/history

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z&sol-staking/sol/history/stakingHistoryTr   r  r  r   s     r(   5margin_v1_get_sol_staking_sol_history_staking_history<Client.margin_v1_get_sol_staking_sol_history_staking_history@  r  r*   c                 (    U R                  SSSUSS9$ )aR  
Placeholder function for GET /fapi/v1/openOrder.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r  Tr   r  rH  r   s     r(   futures_v1_get_open_order Client.futures_v1_get_open_order@  s!     ((Dv_`(aar*   c                 (    U R                  SSSUSS9$ )a2  
Placeholder function for DELETE /sapi/v1/algo/spot/order.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/algo/spot-algo/Cancel-Algo-Order

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zalgo/spot/orderTr   r  r  r   s     r(    margin_v1_delete_algo_spot_order'Client.margin_v1_delete_algo_spot_order@  s#     ''2CDW]gh'iir*   c                 (    U R                  SSSUSS9$ )a	  
Placeholder function for DELETE /sapi/v1/account/apiRestrictions/ipRestriction/ipList.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   rN  Tr   r  r  r   s     r(   @margin_v1_delete_account_api_restrictions_ip_restriction_ip_listGClient.margin_v1_delete_account_api_restrictions_ip_restriction_ip_list@  s.     ''2`imtz  EF'  G  	Gr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/capital/contract/convertible-coins.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r-
  Tr   r  r  r   s     r(   1margin_v1_post_capital_contract_convertible_coins8Client.margin_v1_post_capital_contract_convertible_coins@  r-	  r*   c                 (    U R                  SSSUSS9$ )al  
Placeholder function for GET /sapi/v1/managed-subaccount/marginAsset.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-Margin-Asset-Details

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmanaged-subaccount/marginAssetTr   r  r  r   s     r(   -margin_v1_get_managed_subaccount_margin_asset4Client.margin_v1_get_managed_subaccount_margin_asset@  r5  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for DELETE /api/v3/orderList.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   	orderListTr+  r  r   r   s     r(   v3_delete_order_listClient.v3_delete_order_list@  s!       ;t&Z^ __r*   c                 (    U R                  SSSUSS9$ )a	  
Placeholder function for POST /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r	  Tr   r  r  r   s     r(   Amargin_v1_post_sub_account_sub_account_api_ip_restriction_ip_listHClient.margin_v1_post_sub_account_sub_account_api_ip_restriction_ip_list@  r3
  r*   c                 (    U R                  SSSUSS9$ )a>  
Placeholder function for POST /sapi/v1/broker/subAccountApi/commission.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/fee

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zbroker/subAccountApi/commissionTr   r  r  r   s     r(   0margin_v1_post_broker_sub_account_api_commission7Client.margin_v1_post_broker_sub_account_api_commission@  r  r*   c                 (    U R                  SSSUSS9$ )a[  
Placeholder function for POST /fapi/v1/feeBurn.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r?
  Tr   r  rH  r   s     r(   futures_v1_post_fee_burnClient.futures_v1_post_fee_burn@  s!     ((4f^_(``r*   c                 (    U R                  SSSUSS9$ )ac  
Placeholder function for GET /sapi/v1/broker/subAccount/marginSummary.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/asset/Query-Sub-Account-Margin-Asset-Info

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zbroker/subAccount/marginSummaryTr   r  r  r   s     r(   /margin_v1_get_broker_sub_account_margin_summary6Client.margin_v1_get_broker_sub_account_margin_summaryA  s$     ''/PY]djtu'vvr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/lending/auto-invest/plan/list.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zlending/auto-invest/plan/listTr   r  r  r   s     r(   +margin_v1_get_lending_auto_invest_plan_list2Client.margin_v1_get_lending_auto_invest_plan_listA  $     ''/NW[bhrs'ttr*   c                 (    U R                  SSSUSS9$ )aC  
Placeholder function for GET /sapi/v1/loan/vip/loanable/data.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/vip_loan/market-data/Get-Loanable-Assets-Data

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/vip/loanable/dataTr   r  r  r   s     r(   $margin_v1_get_loan_vip_loanable_data+Client.margin_v1_get_loan_vip_loanable_dataA  r  r*   c                 (    U R                  SSSUSS9$ )aB  
Placeholder function for GET /sapi/v2/loan/flexible/collateral/data.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/flexible/collateral/dataTr<  r  r  r   s     r(   +margin_v2_get_loan_flexible_collateral_data2Client.margin_v2_get_loan_flexible_collateral_data-A  ri  r*   c                 (    U R                  SSSUSS9$ )aT  
Placeholder function for DELETE /sapi/v1/broker/subAccountApi.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account/Delete-Sub-Account-Api-Key

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r  Tr   r  r  r   s     r(   'margin_v1_delete_broker_sub_account_api.Client.margin_v1_delete_broker_sub_account_api;A  s$     ''2HQU\blm'nnr*   c                 (    U R                  SSSUSS9$ )a`  
Placeholder function for GET /sapi/v1/sol-staking/sol/history/bnsolRewardsHistory.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/sol-staking/history/Get-BNSOL-rewards-history

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z+sol-staking/sol/history/bnsolRewardsHistoryTr   r  r  r   s     r(   ;margin_v1_get_sol_staking_sol_history_bnsol_rewards_historyBClient.margin_v1_get_sol_staking_sol_history_bnsol_rewards_historyIA  r_  r*   c                 (    U R                  SSSUSS9$ )a6  
Placeholder function for GET /sapi/v1/convert/limit/queryOpenOrders.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/convert/trade/Query-Order

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zconvert/limit/queryOpenOrdersTr   r  r  r   s     r(   -margin_v1_get_convert_limit_query_open_orders4Client.margin_v1_get_convert_limit_query_open_ordersWA  ri  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /api/v3/account/commission.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zaccount/commissionTr+  r  r   r   s     r(   v3_get_account_commission Client.v3_get_account_commissioneA  s#       (<TPV`d eer*   c                 (    U R                  SSSUSS9$ )ay  
Placeholder function for GET /sapi/v1/managed-subaccount/query-trans-log.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-Account-Transfer-Log-Trading-Team-Sub

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z"managed-subaccount/query-trans-logTr   r  r  r   s     r(   0margin_v1_get_managed_subaccount_query_trans_log7Client.margin_v1_get_managed_subaccount_query_trans_logqA  r  r*   c                 (    U R                  SSSUSS9$ )a  
Placeholder function for POST /sapi/v2/broker/subAccountApi/ipRestriction.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account/Update-IP-Restriction-for-Sub-Account-API-key-For-Master-Account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r  Tr<  r  r  r   s     r(   4margin_v2_post_broker_sub_account_api_ip_restriction;Client.margin_v2_post_broker_sub_account_api_ip_restrictionA  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/lending/auto-invest/all/asset.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zlending/auto-invest/all/assetTr   r  r  r   s     r(   +margin_v1_get_lending_auto_invest_all_asset2Client.margin_v1_get_lending_auto_invest_all_assetA  r
  r*   c                 (    U R                  SSSUSS9$ )aJ  
Placeholder function for POST /fapi/v1/convert/acceptQuote.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/convert/Accept-Quote

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r  Tr   r  rH  r   s     r(   $futures_v1_post_convert_accept_quote+Client.futures_v1_post_convert_accept_quoteA  s#     ((1FtZ`jk(llr*   c                 (    U R                  SSSUSS9$ )a5  
Placeholder function for GET /sapi/v1/spot/delist-schedule.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/asset/spot-delist-schedule

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r  Tr   r  r  r   s     r(   "margin_v1_get_spot_delist_schedule)Client.margin_v1_get_spot_delist_scheduleA  r  r*   c                 (    U R                  SSSUSS9$ )a   
Placeholder function for POST /sapi/v1/account/apiRestrictions/ipRestriction.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r_
  Tr   r  r  r   s     r(   6margin_v1_post_account_api_restrictions_ip_restriction=Client.margin_v1_post_account_api_restrictions_ip_restrictionA  s$     ''0W`dkq{|'}}r*   c                 (    U R                  SSSUSS9$ )aH  
Placeholder function for GET /sapi/v1/dci/product/accounts.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zdci/product/accountsTr   r  r  r   s     r(   "margin_v1_get_dci_product_accounts)Client.margin_v1_get_dci_product_accountsA  r  r*   c                 (    U R                  SSSUSS9$ )aA  
Placeholder function for GET /sapi/v1/sub-account/subAccountApi/ipRestriction.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/api-management

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   rx
  Tr   r  r  r   s     r(   8margin_v1_get_sub_account_sub_account_api_ip_restriction?Client.margin_v1_get_sub_account_sub_account_api_ip_restrictionA  r
  r*   c                 (    U R                  SSSUSS9$ )ai  
Placeholder function for GET /sapi/v1/sub-account/transaction-statistics.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/account-management/Query-Sub-account-Transaction-Statistics

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z"sub-account/transaction-statisticsTr   r  r  r   s     r(   0margin_v1_get_sub_account_transaction_statistics7Client.margin_v1_get_sub_account_transaction_statisticsA  r  r*   c                 (    U R                  SSSUSS9$ )ai  
Placeholder function for GET /sapi/v1/managed-subaccount/deposit/address.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/managed-sub-account/Get-Managed-Sub-account-Deposit-Address

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z"managed-subaccount/deposit/addressTr   r  r  r   s     r(   0margin_v1_get_managed_subaccount_deposit_address7Client.margin_v1_get_managed_subaccount_deposit_addressA  r  r*   c                 (    U R                  SSSUSS9$ )af  
Placeholder function for GET /sapi/v2/portfolio/account.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Classic-Portfolio-Margin-Account-Info-V2

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zportfolio/accountTr<  r  r  r   s     r(   margin_v2_get_portfolio_account&Client.margin_v2_get_portfolio_accountA  rD  r*   c                 (    U R                  SSSUSS9$ )a[  
Placeholder function for GET /sapi/v1/simple-earn/locked/history/redemptionRecord.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/simple_earn/history/Get-Locked-Redemption-Record

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z+simple-earn/locked/history/redemptionRecordTr   r  r  r   s     r(   :margin_v1_get_simple_earn_locked_history_redemption_recordAClient.margin_v1_get_simple_earn_locked_history_redemption_recordB  r_  r*   c                 (    U R                  SSSUSS9$ )am  
Placeholder function for GET /fapi/v1/order/asyn/id.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r2  Tr   r  rH  r   s     r(   futures_v1_get_order_asyn_id#Client.futures_v1_get_order_asyn_idB  r	  r*   c                 (    U R                  SSSUSS9$ )ai  
Placeholder function for POST /sapi/v1/managed-subaccount/withdraw.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/managed-sub-account/Withdrawl-Assets-From-The-Managed-Sub-account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zmanaged-subaccount/withdrawTr   r  r  r   s     r(   *margin_v1_post_managed_subaccount_withdraw1Client.margin_v1_post_managed_subaccount_withdraw#B  r  r*   c                 (    U R                  SSSUSS9$ )a=  
Placeholder function for GET /sapi/v1/localentity/deposit/history.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/wallet/travel-rule/deposit-history

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zlocalentity/deposit/historyTr   r  r  r   s     r(   )margin_v1_get_localentity_deposit_history0Client.margin_v1_get_localentity_deposit_history1B  r  r*   c                 (    U R                  SSSUSS9$ )a<  
Placeholder function for POST /sapi/v1/eth-staking/wbeth/wrap.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/eth-staking/staking/Wrap-BETH

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zeth-staking/wbeth/wrapTr   r  r  r   s     r(   %margin_v1_post_eth_staking_wbeth_wrap,Client.margin_v1_post_eth_staking_wbeth_wrap?B  r=  r*   c                 (    U R                  SSSUSS9$ )aL  
Placeholder function for POST /sapi/v1/simple-earn/locked/setRedeemOption.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/simple_earn/earn/Set-Locked-Redeem-Option

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   z"simple-earn/locked/setRedeemOptionTr   r  r  r   s     r(   3margin_v1_post_simple_earn_locked_set_redeem_option:Client.margin_v1_post_simple_earn_locked_set_redeem_optionMB  r  r*   c                 (    U R                  SSSUSS9$ )a  
Placeholder function for POST /sapi/v1/broker/subAccountApi/ipRestriction/ipList.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r
  Tr   r  r  r   s     r(   <margin_v1_post_broker_sub_account_api_ip_restriction_ip_listCClient.margin_v1_post_broker_sub_account_api_ip_restriction_ip_list[B  s.     ''0[dhou  @A'  B  	Br*   c                 (    U R                  SSSUSS9$ )ao  
Placeholder function for POST /sapi/v1/broker/subAccountApi/commission/futures.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/fee/Change-Sub-Account-UM-Futures-Commission

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r
  Tr   r  r  r   s     r(   8margin_v1_post_broker_sub_account_api_commission_futures?Client.margin_v1_post_broker_sub_account_api_commission_futuresgB  r{
  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/lending/auto-invest/history/list.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z lending/auto-invest/history/listTr   r  r  r   s     r(   .margin_v1_get_lending_auto_invest_history_list5Client.margin_v1_get_lending_auto_invest_history_listuB  r	  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/loan/customize/margin_call.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zloan/customize/margin_callTr   r  r  r   s     r(   )margin_v1_post_loan_customize_margin_call0Client.margin_v1_post_loan_customize_margin_callB  r	  r*   c                 (    U R                  SSSUSS9$ )af  
Placeholder function for GET /sapi/v1/broker/subAccount/bnbBurn/status.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account/Get-BNB-Burn-Status-for-Sub-Account

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z broker/subAccount/bnbBurn/statusTr   r  r  r   s     r(   0margin_v1_get_broker_sub_account_bnb_burn_status7Client.margin_v1_get_broker_sub_account_bnb_burn_statusB  r	  r*   c                 (    U R                  SSSUSS9$ )ad  
Placeholder function for GET /sapi/v1/managed-subaccount/accountSnapshot.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-Snapshot

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z"managed-subaccount/accountSnapshotTr   r  r  r   s     r(   1margin_v1_get_managed_subaccount_account_snapshot8Client.margin_v1_get_managed_subaccount_account_snapshotB  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/asset/convert-transfer.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zasset/convert-transferTr   r  r  r   s     r(   %margin_v1_post_asset_convert_transfer,Client.margin_v1_post_asset_convert_transferB  r9  r*   c                 &    U R                  SSSUS9$ )aT  
Placeholder function for GET /eapi/v1/income/asyn.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/option/account/Get-Download-Id-For-Option-Transaction-History

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r	  Tr  rM  r   s     r(   options_v1_get_income_asyn!Client.options_v1_get_income_asynB  s     ((dQW(XXr*   c                 (    U R                  SSSUSS9$ )aq  
Placeholder function for GET /sapi/v1/broker/subAccountApi/commission/coinFutures.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/fee/Query-Sub-Account-CM-Futures-Commission

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r'  Tr   r  r  r   s     r(   <margin_v1_get_broker_sub_account_api_commission_coin_futuresCClient.margin_v1_get_broker_sub_account_api_commission_coin_futuresB  r_  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v2/broker/subAccount/futuresSummary.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r	  Tr<  r  r  r   s     r(   0margin_v2_get_broker_sub_account_futures_summary7Client.margin_v2_get_broker_sub_account_futures_summaryB  r	  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/loan/ongoing/orders.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/ongoing/ordersTr   r  r  r   s     r(   !margin_v1_get_loan_ongoing_orders(Client.margin_v1_get_loan_ongoing_ordersB  s#     ''/DTX^hi'jjr*   c                 (    U R                  SSSUSS9$ )ag  
Placeholder function for GET /sapi/v2/loan/flexible/ongoing/orders.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Ongoing-Orders

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zloan/flexible/ongoing/ordersTr<  r  r  r   s     r(   *margin_v2_get_loan_flexible_ongoing_orders1Client.margin_v2_get_loan_flexible_ongoing_ordersB  r  r*   c                 (    U R                  SSSUSS9$ )a(  
Placeholder function for POST /sapi/v1/algo/futures/newOrderVp.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/algo/future-algo

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zalgo/futures/newOrderVpTr   r  r  r   s     r(   (margin_v1_post_algo_futures_new_order_vp/Client.margin_v1_post_algo_futures_new_order_vpB  r	  r*   c                 (    U R                  SSSUSS9$ )aM  
Placeholder function for POST /fapi/v1/convert/getQuote.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/convert/Send-quote-request

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   r  Tr   r  rH  r   s     r(   !futures_v1_post_convert_get_quote(Client.futures_v1_post_convert_get_quoteC  s#     ((1CDW]gh(iir*   c                 (    U R                  SSSUSS9$ )a2  
Placeholder function for GET /sapi/v1/algo/spot/subOrders.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/algo/spot-algo/Query-Sub-Orders

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zalgo/spot/subOrdersTr   r  r  r   s     r(   "margin_v1_get_algo_spot_sub_orders)Client.margin_v1_get_algo_spot_sub_ordersC  rT  r*   c                 (    U R                  SSSUSS9$ )aW  
Placeholder function for POST /sapi/v1/portfolio/redeem.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Redeem-BFUSD-Portfolio-Margin

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zportfolio/redeemTr   r  r  r   s     r(   margin_v1_post_portfolio_redeem&Client.margin_v1_post_portfolio_redeem!C  s#     ''0B4V\fg'hhr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/lending/auto-invest/plan/add.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zlending/auto-invest/plan/addTr   r  r  r   s     r(   +margin_v1_post_lending_auto_invest_plan_add2Client.margin_v1_post_lending_auto_invest_plan_add/C  s$     ''0NW[bhrs'ttr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /api/v3/orderList.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r
  Tr+  r  r   r   s     r(   v3_get_order_listClient.v3_get_order_list;C  s!       DvW[ \\r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/lending/auto-invest/source-asset/list.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z%lending/auto-invest/source-asset/listTr   r  r  r   s     r(   3margin_v1_get_lending_auto_invest_source_asset_list:Client.margin_v1_get_lending_auto_invest_source_asset_listGC  r  r*   c                 (    U R                  SSSUSS9$ )aD  
Placeholder function for GET /sapi/v1/margin/allOrderList.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-OCO

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r"  Tr   r  r  r   s     r(   #margin_v1_get_margin_all_order_list*Client.margin_v1_get_margin_all_order_listSC  rT  r*   c                 (    U R                  SSSUSS9$ )a=  
Placeholder function for POST /sapi/v1/eth-staking/eth/redeem.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/eth-staking/staking/Redeem-ETH

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zeth-staking/eth/redeemTr   r  r  r   s     r(   %margin_v1_post_eth_staking_eth_redeem,Client.margin_v1_post_eth_staking_eth_redeemaC  r=  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for GET /sapi/v1/broker/rebate/historicalRecord.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zbroker/rebate/historicalRecordTr   r  r  r   s     r(   -margin_v1_get_broker_rebate_historical_record4Client.margin_v1_get_broker_rebate_historical_recordoC  r	  r*   c                 (    U R                  SSSUSS9$ )a_  
Placeholder function for GET /sapi/v1/simple-earn/locked/history/subscriptionRecord.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/simple_earn/history/Get-Locked-Subscription-Record

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z-simple-earn/locked/history/subscriptionRecordTr   r  r  r   s     r(   <margin_v1_get_simple_earn_locked_history_subscription_recordCClient.margin_v1_get_simple_earn_locked_history_subscription_record{C  .     ''/^gkrx  CD'  E  	Er*   c                 (    U R                  SSSUSS9$ )a_  
Placeholder function for GET /sapi/v1/managed-subaccount/asset.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-Asset-Details

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmanaged-subaccount/assetTr   r  r  r   s     r(   &margin_v1_get_managed_subaccount_asset-Client.margin_v1_get_managed_subaccount_assetC  rq  r*   c                 (    U R                  SSSUSS9$ )aN  
Placeholder function for GET /sapi/v1/sol-staking/sol/quota.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/sol-staking/account/Get-SOL-staking-quota-details

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zsol-staking/sol/quotaTr   r  r  r   s     r(   #margin_v1_get_sol_staking_sol_quota*Client.margin_v1_get_sol_staking_sol_quotaC  r  r*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for POST /sapi/v1/loan/vip/renew.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   zloan/vip/renewTr   r  r  r   s     r(   margin_v1_post_loan_vip_renew$Client.margin_v1_post_loan_vip_renewC  s#     ''0@TZde'ffr*   c                 (    U R                  SSSUSS9$ )a  
Placeholder function for GET /sapi/v1/managed-subaccount/queryTransLogForTradeParent.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-Account-Transfer-Log-Trading-Team-Master

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z.managed-subaccount/queryTransLogForTradeParentTr   r  r  r   s     r(   Amargin_v1_get_managed_subaccount_query_trans_log_for_trade_parentHClient.margin_v1_get_managed_subaccount_query_trans_log_for_trade_parentC  r;	  r*   c                 (    U R                  SSSUSS9$ )a  
Placeholder function for POST /sapi/v1/sub-account/subAccountApi/ipRestriction.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   rx
  Tr   r  r  r   s     r(   9margin_v1_post_sub_account_sub_account_api_ip_restriction@Client.margin_v1_post_sub_account_sub_account_api_ip_restrictionC  s$     ''0Ybfms}~'r*   c                 (    U R                  SSSUSS9$ )a_  
Placeholder function for GET /sapi/v1/simple-earn/flexible/history/redemptionRecord.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/simple_earn/history/Get-Flexible-Redemption-Record

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z-simple-earn/flexible/history/redemptionRecordTr   r  r  r   s     r(   <margin_v1_get_simple_earn_flexible_history_redemption_recordCClient.margin_v1_get_simple_earn_flexible_history_redemption_recordC  r4  r*   c                 (    U R                  SSSUSS9$ )aP  
Placeholder function for GET /sapi/v1/broker/subAccountApi.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/binance_link/exchange-link/account/Query-Sub-Account-Api-Key

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r  Tr   r  r  r   s     r(   $margin_v1_get_broker_sub_account_api+Client.margin_v1_get_broker_sub_account_apiC  r  r*   c                 &    U R                  SSSUS9$ )aI  
Placeholder function for GET /eapi/v1/exerciseHistory.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/option/market-data/Historical-Exercise-Records

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   exerciseHistoryFr  rM  r   s     r(   options_v1_get_exercise_history&Client.options_v1_get_exercise_historyC  s      ((0A%V\(]]r*   c                 $    U R                  SSUS9$ )ah  Get present open interest specific underlying asset on specific expiration date.

https://developers.binance.com/docs/derivatives/option/market-data/Open-Interest

:param params: parameters required by the endpoint
:type params: dict
:param underlyingAsset: required
:type underlyingAsset: str
:param expiration: required (e.g '221225')
:type expiration: str

r@   r  r   rM  r   s     r(   options_open_interestClient.options_open_interestC  s     ((V(LLr*   c                 (    U R                  SSSUSS9$ )a'  
Placeholder function for GET /sapi/v1/convert/exchangeInfo.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/convert/market-data

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r	  Fr   r  r  r   s     r(   #margin_v1_get_convert_exchange_info*Client.margin_v1_get_convert_exchange_infoD  s#     ''/EeZ`jk'llr*   c                 (    U R                  SSSUSS9$ )z
Placeholder function for DELETE /fapi/v1/batchOrder.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r   rJ	  Tr   r  rH  r   s     r(   futures_v1_delete_batch_order$Client.futures_v1_delete_batch_orderD  s"     ((<SYcd(eer*   c                 (    U R                  SSSUSS9$ )a`  
Placeholder function for GET /sapi/v1/eth-staking/eth/history/wbethRewardsHistory.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/staking/eth-staking/history/Get-WBETH-rewards-history

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   z+eth-staking/eth/history/wbethRewardsHistoryTr   r  r  r   s     r(   ;margin_v1_get_eth_staking_eth_history_wbeth_rewards_historyBClient.margin_v1_get_eth_staking_eth_history_wbeth_rewards_historyD  r_  r*   c                 (    U R                  SSSUSS9$ )a"  
Placeholder function for GET /sapi/v1/mining/pub/algoList.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmining/pub/algoListTr   r  r  r   s     r(   "margin_v1_get_mining_pub_algo_list)Client.margin_v1_get_mining_pub_algo_list,D  rT  r*   c                 &    U R                  SSSUS9$ )aA  
Placeholder function for GET /eapi/v1/blockTrades.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/option/market-data/Recent-Block-Trade-List

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   blockTradesFr  rM  r   s     r(   options_v1_get_block_trades"Client.options_v1_get_block_trades:D  s     ((eRX(YYr*   c                 (    U R                  SSSUSS9$ )ah  
Placeholder function for GET /sapi/v1/copyTrading/futures/leadSymbol.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trading-Symbol-Whitelist

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zcopyTrading/futures/leadSymbolTr   r  r  r   s     r(   .margin_v1_get_copy_trading_futures_lead_symbol5Client.margin_v1_get_copy_trading_futures_lead_symbolHD  r5  r*   c                 (    U R                  SSSUSS9$ )a8  
Placeholder function for GET /sapi/v1/mining/worker/list.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/mining/rest-api/Request-for-Miner-List

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zmining/worker/listTr   r  r  r   s     r(    margin_v1_get_mining_worker_list'Client.margin_v1_get_mining_worker_listVD  r	  r*   c                 (    U R                  SSSUSS9$ )a+  
Placeholder function for GET /sapi/v1/dci/product/list.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/dual_investment/market-data

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   zdci/product/listTr   r  r  r   s     r(   margin_v1_get_dci_product_list%Client.margin_v1_get_dci_product_listdD  rb	  r*   c                 (    U R                  SSSUSS9$ )aI  
Placeholder function for GET /fapi/v1/convert/orderStatus.
Note: This function was auto-generated. Any issue please open an issue on GitHub.

https://developers.binance.com/docs/derivatives/usds-margined-futures/convert/Order-Status

:param params: parameters required by the endpoint
:type params: dict

:returns: API response
r@   r  Tr   r  rH  r   s     r(   #futures_v1_get_convert_order_status*Client.futures_v1_get_convert_order_statusrD  s#     ((0EdY_ij(kkr*   rT   )F)Fr   )NNr-   )r   (?  __name__
__module____qualname____firstlineno__r   BASE_ENDPOINT_DEFAULTr   strr   r   boolr   r   r%   r/   Sessionr3   rK   staticmethodResponserE   PUBLIC_API_VERSIONrZ   r   rb   rg   rl   rp   rt   rx   r|   r   r   r   r   r   r   r   r   r!   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r!  r%  r(  r0  TIME_IN_FORCE_GTCr8  r=  rA  rE  rH  rK  rO  rR  rU  rZ  r]  ra  re  ri  rl  ro  rs  rw  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r
  r  r  r  r  r  r  r   r#  r&  r)  r,  r/  r3  r6  r9  r>  rB  rI  rL  rO  rS  rW  r[  r^  rb  re  rh  rk  rn  rq  ru  rx  r{  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r
  r  r  r  r  r  r  r   r#  r&  r)  r,  r/  r2  r5  r8  r;  r>  rB  rE  rI  rM  rP  rT  rW  r[  r_  r   r   r   rk  ro  rt  rw  rz  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r
  r  r  r  r  r"  r&  r+  r/  r3  r7  r;  r?  rC  rG  rK  rO  rS  rW  rZ  r`  rc  rg  rk  ro  rt  rx  r|  r  r  r  r  r  r  r   r  r   r  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r
  r  r  r  r  r  r  r  r"  r%  r(  r+  r/  r3  r7  r;  r>  rB  rF  rJ  rN  rQ  rU  rX  r\  r_  rc  rf  ri  rl  ro  rr  rv  rz  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r
  r  r  r  r  r  r  r   r$  r'  r*  r-  r0  r3  r6  r9  r<  r?  rC  rG  rK  rN  rQ  rU  rX  r\  r_  rb  re  rh  rk  rp  ru  rz  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r#  r&  r)  r,  r0  r3  r8  r<  r?  rB  rE  rH  rK  rN  rS  rW  rZ  r]  r`  rc  rf  ri  rl  ro  rr  ru  rx  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r  r  r  r  r  r   r#  r(  r,  r/  r3  r7  r;  r?  rB  rG  rJ  rO  rR  rV  rZ  r]  ra  rd  rg  rl  ro  rs  rv  rz  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r 	  r	  r	  r
	  r	  r	  r	  r	  r	  r	  r"	  r%	  r(	  r+	  r/	  r2	  r6	  r9	  r=	  rA	  rD	  rG	  rK	  rN	  rQ	  rT	  rW	  rZ	  r]	  r`	  rd	  rg	  rk	  rn	  rq	  rt	  rx	  r{	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r!
  r$
  r'
  r*
  r.
  r1
  r5
  r9
  r<
  r@
  rC
  rF
  rI
  rL
  rO
  rR
  rU
  rX
  r\
  r`
  rc
  rf
  ri
  rl
  ro
  rr
  ru
  ry
  r}
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r  r  r  r  r  r  r  r  r  r  r   r#  r&  r)  r,  r/  r2  r6  r9  r<  r?  rB  rE  rH  rL  rO  rR  rU  rX  r[  r_  rb  re  rh  rk  __static_attributes____classcell__)r'   s   @r(   r   r      s(    "&$(48'==26*.##'# SM "$sCx.1	
     eCI./ #3- tn C= >x//  DI44(,4<@4> R8#4#4 R R( --	< 	< 		< :;J36J	JJQU J 34J	J 34J	JJD J 34J	J 34J	J< < !&z/L/L I !**G*GJ	J !**G*GI	I !**G*GL	Ld  @)4 @)D1$ 1j!d ! ! !(;d38n!5 ;8)
 )
V#/$ #/J0T 0< 
  
D%3 %3NQ.3 Q.f(2 (2T(0d (0V 3G2K2K(7/(7	(7\ -A,E,E	% *	%V ,@,E,E-
 *-
f ,@,E,Ea *aN ,@,E,E)
 *)
^ ,@,E,EW *Wr2&;5z#6J#0J.
dw6r '1&B&B "+H +5*F*F $CL ,6+G+G  CD+>+8+8O>b(/T(/T$;L%5N+9Z8@=jDX#:J =F%7N D'8R?:#BJ*=X@&Q2F
P
>U:FTP$QL-Y^ 
D6
p!LFWB
B)
V8
t6
p+FZ
 
hsm 
F 2
,
08Tto
b
.
.
$EUNQ8 RD1
f
.
$"
H
:-Y^L<K@#PJ%ON
>
B&
P#
J
@
6U:T0Q6
@
@"
H"
H=
~"YH&
P{
z+
Z
(
*;
z*XX0Yd 
D+
Z)
V,Y\/
b;
z:
x
2
2"
Ll
\Q
f,
\G
V .
,
0 :
0
4.
`0
d
<
>
<
40
d+
Z
<2
h







STV	
U	
&VP2
h2
h 
D1
f&
P
@:
xX>
:C
J%
N
:2
h4
l 
D
@
<
:
62
h!
F6
t88@FGQJGPQSQ JN

%(
: JN

%(
: 48
4ML




LMRTMQYU
n
2YMJVVWV











M	M	M
M
M
M
MLR
&LQPOW
$
2QQPRV
VQMYXY$ YT X


==EKLVOLVVXURQQRWdcfZPR
R

T


RX$QQV



$
2






XVR

 


@'YRV8%YNK
ZqUf
"
"88>@	F	G	EFG&GQ"	UR,W"V\*S*TB
$V"
&
S"X*
.X2(
T
*#
J+
Z#
J#
J6
tX*
20
h
.
*
0
$R Z (U"XR
$
$
$
$W&W&
$
$


$
$
$
$
$
$
$

$


 


XTTU
U

X
X
Y
"P
T

T

XVU

V





V











SSSWWX







SWWX







YY





XXYYVUW













! EBF *4)E)E .< .8-I-I F: /9.J.J F4...(.(G#GJWNr)LV'ORINVHNToPb3KjcKJ:PxUJnRIh7Ir&TP?DB5Cn/Mb1Hf(MT-A^%IN'MR6LpEBN@DDD*EGN;MzFBP$HL,G\@6@:8HzIPONOOOVSURTQ
2
,
8(
T 
D!
N
8)
V
8+
Z#
J
8)fVollG
tD
dcv
oo`ilr
EkckC~cuep
s
huoo
}tAlsxmmr
b@{iit
[
j
q~
mrsl
cjnpqkznga{ukfi\
bypn
do
}@
{C
zjFks
^u
cs
d
fl}nh{
{gkdw
h|j
xu
prnk
sis
ofIv[QU*Wslh
yrn
t
vAzx
Apdj
ljqn
`Dvxggn
mt
}
rdjt
z
GztA`
~mgli
cqzd
}wci
nJs
t@h~bj
G
{v
`
Gxaw
unuoCu
fz{
uml
~lzziCftso{
B@
x
sxz
oYC
x
ktpjki
u
]
}ko
vEpm
gF
@El^Mm
fCkZvjhl lr*   r   )pathlibr   typingr   r   r   r   r   r/   r   urllib.parser	   r
   base_clientr   helpersr   r   r   
exceptionsr   r   r   enumsr   r   r   r*   r(   <module>r     sE     3 3   ) # 
 
 (gQlZ gQlr*   