Full Code of sammchardy/python-binance for AI

master dc8d7b7d16fc cached
109 files
1.6 MB
381.7k tokens
3068 symbols
1 requests
Download .txt
Showing preview only (1,650K chars total). Download the full file or copy to clipboard to get everything.
Repository: sammchardy/python-binance
Branch: master
Commit: dc8d7b7d16fc
Files: 109
Total size: 1.6 MB

Directory structure:
gitextract_kozbdaqs/

├── .coverage
├── .github/
│   ├── CODEOWNERS
│   ├── ISSUE_TEMPLATE/
│   │   └── bug_report.md
│   └── workflows/
│       └── python-app.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .readthedocs.yaml
├── .travis.yml
├── Endpoints.md
├── LICENSE
├── PYPIREADME.rst
├── README.rst
├── binance/
│   ├── __init__.py
│   ├── async_client.py
│   ├── base_client.py
│   ├── client.py
│   ├── enums.py
│   ├── exceptions.py
│   ├── helpers.py
│   └── ws/
│       ├── __init__.py
│       ├── constants.py
│       ├── depthcache.py
│       ├── keepalive_websocket.py
│       ├── reconnecting_websocket.py
│       ├── streams.py
│       ├── threaded_stream.py
│       └── websocket_api.py
├── code-generator.py
├── docs/
│   ├── Makefile
│   ├── account.rst
│   ├── binance.rst
│   ├── changelog.rst
│   ├── conf.py
│   ├── constants.rst
│   ├── depth_cache.rst
│   ├── exceptions.rst
│   ├── faqs.rst
│   ├── general.rst
│   ├── helpers.rst
│   ├── index.rst
│   ├── margin.rst
│   ├── market_data.rst
│   ├── overview.rst
│   ├── requirements.txt
│   ├── sub_accounts.rst
│   ├── websockets.rst
│   └── withdraw.rst
├── examples/
│   ├── binace_socket_manager.py
│   ├── create_oco_order.py
│   ├── create_order.py
│   ├── create_order_async.py
│   ├── depth_cache_example.py
│   ├── depth_cache_threaded_example.py
│   ├── futures_algo_order_examples.py
│   ├── save_historical_data.py
│   ├── verbose_example.py
│   ├── websocket.py
│   ├── ws_create_order.py
│   └── ws_create_order_async.py
├── pyproject.toml
├── pyrightconfig.json
├── pytest.ini
├── requirements.txt
├── setup.cfg
├── setup.py
├── test-requirements.txt
├── tests/
│   ├── __init__.py
│   ├── conftest.py
│   ├── test_api_request.py
│   ├── test_async_client.py
│   ├── test_async_client_futures.py
│   ├── test_async_client_gift_card copy.py
│   ├── test_async_client_margin.py
│   ├── test_async_client_options.py
│   ├── test_async_client_portfolio.py
│   ├── test_async_client_ws_api.py
│   ├── test_async_client_ws_futures_requests.py
│   ├── test_client.py
│   ├── test_client_futures.py
│   ├── test_client_gift_card.py
│   ├── test_client_margin.py
│   ├── test_client_options.py
│   ├── test_client_portfolio.py
│   ├── test_client_ws_api.py
│   ├── test_client_ws_futures_requests.py
│   ├── test_cryptography.py
│   ├── test_depth_cache.py
│   ├── test_futures.py
│   ├── test_get_order_book.py
│   ├── test_headers.py
│   ├── test_historical_klines.py
│   ├── test_ids.py
│   ├── test_init.py
│   ├── test_keepalive_reconnect.py
│   ├── test_order.py
│   ├── test_ping.py
│   ├── test_reconnecting_websocket.py
│   ├── test_region_exception.py
│   ├── test_socket_manager.py
│   ├── test_streams.py
│   ├── test_streams_options.py
│   ├── test_threaded_socket_manager.py
│   ├── test_threaded_stream.py
│   ├── test_user_socket_integration.py
│   ├── test_verbose_mode.py
│   ├── test_websocket_verbose.py
│   ├── test_ws_api.py
│   └── utils.py
└── tox.ini

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/CODEOWNERS
================================================
* @carlosmiei


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Code snippet to reproduce the behavior:

**Expected behavior**
A clear and concise description of what you expected to happen.

**Environment (please complete the following information):**
 - Python version: [e.g. 3.5]
 - Virtual Env: [e.g. virtualenv, conda]
 - OS: [e.g. Mac, Ubuntu]
 - python-binance version

**Logs**
Please set logging to debug and paste any logs here, or upload `debug.log` file to the issue.
```python
import logging
# This will log to both console and file
logging.basicConfig(level=logging.DEBUG,format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
handlers=[
logging.FileHandler('debug.log'),
logging.StreamHandler()
]
)
```

**Additional context**
Add any other context about the problem here.


================================================
FILE: .github/workflows/python-app.yml
================================================
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
  workflow_dispatch:
  push:
    branches: [ main, master ]
  pull_request:
    branches: [ main, master ]

permissions:
  contents: read

jobs:
  lint:
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:
    - uses: actions/checkout@v5
    - name: Set up Python
      uses: actions/setup-python@v6
      with:
        python-version: '3.9'
    - name: Install Ruff
      run: pip install ruff
    - name: Lint code with Ruff
      run: ruff check --output-format=github --target-version=py39 .
    - name: Check code formatting with Ruff
      run: ruff format --check .
      continue-on-error: true

  test:
    needs: lint
    runs-on: ubuntu-22.04
    timeout-minutes: 40
    strategy:
      max-parallel: 2
      matrix:
        python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
    env:
      PROXY: "http://188.245.226.105:8911"
      TEST_TESTNET: "true"
      TEST_API_KEY: "u4L8MG2DbshTfTzkx2Xm7NfsHHigvafxeC29HrExEmah1P8JhxXkoOu6KntLICUc"
      TEST_API_SECRET: "hBZEqhZUUS6YZkk7AIckjJ3iLjrgEFr5CRtFPp5gjzkrHKKC9DAv4OH25PlT6yq5"
      TEST_FUTURES_API_KEY: "227719da8d8499e8d3461587d19f259c0b39c2b462a77c9b748a6119abd74401"
      TEST_FUTURES_API_SECRET: "b14b935f9cfacc5dec829008733c40da0588051f29a44625c34967b45c11d73c"
    steps:
    - uses: actions/checkout@v5
    - name: Checking env
      run: |
        echo "PROXY: $PROXY"
        echo "Python version: ${{ matrix.python-version }}"
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v6
      with:
        python-version: ${{ matrix.python-version }}
        cache: 'pip'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install pytest pytest-cov pyright tox
        if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
        if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
    - name: Type check with pyright (Python 3.12 only)
      if: matrix.python-version == '3.12'
      run: pyright
    - name: Test with tox
      run: tox -e py
    - name: Coveralls Parallel
      uses: coverallsapp/github-action@v2
      with:
        parallel: true
  finish:
    needs: test
    if: ${{ always() }}
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:
    - name: Coveralls Finished
      uses: coverallsapp/github-action@v2
      with:
        parallel-finished: true


================================================
FILE: .gitignore
================================================
.tox
.cache/v/cache
docs/_build
binance/__pycache__/
build/
dist/
python_binance.egg-info/
*__pycache__
*.egg-info/
.idea/
venv*/
.vscode
.binance/

================================================
FILE: .pre-commit-config.yaml
================================================
repos:
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.5.0
    hooks:
    -   id: check-yaml
    -   id: end-of-file-fixer
    -   id: trailing-whitespace

-   repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.8.1
    hooks:
    -   id: ruff
    -   id: ruff-format

-   repo: https://github.com/RobertCraigie/pyright-python
    rev: v1.1.389
    hooks:
    -   id: pyright


================================================
FILE: .readthedocs.yaml
================================================
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
  os: ubuntu-22.04
  tools:
    python: "3.12"
    # You can also specify other tool versions:
    # nodejs: "20"
    # rust: "1.70"
    # golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
  configuration: docs/conf.py
  # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
  # builder: "dirhtml"
  # Fail on all warnings to avoid broken references
  # fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
#   - pdf
#   - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
  install:
    - requirements: docs/requirements.txt
    - requirements: requirements.txt


================================================
FILE: .travis.yml
================================================
dist: xenial

language: python

python:
  - "3.6"
  - "3.7"
  - "3.8"
  - "3.9"

install:
  - pip install -r test-requirements.txt
  - pip install -r requirements.txt
  - pip install tox-travis

script:
  - tox

after_success:
  - coveralls


================================================
FILE: Endpoints.md
================================================
> :warning: **Disclaimer**: 

 > * Before using the endpoints, please check the [API documentation](https://binance-docs.github.io/apidocs/#change-log) to be informed about the latest changes or possible bugs/problems. 

 > * Not all parameters are mandatory. Some parameters are only mandatory in specific conditions/types. Check the official documentation the type of each parameter and to know if a parameter is mandatory or optional. 

 > * This documentation only includes methods in client.py file. Websocket methods haven't (yet) been covered.
 
### [Spot/Margin/Saving/Mining Endpoints](https://binance-docs.github.io/apidocs/spot/en/)
- *Wallet Endpoints*
  - **GET /sapi/v1/system/status** (Fetch system status.)
    ```python 
    client.get_system_status()
    ```
  - **GET /sapi/v1/capital/config/getall (HMAC SHA256)** (Get information of coins (available for deposit and withdraw) for user.)
    ```python 
    client.get_all_coins_info()
    ```
  - **GET /sapi/v1/accountSnapshot (HMAC SHA256)** (Daily Account Snapshot (USER_DATA).)
    ```python 
    client.get_account_snapshot(type='SPOT')
    ```
  - **POST /sapi/v1/account/disableFastWithdrawSwitch (HMAC SHA256)** (Disable Fast Withdraw Switch (USER_DATA).)
    ```python 
    client.disable_fast_withdraw_switch(type='SPOT')
    ``` 
  - **POST /sapi/v1/account/enableFastWithdrawSwitch (HMAC SHA256)** (Enable Fast Withdraw Switch (USER_DATA).)
    ```python 
    client.enable_fast_withdraw_switch(type='SPOT')
    ```
  - **POST /sapi/v1/capital/withdraw/apply (HMAC SHA256)** (Withdraw: Submit a withdraw request.)
    ```python 
    client.withdraw(coin, 
        withdrawOrderId, 
        network, 
        address, 
        addressTag, 
        amount, 
        transactionFeeFlag, 
        name, 
        recvWindow)
    ```
  - **GET /sapi/v1/capital/deposit/hisrec (HMAC SHA256)** (Fetch Deposit History(supporting network) (USER_DATA).)
    ```python 
    client.get_deposit_history(coin, status, startTime, endTime, recvWindow)
    ```
  - **GET /sapi/v1/capital/withdraw/history (HMAC SHA256)** (Fetch Withdraw History (supporting network) (USER_DATA).)
    ```python 
    client.get_withdraw_history(coin, status, startTime, endTime, recvWindow)
    ```
  - **GET /sapi/v1/capital/deposit/address (HMAC SHA256)** (Fetch deposit address with network.)
    ```python 
    client.get_deposit_address(coin, status, recvWindow)
    ```
  - **GET /sapi/v1/account/status** (Fetch account status detail.)
    ```python 
    client.get_account_status(recvWindow)
    ```
  - **GET /sapi/account/apiTradingStatus** (Fetch account api trading status detail.)
    ```python 
    client.get_account_api_trading_status(recvWindow)
    ```
  - **GET /sapi/v1/asset/dribblet (HMAC SHA256)** (DustLog: Fetch small amounts of assets exchanged BNB records.)
    ```python 
    client.get_dust_log(recvWindow)
    ```
  - **Post /sapi/v1/asset/dust (HMAC SHA256)** (Dust Transfer: Convert dust assets to BNB.)
    ```python 
    client.transfer_dust(asset, recvWindow)
    ```
  - **Get /sapi/v1/asset/assetDividend (HMAC SHA256)** (Query asset dividend record.)
    ```python 
    client.get_asset_dividend_history(asset, startTime, endTime, limit, recvWindow)
    ```
  - **GET /sapi/v1/asset/assetDetail (HMAC SHA256)** (Fetch details of assets supported on Binance.)
    ```python 
    client.get_asset_details(recvWindow)
    ```
  - **GET /sapi/v1/asset/tradeFee (HMAC SHA256)** (Fetch trade fee, values in percentage.)
    ```python 
    client.get_trade_fee(symbol, recvWindow)
    ```
- *Market Data Endpoints*
  - **GET /api/v3/ping** (Test connectivity to the Rest API.)
    ```python 
    client.ping()
    ```
  - **GET /api/v3/time** (Test connectivity to the Rest API and get the current server time.)
    ```python 
    client.get_server_time()
    ```
  - **GET /api/v3/exchangeInfo** (Current exchange trading rules and symbol information.)
    ```python 
    client.get_exchange_info()
    ```
  - **GET /api/v3/depth** (Get the Order Book for the market.)
    ```python 
    client.get_order_book(symbol, limit)
    ```
  - **GET /api/v3/trades** (Get recent trades (up to last 500))
    ```python 
    client.get_recent_trades(symbol, limit)
    ```
  - **GET /api/v3/historicalTrades** (Get older market trades.)
    ```python 
    client.get_historical_trades(symbol, limit, fromId)
    ``` 
  - **GET /api/v3/aggTrades** (Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated.)
    ```python 
    client.get_aggregate_trades(symbol, fromId, startTime, endTime, limit)
    
    # Wrapper function: Iterate over aggregate trade data from (start_time or last_id) the end of the history so far:
    client.aggregate_trade_iter(symbol, start_str, last_id)
    ```
  - **GET /api/v3/klines** (Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.)
    ```python 
    client.get_klines(symbol, interval, startTime, endTime, limit)
    
    # Wrapper function: Iterate over klines data from client.get_klines()
    client.get_historical_klines(symbol, interval, start_str, end_str, limit)
    ```
  - **GET /api/v3/avgPrice** (Current average price for a symbol.)
    ```python 
    client.get_avg_price(symbol)
    ```
  - **GET /api/v3/ticker/24hr** (24 hour rolling window price change statistics. **Careful** when accessing this with no symbol.)
    ```python 
    client.get_ticker(symbol)
    ```
  - **GET /api/v3/ticker/price** (Latest price for a symbol or symbols.)
    ```python 
    client.get_symbol_ticker(symbol)
    ```
  - **GET /api/v3/ticker/bookTicker** (Best price/qty on the order book for a symbol or symbols.)
    ```python 
    client.get_orderbook_ticker(symbol)
    ```
- *Spot Account/Trade Endpoints*
  - **POST /api/v3/order/test (HMAC SHA256)** (Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine.)
    ```python 
    client.create_test_order(symbol, 
        side, 
        type, 
        timeInForce, 
        quantity, 
        quoteOrderQty, 
        price, 
        newClientOrderId, 
        stopPrice, 
        icebergQty, 
        newOrderRespType, 
        recvWindow)
    ```
  - **POST /api/v3/order (HMAC SHA256)** (Send in a new order.)
    ```python 
    client.create_order(symbol, 
        side, 
        type, 
        timeInForce, 
        quantity, 
        quoteOrderQty, 
        price, 
        newClientOrderId, 
        stopPrice, 
        icebergQty, 
        newOrderRespType, 
        recvWindow)
        
    ## Wrapper functions:
    # Send in a new limit order. 
    # Default parameters: timeInForce=Client.TIME_IN_FORCE_GTC, type=Client.ORDER_TYPE_LIMIT
    client.order_limit(symbol, 
        side,
        quantity, 
        price, 
        newClientOrderId, 
        stopPrice, 
        icebergQty, 
        newOrderRespType, 
        recvWindow)
    
    # Send in a new limit buy order. 
    # Default parameters: timeInForce=Client.TIME_IN_FORCE_GTC, type=Client.ORDER_TYPE_LIMIT, side=Client.SIDE_BUY
    client.order_limit_buy(symbol, 
        quantity, 
        price, 
        newClientOrderId, 
        stopPrice, 
        icebergQty, 
        newOrderRespType, 
        recvWindow) 
    
    # Send in a new limit sell order. 
    # Default parameters: timeInForce=Client.TIME_IN_FORCE_GTC, type=Client.ORDER_TYPE_LIMIT, side= Client.SIDE_SELL
    client.order_limit_sell(symbol, 
        quantity, 
        price, 
        newClientOrderId, 
        stopPrice, 
        icebergQty, 
        newOrderRespType, 
        recvWindow)
        
    # Send in a new market order. 
    # Default parameters: type=Client.ORDER_TYPE_MARKET
    client.order_market(symbol, 
        side, 
        quantity, 
        quoteOrderQty, 
        newClientOrderId, 
        newOrderRespType, 
        recvWindow)
        
    # Send in a new market buy order. 
    # Default parameters: type=Client.ORDER_TYPE_MARKET, side=Client.SIDE_BUY
    client.order_market_buy(symbol, 
        quantity, 
        quoteOrderQty, 
        newClientOrderId, 
        newOrderRespType, 
        recvWindow)
    
    # Send in a new market sell order. 
    # Default parameters: type=Client.ORDER_TYPE_MARKET, side=Client.SIDE_SELL
    client.order_market_sell(symbol, 
        quantity, 
        quoteOrderQty, 
        newClientOrderId, 
        newOrderRespType, 
        recvWindow)
    ```
  - **DELETE /api/v3/order (HMAC SHA256)** (Cancel an active order.)
    ```python 
    client.cancel_order(symbol, orderId, origClientOrderId, newClientOrderId, recvWindow)
    ```
  - **DELETE api/v3/openOrders** (Cancels all active orders on a symbol. This includes OCO orders.)
  
    > :warning: Not yet implemented
  - **GET /api/v3/order (HMAC SHA256)** (Check an order's status.)
    ```python 
    client.get_order(symbol, orderId, origClientOrderId, recvWindow)
    ```
  - **GET /api/v3/openOrders (HMAC SHA256)** (Get all open orders on a symbol. **Careful** when accessing this with no symbol.)
    ```python 
    client.get_open_orders(symbol, recvWindow)
    ```
  - **GET /api/v3/allOrders (HMAC SHA256)** (Get all account orders; active, canceled, or filled.)
    ```python 
    client.get_all_orders(symbol, orderId, startTime, endTime, limit, recvWindow)
    ```
  - **POST /api/v3/order/oco (HMAC SHA256)** (Send in a new OCO order)
    ```python 
    client.create_oco_order(symbol, 
        listClientOrderId, 
        side, 
        quantity, 
        limitClientOrderId, 
        price, 
        limitIcebergQty, 
        stopClientOrderId, 
        stopPrice, 
        stopLimitPrice, 
        stopIcebergQty, 
        stopLimitTimeInForce, 
        newOrderRespType, 
        recvWindow)
    
    ## Wrapper Functions:
    
    # Send in a new OCO buy order. Default parameter: type=Client.SIDE_BUY
    client.order_oco_buy(symbol, 
        listClientOrderId, 
        quantity, 
        limitClientOrderId, 
        price, 
        limitIcebergQty, 
        stopClientOrderId, 
        stopPrice, 
        stopLimitPrice, 
        stopIcebergQty, 
        stopLimitTimeInForce, 
        newOrderRespType, 
        recvWindow)
        
    # Send in a new OCO sell order. Default parameter: type=Client.SIDE_SELL
    client.order_oco_sell(symbol, 
        listClientOrderId, 
        quantity, 
        limitClientOrderId, 
        price, 
        limitIcebergQty, 
        stopClientOrderId, 
        stopPrice, 
        stopLimitPrice, 
        stopIcebergQty, 
        stopLimitTimeInForce, 
        newOrderRespType, 
        recvWindow)
    ```
  - **DELETE /api/v3/orderList (HMAC SHA256)** (Cancel OCO: Cancel an entire Order List)
   
    > :warning: Not yet implemented
  - **GET /api/v3/orderList (HMAC SHA256)** (Query OCO: Retrieves a specific OCO based on provided optional parameters)
  
    > :warning: Not yet implemented
  - **GET /api/v3/allOrderList (HMAC SHA256)** (Retrieves all OCO based on provided optional parameters)
  
    > :warning: Not yet implemented
  - **GET /api/v3/openOrderList (HMAC SHA256)** (Query Open OCO (USER_DATA))
  
    > :warning: Not yet implemented
  - **GET /api/v3/account (HMAC SHA256)** (Get current account information.)
    ```python 
    client.get_account(recvWindow)
    ```
  - **GET /api/v3/myTrades (HMAC SHA256)** (Get trades for a specific account and symbol.)
    ```python 
    client.get_my_trades(symbol, startTime, endTime, fromId, limit, recvWindow)
    ```
- *Margin Account/Trade*
  - **POST /sapi/v1/margin/transfer (HMAC SHA256)** (Execute transfer between margin account and spot account(MARGIN).)
    ```python 
    client.transfer_margin_to_spot(asset, amount, recvWindow)
    client.transfer_spot_to_margin(asset, amount, recvWindow)
    ```
  - **POST /sapi/v1/margin/loan (HMAC SHA256)** (Apply for a loan(MARGIN).)
    ```python 
    client.create_margin_loan(asset, isIsolated, symbol, amount, recvWindow)
    ```
  - **POST /sapi/v1/margin/repay (HMAC SHA256)** (Repay loan for margin account (MARGIN).)
    ```python 
    client.repay_margin_loan(asset, isIsolated, symbol, amount, recvWindow)
    ```
  - **GET /sapi/v1/margin/asset** (Query Margin Asset (MARKET_DATA).)
    ```python 
    client.get_margin_asset(asset)
    ```
  - **GET /sapi/v1/margin/pair** (Query Cross Margin Pair (MARKET_DATA).)
    ```python 
    client.get_margin_symbol(symbol)
    ```
  - **GET /sapi/v1/margin/allAssets** (Get All Cross Margin Assets (MARKET_DATA).)
    ```python 
    client.get_margin_all_assets()
    ```
  - **GET /sapi/v1/margin/allPairs** (Get All Cross Margin Pairs (MARKET_DATA).)
    ```python 
    client.get_margin_all_pairs()
    ```
  - **GET /sapi/v1/margin/priceIndex** (Query Margin PriceIndex (MARKET_DATA).)
    ```python 
    client.get_margin_price_index(symbol)
    ```
  - **POST /sapi/v1/margin/order (HMAC SHA256)** (Post a new order for margin account.)
    ```python 
    client.create_margin_order(symbol,
        isIsolated,
        side, 
        type, 
        quantity, 
        price, 
        stopPrice, 
        newClientOrderId,
        icebergQty,
        newOrderRespType,
        sideEffectType,
        timeInForce, 
        recvWindow)
    ```
  - **DELETE /sapi/v1/margin/order (HMAC SHA256)** (Cancel an active order for margin account.)
    ```python 
    client.cancel_margin_order(symbol, 
        isIsolated, 
        orderId, 
        origClientOrderId, 
        newClientOrderId, 
        recvWindow)
    ```
  - **GET /sapi/v1/margin/transfer (HMAC SHA256)** (Get Cross Margin Transfer History (USER_DATA).)
    ```python 
    client.transfer_margin_to_spot(asset, amount, recvWindow)
    client.transfer_spot_to_margin(asset, amount, recvWindow)
    ```
  - **GET /sapi/v1/margin/loan (HMAC SHA256)** (Query Loan Record (USER_DATA).)
    ```python 
    client.get_margin_loan_details(asset, isolatedSymbol, txId, startTime, endTime, current, size, recvWindow)
    ```
  - **GET /sapi/v1/margin/repay (HMAC SHA256)** (Query repay record (USER_DATA).)
    ```python 
    client.get_margin_repay_details(asset, isolatedSymbol, txId, startTime, endTime, current, size, recvWindow)
    ```
  - **GET /sapi/v1/margin/interestHistory (HMAC SHA256)** (Get Interest History (USER_DATA).)
    ```python 
    client.get_margin_interest_history(asset, isolatedSymbol, startTime, endTime, current, size, archived, recvWindow)
    ```
  - **GET /sapi/v1/margin/forceLiquidationRec (HMAC SHA256)** (Get Force Liquidation Record (USER_DATA).)
    ```python 
    client.get_margin_force_liquidation_rec(isolatedSymbol, startTime, endTime, current, size, recvWindow)
    ```
  - **GET /sapi/v1/margin/account (HMAC SHA256)** (Query Cross Margin Account Details (USER_DATA).)
    ```python 
    client.get_margin_account(recvWindow)
    ```
  - **GET /sapi/v1/margin/order (HMAC SHA256)** (Query Margin Account's Order (USER_DATA).)
    ```python 
    client.get_margin_order(symbol, isIsolated, orderId, origClientOrderId, recvWindow)
    ```
  - **GET /sapi/v1/margin/openOrders (HMAC SHA256)** (Query Margin Account's Open Order (USER_DATA).)
    ```python 
    client.get_open_margin_orders(symbol, isIsolated, recvWindow)
    ```
  - **GET /sapi/v1/margin/allOrders (HMAC SHA256)** (Query Margin Account's All Order (USER_DATA).)
    ```python 
    client.get_all_margin_orders(symbol, isIsolated, orderId, startTime, endTime, limit, recvWindow)
    ```
  - **GET /sapi/v1/margin/myTrades (HMAC SHA256)** (Query Margin Account's Trade List (USER_DATA).)
    ```python 
    client.get_margin_trades(symbol, isIsolated, startTime, endTime, fromId, limit, recvWindow)
    ```
  - **GET /sapi/v1/margin/maxBorrowable (HMAC SHA256)** (Query Max Borrow amount for an asset (USER_DATA).)
    ```python 
    client.get_max_margin_loan(asset, isolatedSymbol, recvWindow)
    ```
  - **GET /sapi/v1/margin/maxTransferable (HMAC SHA256)** (Query Max Transfer-Out Amount (USER_DATA).)
    ```python 
    client.get_max_margin_transfer(asset, isolatedSymbol, recvWindow)
    ```
  - **POST /sapi/v1/margin/isolated/create (HMAC SHA256)** (Create Isolated Margin Account (MARGIN).)
    ```python 
    client.create_isolated_margin_account(base, quote, recvWindow)
    ```
  - **POST /sapi/v1/margin/isolated/transfer (HMAC SHA256)** (Isolated Margin Account Transfer (MARGIN).)
    ```python 
    client.transfer_spot_to_isolated_margin(asset, symbol, amount, recvWindow)
    client.transfer_isolated_margin_to_spot(asset, symbol, amount, recvWindow)
    ```
  - **GET /sapi/v1/margin/isolated/transfer (HMAC SHA256)** (Get Isolated Margin Transfer History (USER_DATA).)
  
    > :warning: Not yet implemented
  - **GET /sapi/v1/margin/isolated/account (HMAC SHA256)** (Query Isolated Margin Account Info (USER_DATA).)
    ```python 
    client.get_isolated_margin_account(symbols, recvWindow)
    ```
  - **GET /sapi/v1/margin/isolated/pair (HMAC SHA256)** (Query Isolated Margin Symbol (USER_DATA).)
    ```python 
    client.get_isolated_margin_symbol(symbol, recvWindow)
    ```
  - **GET /sapi/v1/margin/isolated/allPairs (HMAC SHA256)** (Get All Isolated Margin Symbol (USER_DATA).)
    ```python 
    client.get_all_isolated_margin_symbols(recvWindow)
    ```
  - **POST /sapi/v1/margin/manual-liquidation (HMAC SHA256)** (Margin manual liquidation (MARGIN).)
    ```python 
    client.margin_manual_liquidation(type)
    ```
- *User Data Streams*
  - **POST /api/v3/userDataStream** (Create a ListenKey (Spot) (USER_STREAM): Start a new user data stream.)
    ```python 
    client.stream_get_listen_key()
    ```
  - **PUT /api/v3/userDataStream** (Ping/Keep-alive a ListenKey (Spot) (USER_STREAM).)
    ```python 
    client.stream_keepalive(listenKey)
    ```
  - **DELETE /api/v3/userDataStream** (Close a ListenKey (Spot) (USER_STREAM).)
    ```python 
    client.stream_close(listenKey)
    ```
  - **POST /sapi/v1/userDataStream** (Create a ListenKey (Margin).)
    ```python 
    client.margin_stream_get_listen_key()
    ```
  - **PUT /sapi/v1/userDataStream** (Ping/Keep-alive a ListenKey (Margin).)
    ```python 
    client.margin_stream_keepalive(listenKey)
    ```
  - **DELETE /sapi/v1/userDataStream** (Close a ListenKey (Margin).)
    ```python 
    client.margin_stream_close(listenKey)
    ```
  - **POST /sapi/v1/userDataStream/isolated** (Create a ListenKey (Isolated).)
    ```python 
    client.isolated_margin_stream_get_listen_key(symbol)
    ```
  - **PUT /sapi/v1/userDataStream/isolated** (Ping/Keep-alive a ListenKey (Isolated).)
    ```python 
    client.isolated_margin_stream_keepalive(symbol, listenKey)
    ```
  - **DELETE /sapi/v1/userDataStream/isolated** (Close a ListenKey (Isolated).)
    ```python 
    client.isolated_margin_stream_close(symbol, listenKey)
    ```
- *Savings Endpoints*
  - **GET /sapi/v1/lending/daily/product/list (HMAC SHA256)** (Get Flexible Product List (USER_DATA).)
    ```python 
    client.get_lending_product_list(status, featured, recvWindow)
    ```
  - **GET /sapi/v1/lending/daily/userLeftQuota (HMAC SHA256)** (Get Left Daily Purchase Quota of Flexible Product (USER_DATA).)
    ```python 
    client.get_lending_daily_quota_left(productId, recvWindow)
    ```
  - **POST /sapi/v1/lending/daily/purchase (HMAC SHA256)** (Purchase Flexible Product (USER_DATA).)
    ```python 
    client.purchase_lending_product(productId, amount, recvWindow)
    ```
  - **GET /sapi/v1/lending/daily/userRedemptionQuota (HMAC SHA256)** (Get Left Daily Redemption Quota of Flexible Product (USER_DATA).)
    ```python 
    client.get_lending_daily_redemption_quota(productId, type, recvWindow)
    ```
  - **POST /sapi/v1/lending/daily/redeem (HMAC SHA256)** (Redeem Flexible Product (USER_DATA).)
    ```python 
    client.redeem_lending_product(productId, amount, type, recvWindow)
    ```
  - **GET /sapi/v1/lending/daily/token/position (HMAC SHA256)** (Get Flexible Product Position (USER_DATA).)
    ```python 
    client.get_lending_position(asset, recvWindow)
    ```
  - **GET /sapi/v1/lending/project/list (HMAC SHA256)** (Get Fixed and Activity Project List (USER_DATA).)
    ```python 
    client.get_fixed_activity_project_list(asset, type, status, isSortAsc, sortBy, current, size, recvWindow)
    ```
  - **POST /sapi/v1/lending/customizedFixed/purchase (HMAC SHA256)** (Purchase Fixed/Activity Project (USER_DATA).)

    > :warning: Not yet implemented
  - **GET /sapi/v1/lending/project/position/list (HMAC SHA256)** (Get Fixed/Activity Project Position (USER_DATA).)

    > :warning: Not yet implemented
  - **GET /sapi/v1/lending/union/account (HMAC SHA256)** (Lending Account (USER_DATA).)
    ```python 
    client.get_lending_account(recvWindow)
    ```
  - **GET /sapi/v1/lending/union/purchaseRecord (HMAC SHA256)** (Get Purchase Record (USER_DATA).)
    ```python 
    client.get_lending_purchase_history(lendingType, asset, startTime, endTime, current, size, recvWindow)
    ```
  - **GET /sapi/v1/lending/union/redemptionRecord (HMAC SHA256)** (Get Redemption Record (USER_DATA).)
    ```python 
    client.get_lending_redemption_history(lendingType, asset, startTime, endTime, current, size, recvWindow)
    ```
  - **GET /sapi/v1/lending/union/interestHistory (HMAC SHA256)** (Get Interest History (USER_DATA).)
    ```python 
    client.get_lending_interest_history(lendingType, asset, startTime, endTime, current, size, recvWindow)
    ```
  - **POST /sapi/v1/lending/positionChanged (HMAC SHA256)** (Change Fixed/Activity Position to Daily Position (USER_DATA).)
    ```python 
    client.change_fixed_activity_to_daily_position(projectId, lot, positionId, recvWindow)
    ```
- *Mining Endpoints*
    > :warning: Not yet implemented
- *Sub-Account Endpoints*
  - **GET /sapi/v1/sub-account/list (HMAC SHA256)** (Query Sub-account List (For Master Account).)
    ```python 
    client.get_sub_account_list(email, isFreeze, page, limit, recvWindow)
    ```
  - **GET /sapi/v1/sub-account/sub/transfer/history (HMAC SHA256)** (Query Sub-account Spot Asset Transfer History (For Master Account).)
    ```python 
    client.get_sub_account_transfer_history(fromEmail, toEmail, startTime, endTime, page, limit, recvWindow)
    ```
  - **GET /sapi/v1/sub-account/assets (HMAC SHA256)** (Query Sub-account Assets (For Master Account).)
    ```python 
    client.get_sub_account_assets(email, recvWindow)
    ```
  > :warning: The rest of methods for Sub-Account Endpoints are not yet implemented
- *BLVT Endpoints*
    > :warning: Not yet implemented
- *BSwap Endpoints*
    > :warning: Not yet implemented
### [USDT-M Futures](https://binance-docs.github.io/apidocs/futures/en/)
- *Market Data Endpoints*
  - **GET /fapi/v1/ping** (Test connectivity to the Rest API.)
    ```python 
    client.futures_ping()
    ```
  - **GET /fapi/v1/time** (Test connectivity to the Rest API and get the current server time.)
    ```python 
    client.futures_time()
    ```
  - **GET /fapi/v1/exchangeInfo** (Current exchange trading rules and symbol information.)
    ```python 
    client.futures_exchange_info()
    ```
  - **GET /fapi/v1/depth** (Get the Order Book for the market.)
    ```python 
    client.futures_order_book(symbol, limit)
    ```
  - **GET /fapi/v1/trades** (Get recent trades.)
    ```python 
    client.futures_recent_trades(symbol, limit)
    ```
  - **GET /fapi/v1/historicalTrades** (Get older market historical trades (MARKET_DATA).)
    ```python 
    client.futures_historical_trades(symbol, limit, fromId)
    ```
  - **GET /fapi/v1/aggTrades** (Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated.)
    ```python 
    client.futures_aggregate_trades(symbol, fromId, startTime, endTime, limit)
    ```
  - **GET /fapi/v1/klines** (Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.)
    ```python 
    client.futures_klines(symbol, interval, startTime, endTime, limit)
    ```
  - **GET /fapi/v1/premiumIndex** (Get Mark Price and Funding Rate.)
    ```python 
    client.futures_mark_price(symbol)
    ```
  - **GET /fapi/v1/fundingRate** (Get Funding Rate History.)
    ```python 
    client.futures_funding_rate(symbol, startTime, endTime, limit)
    ```
  - **GET /fapi/v1/ticker/24hr** (24 hour rolling window price change statistics. **Careful** when accessing this with no symbol.)
    ```python 
    client.futures_ticker(symbol)
    ```
  - **GET /fapi/v1/ticker/price** (Latest price for a symbol or symbols.)
    ```python 
    client.futures_symbol_ticker(symbol)
    ```
  - **GET /fapi/v1/ticker/bookTicker** (Best price/qty on the order book for a symbol or symbols.)
    ```python 
    client.futures_orderbook_ticker(symbol)
    ``` 
  - **GET /fapi/v1/allForceOrders** (Get all Liquidation Orders.)
    > :warning: Probably broken, python code below is implemented on v1/ticker/allForceOrders endpoint.
    ```python 
    client.futures_liquidation_orders(symbol, startTime, endTime, limit)
    ``` 
  - **GET /fapi/v1/openInterest** (Get present open interest of a specific symbol.)
    ```python 
    client.futures_open_interest(symbol)
    ``` 
  - **GET /futures/data/openInterestHist** (Open Interest Statistics.)
    ```python 
    client.futures_open_interest_hist(symbol, period, limit, startTime, endTime)
    ``` 
  - **GET /futures/data/topLongShortAccountRatio** (Top Trader Long/Short Ratio (Accounts) (MARKET_DATA).)
    ```python 
    client.futures_top_longshort_account_ratio(symbol, period, limit, startTime, endTime)
    ``` 
  - **GET /futures/data/topLongShortPositionRatio** (Top Trader Long/Short Ratio (Positions).)
    ```python
    client.futures_top_longshort_position_ratio(symbol, period, limit, startTime, endTime)
    ```
  - **GET /futures/data/globalLongShortAccountRatio** (Long/Short Ratio.)
    ```python
    client.futures_global_longshort_ratio(symbol, period, limit, startTime, endTime)
    ```
  - **GET /futures/data/takerlongshortRatio** (Taker Buy/Sell Volume.)
    ```python
    client.futures_taker_longshort_ratio(symbol, period, limit, startTime, endTime)
    ```
  - **GET /fapi/v1/lvtKlines** (Historical BLVT NAV Kline/Candlestick.)

    > :warning: Not yet implemented
  - **GET /fapi/v1/indexInfo** (Composite Index Symbol Information.)

    > :warning: Not yet implemented
- *Account/trades Endpoints*
  - **POST /sapi/v1/futures/transfer (HMAC SHA256)** (New Future Account Transfer (FUTURES): Execute transfer between spot account and futures account.)
    ```python 
    client.futures_account_transfer(asset, amount, type, recvWindow)
    ```
  - **GET /sapi/v1/futures/transfer (HMAC SHA256)** (Get Future Account Transaction History List (USER_DATA).)
    ```python 
    client.transfer_history(asset, startTime, endTime, current, size, recvWindow)
    ```
  - **POST /fapi/v1/positionSide/dual (HMAC SHA256)** (Change user's position mode (Hedge Mode or One-way Mode ) on _**EVERY symbol**_.)
    ```python 
    client.futures_change_position_mode(dualSidePosition, recvWindow)
    ```
  - **GET /fapi/v1/positionSide/dual (HMAC SHA256)** (Get user's position mode (Hedge Mode or One-way Mode ) on _**EVERY symbol**_.)
    ```python 
    client.futures_get_position_mode(recvWindow)
    ```
  - **POST /fapi/v1/order (HMAC SHA256)** (Send in a new order (TRADE).)
    ```python 
    client.futures_create_order(symbol, 
                                side,
                                positionSide,
                                type, 
                                timeInForce, 
                                quantity,
                                reduceOnly,
                                price, 
                                newClientOrderId, 
                                stopPrice,
                                closePosition,
                                activationPrice,
                                callbackRate,
                                workingType,
                                priceProtect,
                                newOrderRespType,
                                recvWindow)
    ```
  - **POST /fapi/v1/batchOrders (HMAC SHA256)** (Place Multiple Orders (TRADE).)

    > :warning: Not yet implemented
  - **GET /fapi/v1/order (HMAC SHA256)** (Query Order (USER_DATA): Check an order's status.)
    ```python 
    client.futures_get_order(symbol, orderId, origClientOrderId, recvWindow)
    ```
  - **DELETE /fapi/v1/order (HMAC SHA256)** (Cancel an active order (TRADE).)
    ```python 
    client.futures_cancel_order(symbol, orderId, origClientOrderId, recvWindow)
    ```
  - **DELETE /fapi/v1/allOpenOrders (HMAC SHA256)** (Cancel All Open Orders (TRADE).)
    ```python 
    client.futures_cancel_all_open_orders(symbol, recvWindow)
    ```
  - **DELETE /fapi/v1/batchOrders (HMAC SHA256)** (Cancel Multiple Orders (TRADE).)
    ```python 
    client.futures_cancel_orders(symbol, orderIdList, origClientOrderIdList, recvWindow)
    ```
  - **POST /fapi/v1/countdownCancelAll (HMAC SHA256)** (Cancel all open orders of the specified symbol at the end of the specified countdown (TRADE).)

    > :warning: Not yet implemented
  - **GET /fapi/v1/openOrder (HMAC SHA256)** (Query Current Open Order (USER_DATA).)
  
    > :warning: Not yet implemented
  - **GET /fapi/v1/openOrders (HMAC SHA256)** (Get all open orders on a symbol. **Careful** when accessing this with no symbol (USER_DATA).)
    ```python 
    client.futures_get_open_orders(symbol, recvWindow)
    ```
  - **GET /fapi/v1/allOrders (HMAC SHA256)** (Get all account orders; active, canceled, or filled (USER_DATA).)
    ```python 
    client.futures_get_all_orders(symbol, orderId, startTime, endTime, limit, recvWindow)
    ```
  - **GET /fapi/v2/balance (HMAC SHA256)** (Futures Account Balance V2 (USER_DATA).)
    > :warning: Probably broken, python code below is implemented on v1 endpoint.
    ```python 
    client.futures_account_balance(recvWindow)
    ```
  - **GET /fapi/v2/account (HMAC SHA256)** (Account Information V2: Get current account information (USER_DATA).)
    > :warning: Probably broken, python code below is implemented on v1 endpoint.
    ```python 
    client.futures_account(recvWindow)
    ```
  - **POST /fapi/v1/leverage (HMAC SHA256)** (Change user's initial leverage of specific symbol market (TRADE).)
    ```python 
    client.futures_change_leverage(symbol, leverage, recvWindow)
    ```
  - **POST /fapi/v1/marginType (HMAC SHA256)** (Change the margin type for a symbol (TRADE).)
    ```python 
    client.futures_change_margin_type(symbol, marginType, recvWindow)
    ```
  - **POST /fapi/v1/positionMargin (HMAC SHA256)** (Modify Isolated Position Margin (TRADE).)
    ```python 
    client.futures_change_position_margin(symbol, positionSide, amount, type, recvWindow)
    ```
  - **GET /fapi/v1/positionMargin/history (HMAC SHA256)** (Get Position Margin Change History (TRADE).)
    ```python 
    client.futures_position_margin_history(symbol, type, startTime, endTime, limit, recvWindow)
    ```
  - **GET /fapi/v2/positionRisk (HMAC SHA256)** (Position Information V2: Get current position information (USER_DATA).)
    > :warning: Probably broken, python code below is implemented on v1 endpoint.
    ```python 
    client.futures_position_information(symbol, recvWindow)
    ```
  - **GET /fapi/v1/userTrades (HMAC SHA256)** (Account Trade List: Get trades for a specific account and symbol (USER_DATA).)
    ```python 
    client.futures_account_trades(symbol, startTime, endTime, fromId, limit, recvWindow)
    ```
  - **GET /fapi/v1/income (HMAC SHA256)** (Get Income History (USER_DATA).)
    ```python 
    client.futures_income_history(symbol, incomeType, startTime, endTime, limit, recvWindow)
    ```
  - **GET /fapi/v1/leverageBracket** (Notional and Leverage Brackets (USER_DATA).)
    > :warning: Probably broken, python code below is implemented on ticker/leverageBracket endpoint.
    ```python 
    client.futures_leverage_bracket(symbol, recvWindow)
    ```
  - **GET /fapi/v1/adlQuantile** (Position ADL Quantile Estimation (USER_DATA).)

    > :warning: Not yet implemented
  - **GET /fapi/v1/forceOrders** (User's Force Orders (USER_DATA).)

    > :warning: Not yet implemented
  - **GET /fapi/v1/apiTradingStatus** (User API Trading Quantitative Rules Indicators (USER_DATA).)

    > :warning: Not yet implemented
- *User Data Streams*
    > :warning: Not yet implemented
### [Vanilla Options](https://binance-docs.github.io/apidocs/voptions/en/)
- *Quoting interface*
  - **GET /vapi/v1/ping** (Test connectivity)
    ```python 
    client.options_ping()
    ```
  - **GET /vapi/v1/time** (Get server time)
    ```python 
    client.options_time()
    ```
  - **GET /vapi/v1/optionInfo** (Get current trading pair info)
    ```python 
    client.options_info()
    ```
  - **GET /vapi/v1/exchangeInfo** (Get current limit info and trading pair info)
    ```python 
    client.options_exchange_info()
    ```
  - **GET /vapi/v1/index** (Get the spot index price)
    ```python 
    client.options_index_price(underlying)
    ```
  - **GET /vapi/v1/ticker** (Get the latest price)
    ```python 
    client.options_price(symbol)
    ```
  - **GET /vapi/v1/mark** (Get the latest mark price)
    ```python 
    client.options_mark_price(symbol)
    ```
  - **GET /vapi/v1/depth** (Depth information)
    ```python 
    client.options_order_book(symbol, limit)
    ```
  - **GET /vapi/v1/klines** (Candle data)
    ```python 
    client.options_klines(symbol, interval, startTime, endTime, limit)
    ```
  - **GET /vapi/v1/trades** (Recently completed Option trades)
    ```python 
    client.options_recent_trades(symbol, limit)
    ```
  - **GET /vapi/v1/historicalTrades** (Query trade history)
    ```python 
    client.options_historical_trades(symbol, fromId, limit)
    ```
- *Account and trading interface*
  - **GET /vapi/v1/account (HMAC SHA256)** (Account asset info (USER_DATA))
    ```python 
    client.options_account_info(recvWindow)
    ```
  - **POST /vapi/v1/transfer (HMAC SHA256)** (Funds transfer (USER_DATA))
    ```python 
    client.options_funds_transfer(currency, type, amount, recvWindow)
    ```
  - **GET /vapi/v1/position (HMAC SHA256)** (Option holdings info (USER_DATA))
    ```python 
    client.options_positions(symbol, recvWindow)
    ```
  - **POST /vapi/v1/bill (HMAC SHA256)** (Account funding flow (USER_DATA))
    ```python 
    client.options_bill(currency, recordId, startTime, endTime, limit, recvWindow)
    ```
  - **POST /vapi/v1/order (HMAC SHA256)** (Option order (TRADE))
    ```python 
    client.options_place_order(symbol, side, type, quantity, price, timeInForce, reduceOnly, postOnly, \
        newOrderRespType, clientOrderId, recvWindow, recvWindow)
    ```
  - **POST /vapi/v1/batchOrders (HMAC SHA256)** (Place Multiple Option orders (TRADE))
    ```python 
    client.options_place_batch_order(orders, recvWindow)
    ```
  - **DELETE /vapi/v1/order (HMAC SHA256)** (Cancel Option order (TRADE))
    ```python 
    client.options_cancel_order(symbol, orderId, clientOrderId, recvWindow)
    ```
  - **DELETE /vapi/v1/batchOrders (HMAC SHA256)** (Cancel Multiple Option orders (TRADE))
    ```python 
    client.options_cancel_batch_order(symbol, orderIds, clientOrderIds, recvWindow)
    ```
  - **DELETE /vapi/v1/allOpenOrders (HMAC SHA256)** (Cancel all Option orders (TRADE))
    ```python 
    client.options_cancel_all_orders(symbol, recvWindow)
    ```
  - **GET /vapi/v1/order (HMAC SHA256)** (Query Option order (TRADE))
    ```python 
    client.options_query_order(symbol, orderId, clientOrderId, recvWindow)
    ```
  - **GET /vapi/v1/openOrders (HMAC SHA256)** (Query current pending Option orders (TRADE))
    ```python 
    client.options_query_pending_orders(symbol, orderId, startTime, endTime, limit, recvWindow)
    ```
  - **GET /vapi/v1/historyOrders (HMAC SHA256)** (Query Option order history (TRADE))
    ```python 
    client.options_query_order_history(symbol, orderId, startTime, endTime, limit, recvWindow)
    ```
  - **GET /vapi/v1/userTrades (HMAC SHA256)** (Option Trade List (USER_DATA))
    ```python 
    client.options_user_trades(symbol, fromId, startTime, endTime, limit, recvWindow)
    ```
### [COIN-M Futures](https://binance-docs.github.io/apidocs/delivery/en/)
> :warning: Not yet implemented
### [USDT-M Futures testnet](https://binance-docs.github.io/apidocs/testnet/en/)
> :warning: Not yet implemented  
### [COIN-M Futures testnet](https://binance-docs.github.io/apidocs/delivery_testnet/en/)
> :warning: Not yet implemented  
	- **GET /sapi/v1/loan/vip/ongoing/orders**
    ```python
    client.margin_v1_get_loan_vip_ongoing_orders(**params)
    ```

	- **GET /sapi/v1/mining/payment/other**
    ```python
    client.margin_v1_get_mining_payment_other(**params)
    ```

	- **GET /dapi/v1/income/asyn/id**
    ```python
    client.futures_coin_v1_get_income_asyn_id(**params)
    ```

	- **GET /sapi/v1/simple-earn/flexible/history/subscriptionRecord**
    ```python
    client.margin_v1_get_simple_earn_flexible_history_subscription_record(**params)
    ```

	- **POST /sapi/v1/lending/auto-invest/one-off**
    ```python
    client.margin_v1_post_lending_auto_invest_one_off(**params)
    ```

	- **POST /sapi/v1/broker/subAccountApi/commission/coinFutures**
    ```python
    client.margin_v1_post_broker_sub_account_api_commission_coin_futures(**params)
    ```

	- **POST /papi/v1/repay-futures-negative-balance**
    ```python
    client.papi_v1_post_repay_futures_negative_balance(**params)
    ```

	- **POST /eapi/v1/block/order/execute**
    ```python
    client.options_v1_post_block_order_execute(**params)
    ```

	- **GET /sapi/v1/margin/dust**
    ```python
    client.margin_v1_get_margin_dust(**params)
    ```

	- **GET /dapi/v1/trades**
    ```python
    client.futures_coin_v1_get_trades(**params)
    ```

	- **POST /api/v3/orderList/otoco**
    ```python
    client.v3_post_order_list_otoco(**params)
    ```

	- **GET /fapi/v1/order/asyn**
    ```python
    client.futures_v1_get_order_asyn(**params)
    ```

	- **GET /sapi/v1/asset/custody/transfer-history**
    ```python
    client.margin_v1_get_asset_custody_transfer_history(**params)
    ```

	- **POST /fapi/v1/order/test**
    ```python
    client.futures_v1_post_order_test(**params)
    ```

	- **POST /sapi/v1/broker/subAccount/blvt**
    ```python
    client.margin_v1_post_broker_sub_account_blvt(**params)
    ```

	- **POST /sapi/v1/sol-staking/sol/redeem**
    ```python
    client.margin_v1_post_sol_staking_sol_redeem(**params)
    ```

	- **GET /eapi/v1/countdownCancelAll**
    ```python
    client.options_v1_get_countdown_cancel_all(**params)
    ```

	- **GET /sapi/v1/margin/tradeCoeff**
    ```python
    client.margin_v1_get_margin_trade_coeff(**params)
    ```

	- **GET /sapi/v1/sub-account/futures/positionRisk**
    ```python
    client.margin_v1_get_sub_account_futures_position_risk(**params)
    ```

	- **GET /dapi/v1/orderAmendment**
    ```python
    client.futures_coin_v1_get_order_amendment(**params)
    ```

	- **GET /papi/v1/margin/openOrders**
    ```python
    client.papi_v1_get_margin_open_orders(**params)
    ```

	- **GET /sapi/v1/margin/available-inventory**
    ```python
    client.margin_v1_get_margin_available_inventory(**params)
    ```

	- **POST /sapi/v1/account/apiRestrictions/ipRestriction/ipList**
    ```python
    client.margin_v1_post_account_api_restrictions_ip_restriction_ip_list(**params)
    ```

	- **GET /sapi/v2/eth-staking/account**
    ```python
    client.margin_v2_get_eth_staking_account(**params)
    ```

	- **POST /papi/v1/asset-collection**
    ```python
    client.papi_v1_post_asset_collection(**params)
    ```

	- **GET /papi/v1/um/trade/asyn/id**
    ```python
    client.papi_v1_get_um_trade_asyn_id(**params)
    ```

	- **POST /sapi/v1/staking/redeem**
    ```python
    client.margin_v1_post_staking_redeem(**params)
    ```

	- **GET /sapi/v1/loan/income**
    ```python
    client.margin_v1_get_loan_income(**params)
    ```

	- **GET /eapi/v1/depth**
    ```python
    client.options_v1_get_depth(**params)
    ```

	- **GET /dapi/v1/pmAccountInfo**
    ```python
    client.futures_coin_v1_get_pm_account_info(**params)
    ```

	- **GET /sapi/v1/managed-subaccount/queryTransLogForInvestor**
    ```python
    client.margin_v1_get_managed_subaccount_query_trans_log_for_investor(**params)
    ```

	- **POST /sapi/v1/dci/product/auto_compound/edit-status**
    ```python
    client.margin_v1_post_dci_product_auto_compound_edit_status(**params)
    ```

	- **GET /fapi/v1/trade/asyn**
    ```python
    client.futures_v1_get_trade_asyn(**params)
    ```

	- **GET /sapi/v1/loan/vip/request/interestRate**
    ```python
    client.margin_v1_get_loan_vip_request_interest_rate(**params)
    ```

	- **GET /fapi/v1/fundingInfo**
    ```python
    client.futures_v1_get_funding_info(**params)
    ```

	- **GET /sapi/v2/loan/flexible/repay/rate**
    ```python
    client.margin_v2_get_loan_flexible_repay_rate(**params)
    ```

	- **GET /sapi/v1/lending/auto-invest/plan/id**
    ```python
    client.margin_v1_get_lending_auto_invest_plan_id(**params)
    ```

	- **POST /sapi/v1/loan/adjust/ltv**
    ```python
    client.margin_v1_post_loan_adjust_ltv(**params)
    ```

	- **GET /sapi/v1/bnbBurn**
    ```python
    client.margin_v1_get_bnb_burn(**params)
    ```

	- **GET /papi/v1/um/order**
    ```python
    client.papi_v1_get_um_order(**params)
    ```

	- **GET /sapi/v1/mining/statistics/user/status**
    ```python
    client.margin_v1_get_mining_statistics_user_status(**params)
    ```

	- **POST /sapi/v1/staking/purchase**
    ```python
    client.margin_v1_post_staking_purchase(**params)
    ```

	- **POST /sapi/v1/giftcard/redeemCode**
    ```python
    client.margin_v1_post_giftcard_redeem_code(**params)
    ```

	- **GET /eapi/v1/userTrades**
    ```python
    client.options_v1_get_user_trades(**params)
    ```

	- **GET /sapi/v1/broker/transfer/futures**
    ```python
    client.margin_v1_get_broker_transfer_futures(**params)
    ```

	- **POST /sapi/v1/algo/spot/newOrderTwap**
    ```python
    client.margin_v1_post_algo_spot_new_order_twap(**params)
    ```

	- **GET /sapi/v1/lending/auto-invest/target-asset/list**
    ```python
    client.margin_v1_get_lending_auto_invest_target_asset_list(**params)
    ```

	- **GET /sapi/v1/capital/deposit/address/list**
    ```python
    client.margin_v1_get_capital_deposit_address_list(**params)
    ```

	- **POST /sapi/v1/broker/subAccount/bnbBurn/marginInterest**
    ```python
    client.margin_v1_post_broker_sub_account_bnb_burn_margin_interest(**params)
    ```

	- **POST /sapi/v2/loan/flexible/repay**
    ```python
    client.margin_v2_post_loan_flexible_repay(**params)
    ```

	- **GET /sapi/v2/loan/flexible/loanable/data**
    ```python
    client.margin_v2_get_loan_flexible_loanable_data(**params)
    ```

	- **POST /sapi/v1/broker/subAccountApi/permission**
    ```python
    client.margin_v1_post_broker_sub_account_api_permission(**params)
    ```

	- **GET /sapi/v1/dci/product/positions**
    ```python
    client.margin_v1_get_dci_product_positions(**params)
    ```

	- **POST /sapi/v1/convert/limit/cancelOrder**
    ```python
    client.margin_v1_post_convert_limit_cancel_order(**params)
    ```

	- **GET /sapi/v1/margin/exchange-small-liability-history**
    ```python
    client.margin_v1_get_margin_exchange_small_liability_history(**params)
    ```

	- **GET /sapi/v1/mining/hash-transfer/config/details/list**
    ```python
    client.margin_v1_get_mining_hash_transfer_config_details_list(**params)
    ```

	- **GET /sapi/v1/mining/hash-transfer/profit/details**
    ```python
    client.margin_v1_get_mining_hash_transfer_profit_details(**params)
    ```

	- **GET /sapi/v1/broker/subAccount**
    ```python
    client.margin_v1_get_broker_sub_account(**params)
    ```

	- **GET /sapi/v1/portfolio/balance**
    ```python
    client.margin_v1_get_portfolio_balance(**params)
    ```

	- **POST /sapi/v1/sub-account/eoptions/enable**
    ```python
    client.margin_v1_post_sub_account_eoptions_enable(**params)
    ```

	- **POST /papi/v1/ping**
    ```python
    client.papi_v1_post_ping(**params)
    ```

	- **GET /sapi/v1/loan/loanable/data**
    ```python
    client.margin_v1_get_loan_loanable_data(**params)
    ```

	- **POST /sapi/v1/eth-staking/wbeth/unwrap**
    ```python
    client.margin_v1_post_eth_staking_wbeth_unwrap(**params)
    ```

	- **PUT /fapi/v1/order**
    ```python
    client.futures_v1_put_order(**params)
    ```

	- **GET /sapi/v1/eth-staking/eth/history/stakingHistory**
    ```python
    client.margin_v1_get_eth_staking_eth_history_staking_history(**params)
    ```

	- **GET /papi/v1/um/conditional/openOrder**
    ```python
    client.papi_v1_get_um_conditional_open_order(**params)
    ```

	- **GET /dapi/v1/openOrders**
    ```python
    client.futures_coin_v1_get_open_orders(**params)
    ```

	- **GET /eapi/v1/order**
    ```python
    client.options_v1_get_order(**params)
    ```

	- **POST /sapi/v1/convert/acceptQuote**
    ```python
    client.margin_v1_post_convert_accept_quote(**params)
    ```

	- **GET /sapi/v1/staking/stakingRecord**
    ```python
    client.margin_v1_get_staking_staking_record(**params)
    ```

	- **GET /sapi/v1/broker/rebate/recentRecord**
    ```python
    client.margin_v1_get_broker_rebate_recent_record(**params)
    ```

	- **GET /eapi/v1/block/order/orders**
    ```python
    client.options_v1_get_block_order_orders(**params)
    ```

	- **GET /sapi/v1/asset/transfer**
    ```python
    client.margin_v1_get_asset_transfer(**params)
    ```

	- **GET /sapi/v1/loan/vip/collateral/account**
    ```python
    client.margin_v1_get_loan_vip_collateral_account(**params)
    ```

	- **GET /sapi/v1/algo/spot/openOrders**
    ```python
    client.margin_v1_get_algo_spot_open_orders(**params)
    ```

	- **POST /sapi/v1/loan/repay**
    ```python
    client.margin_v1_post_loan_repay(**params)
    ```

	- **POST /sapi/v1/margin/isolated/account**
    ```python
    client.margin_v1_post_margin_isolated_account(**params)
    ```

	- **GET /dapi/v1/fundingInfo**
    ```python
    client.futures_coin_v1_get_funding_info(**params)
    ```

	- **GET /papi/v1/cm/leverageBracket**
    ```python
    client.papi_v1_get_cm_leverage_bracket(**params)
    ```

	- **POST /sapi/v1/simple-earn/locked/subscribe**
    ```python
    client.margin_v1_post_simple_earn_locked_subscribe(**params)
    ```

	- **GET /sapi/v1/margin/leverageBracket**
    ```python
    client.margin_v1_get_margin_leverage_bracket(**params)
    ```

	- **GET /sapi/v2/portfolio/collateralRate**
    ```python
    client.margin_v2_get_portfolio_collateral_rate(**params)
    ```

	- **POST /sapi/v2/loan/flexible/adjust/ltv**
    ```python
    client.margin_v2_post_loan_flexible_adjust_ltv(**params)
    ```

	- **GET /sapi/v1/convert/orderStatus**
    ```python
    client.margin_v1_get_convert_order_status(**params)
    ```

	- **POST /sapi/v1/margin/dust**
    ```python
    client.margin_v1_post_margin_dust(**params)
    ```

	- **GET /sapi/v1/broker/subAccountApi/ipRestriction**
    ```python
    client.margin_v1_get_broker_sub_account_api_ip_restriction(**params)
    ```

	- **GET /papi/v1/um/conditional/allOrders**
    ```python
    client.papi_v1_get_um_conditional_all_orders(**params)
    ```

	- **PUT /eapi/v1/block/order/create**
    ```python
    client.options_v1_put_block_order_create(**params)
    ```

	- **POST /sapi/v1/dci/product/subscribe**
    ```python
    client.margin_v1_post_dci_product_subscribe(**params)
    ```

	- **GET /fapi/v1/income/asyn/id**
    ```python
    client.futures_v1_get_income_asyn_id(**params)
    ```

	- **GET /dapi/v1/positionRisk**
    ```python
    client.futures_coin_v1_get_position_risk(**params)
    ```

	- **POST /eapi/v1/countdownCancelAll**
    ```python
    client.options_v1_post_countdown_cancel_all(**params)
    ```

	- **POST /papi/v1/repay-futures-switch**
    ```python
    client.papi_v1_post_repay_futures_switch(**params)
    ```

	- **POST /sapi/v1/mining/hash-transfer/config/cancel**
    ```python
    client.margin_v1_post_mining_hash_transfer_config_cancel(**params)
    ```

	- **GET /sapi/v1/broker/subAccount/depositHist**
    ```python
    client.margin_v1_get_broker_sub_account_deposit_hist(**params)
    ```

	- **POST /eapi/v1/block/order/create**
    ```python
    client.options_v1_post_block_order_create(**params)
    ```

	- **GET /sapi/v1/capital/deposit/subAddress**
    ```python
    client.margin_v1_get_capital_deposit_sub_address(**params)
    ```

	- **GET /sapi/v1/mining/payment/list**
    ```python
    client.margin_v1_get_mining_payment_list(**params)
    ```

	- **GET /fapi/v1/pmAccountInfo**
    ```python
    client.futures_v1_get_pm_account_info(**params)
    ```

	- **GET /dapi/v1/adlQuantile**
    ```python
    client.futures_coin_v1_get_adl_quantile(**params)
    ```

	- **GET /eapi/v1/income/asyn/id**
    ```python
    client.options_v1_get_income_asyn_id(**params)
    ```

	- **POST /api/v3/cancelReplace**
    ```python
    client.v3_post_cancel_replace(**params)
    ```

	- **PUT /papi/v1/um/order**
    ```python
    client.papi_v1_put_um_order(**params)
    ```

	- **GET /sapi/v1/sub-account/futures/accountSummary**
    ```python
    client.margin_v1_get_sub_account_futures_account_summary(**params)
    ```

	- **GET /papi/v1/um/symbolConfig**
    ```python
    client.papi_v1_get_um_symbol_config(**params)
    ```

	- **GET /papi/v1/um/userTrades**
    ```python
    client.papi_v1_get_um_user_trades(**params)
    ```

	- **GET /sapi/v1/staking/productList**
    ```python
    client.margin_v1_get_staking_product_list(**params)
    ```

	- **POST /sapi/v1/asset/get-funding-asset**
    ```python
    client.margin_v1_post_asset_get_funding_asset(**params)
    ```

	- **POST /sapi/v1/bnbBurn**
    ```python
    client.margin_v1_post_bnb_burn(**params)
    ```

	- **POST /papi/v1/um/order**
    ```python
    client.papi_v1_post_um_order(**params)
    ```

	- **GET /dapi/v1/order/asyn**
    ```python
    client.futures_coin_v1_get_order_asyn(**params)
    ```

	- **GET /sapi/v1/c2c/orderMatch/listUserOrderHistory**
    ```python
    client.margin_v1_get_c2c_order_match_list_user_order_history(**params)
    ```

	- **POST /sapi/v1/simple-earn/flexible/subscribe**
    ```python
    client.margin_v1_post_simple_earn_flexible_subscribe(**params)
    ```

	- **POST /sapi/v1/broker/transfer/futures**
    ```python
    client.margin_v1_post_broker_transfer_futures(**params)
    ```

	- **POST /api/v3/order/cancelReplace**
    ```python
    client.v3_post_order_cancel_replace(**params)
    ```

	- **POST /sapi/v1/sol-staking/sol/stake**
    ```python
    client.margin_v1_post_sol_staking_sol_stake(**params)
    ```

	- **POST /sapi/v1/loan/borrow**
    ```python
    client.margin_v1_post_loan_borrow(**params)
    ```

	- **GET /sapi/v1/managed-subaccount/info**
    ```python
    client.margin_v1_get_managed_subaccount_info(**params)
    ```

	- **POST /sapi/v1/lending/auto-invest/plan/edit-status**
    ```python
    client.margin_v1_post_lending_auto_invest_plan_edit_status(**params)
    ```

	- **GET /fapi/v1/symbolConfig**
    ```python
    client.futures_v1_get_symbol_config(**params)
    ```

	- **GET /sapi/v1/sol-staking/sol/history/unclaimedRewards**
    ```python
    client.margin_v1_get_sol_staking_sol_history_unclaimed_rewards(**params)
    ```

	- **POST /sapi/v1/asset/convert-transfer/queryByPage**
    ```python
    client.margin_v1_post_asset_convert_transfer_query_by_page(**params)
    ```

	- **GET /sapi/v1/sub-account/universalTransfer**
    ```python
    client.margin_v1_get_sub_account_universal_transfer(**params)
    ```

	- **GET /sapi/v1/sol-staking/sol/history/boostRewardsHistory**
    ```python
    client.margin_v1_get_sol_staking_sol_history_boost_rewards_history(**params)
    ```

	- **GET /sapi/v1/lending/auto-invest/one-off/status**
    ```python
    client.margin_v1_get_lending_auto_invest_one_off_status(**params)
    ```

	- **GET /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage**
    ```python
    client.margin_v1_get_asset_ledger_transfer_cloud_mining_query_by_page(**params)
    ```

	- **DELETE /sapi/v1/margin/orderList**
    ```python
    client.margin_v1_delete_margin_order_list(**params)
    ```

	- **GET /sapi/v1/mining/pub/coinList**
    ```python
    client.margin_v1_get_mining_pub_coin_list(**params)
    ```

	- **GET /sapi/v2/loan/flexible/repay/history**
    ```python
    client.margin_v2_get_loan_flexible_repay_history(**params)
    ```

	- **GET /fapi/v3/account**
    ```python
    client.futures_v3_get_account(**params)
    ```

	- **POST /api/v3/sor/order**
    ```python
    client.v3_post_sor_order(**params)
    ```

	- **POST /sapi/v1/capital/deposit/credit-apply**
    ```python
    client.margin_v1_post_capital_deposit_credit_apply(**params)
    ```

	- **PUT /fapi/v1/batchOrder**
    ```python
    client.futures_v1_put_batch_order(**params)
    ```

	- **GET /sapi/v1/fiat/payments**
    ```python
    client.margin_v1_get_fiat_payments(**params)
    ```

	- **GET /api/v3/myPreventedMatches**
    ```python
    client.v3_get_my_prevented_matches(**params)
    ```

	- **GET /dapi/v1/forceOrders**
    ```python
    client.futures_coin_v1_get_force_orders(**params)
    ```

	- **POST /sapi/v1/asset/transfer**
    ```python
    client.margin_v1_post_asset_transfer(**params)
    ```

	- **GET /sapi/v1/mining/statistics/user/list**
    ```python
    client.margin_v1_get_mining_statistics_user_list(**params)
    ```

	- **GET /api/v3/ticker/tradingDay**
    ```python
    client.v3_get_ticker_trading_day(**params)
    ```

	- **GET /sapi/v1/mining/worker/detail**
    ```python
    client.margin_v1_get_mining_worker_detail(**params)
    ```

	- **GET /sapi/v1/managed-subaccount/fetch-future-asset**
    ```python
    client.margin_v1_get_managed_subaccount_fetch_future_asset(**params)
    ```

	- **GET /dapi/v1/pmExchangeInfo**
    ```python
    client.futures_coin_v1_get_pm_exchange_info(**params)
    ```

	- **POST /sapi/v1/convert/getQuote**
    ```python
    client.margin_v1_post_convert_get_quote(**params)
    ```

	- **GET /api/v3/uiKlines**
    ```python
    client.v3_get_ui_klines(**params)
    ```

	- **GET /sapi/v1/margin/rateLimit/order**
    ```python
    client.margin_v1_get_margin_rate_limit_order(**params)
    ```

	- **GET /sapi/v1/localentity/vasp**
    ```python
    client.margin_v1_get_localentity_vasp(**params)
    ```

	- **GET /fapi/v1/commissionRate**
    ```python
    client.futures_v1_get_commission_rate(**params)
    ```

	- **GET /sapi/v1/sol-staking/sol/history/rateHistory**
    ```python
    client.margin_v1_get_sol_staking_sol_history_rate_history(**params)
    ```

	- **POST /sapi/v1/broker/subAccountApi/ipRestriction**
    ```python
    client.margin_v1_post_broker_sub_account_api_ip_restriction(**params)
    ```

	- **GET /eapi/v1/block/user-trades**
    ```python
    client.options_v1_get_block_user_trades(**params)
    ```

	- **GET /dapi/v1/order/asyn/id**
    ```python
    client.futures_coin_v1_get_order_asyn_id(**params)
    ```

	- **GET /sapi/v1/sol-staking/account**
    ```python
    client.margin_v1_get_sol_staking_account(**params)
    ```

	- **GET /sapi/v1/account/info**
    ```python
    client.margin_v1_get_account_info(**params)
    ```

	- **POST /sapi/v1/sub-account/transfer/subToMaster**
    ```python
    client.margin_v1_post_sub_account_transfer_sub_to_master(**params)
    ```

	- **POST /sapi/v1/portfolio/repay-futures-switch**
    ```python
    client.margin_v1_post_portfolio_repay_futures_switch(**params)
    ```

	- **GET /sapi/v1/giftcard/buyCode/token-limit**
    ```python
    client.margin_v1_get_giftcard_buy_code_token_limit(**params)
    ```

	- **GET /sapi/v1/capital/deposit/subHisrec**
    ```python
    client.margin_v1_get_capital_deposit_sub_hisrec(**params)
    ```

	- **POST /sapi/v1/loan/vip/borrow**
    ```python
    client.margin_v1_post_loan_vip_borrow(**params)
    ```

	- **GET /papi/v1/um/order/asyn/id**
    ```python
    client.papi_v1_get_um_order_asyn_id(**params)
    ```

	- **GET /papi/v1/cm/account**
    ```python
    client.papi_v1_get_cm_account(**params)
    ```

	- **DELETE /papi/v1/um/conditional/order**
    ```python
    client.papi_v1_delete_um_conditional_order(**params)
    ```

	- **GET /sapi/v2/loan/flexible/ltv/adjustment/history**
    ```python
    client.margin_v2_get_loan_flexible_ltv_adjustment_history(**params)
    ```

	- **DELETE /eapi/v1/allOpenOrdersByUnderlying**
    ```python
    client.options_v1_delete_all_open_orders_by_underlying(**params)
    ```

	- **PUT /papi/v1/cm/order**
    ```python
    client.papi_v1_put_cm_order(**params)
    ```

	- **GET /sapi/v1/broker/subAccount/futuresSummary**
    ```python
    client.margin_v1_get_broker_sub_account_futures_summary(**params)
    ```

	- **GET /dapi/v1/continuousKlines**
    ```python
    client.futures_coin_v1_get_continuous_klines(**params)
    ```

	- **GET /fapi/v1/accountConfig**
    ```python
    client.futures_v1_get_account_config(**params)
    ```

	- **DELETE /dapi/v1/batchOrders**
    ```python
    client.futures_coin_v1_delete_batch_orders(**params)
    ```

	- **GET /sapi/v1/broker/subAccount/spotSummary**
    ```python
    client.margin_v1_get_broker_sub_account_spot_summary(**params)
    ```

	- **GET /papi/v1/margin/openOrderList**
    ```python
    client.papi_v1_get_margin_open_order_list(**params)
    ```

	- **POST /sapi/v1/sub-account/blvt/enable**
    ```python
    client.margin_v1_post_sub_account_blvt_enable(**params)
    ```

	- **GET /dapi/v1/trade/asyn**
    ```python
    client.futures_coin_v1_get_trade_asyn(**params)
    ```

	- **GET /sapi/v1/algo/spot/historicalOrders**
    ```python
    client.margin_v1_get_algo_spot_historical_orders(**params)
    ```

	- **GET /sapi/v1/loan/vip/repay/history**
    ```python
    client.margin_v1_get_loan_vip_repay_history(**params)
    ```

	- **GET /eapi/v1/openInterest**
    ```python
    client.options_v1_get_open_interest(**params)
    ```

	- **GET /papi/v1/um/adlQuantile**
    ```python
    client.papi_v1_get_um_adl_quantile(**params)
    ```

	- **GET /eapi/v1/account**
    ```python
    client.options_v1_get_account(**params)
    ```

	- **POST /sapi/v1/sub-account/universalTransfer**
    ```python
    client.margin_v1_post_sub_account_universal_transfer(**params)
    ```

	- **GET /papi/v1/margin/allOrderList**
    ```python
    client.papi_v1_get_margin_all_order_list(**params)
    ```

	- **GET /fapi/v2/ticker/price**
    ```python
    client.futures_v2_get_ticker_price(**params)
    ```

	- **GET /sapi/v1/loan/borrow/history**
    ```python
    client.margin_v1_get_loan_borrow_history(**params)
    ```

	- **GET /papi/v1/um/account**
    ```python
    client.papi_v1_get_um_account(**params)
    ```

	- **POST /sapi/v1/lending/auto-invest/redeem**
    ```python
    client.margin_v1_post_lending_auto_invest_redeem(**params)
    ```

	- **POST /sapi/v1/managed-subaccount/deposit**
    ```python
    client.margin_v1_post_managed_subaccount_deposit(**params)
    ```

	- **GET /dapi/v1/fundingRate**
    ```python
    client.futures_coin_v1_get_funding_rate(**params)
    ```

	- **GET /fapi/v1/trade/asyn/id**
    ```python
    client.futures_v1_get_trade_asyn_id(**params)
    ```

	- **DELETE /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList**
    ```python
    client.margin_v1_delete_sub_account_sub_account_api_ip_restriction_ip_list(**params)
    ```

	- **GET /sapi/v1/copyTrading/futures/userStatus**
    ```python
    client.margin_v1_get_copy_trading_futures_user_status(**params)
    ```

	- **GET /papi/v1/um/income**
    ```python
    client.papi_v1_get_um_income(**params)
    ```

	- **GET /papi/v1/um/openOrders**
    ```python
    client.papi_v1_get_um_open_orders(**params)
    ```

	- **GET /eapi/v1/marginAccount**
    ```python
    client.options_v1_get_margin_account(**params)
    ```

	- **GET /dapi/v1/premiumIndex**
    ```python
    client.futures_coin_v1_get_premium_index(**params)
    ```

	- **POST /sapi/v1/localentity/withdraw/apply**
    ```python
    client.margin_v1_post_localentity_withdraw_apply(**params)
    ```

	- **GET /sapi/v1/margin/orderList**
    ```python
    client.margin_v1_get_margin_order_list(**params)
    ```

	- **GET /papi/v1/um/feeBurn**
    ```python
    client.papi_v1_get_um_fee_burn(**params)
    ```

	- **GET /fapi/v1/multiAssetsMargin**
    ```python
    client.futures_v1_get_multi_assets_margin(**params)
    ```

	- **GET /sapi/v1/giftcard/verify**
    ```python
    client.margin_v1_get_giftcard_verify(**params)
    ```

	- **GET /sapi/v1/asset/wallet/balance**
    ```python
    client.margin_v1_get_asset_wallet_balance(**params)
    ```

	- **POST /sapi/v1/algo/futures/newOrderTwap**
    ```python
    client.margin_v1_post_algo_futures_new_order_twap(**params)
    ```

	- **GET /sapi/v1/margin/crossMarginCollateralRatio**
    ```python
    client.margin_v1_get_margin_cross_margin_collateral_ratio(**params)
    ```

	- **POST /sapi/v2/eth-staking/eth/stake**
    ```python
    client.margin_v2_post_eth_staking_eth_stake(**params)
    ```

	- **POST /sapi/v1/loan/flexible/repay/history**
    ```python
    client.margin_v1_post_loan_flexible_repay_history(**params)
    ```

	- **GET /dapi/v1/exchangeInfo**
    ```python
    client.futures_coin_v1_get_exchange_info(**params)
    ```

	- **POST /sapi/v1/sub-account/futures/enable**
    ```python
    client.margin_v1_post_sub_account_futures_enable(**params)
    ```

	- **GET /sapi/v1/lending/auto-invest/index/info**
    ```python
    client.margin_v1_get_lending_auto_invest_index_info(**params)
    ```

	- **GET /sapi/v2/sub-account/futures/positionRisk**
    ```python
    client.margin_v2_get_sub_account_futures_position_risk(**params)
    ```

	- **GET /sapi/v1/sub-account/margin/account**
    ```python
    client.margin_v1_get_sub_account_margin_account(**params)
    ```

	- **GET /papi/v1/rateLimit/order**
    ```python
    client.papi_v1_get_rate_limit_order(**params)
    ```

	- **GET /sapi/v1/sol-staking/sol/history/redemptionHistory**
    ```python
    client.margin_v1_get_sol_staking_sol_history_redemption_history(**params)
    ```

	- **GET /fapi/v1/markPriceKlines**
    ```python
    client.futures_v1_get_mark_price_klines(**params)
    ```

	- **GET /sapi/v1/broker/rebate/futures/recentRecord**
    ```python
    client.margin_v1_get_broker_rebate_futures_recent_record(**params)
    ```

	- **GET /sapi/v3/broker/subAccount/futuresSummary**
    ```python
    client.margin_v3_get_broker_sub_account_futures_summary(**params)
    ```

	- **GET /dapi/v1/aggTrades**
    ```python
    client.futures_coin_v1_get_agg_trades(**params)
    ```

	- **GET /eapi/v1/exchangeInfo**
    ```python
    client.options_v1_get_exchange_info(**params)
    ```

	- **GET /sapi/v1/lending/auto-invest/target-asset/roi/list**
    ```python
    client.margin_v1_get_lending_auto_invest_target_asset_roi_list(**params)
    ```

	- **GET /sapi/v1/broker/universalTransfer**
    ```python
    client.margin_v1_get_broker_universal_transfer(**params)
    ```

	- **POST /sapi/v1/sub-account/futures/transfer**
    ```python
    client.margin_v1_post_sub_account_futures_transfer(**params)
    ```

	- **PUT /fapi/v1/batchOrders**
    ```python
    client.futures_v1_put_batch_orders(**params)
    ```

	- **POST /eapi/v1/countdownCancelAllHeartBeat**
    ```python
    client.options_v1_post_countdown_cancel_all_heart_beat(**params)
    ```

	- **GET /sapi/v1/loan/collateral/data**
    ```python
    client.margin_v1_get_loan_collateral_data(**params)
    ```

	- **GET /sapi/v1/margin/borrow-repay**
    ```python
    client.margin_v1_get_margin_borrow_repay(**params)
    ```

	- **GET /sapi/v1/loan/repay/history**
    ```python
    client.margin_v1_get_loan_repay_history(**params)
    ```

	- **GET /dapi/v2/leverageBracket**
    ```python
    client.futures_coin_v2_get_leverage_bracket(**params)
    ```

	- **GET /fapi/v1/indexPriceKlines**
    ```python
    client.futures_v1_get_index_price_klines(**params)
    ```

	- **POST /sapi/v1/convert/limit/placeOrder**
    ```python
    client.margin_v1_post_convert_limit_place_order(**params)
    ```

	- **GET /fapi/v1/convert/exchangeInfo**
    ```python
    client.futures_v1_get_convert_exchange_info(**params)
    ```

	- **GET /dapi/v1/historicalTrades**
    ```python
    client.futures_coin_v1_get_historical_trades(**params)
    ```

	- **DELETE /sapi/v1/broker/subAccountApi/ipRestriction/ipList**
    ```python
    client.margin_v1_delete_broker_sub_account_api_ip_restriction_ip_list(**params)
    ```

	- **GET /sapi/v1/staking/personalLeftQuota**
    ```python
    client.margin_v1_get_staking_personal_left_quota(**params)
    ```

	- **POST /sapi/v1/sub-account/virtualSubAccount**
    ```python
    client.margin_v1_post_sub_account_virtual_sub_account(**params)
    ```

	- **GET /sapi/v1/staking/position**
    ```python
    client.margin_v1_get_staking_position(**params)
    ```

	- **GET /papi/v1/um/income/asyn/id**
    ```python
    client.papi_v1_get_um_income_asyn_id(**params)
    ```

	- **PUT /sapi/v1/localentity/deposit/provide-info**
    ```python
    client.margin_v1_put_localentity_deposit_provide_info(**params)
    ```

	- **POST /sapi/v1/portfolio/mint**
    ```python
    client.margin_v1_post_portfolio_mint(**params)
    ```

	- **POST /sapi/v1/sub-account/transfer/subToSub**
    ```python
    client.margin_v1_post_sub_account_transfer_sub_to_sub(**params)
    ```

	- **GET /fapi/v1/orderAmendment**
    ```python
    client.futures_v1_get_order_amendment(**params)
    ```

	- **POST /sapi/v1/sol-staking/sol/claim**
    ```python
    client.margin_v1_post_sol_staking_sol_claim(**params)
    ```

	- **GET /sapi/v1/account/apiRestrictions**
    ```python
    client.margin_v1_get_account_api_restrictions(**params)
    ```

	- **GET /papi/v1/um/allOrders**
    ```python
    client.papi_v1_get_um_all_orders(**params)
    ```

	- **POST /sapi/v1/giftcard/createCode**
    ```python
    client.margin_v1_post_giftcard_create_code(**params)
    ```

	- **GET /sapi/v1/lending/auto-invest/rebalance/history**
    ```python
    client.margin_v1_get_lending_auto_invest_rebalance_history(**params)
    ```

	- **GET /sapi/v1/loan/repay/collateral/rate**
    ```python
    client.margin_v1_get_loan_repay_collateral_rate(**params)
    ```

	- **GET /sapi/v1/mining/payment/uid**
    ```python
    client.margin_v1_get_mining_payment_uid(**params)
    ```

	- **GET /sapi/v2/loan/flexible/borrow/history**
    ```python
    client.margin_v2_get_loan_flexible_borrow_history(**params)
    ```

	- **POST /sapi/v1/asset/dust**
    ```python
    client.margin_v1_post_asset_dust(**params)
    ```

	- **GET /sapi/v1/capital/contract/convertible-coins**
    ```python
    client.margin_v1_get_capital_contract_convertible_coins(**params)
    ```

	- **POST /sapi/v1/asset/dust-btc**
    ```python
    client.margin_v1_post_asset_dust_btc(**params)
    ```

	- **GET /papi/v1/um/conditional/openOrders**
    ```python
    client.papi_v1_get_um_conditional_open_orders(**params)
    ```

	- **GET /sapi/v1/sub-account/spotSummary**
    ```python
    client.margin_v1_get_sub_account_spot_summary(**params)
    ```

	- **POST /sapi/v1/broker/subAccountApi/permission/vanillaOptions**
    ```python
    client.margin_v1_post_broker_sub_account_api_permission_vanilla_options(**params)
    ```

	- **GET /sapi/v1/lending/auto-invest/redeem/history**
    ```python
    client.margin_v1_get_lending_auto_invest_redeem_history(**params)
    ```

	- **GET /fapi/v3/positionRisk**
    ```python
    client.futures_v3_get_position_risk(**params)
    ```

	- **GET /dapi/v1/klines**
    ```python
    client.futures_coin_v1_get_klines(**params)
    ```

	- **GET /sapi/v2/localentity/withdraw/history**
    ```python
    client.margin_v2_get_localentity_withdraw_history(**params)
    ```

	- **GET /sapi/v1/eth-staking/eth/history/redemptionHistory**
    ```python
    client.margin_v1_get_eth_staking_eth_history_redemption_history(**params)
    ```

	- **POST /eapi/v1/transfer**
    ```python
    client.options_v1_post_transfer(**params)
    ```

	- **GET /fapi/v1/feeBurn**
    ```python
    client.futures_v1_get_fee_burn(**params)
    ```

	- **GET /sapi/v1/lending/auto-invest/index/user-summary**
    ```python
    client.margin_v1_get_lending_auto_invest_index_user_summary(**params)
    ```

	- **POST /sapi/v2/loan/flexible/borrow**
    ```python
    client.margin_v2_post_loan_flexible_borrow(**params)
    ```

	- **DELETE /dapi/v1/order**
    ```python
    client.futures_coin_v1_delete_order(**params)
    ```

	- **POST /sapi/v3/asset/getUserAsset**
    ```python
    client.margin_v3_post_asset_get_user_asset(**params)
    ```

	- **POST /sapi/v1/loan/vip/repay**
    ```python
    client.margin_v1_post_loan_vip_repay(**params)
    ```

	- **GET /sapi/v2/sub-account/futures/accountSummary**
    ```python
    client.margin_v2_get_sub_account_futures_account_summary(**params)
    ```

	- **GET /dapi/v1/commissionRate**
    ```python
    client.futures_coin_v1_get_commission_rate(**params)
    ```

	- **GET /papi/v1/um/conditional/orderHistory**
    ```python
    client.papi_v1_get_um_conditional_order_history(**params)
    ```

	- **GET /fapi/v3/balance**
    ```python
    client.futures_v3_get_balance(**params)
    ```

	- **GET /sapi/v1/convert/assetInfo**
    ```python
    client.margin_v1_get_convert_asset_info(**params)
    ```

	- **POST /api/v3/sor/order/test**
    ```python
    client.v3_post_sor_order_test(**params)
    ```

	- **GET /sapi/v1/giftcard/cryptography/rsa-public-key**
    ```python
    client.margin_v1_get_giftcard_cryptography_rsa_public_key(**params)
    ```

	- **POST /sapi/v1/broker/universalTransfer**
    ```python
    client.margin_v1_post_broker_universal_transfer(**params)
    ```

	- **GET /dapi/v1/allOrders**
    ```python
    client.futures_coin_v1_get_all_orders(**params)
    ```

	- **POST /sapi/v1/margin/borrow-repay**
    ```python
    client.margin_v1_post_margin_borrow_repay(**params)
    ```

	- **GET /fapi/v1/assetIndex**
    ```python
    client.futures_v1_get_asset_index(**params)
    ```

	- **GET /api/v3/rateLimit/order**
    ```python
    client.v3_get_rate_limit_order(**params)
    ```

	- **GET /papi/v1/um/orderAmendment**
    ```python
    client.papi_v1_get_um_order_amendment(**params)
    ```

	- **GET /sapi/v1/account/apiRestrictions/ipRestriction**
    ```python
    client.margin_v1_get_account_api_restrictions_ip_restriction(**params)
    ```

	- **POST /sapi/v1/broker/subAccount/bnbBurn/spot**
    ```python
    client.margin_v1_post_broker_sub_account_bnb_burn_spot(**params)
    ```

	- **POST /papi/v1/um/conditional/order**
    ```python
    client.papi_v1_post_um_conditional_order(**params)
    ```

	- **PUT /dapi/v1/batchOrders**
    ```python
    client.futures_coin_v1_put_batch_orders(**params)
    ```

	- **DELETE /api/v3/openOrders**
    ```python
    client.v3_delete_open_orders(**params)
    ```

	- **GET /sapi/v1/margin/delist-schedule**
    ```python
    client.margin_v1_get_margin_delist_schedule(**params)
    ```

	- **POST /sapi/v1/broker/subAccountApi/permission/universalTransfer**
    ```python
    client.margin_v1_post_broker_sub_account_api_permission_universal_transfer(**params)
    ```

	- **GET /papi/v1/cm/positionRisk**
    ```python
    client.papi_v1_get_cm_position_risk(**params)
    ```

	- **GET /papi/v1/cm/income**
    ```python
    client.papi_v1_get_cm_income(**params)
    ```

	- **POST /sapi/v1/giftcard/buyCode**
    ```python
    client.margin_v1_post_giftcard_buy_code(**params)
    ```

	- **GET /fapi/v1/balance**
    ```python
    client.futures_v1_get_balance(**params)
    ```

	- **GET /api/v3/myAllocations**
    ```python
    client.v3_get_my_allocations(**params)
    ```

	- **GET /papi/v1/margin/order**
    ```python
    client.papi_v1_get_margin_order(**params)
    ```

	- **GET /sapi/v1/loan/ltv/adjustment/history**
    ```python
    client.margin_v1_get_loan_ltv_adjustment_history(**params)
    ```

	- **POST /dapi/v1/batchOrders**
    ```python
    client.futures_coin_v1_post_batch_orders(**params)
    ```

	- **GET /sapi/v1/localentity/withdraw/history**
    ```python
    client.margin_v1_get_localentity_withdraw_history(**params)
    ```

	- **GET /sapi/v1/sub-account/status**
    ```python
    client.margin_v1_get_sub_account_status(**params)
    ```

	- **POST /sapi/v2/sub-account/subAccountApi/ipRestriction**
    ```python
    client.margin_v2_post_sub_account_sub_account_api_ip_restriction(**params)
    ```

	- **GET /dapi/v1/trade/asyn/id**
    ```python
    client.futures_coin_v1_get_trade_asyn_id(**params)
    ```

	- **GET /fapi/v1/rateLimit/order**
    ```python
    client.futures_v1_get_rate_limit_order(**params)
    ```

	- **GET /sapi/v1/broker/subAccountApi/commission/futures**
    ```python
    client.margin_v1_get_broker_sub_account_api_commission_futures(**params)
    ```

	- **GET /sapi/v1/sol-staking/sol/history/stakingHistory**
    ```python
    client.margin_v1_get_sol_staking_sol_history_staking_history(**params)
    ```

	- **DELETE /sapi/v1/algo/spot/order**
    ```python
    client.margin_v1_delete_algo_spot_order(**params)
    ```

	- **GET /papi/v1/repay-futures-switch**
    ```python
    client.papi_v1_get_repay_futures_switch(**params)
    ```

	- **POST /sapi/v1/margin/max-leverage**
    ```python
    client.margin_v1_post_margin_max_leverage(**params)
    ```

	- **DELETE /sapi/v1/account/apiRestrictions/ipRestriction/ipList**
    ```python
    client.margin_v1_delete_account_api_restrictions_ip_restriction_ip_list(**params)
    ```

	- **POST /sapi/v1/capital/contract/convertible-coins**
    ```python
    client.margin_v1_post_capital_contract_convertible_coins(**params)
    ```

	- **GET /sapi/v1/managed-subaccount/marginAsset**
    ```python
    client.margin_v1_get_managed_subaccount_margin_asset(**params)
    ```

	- **GET /sapi/v3/sub-account/assets**
    ```python
    client.margin_v3_get_sub_account_assets(**params)
    ```

	- **GET /fapi/v1/continuousKlines**
    ```python
    client.futures_v1_get_continuous_klines(**params)
    ```

	- **GET /sapi/v1/sub-account/futures/internalTransfer**
    ```python
    client.margin_v1_get_sub_account_futures_internal_transfer(**params)
    ```

	- **GET /sapi/v1/capital/withdraw/apply**
    ```python
    client.margin_v1_get_capital_withdraw_apply(**params)
    ```

	- **POST /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList**
    ```python
    client.margin_v1_post_sub_account_sub_account_api_ip_restriction_ip_list(**params)
    ```

	- **POST /sapi/v1/staking/setAutoStaking**
    ```python
    client.margin_v1_post_staking_set_auto_staking(**params)
    ```

	- **POST /fapi/v1/feeBurn**
    ```python
    client.futures_v1_post_fee_burn(**params)
    ```

	- **POST /sapi/v1/simple-earn/flexible/redeem**
    ```python
    client.margin_v1_post_simple_earn_flexible_redeem(**params)
    ```

	- **GET /sapi/v1/broker/subAccount/marginSummary**
    ```python
    client.margin_v1_get_broker_sub_account_margin_summary(**params)
    ```

	- **GET /sapi/v1/lending/auto-invest/plan/list**
    ```python
    client.margin_v1_get_lending_auto_invest_plan_list(**params)
    ```

	- **GET /sapi/v1/loan/vip/loanable/data**
    ```python
    client.margin_v1_get_loan_vip_loanable_data(**params)
    ```

	- **POST /sapi/v1/margin/exchange-small-liability**
    ```python
    client.margin_v1_post_margin_exchange_small_liability(**params)
    ```

	- **GET /sapi/v2/loan/flexible/collateral/data**
    ```python
    client.margin_v2_get_loan_flexible_collateral_data(**params)
    ```

	- **POST /papi/v1/margin/repay-debt**
    ```python
    client.papi_v1_post_margin_repay_debt(**params)
    ```

	- **GET /sapi/v1/sol-staking/sol/history/bnsolRewardsHistory**
    ```python
    client.margin_v1_get_sol_staking_sol_history_bnsol_rewards_history(**params)
    ```

	- **GET /sapi/v1/convert/limit/queryOpenOrders**
    ```python
    client.margin_v1_get_convert_limit_query_open_orders(**params)
    ```

	- **GET /api/v3/account/commission**
    ```python
    client.v3_get_account_commission(**params)
    ```

	- **GET /sapi/v1/margin/interestRateHistory**
    ```python
    client.margin_v1_get_margin_interest_rate_history(**params)
    ```

	- **POST /api/v3/orderList/oco**
    ```python
    client.v3_post_order_list_oco(**params)
    ```

	- **GET /sapi/v1/managed-subaccount/query-trans-log**
    ```python
    client.margin_v1_get_managed_subaccount_query_trans_log(**params)
    ```

	- **POST /sapi/v2/broker/subAccountApi/ipRestriction**
    ```python
    client.margin_v2_post_broker_sub_account_api_ip_restriction(**params)
    ```

	- **GET /papi/v1/um/positionRisk**
    ```python
    client.papi_v1_get_um_position_risk(**params)
    ```

	- **POST /sapi/v1/sub-account/margin/transfer**
    ```python
    client.margin_v1_post_sub_account_margin_transfer(**params)
    ```

	- **GET /fapi/v1/positionRisk**
    ```python
    client.futures_v1_get_position_risk(**params)
    ```

	- **GET /sapi/v1/lending/auto-invest/all/asset**
    ```python
    client.margin_v1_get_lending_auto_invest_all_asset(**params)
    ```

	- **POST /fapi/v1/convert/acceptQuote**
    ```python
    client.futures_v1_post_convert_accept_quote(**params)
    ```

	- **GET /sapi/v1/spot/delist-schedule**
    ```python
    client.margin_v1_get_spot_delist_schedule(**params)
    ```

	- **GET /sapi/v1/dci/product/accounts**
    ```python
    client.margin_v1_get_dci_product_accounts(**params)
    ```

	- **GET /sapi/v1/sub-account/subAccountApi/ipRestriction**
    ```python
    client.margin_v1_get_sub_account_sub_account_api_ip_restriction(**params)
    ```

	- **GET /papi/v1/um/accountConfig**
    ```python
    client.papi_v1_get_um_account_config(**params)
    ```

	- **GET /papi/v1/cm/adlQuantile**
    ```python
    client.papi_v1_get_cm_adl_quantile(**params)
    ```

	- **GET /sapi/v1/sub-account/transaction-statistics**
    ```python
    client.margin_v1_get_sub_account_transaction_statistics(**params)
    ```

	- **PUT /fapi/v1/listenKey**
    ```python
    client.futures_v1_put_listen_key(**params)
    ```

	- **GET /sapi/v1/margin/openOrderList**
    ```python
    client.margin_v1_get_margin_open_order_list(**params)
    ```

	- **GET /api/v3/acccount**
    ```python
    client.v3_get_acccount(**params)
    ```

	- **GET /sapi/v1/fiat/orders**
    ```python
    client.margin_v1_get_fiat_orders(**params)
    ```

	- **GET /papi/v1/margin/allOrders**
    ```python
    client.papi_v1_get_margin_all_orders(**params)
    ```

	- **POST /sapi/v1/sub-account/margin/enable**
    ```python
    client.margin_v1_post_sub_account_margin_enable(**params)
    ```

	- **GET /sapi/v1/managed-subaccount/deposit/address**
    ```python
    client.margin_v1_get_managed_subaccount_deposit_address(**params)
    ```

	- **DELETE /sapi/v1/margin/isolated/account**
    ```python
    client.margin_v1_delete_margin_isolated_account(**params)
    ```

	- **GET /sapi/v2/portfolio/account**
    ```python
    client.margin_v2_get_portfolio_account(**params)
    ```

	- **GET /sapi/v1/simple-earn/locked/history/redemptionRecord**
    ```python
    client.margin_v1_get_simple_earn_locked_history_redemption_record(**params)
    ```

	- **GET /fapi/v1/order/asyn/id**
    ```python
    client.futures_v1_get_order_asyn_id(**params)
    ```

	- **POST /sapi/v1/managed-subaccount/withdraw**
    ```python
    client.margin_v1_post_managed_subaccount_withdraw(**params)
    ```

	- **GET /sapi/v1/convert/tradeFlow**
    ```python
    client.margin_v1_get_convert_trade_flow(**params)
    ```

	- **GET /sapi/v1/localentity/deposit/history**
    ```python
    client.margin_v1_get_localentity_deposit_history(**params)
    ```

	- **POST /sapi/v1/eth-staking/wbeth/wrap**
    ```python
    client.margin_v1_post_eth_staking_wbeth_wrap(**params)
    ```

	- **POST /sapi/v1/simple-earn/locked/setRedeemOption**
    ```python
    client.margin_v1_post_simple_earn_locked_set_redeem_option(**params)
    ```

	- **POST /sapi/v1/broker/subAccountApi/ipRestriction/ipList**
    ```python
    client.margin_v1_post_broker_sub_account_api_ip_restriction_ip_list(**params)
    ```

	- **POST /sapi/v1/broker/subAccountApi/commission/futures**
    ```python
    client.margin_v1_post_broker_sub_account_api_commission_futures(**params)
    ```

	- **GET /papi/v1/margin/myTrades**
    ```python
    client.papi_v1_get_margin_my_trades(**params)
    ```

	- **GET /sapi/v1/pay/transactions**
    ```python
    client.margin_v1_get_pay_transactions(**params)
    ```

	- **GET /papi/v1/um/leverageBracket**
    ```python
    client.papi_v1_get_um_leverage_bracket(**params)
    ```

	- **GET /papi/v1/margin/orderList**
    ```python
    client.papi_v1_get_margin_order_list(**params)
    ```

	- **GET /dapi/v1/allForceOrders**
    ```python
    client.futures_coin_v1_get_all_force_orders(**params)
    ```

	- **GET /sapi/v1/margin/isolated/accountLimit**
    ```python
    client.margin_v1_get_margin_isolated_account_limit(**params)
    ```

	- **GET /sapi/v1/lending/auto-invest/history/list**
    ```python
    client.margin_v1_get_lending_auto_invest_history_list(**params)
    ```

	- **GET /dapi/v1/account**
    ```python
    client.futures_coin_v1_get_account(**params)
    ```

	- **GET /dapi/v1/markPriceKlines**
    ```python
    client.futures_coin_v1_get_mark_price_klines(**params)
    ```

	- **POST /sapi/v1/loan/customize/margin_call**
    ```python
    client.margin_v1_post_loan_customize_margin_call(**params)
    ```

	- **GET /sapi/v1/broker/subAccount/bnbBurn/status**
    ```python
    client.margin_v1_get_broker_sub_account_bnb_burn_status(**params)
    ```

	- **DELETE /eapi/v1/block/order/create**
    ```python
    client.options_v1_delete_block_order_create(**params)
    ```

	- **GET /sapi/v1/managed-subaccount/accountSnapshot**
    ```python
    client.margin_v1_get_managed_subaccount_account_snapshot(**params)
    ```

	- **GET /fapi/v1/constituents**
    ```python
    client.futures_v1_get_constituents(**params)
    ```

	- **GET /dapi/v1/indexPriceKlines**
    ```python
    client.futures_coin_v1_get_index_price_klines(**params)
    ```

	- **GET /sapi/v1/broker/subAccountApi/commission/coinFutures**
    ```python
    client.margin_v1_get_broker_sub_account_api_commission_coin_futures(**params)
    ```

	- **GET /sapi/v2/broker/subAccount/futuresSummary**
    ```python
    client.margin_v2_get_broker_sub_account_futures_summary(**params)
    ```

	- **GET /sapi/v1/sub-account/transfer/subUserHistory**
    ```python
    client.margin_v1_get_sub_account_transfer_sub_user_history(**params)
    ```

	- **POST /sapi/v1/sub-account/futures/internalTransfer**
    ```python
    client.margin_v1_post_sub_account_futures_internal_transfer(**params)
    ```

	- **GET /sapi/v1/loan/ongoing/orders**
    ```python
    client.margin_v1_get_loan_ongoing_orders(**params)
    ```

	- **GET /sapi/v2/loan/flexible/ongoing/orders**
    ```python
    client.margin_v2_get_loan_flexible_ongoing_orders(**params)
    ```

	- **GET /eapi/v1/block/order/execute**
    ```python
    client.options_v1_get_block_order_execute(**params)
    ```

	- **GET /papi/v2/um/account**
    ```python
    client.papi_v2_get_um_account(**params)
    ```

	- **POST /sapi/v1/margin/order/oco**
    ```python
    client.margin_v1_post_margin_order_oco(**params)
    ```

	- **GET /api/v1/portfolio/negative-balance-exchange-record**
    ```python
    client.v1_get_portfolio_negative_balance_exchange_record(**params)
    ```

	- **POST /sapi/v1/algo/futures/newOrderVp**
    ```python
    client.margin_v1_post_algo_futures_new_order_vp(**params)
    ```

	- **DELETE /papi/v1/um/order**
    ```python
    client.papi_v1_delete_um_order(**params)
    ```

	- **POST /fapi/v1/convert/getQuote**
    ```python
    client.futures_v1_post_convert_get_quote(**params)
    ```

	- **GET /sapi/v1/algo/spot/subOrders**
    ```python
    client.margin_v1_get_algo_spot_sub_orders(**params)
    ```

	- **GET /dapi/v1/userTrades**
    ```python
    client.futures_coin_v1_get_user_trades(**params)
    ```

	- **POST /papi/v1/um/feeBurn**
    ```python
    client.papi_v1_post_um_fee_burn(**params)
    ```

	- **POST /sapi/v1/portfolio/redeem**
    ```python
    client.margin_v1_post_portfolio_redeem(**params)
    ```

	- **POST /fapi/v1/multiAssetsMargin**
    ```python
    client.futures_v1_post_multi_assets_margin(**params)
    ```

	- **POST /sapi/v1/lending/auto-invest/plan/add**
    ```python
    client.margin_v1_post_lending_auto_invest_plan_add(**params)
    ```

	- **GET /eapi/v1/historyOrders**
    ```python
    client.options_v1_get_history_orders(**params)
    ```

	- **GET /sapi/v1/lending/auto-invest/source-asset/list**
    ```python
    client.margin_v1_get_lending_auto_invest_source_asset_list(**params)
    ```

	- **GET /sapi/v1/margin/allOrderList**
    ```python
    client.margin_v1_get_margin_all_order_list(**params)
    ```

	- **POST /sapi/v1/eth-staking/eth/redeem**
    ```python
    client.margin_v1_post_eth_staking_eth_redeem(**params)
    ```

	- **GET /sapi/v1/broker/rebate/historicalRecord**
    ```python
    client.margin_v1_get_broker_rebate_historical_record(**params)
    ```

	- **GET /sapi/v1/simple-earn/locked/history/subscriptionRecord**
    ```python
    client.margin_v1_get_simple_earn_locked_history_subscription_record(**params)
    ```

	- **PUT /dapi/v1/order**
    ```python
    client.futures_coin_v1_put_order(**params)
    ```

	- **GET /sapi/v1/managed-subaccount/asset**
    ```python
    client.margin_v1_get_managed_subaccount_asset(**params)
    ```

	- **GET /sapi/v1/sol-staking/sol/quota**
    ```python
    client.margin_v1_get_sol_staking_sol_quota(**params)
    ```

	- **POST /sapi/v1/loan/vip/renew**
    ```python
    client.margin_v1_post_loan_vip_renew(**params)
    ```

	- **POST /dapi/v1/order**
    ```python
    client.futures_coin_v1_post_order(**params)
    ```

	- **GET /sapi/v1/managed-subaccount/queryTransLogForTradeParent**
    ```python
    client.margin_v1_get_managed_subaccount_query_trans_log_for_trade_parent(**params)
    ```

	- **GET /sapi/v1/simple-earn/flexible/history/redemptionRecord**
    ```python
    client.margin_v1_get_simple_earn_flexible_history_redemption_record(**params)
    ```

	- **GET /sapi/v1/sub-account/margin/accountSummary**
    ```python
    client.margin_v1_get_sub_account_margin_account_summary(**params)
    ```

	- **GET /sapi/v1/margin/dribblet**
    ```python
    client.margin_v1_get_margin_dribblet(**params)
    ```

	- **GET /eapi/v1/exerciseHistory**
    ```python
    client.options_v1_get_exercise_history(**params)
    ```

	- **GET /sapi/v1/convert/exchangeInfo**
    ```python
    client.margin_v1_get_convert_exchange_info(**params)
    ```

	- **GET /sapi/v1/eth-staking/eth/history/wbethRewardsHistory**
    ```python
    client.margin_v1_get_eth_staking_eth_history_wbeth_rewards_history(**params)
    ```

	- **GET /sapi/v1/simple-earn/locked/position**
    ```python
    client.margin_v1_get_simple_earn_locked_position(**params)
    ```

	- **GET /sapi/v1/mining/pub/algoList**
    ```python
    client.margin_v1_get_mining_pub_algo_list(**params)
    ```

	- **GET /dapi/v1/ticker/bookTicker**
    ```python
    client.futures_coin_v1_get_ticker_book_ticker(**params)
    ```

	- **GET /eapi/v1/blockTrades**
    ```python
    client.options_v1_get_block_trades(**params)
    ```

	- **GET /sapi/v1/copyTrading/futures/leadSymbol**
    ```python
    client.margin_v1_get_copy_trading_futures_lead_symbol(**params)
    ```

	- **GET /papi/v1/cm/orderAmendment**
    ```python
    client.papi_v1_get_cm_order_amendment(**params)
    ```

	- **GET /sapi/v4/sub-account/assets**
    ```python
    client.margin_v4_get_sub_account_assets(**params)
    ```

	- **GET /sapi/v1/mining/worker/list**
    ```python
    client.margin_v1_get_mining_worker_list(**params)
    ```

	- **DELETE /sapi/v1/margin/openOrders**
    ```python
    client.margin_v1_delete_margin_open_orders(**params)
    ```

	- **GET /dapi/v1/constituents**
    ```python
    client.futures_coin_v1_get_constituents(**params)
    ```

	- **GET /sapi/v1/dci/product/list**
    ```python
    client.margin_v1_get_dci_product_list(**params)
    ```

	- **GET /fapi/v1/convert/orderStatus**
    ```python
    client.futures_v1_get_convert_order_status(**params)
    ```



================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2017 sammchardy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: PYPIREADME.rst
================================================
.. image:: https://img.shields.io/pypi/v/python-binance.svg
    :target: https://pypi.python.org/pypi/python-binance

.. image:: https://img.shields.io/pypi/l/python-binance.svg
    :target: https://pypi.python.org/pypi/python-binance

.. image:: https://img.shields.io/travis/sammchardy/python-binance.svg
    :target: https://travis-ci.org/sammchardy/python-binance

.. image:: https://img.shields.io/coveralls/sammchardy/python-binance.svg
    :target: https://coveralls.io/github/sammchardy/python-binance

.. image:: https://img.shields.io/pypi/wheel/python-binance.svg
    :target: https://pypi.python.org/pypi/python-binance

.. image:: https://img.shields.io/pypi/pyversions/python-binance.svg
    :target: https://pypi.python.org/pypi/python-binance

This is an unofficial Python wrapper for the `Binance exchange REST API v3 <https://binance-docs.github.io/apidocs/spot/en>`_. I am in no way affiliated with Binance, use at your own risk.

If you came here looking for the `Binance exchange <https://www.binance.com/?ref=10099792>`_ to purchase cryptocurrencies, then `go here <https://www.binance.com/?ref=10099792>`_.
If you want to automate interactions with Binance stick around.

If you're interested in Binance's new DEX Binance Chain see my `python-binance-chain library <https://github.com/sammchardy/python-binance-chain>`_

Source code
  https://github.com/sammchardy/python-binance

Documentation
  https://python-binance.readthedocs.io/en/latest/

Binance API Telegram
  https://t.me/binance_api_english

Blog with examples including async
  https://sammchardy.github.io

- `Async basics for Binance <https://sammchardy.github.io/binance/2021/05/01/async-binance-basics.html>`_
- `Understanding Binance Order Filters <https://sammchardy.github.io/binance/2021/05/03/binance-order-filters.html>`_

Make sure you update often and check the `Changelog <https://python-binance.readthedocs.io/en/latest/changelog.html>`_ for new features and bug fixes.

Features
--------

- Implementation of all General, Market Data and Account endpoints.
- Asyncio implementation
- Testnet support for Spot, Futures and Vanilla Options
- Simple handling of authentication include RSA keys
- No need to generate timestamps yourself, the wrapper does it for you
- Response exception handling
- Websocket handling with reconnection and multiplexed connections
- Symbol Depth Cache
- Historical Kline/Candle fetching function
- Withdraw functionality
- Deposit addresses
- Margin Trading
- Futures Trading
- Vanilla Options
- Support other domains (.us, .jp, etc)

Upgrading to v1.0.0+
--------------------

The breaking changes include the migration from wapi to sapi endpoints which related to the
wallet endpoints detailed in the `Binance Docs <https://binance-docs.github.io/apidocs/spot/en/#wallet-endpoints>`_

The other breaking change is for websocket streams and the Depth Cache Manager which have been
converted to use Asynchronous Context Managers. See examples in the Async section below or view the
`websockets <https://python-binance.readthedocs.io/en/latest/websockets.html>`_ and
`depth cache <https://python-binance.readthedocs.io/en/latest/depth_cache.html>`_ docs.

Quick Start
-----------

`Register an account with Binance <https://accounts.binance.com/en/register?ref=10099792>`_.

`Generate an API Key <https://www.binance.com/en/my/settings/api-management>`_ and assign relevant permissions.

If you are using an exchange from the US, Japan or other TLD then make sure pass `tld='us'` when creating the
client.

To use the `Spot <https://testnet.binance.vision/>`_ or `Vanilla Options <https://testnet.binanceops.com/>`_ Testnet,
pass `testnet=True` when creating the client.


.. code:: bash

    pip install python-binance


.. code:: python

    from binance import Client, ThreadedWebsocketManager, ThreadedDepthCacheManager
    client = Client(api_key, api_secret)

    # get market depth
    depth = client.get_order_book(symbol='BNBBTC')

    # place a test market buy order, to place an actual order use the create_order function
    order = client.create_test_order(
        symbol='BNBBTC',
        side=Client.SIDE_BUY,
        type=Client.ORDER_TYPE_MARKET,
        quantity=100)

    # get all symbol prices
    prices = client.get_all_tickers()

    # withdraw 100 ETH
    # check docs for assumptions around withdrawals
    from binance.exceptions import BinanceAPIException
    try:
        result = client.withdraw(
            asset='ETH',
            address='<eth_address>',
            amount=100)
    except BinanceAPIException as e:
        print(e)
    else:
        print("Success")

    # fetch list of withdrawals
    withdraws = client.get_withdraw_history()

    # fetch list of ETH withdrawals
    eth_withdraws = client.get_withdraw_history(coin='ETH')

    # get a deposit address for BTC
    address = client.get_deposit_address(coin='BTC')

    # get historical kline data from any date range

    # fetch 1 minute klines for the last day up until now
    klines = client.get_historical_klines("BNBBTC", Client.KLINE_INTERVAL_1MINUTE, "1 day ago UTC")

    # fetch 30 minute klines for the last month of 2017
    klines = client.get_historical_klines("ETHBTC", Client.KLINE_INTERVAL_30MINUTE, "1 Dec, 2017", "1 Jan, 2018")

    # fetch weekly klines since it listed
    klines = client.get_historical_klines("NEOBTC", Client.KLINE_INTERVAL_1WEEK, "1 Jan, 2017")

    # socket manager using threads
    twm = ThreadedWebsocketManager()
    twm.start()

    # depth cache manager using threads
    dcm = ThreadedDepthCacheManager()
    dcm.start()

    def handle_socket_message(msg):
        print(f"message type: {msg['e']}")
        print(msg)

    def handle_dcm_message(depth_cache):
        print(f"symbol {depth_cache.symbol}")
        print("top 5 bids")
        print(depth_cache.get_bids()[:5])
        print("top 5 asks")
        print(depth_cache.get_asks()[:5])
        print("last update time {}".format(depth_cache.update_time))

    twm.start_kline_socket(callback=handle_socket_message, symbol='BNBBTC')

    dcm.start_depth_cache(callback=handle_dcm_message, symbol='ETHBTC')

    # replace with a current options symbol
    options_symbol = 'BTC-210430-36000-C'
    dcm.start_options_depth_cache(callback=handle_dcm_message, symbol=options_symbol)


For more `check out the documentation <https://python-binance.readthedocs.io/en/latest/>`_.

Async Example
-------------

Read `Async basics for Binance <https://sammchardy.github.io/binance/2021/05/01/async-binance-basics.html>`_
for more information.

.. code:: python

    import asyncio
    import json

    from binance import AsyncClient, DepthCacheManager, BinanceSocketManager

    async def main():

        # initialise the client
        client = await AsyncClient.create()

        # run some simple requests
        print(json.dumps(await client.get_exchange_info(), indent=2))

        print(json.dumps(await client.get_symbol_ticker(symbol="BTCUSDT"), indent=2))

        # initialise websocket factory manager
        bsm = BinanceSocketManager(client)

        # create listener using async with
        # this will exit and close the connection after 5 messages
        async with bsm.trade_socket('ETHBTC') as ts:
            for _ in range(5):
                res = await ts.recv()
                print(f'recv {res}')

        # get historical kline data from any date range

        # fetch 1 minute klines for the last day up until now
        klines = client.get_historical_klines("BNBBTC", AsyncClient.KLINE_INTERVAL_1MINUTE, "1 day ago UTC")

        # use generator to fetch 1 minute klines for the last day up until now
        async for kline in await client.get_historical_klines_generator("BNBBTC", AsyncClient.KLINE_INTERVAL_1MINUTE, "1 day ago UTC"):
            print(kline)

        # fetch 30 minute klines for the last month of 2017
        klines = client.get_historical_klines("ETHBTC", Client.KLINE_INTERVAL_30MINUTE, "1 Dec, 2017", "1 Jan, 2018")

        # fetch weekly klines since it listed
        klines = client.get_historical_klines("NEOBTC", Client.KLINE_INTERVAL_1WEEK, "1 Jan, 2017")

        # setup an async context the Depth Cache and exit after 5 messages
        async with DepthCacheManager(client, symbol='ETHBTC') as dcm_socket:
            for _ in range(5):
                depth_cache = await dcm_socket.recv()
                print(f"symbol {depth_cache.symbol} updated:{depth_cache.update_time}")
                print("Top 5 asks:")
                print(depth_cache.get_asks()[:5])
                print("Top 5 bids:")
                print(depth_cache.get_bids()[:5])

        # Vanilla options Depth Cache works the same, update the symbol to a current one
        options_symbol = 'BTC-210430-36000-C'
        async with OptionsDepthCacheManager(client, symbol=options_symbol) as dcm_socket:
            for _ in range(5):
                depth_cache = await dcm_socket.recv()
                count += 1
                print(f"symbol {depth_cache.symbol} updated:{depth_cache.update_time}")
                print("Top 5 asks:")
                print(depth_cache.get_asks()[:5])
                print("Top 5 bids:")
                print(depth_cache.get_bids()[:5])

        await client.close_connection()

    if __name__ == "__main__":

        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())


Donate
------

If this library helped you out feel free to donate.

- ETH: 0xD7a7fDdCfA687073d7cC93E9E51829a727f9fE70
- LTC: LPC5vw9ajR1YndE1hYVeo3kJ9LdHjcRCUZ
- NEO: AVJB4ZgN7VgSUtArCt94y7ZYT6d5NDfpBo
- BTC: 1Dknp6L6oRZrHDECRedihPzx2sSfmvEBys

Other Exchanges
---------------

If you use `Binance Chain <https://testnet.binance.org/>`_ check out my `python-binance-chain <https://github.com/sammchardy/python-binance-chain>`_ library.

If you use `Kucoin <https://www.kucoin.com/?rcode=E42cWB>`_ check out my `python-kucoin <https://github.com/sammchardy/python-kucoin>`_ library.

If you use `IDEX <https://idex.market>`_ check out my `python-idex <https://github.com/sammchardy/python-idex>`_ library.

.. image:: https://ga-beacon.appspot.com/UA-111417213-1/github/python-binance?pixel&useReferer


================================================
FILE: README.rst
================================================
=================================
Welcome to python-binance v1.0.35
=================================

.. image:: https://img.shields.io/pypi/v/python-binance.svg
    :target: https://pypi.python.org/pypi/python-binance

.. image:: https://img.shields.io/pypi/l/python-binance.svg
    :target: https://pypi.python.org/pypi/python-binance

.. image:: https://img.shields.io/coveralls/sammchardy/python-binance.svg
    :target: https://coveralls.io/github/sammchardy/python-binance

.. image:: https://img.shields.io/pypi/wheel/python-binance.svg
    :target: https://pypi.python.org/pypi/python-binance

.. image:: https://img.shields.io/pypi/pyversions/python-binance.svg
    :target: https://pypi.python.org/pypi/python-binance

.. image:: https://img.shields.io/badge/Telegram-Join%20Us-blue?logo=Telegram
    :target: https://t.me/python_binance


This is an unofficial Python wrapper for the `Binance exchange REST API v3 <https://binance-docs.github.io/apidocs/spot/en>`_.

If you came here looking for the `Binance exchange <https://accounts.binance.com/register?ref=PGDFCE46>`_ to purchase cryptocurrencies, then `go here <https://accounts.binance.com/register?ref=PGDFCE46>`_.
If you want to automate interactions with Binance stick around.

.. |ico1| image:: https://avatars.githubusercontent.com/u/31901609?s=48&v=4
    :target: https://github.com/ccxt/ccxt
    :height: 3ex
    :align: middle

**This project is powered by** |ico1|

*Please make sure your* `python-binance` *version is* **v.1.0.20** *or higher.*
*The previous versions are no longer recommended because some endpoints have been deprecated.*

Source code
  https://github.com/sammchardy/python-binance

Documentation
  https://python-binance.readthedocs.io/en/latest/

Community Telegram Chat
  https://t.me/python_binance

Announcements Channel
  https://t.me/python_binance_announcements

Examples including async
  https://github.com/sammchardy/python-binance/tree/master/examples

- `Async basics for Binance <https://sammchardy.github.io/binance/2021/05/01/async-binance-basics.html>`_
- `Understanding Binance Order Filters <https://sammchardy.github.io/binance/2021/05/03/binance-order-filters.html>`_

Make sure you update often and check the `Changelog <https://python-binance.readthedocs.io/en/latest/changelog.html>`_ for new features and bug fixes.

Your contributions, suggestions, and fixes are always welcome! Don't hesitate to open a GitHub issue or reach out to us on our Telegram chat

Features
--------

- Implementation of all General, Market Data and Account endpoints.
- Asyncio implementation
- Demo trading support (by providing demo=True)
- Testnet support for Spot, Futures and Vanilla Options (deprecated)
- Simple handling of authentication include RSA and EDDSA keys
- Verbose mode for inspecting requests (verbose=True)
- No need to generate timestamps yourself, the wrapper does it for you
- RecvWindow sent by default
- Response exception handling
- Customizable HTTP headers
- Websocket handling with reconnection and multiplexed connections
- CRUD over websockets, create/fetch/edit through websockets for minimum latency.
- Symbol Depth Cache
- Historical Kline/Candle fetching function
- Withdraw functionality
- Deposit addresses
- Margin Trading
- Futures Trading
- Porfolio Margin Trading
- Vanilla Options
- Proxy support (REST and WS)
- Orjson support for faster JSON parsing
- Support other domains (.us, .jp, etc)
- Support for the Gift Card API

Upgrading to v1.0.0+
--------------------

The breaking changes include the migration from wapi to sapi endpoints which related to the
wallet endpoints detailed in the `Binance Docs <https://binance-docs.github.io/apidocs/spot/en/#wallet-endpoints>`_

The other breaking change is for websocket streams and the Depth Cache Manager which have been
converted to use Asynchronous Context Managers. See examples in the Async section below or view the
`websockets <https://python-binance.readthedocs.io/en/latest/websockets.html>`_ and
`depth cache <https://python-binance.readthedocs.io/en/latest/depth_cache.html>`_ docs.

Quick Start
-----------

`Register an account with Binance <https://accounts.binance.com/register?ref=PGDFCE46>`_.

`Generate an API Key <https://www.binance.com/en/my/settings/api-management>`_ and assign relevant permissions.

If you are using an exchange from the US, Japan or other TLD then make sure pass `tld='us'` when creating the
client.

To use the `Spot <https://testnet.binance.vision/>`_, `Vanilla Options <https://testnet.binanceops.com/>`_ , or `Futures <https://testnet.binancefuture.com>`_ Testnet
pass `testnet=True` when creating the client.


.. code:: bash

    pip install python-binance


.. code:: python

    from binance import Client, ThreadedWebsocketManager, ThreadedDepthCacheManager
    client = Client(api_key, api_secret)

    # get market depth
    depth = client.get_order_book(symbol='BNBBTC')

    # place a test market buy order, to place an actual order use the create_order function
    order = client.create_test_order(
        symbol='BNBBTC',
        side=Client.SIDE_BUY,
        type=Client.ORDER_TYPE_MARKET,
        quantity=100)

    # get all symbol prices
    prices = client.get_all_tickers()

    # withdraw 100 ETH
    # check docs for assumptions around withdrawals
    from binance.exceptions import BinanceAPIException
    try:
        result = client.withdraw(
            asset='ETH',
            address='<eth_address>',
            amount=100)
    except BinanceAPIException as e:
        print(e)
    else:
        print("Success")

    # fetch list of withdrawals
    withdraws = client.get_withdraw_history()

    # fetch list of ETH withdrawals
    eth_withdraws = client.get_withdraw_history(coin='ETH')

    # get a deposit address for BTC
    address = client.get_deposit_address(coin='BTC')

    # get historical kline data from any date range

    # fetch 1 minute klines for the last day up until now
    klines = client.get_historical_klines("BNBBTC", Client.KLINE_INTERVAL_1MINUTE, "1 day ago UTC")

    # fetch 30 minute klines for the last month of 2017
    klines = client.get_historical_klines("ETHBTC", Client.KLINE_INTERVAL_30MINUTE, "1 Dec, 2017", "1 Jan, 2018")

    # fetch weekly klines since it listed
    klines = client.get_historical_klines("NEOBTC", Client.KLINE_INTERVAL_1WEEK, "1 Jan, 2017")

    # create conditional order using the dedicated method
    algo_order = client.futures_create_algo_order(symbol="LTCUSDT", side="BUY", type="STOP_MARKET", quantity=0.1, triggerPrice = 120)

    # create conditional order using the create_order method (will redirect to the algoOrder as well)
    order2 = await client.futures_create_order(symbol="LTCUSDT", side="BUY", type="STOP_MARKET", quantity=0.1, triggerPrice = 120)

    # cancel algo/conditional order
    cancel2 = await client.futures_cancel_algo_order(orderId=order2["orderId"], symbol="LTCUSDT")

    # fetch open algo/conditional orders
    open_orders = await client.futures_get_open_algo_orders(symbol="LTCUSDT")

    # create order through websockets
    order_ws = client.ws_create_order( symbol="LTCUSDT", side="BUY", type="MARKET", quantity=0.1)

    # get account using custom headers
    account = client.get_account(headers={'MyCustomKey': 'MyCustomValue'})

    # socket manager using threads
    twm = ThreadedWebsocketManager()
    twm.start()

    # depth cache manager using threads
    dcm = ThreadedDepthCacheManager()
    dcm.start()

    def handle_socket_message(msg):
        print(f"message type: {msg['e']}")
        print(msg)

    def handle_dcm_message(depth_cache):
        print(f"symbol {depth_cache.symbol}")
        print("top 5 bids")
        print(depth_cache.get_bids()[:5])
        print("top 5 asks")
        print(depth_cache.get_asks()[:5])
        print("last update time {}".format(depth_cache.update_time))

    twm.start_kline_socket(callback=handle_socket_message, symbol='BNBBTC')

    dcm.start_depth_cache(callback=handle_dcm_message, symbol='ETHBTC')

    # replace with a current options symbol
    options_symbol = 'BTC-241227-41000-C'
    dcm.start_options_depth_cache(callback=handle_dcm_message, symbol=options_symbol)

    # join the threaded managers to the main thread
    twm.join()
    dcm.join()

For more `check out the documentation <https://python-binance.readthedocs.io/en/latest/>`_.

Async Example
-------------

Read `Async basics for Binance <https://sammchardy.github.io/binance/2021/05/01/async-binance-basics.html>`_
for more information.

.. code:: python

    import asyncio
    import json

    from binance import AsyncClient, DepthCacheManager, BinanceSocketManager

    async def main():

        # initialise the client
        client = await AsyncClient.create()

        # run some simple requests
        print(json.dumps(await client.get_exchange_info(), indent=2))

        print(json.dumps(await client.get_symbol_ticker(symbol="BTCUSDT"), indent=2))

        # initialise websocket factory manager
        bsm = BinanceSocketManager(client)

        # create listener using async with
        # this will exit and close the connection after 5 messages
        async with bsm.trade_socket('ETHBTC') as ts:
            for _ in range(5):
                res = await ts.recv()
                print(f'recv {res}')

        # get historical kline data from any date range

        # fetch 1 minute klines for the last day up until now
        klines = client.get_historical_klines("BNBBTC", AsyncClient.KLINE_INTERVAL_1MINUTE, "1 day ago UTC")

        # use generator to fetch 1 minute klines for the last day up until now
        async for kline in await client.get_historical_klines_generator("BNBBTC", AsyncClient.KLINE_INTERVAL_1MINUTE, "1 day ago UTC"):
            print(kline)

        # fetch 30 minute klines for the last month of 2017
        klines = await client.get_historical_klines("ETHBTC", Client.KLINE_INTERVAL_30MINUTE, "1 Dec, 2017", "1 Jan, 2018")

        # fetch weekly klines since it listed
        klines = await client.get_historical_klines("NEOBTC", Client.KLINE_INTERVAL_1WEEK, "1 Jan, 2017")


        # create order through websockets
        order_ws = await client.ws_create_order( symbol="LTCUSDT", side="BUY", type="MARKET", quantity=0.1)

        # setup an async context the Depth Cache and exit after 5 messages
        async with DepthCacheManager(client, symbol='ETHBTC') as dcm_socket:
            for _ in range(5):
                depth_cache = await dcm_socket.recv()
                print(f"symbol {depth_cache.symbol} updated:{depth_cache.update_time}")
                print("Top 5 asks:")
                print(depth_cache.get_asks()[:5])
                print("Top 5 bids:")
                print(depth_cache.get_bids()[:5])

        # Vanilla options Depth Cache works the same, update the symbol to a current one
        options_symbol = 'BTC-241227-41000-C'
        async with OptionsDepthCacheManager(client, symbol=options_symbol) as dcm_socket:
            for _ in range(5):
                depth_cache = await dcm_socket.recv()
                count += 1
                print(f"symbol {depth_cache.symbol} updated:{depth_cache.update_time}")
                print("Top 5 asks:")
                print(depth_cache.get_asks()[:5])
                print("Top 5 bids:")
                print(depth_cache.get_bids()[:5])

        await client.close_connection()

    if __name__ == "__main__":
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())


The library is under `MIT license`, that means it's absolutely free for any developer to build commercial and opensource software on top of it, but use it at your own risk with no warranties, as is.


Orjson support
-------------------

Python-binance also supports `orjson` for parsing JSON since it is much faster than the builtin library. This is especially important when using websockets because some exchanges return big messages that need to be parsed and dispatched as quickly as possible.

However, `orjson` is not enabled by default because it is not supported by every python interpreter. If you want to opt-in, you just need to install it (`pip install orjson`) on your local environment. Python-binance will detect the installion and pick it up automatically.

Star history
------------

.. image:: https://api.star-history.com/svg?repos=sammchardy/python-binance&type=Date
    :target: https://api.star-history.com/svg?repos=sammchardy/python-binance&type=Date

Contact Us
----------

For business inquiries: `info@ccxt.trade`

Other Exchanges
---------------
- Check out `CCXT <https://github.com/ccxt/ccxt>`_ for more than 100 crypto exchanges with a unified trading API.
- If you use `Kucoin <https://www.kucoin.com/ucenter/signup?rcode=E5wkqe>`_ check out my `python-kucoin <https://github.com/sammchardy/python-kucoin>`_ library.


================================================
FILE: binance/__init__.py
================================================
"""An unofficial Python wrapper for the Binance exchange API v3

.. moduleauthor:: Sam McHardy

"""

__version__ = "1.0.35"

from binance.async_client import AsyncClient  # noqa
from binance.client import Client  # noqa
from binance.ws.depthcache import (
    DepthCacheManager,  # noqa
    OptionsDepthCacheManager,  # noqa
    ThreadedDepthCacheManager,  # noqa
    FuturesDepthCacheManager,  # noqa
)
from binance.ws.streams import (
    BinanceSocketManager,  # noqa
    ThreadedWebsocketManager,  # noqa
    BinanceSocketType,  # noqa
)

from binance.ws.keepalive_websocket import KeepAliveWebsocket  # noqa

from binance.ws.reconnecting_websocket import ReconnectingWebsocket  # noqa

from binance.ws.constants import *  # noqa

from binance.exceptions import *  # noqa

from binance.enums import *  # noqa


================================================
FILE: binance/async_client.py
================================================
import asyncio
from pathlib import Path
from typing import Any, Dict, List, Optional, Union
from urllib.parse import urlencode, quote
import time
import warnings
import aiohttp
import yarl

from binance.enums import HistoricalKlinesType
from binance.exceptions import (
    BinanceAPIException,
    BinanceRequestException,
    NotImplementedException,
)
from binance.helpers import (
    convert_list_to_json_array,
    convert_ts_str,
    get_loop,
    interval_to_milliseconds,
)
from .base_client import BaseClient
from .client import Client


class AsyncClient(BaseClient):
    def __init__(
        self,
        api_key: Optional[str] = None,
        api_secret: Optional[str] = None,
        requests_params: Optional[Dict[str, Any]] = None,
        tld: str = "com",
        base_endpoint: str = BaseClient.BASE_ENDPOINT_DEFAULT,
        testnet: bool = False,
        demo: bool = False,
        loop=None,
        session_params: Optional[Dict[str, Any]] = None,
        private_key: Optional[Union[str, Path]] = None,
        private_key_pass: Optional[str] = None,
        https_proxy: Optional[str] = None,
        time_unit: Optional[str] = None,
        verbose: bool = False,
    ):
        self.https_proxy = https_proxy
        self.loop = loop or get_loop()
        self._session_params: Dict[str, Any] = session_params or {}

        # Convert https_proxy to requests_params format for BaseClient
        if https_proxy and requests_params is None:
            requests_params = {'proxies': {'http': https_proxy, 'https': https_proxy}}
        elif https_proxy and requests_params is not None:
            if 'proxies' not in requests_params:
                requests_params['proxies'] = {}
            requests_params['proxies'].update({'http': https_proxy, 'https': https_proxy})

        super().__init__(
            api_key,
            api_secret,
            requests_params,
            tld,
            base_endpoint,
            testnet,
            demo,
            private_key,
            private_key_pass,
            time_unit=time_unit,
            verbose=verbose,
        )

    @classmethod
    async def create(
        cls,
        api_key: Optional[str] = None,
        api_secret: Optional[str] = None,
        requests_params: Optional[Dict[str, Any]] = None,
        tld: str = "com",
        base_endpoint: str = BaseClient.BASE_ENDPOINT_DEFAULT,
        testnet: bool = False,
        demo: bool = False,
        loop=None,
        session_params: Optional[Dict[str, Any]] = None,
        private_key: Optional[Union[str, Path]] = None,
        private_key_pass: Optional[str] = None,
        https_proxy: Optional[str] = None,
        time_unit: Optional[str] = None,
        verbose: bool = False,
    ):
        self = cls(
            api_key,
            api_secret,
            requests_params,
            tld,
            base_endpoint,
            testnet,
            demo,
            loop,
            session_params,
            private_key,
            private_key_pass,
            https_proxy,
            time_unit,
            verbose
        )
        self.https_proxy = https_proxy  # move this to the constructor

        try:
            await self.ping()

            # calculate timestamp offset between local and binance server
            res = await self.get_server_time()
            self.timestamp_offset = res["serverTime"] - int(time.time() * 1000)

            return self
        except Exception:
            # If ping throw an exception, the current self must be cleaned
            # else, we can receive a "asyncio:Unclosed client session"
            await self.close_connection()
            raise

    def _init_session(self) -> aiohttp.ClientSession:
        session = aiohttp.ClientSession(
            loop=self.loop, headers=self._get_headers(), **self._session_params
        )
        return session

    async def close_connection(self):
        if self.session:
            assert self.session
            await self.session.close()
        if self.ws_api:
            await self.ws_api.close()
            self._ws_api = None

    close_connection.__doc__ = Client.close_connection.__doc__

    async def _request(
        self, method, uri: str, signed: bool, force_params: bool = False, **kwargs
    ):
        # this check needs to be done before __get_request_kwargs to avoid
        # polluting the signature
        headers = {}
        if method.upper() in ["POST", "PUT", "DELETE"]:
            headers.update({"Content-Type": "application/x-www-form-urlencoded"})

        if "data" in kwargs:
            for key in kwargs["data"]:
                if key == "headers":
                    headers.update(kwargs["data"][key])
                    del kwargs["data"][key]
                    break

        kwargs = self._get_request_kwargs(method, signed, force_params, **kwargs)

        if method == "get":
            # url encode the query string
            if "params" in kwargs:
                uri = f"{uri}?{kwargs['params']}"
                kwargs.pop("params")

        data = kwargs.get("data")
        if data is not None:
            del kwargs["data"]

        if (
            signed and self.PRIVATE_KEY and data
        ):  # handle issues with signing using eddsa/rsa and POST requests
            dict_data = Client.convert_to_dict(data)
            signature = dict_data["signature"] if "signature" in dict_data else None
            if signature:
                del dict_data["signature"]
            url_encoded_data = urlencode(dict_data)
            data = f"{url_encoded_data}&signature={signature}"

        # Remove proxies from kwargs since aiohttp uses 'proxy' parameter instead
        kwargs.pop('proxies', None)

        async with getattr(self.session, method)(
            yarl.URL(uri, encoded=True),
            proxy=self.https_proxy,
            headers=headers,
            data=data,
            **kwargs,
        ) as response:
            self.response = response

            if self.verbose:
                response_text = await response.text()
                self.logger.debug(
                    "\nRequest: %s %s\nRequestHeaders: %s\nRequestBody: %s\nResponse: %s\nResponseHeaders: %s\nResponseBody: %s",
                    method.upper(),
                    uri,
                    headers,
                    data,
                    response.status,
                    dict(response.headers),
                    response_text[:1000] if response_text else None
                )

            return await self._handle_response(response)

    async def _handle_response(self, response: aiohttp.ClientResponse):
        """Internal helper for handling API responses from the Binance server.
        Raises the appropriate exceptions when necessary; otherwise, returns the
        response.
        """
        if not str(response.status).startswith("2"):
            raise BinanceAPIException(response, response.status, await response.text())
        
        text = await response.text()
        if text == "":
            return {}

        try:
            return await response.json()
        except ValueError:
            txt = await response.text()
            raise BinanceRequestException(f"Invalid Response: {txt}")

    async def _request_api(
        self,
        method,
        path,
        signed=False,
        version=BaseClient.PUBLIC_API_VERSION,
        **kwargs,
    ):
        uri = self._create_api_uri(path, signed, version)
        force_params = kwargs.pop("force_params", False)
        return await self._request(method, uri, signed, force_params, **kwargs)

    async def _request_futures_api(
        self, method, path, signed=False, version=1, **kwargs
    ) -> Dict:
        version = self._get_version(version, **kwargs)
        uri = self._create_futures_api_uri(path, version=version)
        force_params = kwargs.pop("force_params", False)
        return await self._request(method, uri, signed, force_params, **kwargs)

    async def _request_futures_data_api(
        self, method, path, signed=False, **kwargs
    ) -> Dict:
        uri = self._create_futures_data_api_uri(path)
        force_params = kwargs.pop("force_params", True)
        return await self._request(method, uri, signed, force_params, **kwargs)

    async def _request_futures_coin_api(
        self, method, path, signed=False, version=1, **kwargs
    ) -> Dict:
        version = self._get_version(version, **kwargs)
        uri = self._create_futures_coin_api_url(path, version=version)
        force_params = kwargs.pop("force_params", False)
        return await self._request(method, uri, signed, force_params, **kwargs)

    async def _request_futures_coin_data_api(
        self, method, path, signed=False, version=1, **kwargs
    ) -> Dict:
        version = self._get_version(version, **kwargs)
        uri = self._create_futures_coin_data_api_url(path, version=version)

        force_params = kwargs.pop("force_params", True)
        return await self._request(method, uri, signed, force_params, **kwargs)

    async def _request_options_api(self, method, path, signed=False, **kwargs) -> Dict:
        uri = self._create_options_api_uri(path)
        force_params = kwargs.pop("force_params", True)

        return await self._request(method, uri, signed, force_params, **kwargs)

    async def _request_margin_api(
        self, method, path, signed=False, version=1, **kwargs
    ) -> Dict:
        version = self._get_version(version, **kwargs)
        uri = self._create_margin_api_uri(path, version)

        force_params = kwargs.pop("force_params", False)
        return await self._request(method, uri, signed, force_params, **kwargs)

    async def _request_papi_api(
        self, method, path, signed=False, version=1, **kwargs
    ) -> Dict:
        version = self._get_version(version, **kwargs)
        uri = self._create_papi_api_uri(path, version)

        force_params = kwargs.pop("force_params", False)
        return await self._request(method, uri, signed, force_params, **kwargs)

    async def _request_website(self, method, path, signed=False, **kwargs) -> Dict:
        uri = self._create_website_uri(path)
        return await self._request(method, uri, signed, **kwargs)

    async def _get(
        self, path, signed=False, version=BaseClient.PUBLIC_API_VERSION, **kwargs
    ):
        return await self._request_api("get", path, signed, version, **kwargs)

    async def _post(
        self, path, signed=False, version=BaseClient.PUBLIC_API_VERSION, **kwargs
    ) -> Dict:
        return await self._request_api("post", path, signed, version, **kwargs)

    async def _put(
        self, path, signed=False, version=BaseClient.PUBLIC_API_VERSION, **kwargs
    ) -> Dict:
        return await self._request_api("put", path, signed, version, **kwargs)

    async def _delete(
        self, path, signed=False, version=BaseClient.PUBLIC_API_VERSION, **kwargs
    ) -> Dict:
        return await self._request_api("delete", path, signed, version, **kwargs)

    # Exchange Endpoints

    async def get_products(self) -> Dict:
        products = await self._request_website(
            "get",
            "bapi/asset/v2/public/asset-service/product/get-products?includeEtf=true",
        )
        return products

    get_products.__doc__ = Client.get_products.__doc__

    async def get_exchange_info(self) -> Dict:
        return await self._get("exchangeInfo")

    get_exchange_info.__doc__ = Client.get_exchange_info.__doc__

    async def get_symbol_info(self, symbol) -> Optional[Dict]:
        res = await self.get_exchange_info()

        for item in res["symbols"]:
            if item["symbol"] == symbol.upper():
                return item

        return None

    get_symbol_info.__doc__ = Client.get_symbol_info.__doc__

    # General Endpoints

    async def ping(self) -> Dict:
        return await self._get("ping")

    ping.__doc__ = Client.ping.__doc__

    async def get_server_time(self) -> Dict:
        return await self._get("time")

    get_server_time.__doc__ = Client.get_server_time.__doc__

    # Market Data Endpoints

    async def get_all_tickers(
        self, symbol: Optional[str] = None
    ) -> List[Dict[str, str]]:
        params = {}
        if symbol:
            params["symbol"] = symbol
        response = await self._get(
            "ticker/price", data=params
        )
        if isinstance(response, list) and all(isinstance(item, dict) for item in response):
            return response
        raise TypeError("Expected a list of dictionaries")

    get_all_tickers.__doc__ = Client.get_all_tickers.__doc__

    async def get_orderbook_tickers(self, **params) -> Dict:
        data = {}
        if "symbol" in params:
            data["symbol"] = params["symbol"]
        elif "symbols" in params:
            data["symbols"] = params["symbols"]
        return await self._get(
            "ticker/bookTicker", data=data
        )

    get_orderbook_tickers.__doc__ = Client.get_orderbook_tickers.__doc__

    async def get_order_book(self, **params) -> Dict:
        return await self._get("depth", data=params)

    get_order_book.__doc__ = Client.get_order_book.__doc__

    async def get_recent_trades(self, **params) -> Dict:
        return await self._get("trades", data=params)

    get_recent_trades.__doc__ = Client.get_recent_trades.__doc__

    async def get_historical_trades(self, **params) -> Dict:
        return await self._get(
            "historicalTrades", data=params
        )

    get_historical_trades.__doc__ = Client.get_historical_trades.__doc__

    async def get_aggregate_trades(self, **params) -> Dict:
        return await self._get(
            "aggTrades", data=params
        )

    get_aggregate_trades.__doc__ = Client.get_aggregate_trades.__doc__

    async def aggregate_trade_iter(self, symbol, start_str=None, last_id=None):
        if start_str is not None and last_id is not None:
            raise ValueError(
                "start_time and last_id may not be simultaneously specified."
            )

        # If there's no last_id, get one.
        if last_id is None:
            # Without a last_id, we actually need the first trade.  Normally,
            # we'd get rid of it. See the next loop.
            if start_str is None:
                trades = await self.get_aggregate_trades(symbol=symbol, fromId=0)
            else:
                # The difference between startTime and endTime should be less
                # or equal than an hour and the result set should contain at
                # least one trade.
                start_ts = convert_ts_str(start_str)
                # If the resulting set is empty (i.e. no trades in that interval)
                # then we just move forward hour by hour until we find at least one
                # trade or reach present moment
                while True:
                    end_ts = start_ts + (60 * 60 * 1000)
                    trades = await self.get_aggregate_trades(
                        symbol=symbol, startTime=start_ts, endTime=end_ts
                    )
                    if len(trades) > 0:
                        break
                    # If we reach present moment and find no trades then there is
                    # nothing to iterate, so we're done
                    if end_ts > int(time.time() * 1000):
                        return
                    start_ts = end_ts
            for t in trades:
                yield t
            last_id = trades[-1][self.AGG_ID]

        while True:
            # There is no need to wait between queries, to avoid hitting the
            # rate limit. We're using blocking IO, and as long as we're the
            # only thread running calls like this, Binance will automatically
            # add the right delay time on their end, forcing us to wait for
            # data. That really simplifies this function's job. Binance is
            # fucking awesome.
            trades = await self.get_aggregate_trades(symbol=symbol, fromId=last_id)
            # fromId=n returns a set starting with id n, but we already have
            # that one. So get rid of the first item in the result set.
            trades = trades[1:]
            if len(trades) == 0:
                return
            for t in trades:
                yield t
            last_id = trades[-1][self.AGG_ID]

    aggregate_trade_iter.__doc__ = Client.aggregate_trade_iter.__doc__

    async def get_ui_klines(self, **params) -> Dict:
        return await self._get("uiKlines", data=params)

    get_ui_klines.__doc__ = Client.get_ui_klines.__doc__

    async def get_klines(self, **params) -> Dict:
        return await self._get("klines", data=params)

    get_klines.__doc__ = Client.get_klines.__doc__

    async def _klines(
        self, klines_type: HistoricalKlinesType = HistoricalKlinesType.SPOT, **params
    ) -> Dict:
        if "endTime" in params and not params["endTime"]:
            del params["endTime"]
        if HistoricalKlinesType.SPOT == klines_type:
            return await self.get_klines(**params)
        elif HistoricalKlinesType.FUTURES == klines_type:
            return await self.futures_klines(**params)
        elif HistoricalKlinesType.FUTURES_COIN == klines_type:
            return await self.futures_coin_klines(**params)
        elif HistoricalKlinesType.FUTURES_MARK_PRICE == klines_type:
            return await self.futures_mark_price_klines(**params)
        elif HistoricalKlinesType.FUTURES_INDEX_PRICE == klines_type:
            return await self.futures_index_price_klines(**params)
        elif HistoricalKlinesType.FUTURES_COIN_MARK_PRICE == klines_type:
            return await self.futures_coin_mark_price_klines(**params)
        elif HistoricalKlinesType.FUTURES_COIN_INDEX_PRICE == klines_type:
            return await self.futures_coin_index_price_klines(**params)
        else:
            raise NotImplementedException(klines_type)

    _klines.__doc__ = Client._klines.__doc__

    async def _get_earliest_valid_timestamp(
        self,
        symbol,
        interval,
        klines_type: HistoricalKlinesType = HistoricalKlinesType.SPOT,
    ):
        kline = await self._klines(
            klines_type=klines_type,
            symbol=symbol,
            interval=interval,
            limit=1,
            startTime=0,
            endTime=int(time.time() * 1000),
        )
        return kline[0][0]

    _get_earliest_valid_timestamp.__doc__ = Client._get_earliest_valid_timestamp.__doc__

    async def get_historical_klines(
        self,
        symbol,
        interval,
        start_str=None,
        end_str=None,
        limit=None,
        klines_type: HistoricalKlinesType = HistoricalKlinesType.SPOT,
    ):
        return await self._historical_klines(
            symbol,
            interval,
            start_str,
            end_str=end_str,
            limit=limit,
            klines_type=klines_type,
        )

    get_historical_klines.__doc__ = Client.get_historical_klines.__doc__

    async def _historical_klines(
        self,
        symbol,
        interval,
        start_str=None,
        end_str=None,
        limit=None,
        klines_type: HistoricalKlinesType = HistoricalKlinesType.SPOT,
    ):
        initial_limit_set = True
        if limit is None:
            limit = 1000
            initial_limit_set = False

        # init our list
        output_data = []

        # convert interval to useful value in seconds
        timeframe = interval_to_milliseconds(interval)

        # establish first available start timestamp
        start_ts = convert_ts_str(start_str)
        if start_ts is not None:
            first_valid_ts = await self._get_earliest_valid_timestamp(
                symbol, interval, klines_type
            )
            start_ts = max(start_ts, first_valid_ts)

        # if an end time was passed convert it
        end_ts = convert_ts_str(end_str)
        if end_ts and start_ts and end_ts <= start_ts:
            return output_data

        idx = 0
        while True:
            # fetch the klines from start_ts up to max 500 entries or the end_ts if set
            temp_data = await self._klines(
                klines_type=klines_type,
                symbol=symbol,
                interval=interval,
                limit=limit,
                startTime=start_ts,
                endTime=end_ts,
            )

            # append this loops data to our output data
            if temp_data:
                output_data += temp_data

            # check if output_data is greater than limit and truncate if needed and break loop
            if initial_limit_set and len(output_data) > limit:
                output_data = output_data[:limit]
                break

            # handle the case where exactly the limit amount of data was returned last loop
            # or check if we received less than the required limit and exit the loop
            if not len(temp_data) or len(temp_data) < limit:
                # exit the while loop
                break

            # set our start timestamp using the last value in the array
            # and increment next call by our timeframe
            start_ts = temp_data[-1][0] + timeframe

            # exit loop if we reached end_ts before reaching <limit> klines
            if end_ts and start_ts >= end_ts:
                break

            # sleep after every 3rd call to be kind to the API
            idx += 1
            if idx % 3 == 0:
                await asyncio.sleep(1)

        return output_data

    _historical_klines.__doc__ = Client._historical_klines.__doc__

    async def get_historical_klines_generator(
        self,
        symbol,
        interval,
        start_str=None,
        end_str=None,
        limit=1000,
        klines_type: HistoricalKlinesType = HistoricalKlinesType.SPOT,
    ):
        return self._historical_klines_generator(
            symbol,
            interval,
            start_str,
            end_str=end_str,
            limit=limit,
            klines_type=klines_type,
        )

    get_historical_klines_generator.__doc__ = (
        Client.get_historical_klines_generator.__doc__
    )

    async def _historical_klines_generator(
        self,
        symbol,
        interval,
        start_str=None,
        end_str=None,
        limit=1000,
        klines_type: HistoricalKlinesType = HistoricalKlinesType.SPOT,
    ):
        # convert interval to useful value in seconds
        timeframe = interval_to_milliseconds(interval)

        # if a start time was passed convert it
        start_ts = convert_ts_str(start_str)

        # establish first available start timestamp
        if start_ts is not None:
            first_valid_ts = await self._get_earliest_valid_timestamp(
                symbol, interval, klines_type
            )
            start_ts = max(start_ts, first_valid_ts)

        # if an end time was passed convert it
        end_ts = convert_ts_str(end_str)
        if end_ts and start_ts and end_ts <= start_ts:
            return

        idx = 0
        while True:
            # fetch the klines from start_ts up to max 500 entries or the end_ts if set
            output_data = await self._klines(
                klines_type=klines_type,
                symbol=symbol,
                interval=interval,
                limit=limit,
                startTime=start_ts,
                endTime=end_ts,
            )

            # yield data
            if output_data:
                for o in output_data:
                    yield o

            # handle the case where exactly the limit amount of data was returned last loop
            # check if we received less than the required limit and exit the loop
            if not len(output_data) or len(output_data) < limit:
                # exit the while loop
                break

            # increment next call by our timeframe
            start_ts = output_data[-1][0] + timeframe

            # exit loop if we reached end_ts before reaching <limit> klines
            if end_ts and start_ts >= end_ts:
                break

            # sleep after every 3rd call to be kind to the API
            idx += 1
            if idx % 3 == 0:
                await asyncio.sleep(1)

    _historical_klines_generator.__doc__ = Client._historical_klines_generator.__doc__

    async def get_avg_price(self, **params):
        return await self._get(
            "avgPrice", data=params
        )

    get_avg_price.__doc__ = Client.get_avg_price.__doc__

    async def get_ticker(self, **params):
        return await self._get(
            "ticker/24hr", data=params
        )

    get_ticker.__doc__ = Client.get_ticker.__doc__

    async def get_symbol_ticker(self, **params):
        return await self._get(
            "ticker/price", data=params
        )

    get_symbol_ticker.__doc__ = Client.get_symbol_ticker.__doc__

    async def get_symbol_ticker_window(self, **params):
        return await self._get("ticker", data=params)

    get_symbol_ticker_window.__doc__ = Client.get_symbol_ticker_window.__doc__

    async def get_orderbook_ticker(self, **params):
        return await self._get(
            "ticker/bookTicker", data=params
        )

    get_orderbook_ticker.__doc__ = Client.get_orderbook_ticker.__doc__

    # Account Endpoints

    async def create_order(self, **params):
        if "newClientOrderId" not in params:
            params["newClientOrderId"] = self.SPOT_ORDER_PREFIX + self.uuid22()
        return await self._post("order", True, data=params)

    create_order.__doc__ = Client.create_order.__doc__

    async def order_limit(self, timeInForce=BaseClient.TIME_IN_FORCE_GTC, **params):
        params.update({"type": self.ORDER_TYPE_LIMIT, "timeInForce": timeInForce})
        return await self.create_order(**params)

    order_limit.__doc__ = Client.order_limit.__doc__

    async def order_limit_buy(self, timeInForce=BaseClient.TIME_IN_FORCE_GTC, **params):
        params.update({
            "side": self.SIDE_BUY,
        })
        return await self.order_limit(timeInForce=timeInForce, **params)

    order_limit_buy.__doc__ = Client.order_limit_buy.__doc__

    async def order_limit_sell(
        self, timeInForce=BaseClient.TIME_IN_FORCE_GTC, **params
    ):
        params.update({"side": self.SIDE_SELL})
        return await self.order_limit(timeInForce=timeInForce, **params)

    order_limit_sell.__doc__ = Client.order_limit_sell.__doc__

    async def order_market(self, **params):
        params.update({"type": self.ORDER_TYPE_MARKET})
        return await self.create_order(**params)

    order_market.__doc__ = Client.order_market.__doc__

    async def order_market_buy(self, **params):
        params.update({"side": self.SIDE_BUY})
        return await self.order_market(**params)

    order_market_buy.__doc__ = Client.order_market_buy.__doc__

    async def order_market_sell(self, **params):
        params.update({"side": self.SIDE_SELL})
        return await self.order_market(**params)

    order_market_sell.__doc__ = Client.order_market_sell.__doc__

    async def order_oco_buy(self, **params):
        params.update({"side": self.SIDE_BUY})
        return await self.create_oco_order(**params)

    order_oco_buy.__doc__ = Client.order_oco_buy.__doc__

    async def order_oco_sell(self, **params):
        params.update({"side": self.SIDE_SELL})
        return await self.create_oco_order(**params)

    order_oco_sell.__doc__ = Client.order_oco_sell.__doc__

    async def create_test_order(self, **params):
        return await self._post("order/test", True, data=params)

    create_test_order.__doc__ = Client.create_test_order.__doc__

    async def get_order(self, **params):
        return await self._get("order", True, data=params)

    get_order.__doc__ = Client.get_order.__doc__

    async def get_all_orders(self, **params):
        return await self._get("allOrders", True, data=params)

    get_all_orders.__doc__ = Client.get_all_orders.__doc__

    async def cancel_order(self, **params):
        return await self._delete("order", True, data=params)

    cancel_order.__doc__ = Client.cancel_order.__doc__

    async def get_open_orders(self, **params):
        return await self._get("openOrders", True, data=params)

    get_open_orders.__doc__ = Client.get_open_orders.__doc__

    async def get_open_oco_orders(self, **params):
        return await self._get("openOrderList", True, data=params)

    get_open_oco_orders.__doc__ = Client.get_open_oco_orders.__doc__

    # User Stream Endpoints
    async def get_account(self, **params):
        return await self._get("account", True, data=params)

    get_account.__doc__ = Client.get_account.__doc__

    async def get_asset_balance(self, asset=None, **params):
        res = await self.get_account(**params)
        # find asset balance in list of balances
        if "balances" in res:
            if asset:
                for bal in res["balances"]:
                    if bal["asset"].lower() == asset.lower():
                        return bal
            else:
                return res["balances"]
        return None

    get_asset_balance.__doc__ = Client.get_asset_balance.__doc__

    async def get_my_trades(self, **params):
        return await self._get("myTrades", True, data=params)

    get_my_trades.__doc__ = Client.get_my_trades.__doc__

    async def get_current_order_count(self, **params):
        return await self._get("rateLimit/order", True, data=params)

    get_current_order_count.__doc__ = Client.get_current_order_count.__doc__

    async def get_prevented_matches(self, **params):
        return await self._get("myPreventedMatches", True, data=params)

    get_prevented_matches.__doc__ = Client.get_prevented_matches.__doc__

    async def get_allocations(self, **params):
        return await self._get("myAllocations", True, data=params)

    get_allocations.__doc__ = Client.get_allocations.__doc__

    async def get_system_status(self):
        return await self._request_margin_api("get", "system/status")

    get_system_status.__doc__ = Client.get_system_status.__doc__

    async def get_account_status(self, **params):
        return await self._request_margin_api(
            "get", "account/status", True, data=params
        )

    get_account_status.__doc__ = Client.get_account_status.__doc__

    async def get_account_api_trading_status(self, **params):
        return await self._request_margin_api(
            "get", "account/apiTradingStatus", True, data=params
        )

    get_account_api_trading_status.__doc__ = (
        Client.get_account_api_trading_status.__doc__
    )

    async def get_account_api_permissions(self, **params):
        return await self._request_margin_api(
            "get", "account/apiRestrictions", True, data=params
        )

    get_account_api_permissions.__doc__ = Client.get_account_api_permissions.__doc__

    async def get_dust_assets(self, **params):
        return await self._request_margin_api(
            "post", "asset/dust-btc", True, data=params
        )

    get_dust_assets.__doc__ = Client.get_dust_assets.__doc__

    async def get_dust_log(self, **params):
        return await self._request_margin_api(
            "get", "asset/dribblet", True, data=params
        )

    get_dust_log.__doc__ = Client.get_dust_log.__doc__

    async def transfer_dust(self, **params):
        return await self._request_margin_api("post", "asset/dust", True, data=params)

    transfer_dust.__doc__ = Client.transfer_dust.__doc__

    async def get_asset_dividend_history(self, **params):
        return await self._request_margin_api(
            "get", "asset/assetDividend", True, data=params
        )

    get_asset_dividend_history.__doc__ = Client.get_asset_dividend_history.__doc__

    async def make_universal_transfer(self, **params):
        return await self._request_margin_api(
            "post", "asset/transfer", signed=True, data=params
        )

    make_universal_transfer.__doc__ = Client.make_universal_transfer.__doc__

    async def query_universal_transfer_history(self, **params):
        return await self._request_margin_api(
            "get", "asset/transfer", signed=True, data=params
        )

    query_universal_transfer_history.__doc__ = (
        Client.query_universal_transfer_history.__doc__
    )

    async def get_trade_fee(self, **params):
        if self.tld == "us":
            endpoint = "asset/query/trading-fee"
        else:
            endpoint = "asset/tradeFee"
        return await self._request_margin_api("get", endpoint, True, data=params)

    get_trade_fee.__doc__ = Client.get_trade_fee.__doc__

    async def get_asset_details(self, **params):
        return await self._request_margin_api(
            "get", "asset/assetDetail", True, data=params
        )

    get_asset_details.__doc__ = Client.get_asset_details.__doc__

    async def get_spot_delist_schedule(self, **params):
        return await self._request_margin_api(
            "get", "/spot/delist-schedule", signed=False, data=params
        )

    get_spot_delist_schedule.__doc__ = Client.get_spot_delist_schedule.__doc__

    # Withdraw Endpoints

    async def withdraw(self, **params):
        # force a name for the withdrawal if one not set
        if "coin" in params and "name" not in params:
            params["name"] = params["coin"]
        return await self._request_margin_api(
            "post", "capital/withdraw/apply", True, data=params
        )

    withdraw.__doc__ = Client.withdraw.__doc__

    async def get_deposit_history(self, **params):
        return await self._request_margin_api(
            "get", "capital/deposit/hisrec", True, data=params
        )

    get_deposit_history.__doc__ = Client.get_deposit_history.__doc__

    async def get_withdraw_history(self, **params):
        return await self._request_margin_api(
            "get", "capital/withdraw/history", True, data=params
        )

    get_withdraw_history.__doc__ = Client.get_withdraw_history.__doc__

    async def get_withdraw_history_id(self, withdraw_id, **params):
        result = await self.get_withdraw_history(**params)

        for entry in result:
            if "id" in entry and entry["id"] == withdraw_id:
                return entry

        raise Exception("There is no entry with withdraw id", result)

    get_withdraw_history_id.__doc__ = Client.get_withdraw_history_id.__doc__

    async def get_deposit_address(
        self, coin: str, network: Optional[str] = None, **params
    ):
        params["coin"] = coin
        if network:
            params["network"] = network
        return await self._request_margin_api(
            "get", "capital/deposit/address", True, data=params
        )

    get_deposit_address.__doc__ = Client.get_deposit_address.__doc__

    # User Stream Endpoints

    async def stream_get_listen_key(self):
        res = await self._post("userDataStream", False, data={})
        return res["listenKey"]

    stream_get_listen_key.__doc__ = Client.stream_get_listen_key.__doc__

    async def stream_keepalive(self, listenKey):
        params = {"listenKey": listenKey}
        return await self._put("userDataStream", False, data=params)

    stream_keepalive.__doc__ = Client.stream_keepalive.__doc__

    async def stream_close(self, listenKey):
        params = {"listenKey": listenKey}
        return await self._delete("userDataStream", False, data=params)

    stream_close.__doc__ = Client.stream_close.__doc__

    # Margin Trading Endpoints
    async def get_margin_account(self, **params):
        return await self._request_margin_api(
            "get", "margin/account", True, data=params
        )

    get_margin_account.__doc__ = Client.get_margin_account.__doc__

    async def get_isolated_margin_account(self, **params):
        return await self._request_margin_api(
            "get", "margin/isolated/account", True, data=params
        )

    get_isolated_margin_account.__doc__ = Client.get_isolated_margin_account.__doc__

    async def enable_isolated_margin_account(self, **params):
        return await self._request_margin_api(
            "post", "margin/isolated/account", True, data=params
        )

    enable_isolated_margin_account.__doc__ = (
        Client.enable_isolated_margin_account.__doc__
    )

    async def disable_isolated_margin_account(self, **params):
        return await self._request_margin_api(
            "delete", "margin/isolated/account", True, data=params
        )

    disable_isolated_margin_account.__doc__ = (
        Client.disable_isolated_margin_account.__doc__
    )

    async def get_enabled_isolated_margin_account_limit(self, **params):
        return await self._request_margin_api(
            "get", "margin/isolated/accountLimit", True, data=params
        )

    get_enabled_isolated_margin_account_limit.__doc__ = (
        Client.get_enabled_isolated_margin_account_limit.__doc__
    )

    async def get_margin_dustlog(self, **params):
        return await self._request_margin_api(
            "get", "margin/dribblet", True, data=params
        )

    get_margin_dustlog.__doc__ = Client.get_margin_dustlog.__doc__

    async def get_margin_dust_assets(self, **params):
        return await self._request_margin_api("get", "margin/dust", True, data=params)

    get_margin_dust_assets.__doc__ = Client.get_margin_dust_assets.__doc__

    async def transfer_margin_dust(self, **params):
        return await self._request_margin_api("post", "margin/dust", True, data=params)

    transfer_margin_dust.__doc__ = Client.transfer_margin_dust.__doc__

    async def get_cross_margin_collateral_ratio(self, **params):
        return await self._request_margin_api(
            "get", "margin/crossMarginCollateralRatio", True, data=params
        )

    get_cross_margin_collateral_ratio.__doc__ = (
        Client.get_cross_margin_collateral_ratio.__doc__
    )

    async def get_small_liability_exchange_assets(self, **params):
        return await self._request_margin_api(
            "get", "margin/exchange-small-liability", True, data=params
        )

    get_small_liability_exchange_assets.__doc__ = (
        Client.get_small_liability_exchange_assets.__doc__
    )

    async def exchange_small_liability_assets(self, **params):
        return await self._request_margin_api(
            "post", "margin/exchange-small-liability", True, data=params
        )

    exchange_small_liability_assets.__doc__ = (
        Client.exchange_small_liability_assets.__doc__
    )

    async def get_small_liability_exchange_history(self, **params):
        return await self._request_margin_api(
            "get", "margin/exchange-small-liability-history", True, data=params
        )

    get_small_liability_exchange_history.__doc__ = (
        Client.get_small_liability_exchange_history.__doc__
    )

    async def get_future_hourly_interest_rate(self, **params):
        return await self._request_margin_api(
            "get", "margin/next-hourly-interest-rate", True, data=params
        )

    get_future_hourly_interest_rate.__doc__ = (
        Client.get_future_hourly_interest_rate.__doc__
    )

    async def get_margin_capital_flow(self, **params):
        return await self._request_margin_api(
            "get", "margin/capital-flow", True, data=params
        )

    get_margin_capital_flow.__doc__ = Client.get_margin_capital_flow.__doc__

    async def get_margin_delist_schedule(self, **params):
        return await self._request_margin_api(
            "get", "margin/delist-schedule", True, data=params
        )

    get_margin_delist_schedule.__doc__ = Client.get_margin_delist_schedule.__doc__

    async def get_margin_asset(self, **params):
        return await self._request_margin_api("get", "margin/asset", data=params)

    get_margin_asset.__doc__ = Client.get_margin_asset.__doc__

    async def get_margin_symbol(self, **params):
        return await self._request_margin_api("get", "margin/pair", data=params)

    get_margin_symbol.__doc__ = Client.get_margin_symbol.__doc__

    async def get_margin_all_assets(self, **params):
        return await self._request_margin_api("get", "margin/allAssets", data=params)

    get_margin_all_assets.__doc__ = Client.get_margin_all_assets.__doc__

    async def get_margin_all_pairs(self, **params):
        return await self._request_margin_api("get", "margin/allPairs", data=params)

    get_margin_all_pairs.__doc__ = Client.get_margin_all_pairs.__doc__

    async def create_isolated_margin_account(self, **params):
        return await self._request_margin_api(
            "post", "margin/isolated/create", signed=True, data=params
        )

    create_isolated_margin_account.__doc__ = (
        Client.create_isolated_margin_account.__doc__
    )

    async def get_isolated_margin_symbol(self, **params):
        return await self._request_margin_api(
            "get", "margin/isolated/pair", signed=True, data=params
        )

    get_isolated_margin_symbol.__doc__ = Client.get_isolated_margin_symbol.__doc__

    async def get_all_isolated_margin_symbols(self, **params):
        return await self._request_margin_api(
            "get", "margin/isolated/allPairs", signed=True, data=params
        )

    get_all_isolated_margin_symbols.__doc__ = (
        Client.get_all_isolated_margin_symbols.__doc__
    )

    async def get_isolated_margin_fee_data(self, **params):
        return await self._request_margin_api(
            "get", "margin/isolatedMarginData", True, data=params
        )

    get_isolated_margin_fee_data.__doc__ = Client.get_isolated_margin_fee_data.__doc__

    async def get_isolated_margin_tier_data(self, **params):
        return await self._request_margin_api(
            "get", "margin/isolatedMarginTier", True, data=params
        )

    get_isolated_margin_tier_data.__doc__ = Client.get_isolated_margin_tier_data.__doc__

    async def margin_manual_liquidation(self, **params):
        return await self._request_margin_api(
            "get", "margin/manual-liquidation", True, data=params
        )

    margin_manual_liquidation.__doc__ = Client.margin_manual_liquidation.__doc__

    async def toggle_bnb_burn_spot_margin(self, **params):
        return await self._request_margin_api(
            "post", "bnbBurn", signed=True, data=params
        )

    toggle_bnb_burn_spot_margin.__doc__ = Client.toggle_bnb_burn_spot_margin.__doc__

    async def get_bnb_burn_spot_margin(self, **params):
        return await self._request_margin_api(
            "get", "bnbBurn", signed=True, data=params
        )

    get_bnb_burn_spot_margin.__doc__ = Client.get_bnb_burn_spot_margin.__doc__

    async def get_margin_price_index(self, **params):
        return await self._request_margin_api("get", "margin/priceIndex", data=params)

    get_margin_price_index.__doc__ = Client.get_margin_price_index.__doc__

    async def transfer_margin_to_spot(self, **params):
        params["type"] = 2
        return await self._request_margin_api(
            "post", "margin/transfer", signed=True, data=params
        )

    transfer_margin_to_spot.__doc__ = Client.transfer_margin_to_spot.__doc__

    async def transfer_spot_to_margin(self, **params):
        params["type"] = 1
        return await self._request_margin_api(
            "post", "margin/transfer", signed=True, data=params
        )

    transfer_spot_to_margin.__doc__ = Client.transfer_spot_to_margin.__doc__

    async def transfer_isolated_margin_to_spot(self, **params):
        params["transFrom"] = "ISOLATED_MARGIN"
        params["transTo"] = "SPOT"
        return await self._request_margin_api(
            "post", "margin/isolated/transfer", signed=True, data=params
        )

    transfer_isolated_margin_to_spot.__doc__ = (
        Client.transfer_isolated_margin_to_spot.__doc__
    )

    async def transfer_spot_to_isolated_margin(self, **params):
        params["transFrom"] = "SPOT"
        params["transTo"] = "ISOLATED_MARGIN"
        return await self._request_margin_api(
            "post", "margin/isolated/transfer", signed=True, data=params
        )

    transfer_spot_to_isolated_margin.__doc__ = (
        Client.transfer_spot_to_isolated_margin.__doc__
    )

    async def create_margin_loan(self, **params):
        return await self._request_margin_api(
            "post", "margin/loan", signed=True, data=params
        )

    create_margin_loan.__doc__ = Client.create_margin_loan.__doc__

    async def repay_margin_loan(self, **params):
        return await self._request_margin_api(
            "post", "margin/repay", signed=True, data=params
        )

    repay_margin_loan.__doc__ = Client.repay_margin_loan.__doc__

    async def create_margin_order(self, **params):
        if "newClientOrderId" not in params:
            params["newClientOrderId"] = self.SPOT_ORDER_PREFIX + self.uuid22()
        return await self._request_margin_api(
            "post", "margin/order", signed=True, data=params
        )

    create_margin_order.__doc__ = Client.create_margin_order.__doc__

    async def cancel_margin_order(self, **params):
        return await self._request_margin_api(
            "delete", "margin/order", signed=True, data=params
        )

    cancel_margin_order.__doc__ = Client.cancel_margin_order.__doc__

    async def cancel_all_open_margin_orders(self, **params):
        return await self._request_margin_api(
            "delete", "margin/openOrders", signed=True, data=params
        )

    cancel_all_open_margin_orders.__doc__ = Client.cancel_all_open_margin_orders.__doc__

    async def set_margin_max_leverage(self, **params):
        return await self._request_margin_api(
            "post", "margin/max-leverage", signed=True, data=params
        )

    set_margin_max_leverage.__doc__ = Client.set_margin_max_leverage.__doc__

    async def get_margin_transfer_history(self, **params):
        return await self._request_margin_api(
            "get", "margin/transfer", signed=True, data=params
        )

    get_margin_transfer_history.__doc__ = Client.get_margin_transfer_history.__doc__

    async def get_margin_loan_details(self, **params):
        return await self._request_margin_api(
            "get", "margin/loan", signed=True, data=params
        )

    get_margin_loan_details.__doc__ = Client.get_margin_loan_details.__doc__

    async def get_margin_repay_details(self, **params):
        return await self._request_margin_api(
            "get", "margin/repay", signed=True, data=params
        )

    get_margin_repay_details.__doc__ = Client.get_margin_repay_details.__doc__

    async def get_cross_margin_data(self, **params):
        return await self._request_margin_api(
            "get", "margin/crossMarginData", signed=True, data=params
        )

    get_cross_margin_data.__doc__ = Client.get_cross_margin_data.__doc__

    async def get_margin_interest_history(self, **params):
        return await self._request_margin_api(
            "get", "margin/interestHistory", signed=True, data=params
        )

    get_margin_interest_history.__doc__ = Client.get_margin_interest_history.__doc__

    async def get_margin_force_liquidation_rec(self, **params):
        return await self._request_margin_api(
            "get", "margin/forceLiquidationRec", signed=True, data=params
        )

    get_margin_force_liquidation_rec.__doc__ = Client.get_margin_force_liquidation_rec.__doc__

    async def get_margin_order(self, **params):
        return await self._request_margin_api(
            "get", "margin/order", signed=True, data=params
        )

    get_margin_order.__doc__ = Client.get_margin_order.__doc__

    async def get_open_margin_orders(self, **params):
        return await self._request_margin_api(
            "get", "margin/openOrders", signed=True, data=params
        )

    get_open_margin_orders.__doc__ = Client.get_open_margin_orders.__doc__

    async def get_all_margin_orders(self, **params):
        return await self._request_margin_api(
            "get", "margin/allOrders", signed=True, data=params
        )

    get_all_margin_orders.__doc__ = Client.get_all_margin_orders.__doc__

    async def get_margin_trades(self, **params):
        return await self._request_margin_api(
            "get", "margin/myTrades", signed=True, data=params
        )

    get_margin_trades.__doc__ = Client.get_margin_trades.__doc__

    async def get_max_margin_loan(self, **params):
        return await self._request_margin_api(
            "get", "margin/maxBorrowable", signed=True, data=params
        )

    get_max_margin_loan.__doc__ = Client.get_max_margin_loan.__doc__

    async def get_max_margin_transfer(self, **params):
        return await self._request_margin_api(
            "get", "margin/maxTransferable", signed=True, data=params
        )

    # Margin OCO

    get_max_margin_transfer.__doc__ = Client.get_max_margin_transfer.__doc__

    async def create_margin_oco_order(self, **params):
        return await self._request_margin_api(
            "post", "margin/order/oco", signed=True, data=params
        )

    create_margin_oco_order.__doc__ = Client.create_margin_oco_order.__doc__

    async def cancel_margin_oco_order(self, **params):
        return await self._request_margin_api(
            "delete", "margin/orderList", signed=True, data=params
        )

    cancel_margin_oco_order.__doc__ = Client.cancel_margin_oco_order.__doc__

    async def get_margin_oco_order(self, **params):
        return await self._request_margin_api(
            "get", "margin/orderList", signed=True, data=params
        )

    get_margin_oco_order.__doc__ = Client.get_margin_oco_order.__doc__

    async def get_open_margin_oco_orders(self, **params):
        return await self._request_margin_api(
            "get", "margin/openOrderList", signed=True, data=params
        )

    # Cross-margin

    get_open_margin_oco_orders.__doc__ = Client.get_open_margin_oco_orders.__doc__

    async def margin_stream_get_listen_key(self):
        warnings.warn(
            "POST /sapi/v1/userDataStream is deprecated and will be removed on 2026-02-20. "
            "Use the WebSocket API subscription method instead (create listenToken via POST /sapi/v1/userListenToken, "
            "then subscribe with userDataStream.subscribe.listenToken). "
            "The margin_socket() method now uses WebSocket API by default.",
            DeprecationWarning,
            stacklevel=2
        )
        res = await self._request_margin_api(
            "post", "userDataStream", signed=False, data={}
        )
        return res["listenKey"]

    margin_stream_get_listen_key.__doc__ = Client.margin_stream_get_listen_key.__doc__

    async def margin_stream_keepalive(self, listenKey):
        warnings.warn(
            "PUT /sapi/v1/userDataStream is deprecated and will be removed on 2026-02-20. "
            "Use the WebSocket API subscription method instead (create listenToken via POST /sapi/v1/userListenToken, "
            "then subscribe with userDataStream.subscribe.listenToken). "
            "The margin_socket() method now uses WebSocket API by default.",
            DeprecationWarning,
            stacklevel=2
        )
        params = {"listenKey": listenKey}
        return await self._request_margin_api(
            "put", "userDataStream", signed=False, data=params
        )

    margin_stream_keepalive.__doc__ = Client.margin_stream_keepalive.__doc__

    async def margin_stream_close(self, listenKey):
        warnings.warn(
            "DELETE /sapi/v1/userDataStream is deprecated and will be removed on 2026-02-20. "
            "Use the WebSocket API subscription method instead (create listenToken via POST /sapi/v1/userListenToken, "
            "then subscribe with userDataStream.subscribe.listenToken). "
            "The margin_socket() method now uses WebSocket API by default.",
            DeprecationWarning,
            stacklevel=2
        )
        params = {"listenKey": listenKey}
        return await self._request_margin_api(
            "delete", "userDataStream", signed=False, data=params
        )

    async def margin_create_listen_token(self, symbol: Optional[str] = None, is_isolated: bool = False, validity: Optional[int] = None):
        """Create a listenToken for margin account user data stream

        https://developers.binance.com/docs/margin_trading/trade-data-stream/Create-Margin-Account-listenToken

        :param symbol: Trading pair symbol (required when is_isolated=True)
        :type symbol: str
        :param is_isolated: Whether it is isolated margin (default: False for cross-margin)
        :type is_isolated: bool
        :param validity: Validity in milliseconds (default: 24 hours, max: 24 hours)
        :type validity: int
        :returns: API response with token and expirationTime

        .. code-block:: python

            {
                "token": "6xXxePXwZRjVSHKhzUCCGnmN3fkvMTXru+pYJS8RwijXk9Vcyr3rkwfVOTcP2OkONqciYA",
                "expirationTime": 1758792204196
            }
        """
        params = {}
        if is_isolated:
            if not symbol:
                raise ValueError("symbol is required when is_isolated=True")
            params["symbol"] = symbol
            params["isIsolated"] = "true"
        if validity is not None:
            params["validity"] = validity

        return await self._request_margin_api(
            "post", "userListenToken", signed=True, data=params
        )

        # Isolated margin

    margin_stream_close.__doc__ = Client.margin_stream_close.__doc__

    async def isolated_margin_stream_get_listen_key(self, symbol):
        warnings.warn(
            "POST /sapi/v1/userDataStream/isolated is deprecated and will be removed on 2026-02-20. "
            "Use the WebSocket API subscription method instead (create listenToken via POST /sapi/v1/userListenToken "
            "with isIsolated=true, then subscribe with userDataStream.subscribe.listenToken). "
            "The isolated_margin_socket() method now uses WebSocket API by default.",
            DeprecationWarning,
            stacklevel=2
        )
        params = {"symbol": symbol}
        res = await self._request_margin_api(
            "post", "userDataStream/isolated", signed=False, data=params
        )
        return res["listenKey"]

    isolated_margin_stream_get_listen_key.__doc__ = Client.isolated_margin_stream_get_listen_key.__doc__

    async def isolated_margin_stream_keepalive(self, symbol, listenKey):
        warnings.warn(
            "PUT /sapi/v1/userDataStream/isolated is deprecated and will be removed on 2026-02-20. "
            "Use the WebSocket API subscription method instead (create listenToken via POST /sapi/v1/userListenToken "
            "with isIsolated=true, then subscribe with userDataStream.subscribe.listenToken). "
            "The isolated_margin_socket() method now uses WebSocket API by default.",
            DeprecationWarning,
            stacklevel=2
        )
        params = {"symbol": symbol, "listenKey": listenKey}
        return await self._request_margin_api(
            "put", "userDataStream/isolated", signed=False, data=params
        )

    isolated_margin_stream_keepalive.__doc__ = Client.isolated_margin_stream_keepalive.__doc__

    async def isolated_margin_stream_close(self, symbol, listenKey):
        warnings.warn(
            "DELETE /sapi/v1/userDataStream/isolated is deprecated and will be removed on 2026-02-20. "
            "Use the WebSocket API subscription method instead (create listenToken via POST /sapi/v1/userListenToken "
            "with isIsolated=true, then subscribe with userDataStream.subscribe.listenToken). "
            "The isolated_margin_socket() method now uses WebSocket API by default.",
            DeprecationWarning,
            stacklevel=2
        )
        params = {"symbol": symbol, "listenKey": listenKey}
        return await self._request_margin_api(
            "delete", "userDataStream/isolated", signed=False, data=params
        )

    # Simple Earn Endpoints

    isolated_margin_stream_close.__doc__ = Client.isolated_margin_stream_close.__doc__

    async def get_simple_earn_flexible_product_list(self, **params):
        return await self._request_margin_api(
            "get", "simple-earn/flexible/list", signed=True, data=params
        )

    get_simple_earn_flexible_product_list.__doc__ = (
        Client.get_simple_earn_flexible_product_list.__doc__
    )

    async def get_simple_earn_locked_product_list(self, **params):
        return await self._request_margin_api(
            "get", "simple-earn/locked/list", signed=True, data=params
        )

    get_simple_earn_locked_product_list.__doc__ = (
        Client.get_simple_earn_locked_product_list.__doc__
    )

    async def subscribe_simple_earn_flexible_product(self, **params):
        return await self._request_margin_api(
            "post", "simple-earn/flexible/subscribe", signed=True, data=params
        )

    subscribe_simple_earn_flexible_product.__doc__ = (
        Client.subscribe_simple_earn_flexible_product.__doc__
    )

    async def subscribe_simple_earn_locked_product(self, **params):
        return await self._request_margin_api(
            "post", "simple-earn/locked/subscribe", signed=True, data=params
        )

    subscribe_simple_earn_locked_product.__doc__ = (
        Client.subscribe_simple_earn_locked_product.__doc__
    )

    async def redeem_simple_earn_flexible_product(self, **params):
        return await self._request_margin_api(
            "post", "simple-earn/flexible/redeem", signed=True, data=params
        )

    redeem_simple_earn_flexible_product.__doc__ = (
        Client.redeem_simple_earn_flexible_product.__doc__
    )

    async def redeem_simple_earn_locked_product(self, **params):
        return await self._request_margin_api(
            "post", "simple-earn/locked/redeem", signed=True, data=params
        )

    redeem_simple_earn_locked_product.__doc__ = (
        Client.redeem_simple_earn_locked_product.__doc__
    )

    async def get_simple_earn_flexible_product_position(self, **params):
        return await self._request_margin_api(
            "get", "simple-earn/flexible/position", signed=True, data=params
        )

    get_simple_earn_flexible_product_position.__doc__ = (
        Client.get_simple_earn_flexible_product_position.__doc__
    )

    async def get_simple_earn_locked_product_position(self, **params):
        return await self._request_margin_api(
            "get", "simple-earn/locked/position", signed=True, data=params
        )

    get_simple_earn_locked_product_position.__doc__ = (
        Client.get_simple_earn_locked_product_position.__doc__
    )

    async def get_simple_earn_account(self, **params):
        return await self._request_margin_api(
            "get", "simple-earn/account", signed=True, data=params
        )

    get_simple_earn_account.__doc__ = Client.get_simple_earn_account.__doc__

    # Lending Endpoints

    async def get_fixed_activity_project_list(self, **params):
        return await self._request_margin_api(
            "get", "lending/project/list", signed=True, data=params
        )

    get_fixed_activity_project_list.__doc__ = Client.get_fixed_activity_project_list.__doc__

    async def change_fixed_activity_to_daily_position(self, **params):
        return await self._request_margin_api(
            "post", "lending/positionChanged", signed=True, data=params
        )

    # Staking Endpoints

    change_fixed_activity_to_daily_position.__doc__ = Client.change_fixed_activity_to_daily_position.__doc__

    async def get_staking_product_list(self, **params):
        return await self._request_margin_api(
            "get", "staking/productList", signed=True, data=params
        )

    get_staking_product_list.__doc__ = Client.get_staking_product_list.__doc__

    async def purchase_staking_product(self, **params):
        return await self._request_margin_api(
            "post", "staking/purchase", signed=True, data=params
        )

    purchase_staking_product.__doc__ = Client.purchase_staking_product.__doc__

    async def redeem_staking_product(self, **params):
        return await self._request_margin_api(
            "post", "staking/redeem", signed=True, data=params
        )

    redeem_staking_product.__doc__ = Client.redeem_staking_product.__doc__

    async def get_staking_position(self, **params):
        return await self._request_margin_api(
            "get", "staking/position", signed=True, data=params
        )

    get_staking_position.__doc__ = Client.get_staking_position.__doc__

    async def get_staking_purchase_history(self, **params):
        return await self._request_margin_api(
            "get", "staking/purchaseRecord", signed=True, data=params
        )

    get_staking_purchase_history.__doc__ = Client.get_staking_purchase_history.__doc__

    async def set_auto_staking(self, **params):
        return await self._request_margin_api(
            "post", "staking/setAutoStaking", signed=True, data=params
        )

    set_auto_staking.__doc__ = Client.set_auto_staking.__doc__

    async def get_personal_left_quota(self, **params):
        return await self._request_margin_api(
            "get", "staking/personalLeftQuota", signed=True, data=params
        )

    # US Staking Endpoints

    get_personal_left_quota.__doc__ = Client.get_personal_left_quota.__doc__

    async def get_staking_asset_us(self, **params):
        self._require_tld("us", "get_staking_asset_us")
        return await self._request_margin_api("get", "staking/asset", True, data=params)

    get_staking_asset_us.__doc__ = Client.get_staking_asset_us.__doc__

    async def stake_asset_us(self, **params):
        self._require_tld("us", "stake_asset_us")
        return await self._request_margin_api(
            "post", "staking/stake", True, data=params
        )

    stake_asset_us.__doc__ = Client.stake_asset_us.__doc__

    async def unstake_asset_us(self, **params):
        self._require_tld("us", "unstake_asset_us")
        return await self._request_margin_api(
            "post", "staking/unstake", True, data=params
        )

    unstake_asset_us.__doc__ = Client.unstake_asset_us.__doc__

    async def get_staking_balance_us(self, **params):
        self._require_tld("us", "get_staking_balance_us")
        return await self._request_margin_api(
            "get", "staking/stakingBalance", True, data=params
        )

    get_staking_balance_us.__doc__ = Client.get_staking_balance_us.__doc__

    async def get_staking_history_us(self, **params):
        self._require_tld("us", "get_staking_history_us")
        return await self._request_margin_api(
            "get", "staking/history", True, data=params
        )

    get_staking_history_us.__doc__ = Client.get_staking_history_us.__doc__

    async def get_staking_rewards_history_us(self, **params):
        self._require_tld("us", "get_staking_rewards_history_us")
        return await self._request_margin_api(
            "get", "staking/stakingRewardsHistory", True, data=params
        )

    get_staking_rewards_history_us.__doc__ = (
        Client.get_staking_rewards_history_us.__doc__
    )

    # Sub Accounts

    async def get_sub_account_list(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/list", True, data=params
        )

    get_sub_account_list.__doc__ = Client.get_sub_account_list.__doc__

    async def get_sub_account_transfer_history(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/sub/transfer/history", True, data=params
        )

    get_sub_account_transfer_history.__doc__ = Client.get_sub_account_transfer_history.__doc__

    async def get_sub_account_futures_transfer_history(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/futures/internalTransfer", True, data=params
        )

    get_sub_account_futures_transfer_history.__doc__ = Client.get_sub_account_futures_transfer_history.__doc__

    async def create_sub_account_futures_transfer(self, **params):
        return await self._request_margin_api(
            "post", "sub-account/futures/internalTransfer", True, data=params
        )

    create_sub_account_futures_transfer.__doc__ = Client.create_sub_account_futures_transfer.__doc__

    async def get_sub_account_assets(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/assets", True, data=params, version=4
        )

    get_sub_account_assets.__doc__ = Client.get_sub_account_assets.__doc__

    async def query_subaccount_spot_summary(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/spotSummary", True, data=params
        )

    query_subaccount_spot_summary.__doc__ = Client.query_subaccount_spot_summary.__doc__

    async def get_subaccount_deposit_address(self, **params):
        return await self._request_margin_api(
            "get", "capital/deposit/subAddress", True, data=params
        )

    get_subaccount_deposit_address.__doc__ = Client.get_subaccount_deposit_address.__doc__

    async def get_subaccount_deposit_history(self, **params):
        return await self._request_margin_api(
            "get", "capital/deposit/subHisrec", True, data=params
        )

    get_subaccount_deposit_history.__doc__ = Client.get_subaccount_deposit_history.__doc__

    async def get_subaccount_futures_margin_status(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/status", True, data=params
        )

    get_subaccount_futures_margin_status.__doc__ = Client.get_subaccount_futures_margin_status.__doc__

    async def enable_subaccount_margin(self, **params):
        return await self._request_margin_api(
            "post", "sub-account/margin/enable", True, data=params
        )

    enable_subaccount_margin.__doc__ = Client.enable_subaccount_margin.__doc__

    async def get_subaccount_margin_details(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/margin/account", True, data=params
        )

    get_subaccount_margin_details.__doc__ = Client.get_subaccount_margin_details.__doc__

    async def get_subaccount_margin_summary(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/margin/accountSummary", True, data=params
        )

    get_subaccount_margin_summary.__doc__ = Client.get_subaccount_margin_summary.__doc__

    async def enable_subaccount_futures(self, **params):
        return await self._request_margin_api(
            "post", "sub-account/futures/enable", True, data=params
        )

    enable_subaccount_futures.__doc__ = Client.enable_subaccount_futures.__doc__

    async def get_subaccount_futures_details(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/futures/account", True, data=params, version=2
        )

    get_subaccount_futures_details.__doc__ = Client.get_subaccount_futures_details.__doc__

    async def get_subaccount_futures_summary(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/futures/accountSummary", True, data=params, version=2
        )

    get_subaccount_futures_summary.__doc__ = Client.get_subaccount_futures_summary.__doc__

    async def get_subaccount_futures_positionrisk(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/futures/positionRisk", True, data=params, version=2
        )

    get_subaccount_futures_positionrisk.__doc__ = Client.get_subaccount_futures_positionrisk.__doc__

    async def make_subaccount_futures_transfer(self, **params):
        return await self._request_margin_api(
            "post", "sub-account/futures/transfer", True, data=params
        )

    make_subaccount_futures_transfer.__doc__ = Client.make_subaccount_futures_transfer.__doc__

    async def make_subaccount_margin_transfer(self, **params):
        return await self._request_margin_api(
            "post", "sub-account/margin/transfer", True, data=params
        )

    make_subaccount_margin_transfer.__doc__ = Client.make_subaccount_margin_transfer.__doc__

    async def make_subaccount_to_subaccount_transfer(self, **params):
        return await self._request_margin_api(
            "post", "sub-account/transfer/subToSub", True, data=params
        )

    make_subaccount_to_subaccount_transfer.__doc__ = Client.make_subaccount_to_subaccount_transfer.__doc__

    async def make_subaccount_to_master_transfer(self, **params):
        return await self._request_margin_api(
            "post", "sub-account/transfer/subToMaster", True, data=params
        )

    make_subaccount_to_master_transfer.__doc__ = Client.make_subaccount_to_master_transfer.__doc__

    async def get_subaccount_transfer_history(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/transfer/subUserHistory", True, data=params
        )

    get_subaccount_transfer_history.__doc__ = Client.get_subaccount_transfer_history.__doc__

    async def make_subaccount_universal_transfer(self, **params):
        return await self._request_margin_api(
            "post", "sub-account/universalTransfer", True, data=params
        )

    make_subaccount_universal_transfer.__doc__ = Client.make_subaccount_universal_transfer.__doc__

    async def get_universal_transfer_history(self, **params):
        return await self._request_margin_api(
            "get", "sub-account/universalTransfer", True, data=params
        )

    # Futures API

    get_universal_transfer_history.__doc__ = Client.get_universal_transfer_history.__doc__

    async def futures_ping(self):
        return await self._request_futures_api("get", "ping")

    futures_ping.__doc__ = Client.futures_ping.__doc__

    async def futures_time(self):
        return await self._request_futures_api("get", "time")

    futures_time.__doc__ = Client.futures_time.__doc__

    async def futures_exchange_info(self):
        return await self._request_futures_api("get", "exchangeInfo")

    futures_exchange_info.__doc__ = Client.futures_exchange_info.__doc__

    async def futures_order_book(self, **params):
        return await self._request_futures_api("get", "depth", data=params)

    futures_order_book.__doc__ = Client.futures_order_book.__doc__

    async def futures_rpi_depth(self, **params):
        return await self._request_futures_api("get", "rpiDepth", data=params)

    futures_rpi_depth.__doc__ = Client.futures_rpi_depth.__doc__

    async def futures_recent_trades(self, **params):
        return await self._request_futures_api("get", "trades", data=params)

    futures_recent_trades.__doc__ = Client.futures_recent_trades.__doc__

    async def futures_historical_trades(self, **params):
        return await self._request_futures_api("get", "historicalTrades", data=params)

    futures_historical_trades.__doc__ = Client.futures_historical_trades.__doc__

    async def futures_aggregate_trades(self, **params):
        return await self._request_futures_api("get", "aggTrades", data=params)

    futures_aggregate_trades.__doc__ = Client.futures_aggregate_trades.__doc__

    async def futures_klines(self, **params):
        return await self._request_futures_api("get", "klines", data=params)

    futures_klines.__doc__ = Client.futures_klines.__doc__

    async def futures_mark_price_klines(self, **params):
        return await self._request_futures_api("get", "markPriceKlines", data=params)

    futures_mark_price_klines.__doc__ = Client.futures_mark_price_klines.__doc__

    async def futures_index_price_klines(self, **params):
        return await self._request_futures_api("get", "indexPriceKlines", data=params)

    futures_index_price_klines.__doc__ = Client.futures_index_price_klines.__doc__

    async def futures_premium_index_klines(self, **params):
        return await self._request_futures_api("get", "premiumIndexKlines", data=params)

    futures_premium_index_klines.__doc__ = Client.futures_index_price_klines.__doc__

    async def futures_continuous_klines(self, **params):
        return await self._request_futures_api("get", "continuousKlines", data=params)

    futures_continuous_klines.__doc__ = Client.futures_continuous_klines.__doc__

    async def futures_historical_klines(
        self, symbol: str, interval: str, start_str, end_str=None, limit=None
    ):
        return await self._historical_klines(
            symbol,
            interval,
            start_str,
            end_str=end_str,
            limit=limit,
            klines_type=HistoricalKlinesType.FUTURES,
        )

    futures_historical_klines.__doc__ = Client.futures_historical_klines.__doc__

    async def futures_historical_klines_generator(
        self, symbol, interval, start_str, end_str=None
    ):
        return self._historical_klines_generator(
            symbol,
            interval,
            start_str,
            end_str=end_str,
            klines_type=HistoricalKlinesType.FUTURES,
        )

    futures_historical_klines_generator.__doc__ = Client.futures_historical_klines_generator.__doc__

    async def futures_mark_price(self, **params):
        return await self._request_futures_api("get", "premiumIndex", data=params)

    futures_mark_price.__doc__ = Client.futures_mark_price.__doc__

    async def futures_funding_rate(self, **params):
        return await self._request_futures_api("get", "fundingRate", data=params)

    futures_funding_rate.__doc__ = Client.futures_funding_rate.__doc__

    async def futures_top_longshort_account_ratio(self, **params):
        return await self._request_futures_data_api(
            "get", "topLongShortAccountRatio", data=params
        )

    futures_top_longshort_account_ratio.__doc__ = Client.futures_top_longshort_account_ratio.__doc__

    async def futures_top_longshort_position_ratio(self, **params):
        return await self._request_futures_data_api(
            "get", "topLongShortPositionRatio", data=params
        )

    futures_top_longshort_position_ratio.__doc__ = Client.futures_top_longshort_position_ratio.__doc__

    async def futures_global_longshort_ratio(self, **params):
        return await self._request_futures_data_api(
            "get", "globalLongShortAccountRatio", data=params
        )

    futures_global_longshort_ratio.__doc__ = Client.futures_global_longshort_ratio.__doc__
        
    async def futures_taker_longshort_ratio(self, **params):
        return await self._request_futures_data_api(
            "get", "takerlongshortRatio", data=params
        )

    futures_taker_longshort_ratio.__doc__ = Client.futures_taker_longshort_ratio.__doc__

    async def futures_ticker(self, **params):
        return await self._request_futures_api("get", "ticker/24hr", data=params)

    futures_ticker.__doc__ = Client.futures_ticker.__doc__

    async def futures_symbol_ticker(self, **params):
        return await self._request_futures_api("get", "ticker/price", version=2, data=params)
    
    futures_symbol_ticker.__doc__ = Client.futures_symbol_ticker.__doc__

    futures_symbol_ticker.__doc__ = Client.futures_symbol_ticker.__doc__

    futures_symbol_ticker.__doc__ = Client.futures_symbol_ticker.__doc__

    async def futures_orderbook_ticker(self, **params):
        return await self._request_futures_api("get", "ticker/bookTicker", data=params)

    futures_orderbook_ticker.__doc__ = Client.futures_orderbook_ticker.__doc__

    async def futures_index_price_constituents(self, **params):
        return await self._request_futures_api("get", "constituents", data=params)

    futures_index_price_constituents.__doc__ = (
        Client.futures_index_price_constituents.__doc__
    )

    async def futures_liquidation_orders(self, **params):
        return await self._request_futures_api(
            "get", "forceOrders", signed=True, data=params
        )

    futures_liquidation_orders.__doc__ = Client.futures_liquidation_orders.__doc__

    async def futures_api_trading_status(self, **params):
        return await self._request_futures_api(
            "get", "apiTradingStatus", signed=True, data=params
        )

    futures_api_trading_status.__doc__ = Client.futures_api_trading_status.__doc__

    async def futures_commission_rate(self, **params):
        return await self._request_futures_api(
            "get", "commissionRate", signed=True, data=params
        )

    futures_commission_rate.__doc__ = Client.futures_commission_rate.__doc__

    async def futures_adl_quantile_estimate(self, **params):
        return await self._request_futures_api(
            "get", "adlQuantile", signed=True, data=params
        )

    futures_adl_quantile_estimate.__doc__ = Client.futures_adl_quantile_estimate.__doc__

    async def futures_open_interest(self, **params):
        return await self._request_futures_api("get", "openInterest", data=params)

    futures_open_interest.__doc__ = Client.futures_open_interest.__doc__

    async def futures_index_info(self, **params):
        return await self._request_futures_api("get", "indexInfo", data=params)

    futures_index_info.__doc__ = Client.futures_index_info.__doc__

    async def futures_open_interest_hist(self, **params):
        return await self._request_futures_data_api(
            "get", "openInterestHist", data=params
        )

    futures_open_interest_hist.__doc__ = Client.futures_open_interest_hist.__doc__

    async def futures_leverage_bracket(self, **params):
        return await self._request_futures_api(
            "get", "leverageBracket", True, data=params
        )

    futures_leverage_bracket.__doc__ = Client.futures_leverage_bracket.__doc__

    async def futures_account_transfer(self, **params):
        return await self._request_margin_api(
            "post", "futures/transfer", True, data=params
        )

    futures_account_transfer.__doc__ = Client.futures_account_transfer.__doc__

    async def transfer_history(self, **params):
        return await self._request_margin_api(
            "get", "futures/transfer", True, data=params
        )

    transfer_history.__doc__ = Client.transfer_history.__doc__

    async def futures_loan_borrow_history(self, **params):
        return await self._request_margin_api(
            "get", "futures/loan/borrow/history", True, data=params
        )

    futures_loan_borrow_history.__doc__ = Client.futures_loan_borrow_history.__doc__

    async def futures_loan_repay_history(self, **params):
        return await self._request_margin_api(
            "get", "futures/loan/repay/history", True, data=params
        )

    futures_loan_re
Download .txt
gitextract_kozbdaqs/

├── .coverage
├── .github/
│   ├── CODEOWNERS
│   ├── ISSUE_TEMPLATE/
│   │   └── bug_report.md
│   └── workflows/
│       └── python-app.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .readthedocs.yaml
├── .travis.yml
├── Endpoints.md
├── LICENSE
├── PYPIREADME.rst
├── README.rst
├── binance/
│   ├── __init__.py
│   ├── async_client.py
│   ├── base_client.py
│   ├── client.py
│   ├── enums.py
│   ├── exceptions.py
│   ├── helpers.py
│   └── ws/
│       ├── __init__.py
│       ├── constants.py
│       ├── depthcache.py
│       ├── keepalive_websocket.py
│       ├── reconnecting_websocket.py
│       ├── streams.py
│       ├── threaded_stream.py
│       └── websocket_api.py
├── code-generator.py
├── docs/
│   ├── Makefile
│   ├── account.rst
│   ├── binance.rst
│   ├── changelog.rst
│   ├── conf.py
│   ├── constants.rst
│   ├── depth_cache.rst
│   ├── exceptions.rst
│   ├── faqs.rst
│   ├── general.rst
│   ├── helpers.rst
│   ├── index.rst
│   ├── margin.rst
│   ├── market_data.rst
│   ├── overview.rst
│   ├── requirements.txt
│   ├── sub_accounts.rst
│   ├── websockets.rst
│   └── withdraw.rst
├── examples/
│   ├── binace_socket_manager.py
│   ├── create_oco_order.py
│   ├── create_order.py
│   ├── create_order_async.py
│   ├── depth_cache_example.py
│   ├── depth_cache_threaded_example.py
│   ├── futures_algo_order_examples.py
│   ├── save_historical_data.py
│   ├── verbose_example.py
│   ├── websocket.py
│   ├── ws_create_order.py
│   └── ws_create_order_async.py
├── pyproject.toml
├── pyrightconfig.json
├── pytest.ini
├── requirements.txt
├── setup.cfg
├── setup.py
├── test-requirements.txt
├── tests/
│   ├── __init__.py
│   ├── conftest.py
│   ├── test_api_request.py
│   ├── test_async_client.py
│   ├── test_async_client_futures.py
│   ├── test_async_client_gift_card copy.py
│   ├── test_async_client_margin.py
│   ├── test_async_client_options.py
│   ├── test_async_client_portfolio.py
│   ├── test_async_client_ws_api.py
│   ├── test_async_client_ws_futures_requests.py
│   ├── test_client.py
│   ├── test_client_futures.py
│   ├── test_client_gift_card.py
│   ├── test_client_margin.py
│   ├── test_client_options.py
│   ├── test_client_portfolio.py
│   ├── test_client_ws_api.py
│   ├── test_client_ws_futures_requests.py
│   ├── test_cryptography.py
│   ├── test_depth_cache.py
│   ├── test_futures.py
│   ├── test_get_order_book.py
│   ├── test_headers.py
│   ├── test_historical_klines.py
│   ├── test_ids.py
│   ├── test_init.py
│   ├── test_keepalive_reconnect.py
│   ├── test_order.py
│   ├── test_ping.py
│   ├── test_reconnecting_websocket.py
│   ├── test_region_exception.py
│   ├── test_socket_manager.py
│   ├── test_streams.py
│   ├── test_streams_options.py
│   ├── test_threaded_socket_manager.py
│   ├── test_threaded_stream.py
│   ├── test_user_socket_integration.py
│   ├── test_verbose_mode.py
│   ├── test_websocket_verbose.py
│   ├── test_ws_api.py
│   └── utils.py
└── tox.ini
Download .txt
Showing preview only (326K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3068 symbols across 68 files)

FILE: binance/async_client.py
  class AsyncClient (line 26) | class AsyncClient(BaseClient):
    method __init__ (line 27) | def __init__(
    method create (line 71) | async def create(
    method _init_session (line 120) | def _init_session(self) -> aiohttp.ClientSession:
    method close_connection (line 126) | async def close_connection(self):
    method _request (line 136) | async def _request(
    method _handle_response (line 201) | async def _handle_response(self, response: aiohttp.ClientResponse):
    method _request_api (line 219) | async def _request_api(
    method _request_futures_api (line 231) | async def _request_futures_api(
    method _request_futures_data_api (line 239) | async def _request_futures_data_api(
    method _request_futures_coin_api (line 246) | async def _request_futures_coin_api(
    method _request_futures_coin_data_api (line 254) | async def _request_futures_coin_data_api(
    method _request_options_api (line 263) | async def _request_options_api(self, method, path, signed=False, **kwa...
    method _request_margin_api (line 269) | async def _request_margin_api(
    method _request_papi_api (line 278) | async def _request_papi_api(
    method _request_website (line 287) | async def _request_website(self, method, path, signed=False, **kwargs)...
    method _get (line 291) | async def _get(
    method _post (line 296) | async def _post(
    method _put (line 301) | async def _put(
    method _delete (line 306) | async def _delete(
    method get_products (line 313) | async def get_products(self) -> Dict:
    method get_exchange_info (line 322) | async def get_exchange_info(self) -> Dict:
    method get_symbol_info (line 327) | async def get_symbol_info(self, symbol) -> Optional[Dict]:
    method ping (line 340) | async def ping(self) -> Dict:
    method get_server_time (line 345) | async def get_server_time(self) -> Dict:
    method get_all_tickers (line 352) | async def get_all_tickers(
    method get_orderbook_tickers (line 367) | async def get_orderbook_tickers(self, **params) -> Dict:
    method get_order_book (line 379) | async def get_order_book(self, **params) -> Dict:
    method get_recent_trades (line 384) | async def get_recent_trades(self, **params) -> Dict:
    method get_historical_trades (line 389) | async def get_historical_trades(self, **params) -> Dict:
    method get_aggregate_trades (line 396) | async def get_aggregate_trades(self, **params) -> Dict:
    method aggregate_trade_iter (line 403) | async def aggregate_trade_iter(self, symbol, start_str=None, last_id=N...
    method get_ui_klines (line 458) | async def get_ui_klines(self, **params) -> Dict:
    method get_klines (line 463) | async def get_klines(self, **params) -> Dict:
    method _klines (line 468) | async def _klines(
    method _get_earliest_valid_timestamp (line 492) | async def _get_earliest_valid_timestamp(
    method get_historical_klines (line 510) | async def get_historical_klines(
    method _historical_klines (line 530) | async def _historical_klines(
    method get_historical_klines_generator (line 607) | async def get_historical_klines_generator(
    method _historical_klines_generator (line 629) | async def _historical_klines_generator(
    method get_avg_price (line 693) | async def get_avg_price(self, **params):
    method get_ticker (line 700) | async def get_ticker(self, **params):
    method get_symbol_ticker (line 707) | async def get_symbol_ticker(self, **params):
    method get_symbol_ticker_window (line 714) | async def get_symbol_ticker_window(self, **params):
    method get_orderbook_ticker (line 719) | async def get_orderbook_ticker(self, **params):
    method create_order (line 728) | async def create_order(self, **params):
    method order_limit (line 735) | async def order_limit(self, timeInForce=BaseClient.TIME_IN_FORCE_GTC, ...
    method order_limit_buy (line 741) | async def order_limit_buy(self, timeInForce=BaseClient.TIME_IN_FORCE_G...
    method order_limit_sell (line 749) | async def order_limit_sell(
    method order_market (line 757) | async def order_market(self, **params):
    method order_market_buy (line 763) | async def order_market_buy(self, **params):
    method order_market_sell (line 769) | async def order_market_sell(self, **params):
    method order_oco_buy (line 775) | async def order_oco_buy(self, **params):
    method order_oco_sell (line 781) | async def order_oco_sell(self, **params):
    method create_test_order (line 787) | async def create_test_order(self, **params):
    method get_order (line 792) | async def get_order(self, **params):
    method get_all_orders (line 797) | async def get_all_orders(self, **params):
    method cancel_order (line 802) | async def cancel_order(self, **params):
    method get_open_orders (line 807) | async def get_open_orders(self, **params):
    method get_open_oco_orders (line 812) | async def get_open_oco_orders(self, **params):
    method get_account (line 818) | async def get_account(self, **params):
    method get_asset_balance (line 823) | async def get_asset_balance(self, asset=None, **params):
    method get_my_trades (line 837) | async def get_my_trades(self, **params):
    method get_current_order_count (line 842) | async def get_current_order_count(self, **params):
    method get_prevented_matches (line 847) | async def get_prevented_matches(self, **params):
    method get_allocations (line 852) | async def get_allocations(self, **params):
    method get_system_status (line 857) | async def get_system_status(self):
    method get_account_status (line 862) | async def get_account_status(self, **params):
    method get_account_api_trading_status (line 869) | async def get_account_api_trading_status(self, **params):
    method get_account_api_permissions (line 878) | async def get_account_api_permissions(self, **params):
    method get_dust_assets (line 885) | async def get_dust_assets(self, **params):
    method get_dust_log (line 892) | async def get_dust_log(self, **params):
    method transfer_dust (line 899) | async def transfer_dust(self, **params):
    method get_asset_dividend_history (line 904) | async def get_asset_dividend_history(self, **params):
    method make_universal_transfer (line 911) | async def make_universal_transfer(self, **params):
    method query_universal_transfer_history (line 918) | async def query_universal_transfer_history(self, **params):
    method get_trade_fee (line 927) | async def get_trade_fee(self, **params):
    method get_asset_details (line 936) | async def get_asset_details(self, **params):
    method get_spot_delist_schedule (line 943) | async def get_spot_delist_schedule(self, **params):
    method withdraw (line 952) | async def withdraw(self, **params):
    method get_deposit_history (line 962) | async def get_deposit_history(self, **params):
    method get_withdraw_history (line 969) | async def get_withdraw_history(self, **params):
    method get_withdraw_history_id (line 976) | async def get_withdraw_history_id(self, withdraw_id, **params):
    method get_deposit_address (line 987) | async def get_deposit_address(
    method stream_get_listen_key (line 1001) | async def stream_get_listen_key(self):
    method stream_keepalive (line 1007) | async def stream_keepalive(self, listenKey):
    method stream_close (line 1013) | async def stream_close(self, listenKey):
    method get_margin_account (line 1020) | async def get_margin_account(self, **params):
    method get_isolated_margin_account (line 1027) | async def get_isolated_margin_account(self, **params):
    method enable_isolated_margin_account (line 1034) | async def enable_isolated_margin_account(self, **params):
    method disable_isolated_margin_account (line 1043) | async def disable_isolated_margin_account(self, **params):
    method get_enabled_isolated_margin_account_limit (line 1052) | async def get_enabled_isolated_margin_account_limit(self, **params):
    method get_margin_dustlog (line 1061) | async def get_margin_dustlog(self, **params):
    method get_margin_dust_assets (line 1068) | async def get_margin_dust_assets(self, **params):
    method transfer_margin_dust (line 1073) | async def transfer_margin_dust(self, **params):
    method get_cross_margin_collateral_ratio (line 1078) | async def get_cross_margin_collateral_ratio(self, **params):
    method get_small_liability_exchange_assets (line 1087) | async def get_small_liability_exchange_assets(self, **params):
    method exchange_small_liability_assets (line 1096) | async def exchange_small_liability_assets(self, **params):
    method get_small_liability_exchange_history (line 1105) | async def get_small_liability_exchange_history(self, **params):
    method get_future_hourly_interest_rate (line 1114) | async def get_future_hourly_interest_rate(self, **params):
    method get_margin_capital_flow (line 1123) | async def get_margin_capital_flow(self, **params):
    method get_margin_delist_schedule (line 1130) | async def get_margin_delist_schedule(self, **params):
    method get_margin_asset (line 1137) | async def get_margin_asset(self, **params):
    method get_margin_symbol (line 1142) | async def get_margin_symbol(self, **params):
    method get_margin_all_assets (line 1147) | async def get_margin_all_assets(self, **params):
    method get_margin_all_pairs (line 1152) | async def get_margin_all_pairs(self, **params):
    method create_isolated_margin_account (line 1157) | async def create_isolated_margin_account(self, **params):
    method get_isolated_margin_symbol (line 1166) | async def get_isolated_margin_symbol(self, **params):
    method get_all_isolated_margin_symbols (line 1173) | async def get_all_isolated_margin_symbols(self, **params):
    method get_isolated_margin_fee_data (line 1182) | async def get_isolated_margin_fee_data(self, **params):
    method get_isolated_margin_tier_data (line 1189) | async def get_isolated_margin_tier_data(self, **params):
    method margin_manual_liquidation (line 1196) | async def margin_manual_liquidation(self, **params):
    method toggle_bnb_burn_spot_margin (line 1203) | async def toggle_bnb_burn_spot_margin(self, **params):
    method get_bnb_burn_spot_margin (line 1210) | async def get_bnb_burn_spot_margin(self, **params):
    method get_margin_price_index (line 1217) | async def get_margin_price_index(self, **params):
    method transfer_margin_to_spot (line 1222) | async def transfer_margin_to_spot(self, **params):
    method transfer_spot_to_margin (line 1230) | async def transfer_spot_to_margin(self, **params):
    method transfer_isolated_margin_to_spot (line 1238) | async def transfer_isolated_margin_to_spot(self, **params):
    method transfer_spot_to_isolated_margin (line 1249) | async def transfer_spot_to_isolated_margin(self, **params):
    method create_margin_loan (line 1260) | async def create_margin_loan(self, **params):
    method repay_margin_loan (line 1267) | async def repay_margin_loan(self, **params):
    method create_margin_order (line 1274) | async def create_margin_order(self, **params):
    method cancel_margin_order (line 1283) | async def cancel_margin_order(self, **params):
    method cancel_all_open_margin_orders (line 1290) | async def cancel_all_open_margin_orders(self, **params):
    method set_margin_max_leverage (line 1297) | async def set_margin_max_leverage(self, **params):
    method get_margin_transfer_history (line 1304) | async def get_margin_transfer_history(self, **params):
    method get_margin_loan_details (line 1311) | async def get_margin_loan_details(self, **params):
    method get_margin_repay_details (line 1318) | async def get_margin_repay_details(self, **params):
    method get_cross_margin_data (line 1325) | async def get_cross_margin_data(self, **params):
    method get_margin_interest_history (line 1332) | async def get_margin_interest_history(self, **params):
    method get_margin_force_liquidation_rec (line 1339) | async def get_margin_force_liquidation_rec(self, **params):
    method get_margin_order (line 1346) | async def get_margin_order(self, **params):
    method get_open_margin_orders (line 1353) | async def get_open_margin_orders(self, **params):
    method get_all_margin_orders (line 1360) | async def get_all_margin_orders(self, **params):
    method get_margin_trades (line 1367) | async def get_margin_trades(self, **params):
    method get_max_margin_loan (line 1374) | async def get_max_margin_loan(self, **params):
    method get_max_margin_transfer (line 1381) | async def get_max_margin_transfer(self, **params):
    method create_margin_oco_order (line 1390) | async def create_margin_oco_order(self, **params):
    method cancel_margin_oco_order (line 1397) | async def cancel_margin_oco_order(self, **params):
    method get_margin_oco_order (line 1404) | async def get_margin_oco_order(self, **params):
    method get_open_margin_oco_orders (line 1411) | async def get_open_margin_oco_orders(self, **params):
    method margin_stream_get_listen_key (line 1420) | async def margin_stream_get_listen_key(self):
    method margin_stream_keepalive (line 1436) | async def margin_stream_keepalive(self, listenKey):
    method margin_stream_close (line 1452) | async def margin_stream_close(self, listenKey):
    method margin_create_listen_token (line 1466) | async def margin_create_listen_token(self, symbol: Optional[str] = Non...
    method isolated_margin_stream_get_listen_key (line 1503) | async def isolated_margin_stream_get_listen_key(self, symbol):
    method isolated_margin_stream_keepalive (line 1520) | async def isolated_margin_stream_keepalive(self, symbol, listenKey):
    method isolated_margin_stream_close (line 1536) | async def isolated_margin_stream_close(self, symbol, listenKey):
    method get_simple_earn_flexible_product_list (line 1554) | async def get_simple_earn_flexible_product_list(self, **params):
    method get_simple_earn_locked_product_list (line 1563) | async def get_simple_earn_locked_product_list(self, **params):
    method subscribe_simple_earn_flexible_product (line 1572) | async def subscribe_simple_earn_flexible_product(self, **params):
    method subscribe_simple_earn_locked_product (line 1581) | async def subscribe_simple_earn_locked_product(self, **params):
    method redeem_simple_earn_flexible_product (line 1590) | async def redeem_simple_earn_flexible_product(self, **params):
    method redeem_simple_earn_locked_product (line 1599) | async def redeem_simple_earn_locked_product(self, **params):
    method get_simple_earn_flexible_product_position (line 1608) | async def get_simple_earn_flexible_product_position(self, **params):
    method get_simple_earn_locked_product_position (line 1617) | async def get_simple_earn_locked_product_position(self, **params):
    method get_simple_earn_account (line 1626) | async def get_simple_earn_account(self, **params):
    method get_fixed_activity_project_list (line 1635) | async def get_fixed_activity_project_list(self, **params):
    method change_fixed_activity_to_daily_position (line 1642) | async def change_fixed_activity_to_daily_position(self, **params):
    method get_staking_product_list (line 1651) | async def get_staking_product_list(self, **params):
    method purchase_staking_product (line 1658) | async def purchase_staking_product(self, **params):
    method redeem_staking_product (line 1665) | async def redeem_staking_product(self, **params):
    method get_staking_position (line 1672) | async def get_staking_position(self, **params):
    method get_staking_purchase_history (line 1679) | async def get_staking_purchase_history(self, **params):
    method set_auto_staking (line 1686) | async def set_auto_staking(self, **params):
    method get_personal_left_quota (line 1693) | async def get_personal_left_quota(self, **params):
    method get_staking_asset_us (line 1702) | async def get_staking_asset_us(self, **params):
    method stake_asset_us (line 1708) | async def stake_asset_us(self, **params):
    method unstake_asset_us (line 1716) | async def unstake_asset_us(self, **params):
    method get_staking_balance_us (line 1724) | async def get_staking_balance_us(self, **params):
    method get_staking_history_us (line 1732) | async def get_staking_history_us(self, **params):
    method get_staking_rewards_history_us (line 1740) | async def get_staking_rewards_history_us(self, **params):
    method get_sub_account_list (line 1752) | async def get_sub_account_list(self, **params):
    method get_sub_account_transfer_history (line 1759) | async def get_sub_account_transfer_history(self, **params):
    method get_sub_account_futures_transfer_history (line 1766) | async def get_sub_account_futures_transfer_history(self, **params):
    method create_sub_account_futures_transfer (line 1773) | async def create_sub_account_futures_transfer(self, **params):
    method get_sub_account_assets (line 1780) | async def get_sub_account_assets(self, **params):
    method query_subaccount_spot_summary (line 1787) | async def query_subaccount_spot_summary(self, **params):
    method get_subaccount_deposit_address (line 1794) | async def get_subaccount_deposit_address(self, **params):
    method get_subaccount_deposit_history (line 1801) | async def get_subaccount_deposit_history(self, **params):
    method get_subaccount_futures_margin_status (line 1808) | async def get_subaccount_futures_margin_status(self, **params):
    method enable_subaccount_margin (line 1815) | async def enable_subaccount_margin(self, **params):
    method get_subaccount_margin_details (line 1822) | async def get_subaccount_margin_details(self, **params):
    method get_subaccount_margin_summary (line 1829) | async def get_subaccount_margin_summary(self, **params):
    method enable_subaccount_futures (line 1836) | async def enable_subaccount_futures(self, **params):
    method get_subaccount_futures_details (line 1843) | async def get_subaccount_futures_details(self, **params):
    method get_subaccount_futures_summary (line 1850) | async def get_subaccount_futures_summary(self, **params):
    method get_subaccount_futures_positionrisk (line 1857) | async def get_subaccount_futures_positionrisk(self, **params):
    method make_subaccount_futures_transfer (line 1864) | async def make_subaccount_futures_transfer(self, **params):
    method make_subaccount_margin_transfer (line 1871) | async def make_subaccount_margin_transfer(self, **params):
    method make_subaccount_to_subaccount_transfer (line 1878) | async def make_subaccount_to_subaccount_transfer(self, **params):
    method make_subaccount_to_master_transfer (line 1885) | async def make_subaccount_to_master_transfer(self, **params):
    method get_subaccount_transfer_history (line 1892) | async def get_subaccount_transfer_history(self, **params):
    method make_subaccount_universal_transfer (line 1899) | async def make_subaccount_universal_transfer(self, **params):
    method get_universal_transfer_history (line 1906) | async def get_universal_transfer_history(self, **params):
    method futures_ping (line 1915) | async def futures_ping(self):
    method futures_time (line 1920) | async def futures_time(self):
    method futures_exchange_info (line 1925) | async def futures_exchange_info(self):
    method futures_order_book (line 1930) | async def futures_order_book(self, **params):
    method futures_rpi_depth (line 1935) | async def futures_rpi_depth(self, **params):
    method futures_recent_trades (line 1940) | async def futures_recent_trades(self, **params):
    method futures_historical_trades (line 1945) | async def futures_historical_trades(self, **params):
    method futures_aggregate_trades (line 1950) | async def futures_aggregate_trades(self, **params):
    method futures_klines (line 1955) | async def futures_klines(self, **params):
    method futures_mark_price_klines (line 1960) | async def futures_mark_price_klines(self, **params):
    method futures_index_price_klines (line 1965) | async def futures_index_price_klines(self, **params):
    method futures_premium_index_klines (line 1970) | async def futures_premium_index_klines(self, **params):
    method futures_continuous_klines (line 1975) | async def futures_continuous_klines(self, **params):
    method futures_historical_klines (line 1980) | async def futures_historical_klines(
    method futures_historical_klines_generator (line 1994) | async def futures_historical_klines_generator(
    method futures_mark_price (line 2007) | async def futures_mark_price(self, **params):
    method futures_funding_rate (line 2012) | async def futures_funding_rate(self, **params):
    method futures_top_longshort_account_ratio (line 2017) | async def futures_top_longshort_account_ratio(self, **params):
    method futures_top_longshort_position_ratio (line 2024) | async def futures_top_longshort_position_ratio(self, **params):
    method futures_global_longshort_ratio (line 2031) | async def futures_global_longshort_ratio(self, **params):
    method futures_taker_longshort_ratio (line 2038) | async def futures_taker_longshort_ratio(self, **params):
    method futures_ticker (line 2045) | async def futures_ticker(self, **params):
    method futures_symbol_ticker (line 2050) | async def futures_symbol_ticker(self, **params):
    method futures_orderbook_ticker (line 2059) | async def futures_orderbook_ticker(self, **params):
    method futures_index_price_constituents (line 2064) | async def futures_index_price_constituents(self, **params):
    method futures_liquidation_orders (line 2071) | async def futures_liquidation_orders(self, **params):
    method futures_api_trading_status (line 2078) | async def futures_api_trading_status(self, **params):
    method futures_commission_rate (line 2085) | async def futures_commission_rate(self, **params):
    method futures_adl_quantile_estimate (line 2092) | async def futures_adl_quantile_estimate(self, **params):
    method futures_open_interest (line 2099) | async def futures_open_interest(self, **params):
    method futures_index_info (line 2104) | async def futures_index_info(self, **params):
    method futures_open_interest_hist (line 2109) | async def futures_open_interest_hist(self, **params):
    method futures_leverage_bracket (line 2116) | async def futures_leverage_bracket(self, **params):
    method futures_account_transfer (line 2123) | async def futures_account_transfer(self, **params):
    method transfer_history (line 2130) | async def transfer_history(self, **params):
    method futures_loan_borrow_history (line 2137) | async def futures_loan_borrow_history(self, **params):
    method futures_loan_repay_history (line 2144) | async def futures_loan_repay_history(self, **params):
    method futures_loan_wallet (line 2151) | async def futures_loan_wallet(self, **params):
    method futures_cross_collateral_adjust_history (line 2158) | async def futures_cross_collateral_adjust_history(self, **params):
    method futures_cross_collateral_liquidation_history (line 2165) | async def futures_cross_collateral_liquidation_history(self, **params):
    method futures_loan_interest_history (line 2172) | async def futures_loan_interest_history(self, **params):
    method futures_create_order (line 2179) | async def futures_create_order(self, **params):
    method futures_limit_order (line 2209) | async def futures_limit_order(self, **params):
    method futures_market_order (line 2220) | async def futures_market_order(self, **params):
    method futures_limit_buy_order (line 2232) | async def futures_limit_buy_order(self, **params):
    method futures_limit_sell_order (line 2244) | async def futures_limit_sell_order(self, **params):
    method futures_market_buy_order (line 2256) | async def futures_market_buy_order(self, **params):
    method futures_market_sell_order (line 2268) | async def futures_market_sell_order(self, **params):
    method futures_modify_order (line 2280) | async def futures_modify_order(self, **params):
    method futures_create_test_order (line 2290) | async def futures_create_test_order(self, **params):
    method futures_place_batch_order (line 2295) | async def futures_place_batch_order(self, **params):
    method futures_get_order (line 2309) | async def futures_get_order(self, **params):
    method futures_get_open_orders (line 2323) | async def futures_get_open_orders(self, **params):
    method futures_get_all_orders (line 2333) | async def futures_get_all_orders(self, **params):
    method futures_cancel_order (line 2343) | async def futures_cancel_order(self, **params):
    method futures_cancel_all_open_orders (line 2357) | async def futures_cancel_all_open_orders(self, **params):
    method futures_cancel_orders (line 2371) | async def futures_cancel_orders(self, **params):
    method futures_countdown_cancel_all (line 2386) | async def futures_countdown_cancel_all(self, **params):
    method futures_create_algo_order (line 2395) | async def futures_create_algo_order(self, **params):
    method futures_cancel_algo_order (line 2404) | async def futures_cancel_algo_order(self, **params):
    method futures_cancel_all_algo_open_orders (line 2409) | async def futures_cancel_all_algo_open_orders(self, **params):
    method futures_get_algo_order (line 2416) | async def futures_get_algo_order(self, **params):
    method futures_get_open_algo_orders (line 2421) | async def futures_get_open_algo_orders(self, **params):
    method futures_get_all_algo_orders (line 2426) | async def futures_get_all_algo_orders(self, **params):
    method futures_account_balance (line 2431) | async def futures_account_balance(self, **params):
    method futures_account (line 2438) | async def futures_account(self, **params):
    method futures_symbol_adl_risk (line 2445) | async def futures_symbol_adl_risk(self, **params):
    method futures_change_leverage (line 2450) | async def futures_change_leverage(self, **params):
    method futures_change_margin_type (line 2455) | async def futures_change_margin_type(self, **params):
    method futures_change_position_margin (line 2460) | async def futures_change_position_margin(self, **params):
    method futures_position_margin_history (line 2467) | async def futures_position_margin_history(self, **params):
    method futures_position_information (line 2474) | async def futures_position_information(self, **params):
    method futures_account_trades (line 2481) | async def futures_account_trades(self, **params):
    method futures_income_history (line 2486) | async def futures_income_history(self, **params):
    method futures_change_position_mode (line 2491) | async def futures_change_position_mode(self, **params):
    method futures_get_position_mode (line 2498) | async def futures_get_position_mode(self, **params):
    method futures_change_multi_assets_mode (line 2505) | async def futures_change_multi_assets_mode(self, multiAssetsMargin: bo...
    method futures_get_multi_assets_mode (line 2513) | async def futures_get_multi_assets_mode(self):
    method futures_stream_get_listen_key (line 2520) | async def futures_stream_get_listen_key(self):
    method futures_stream_keepalive (line 2528) | async def futures_stream_keepalive(self, listenKey):
    method futures_stream_close (line 2536) | async def futures_stream_close(self, listenKey):
    method futures_account_config (line 2545) | async def futures_account_config(self, **params):
    method futures_symbol_config (line 2552) | async def futures_symbol_config(self, **params):
    method futures_coin_ping (line 2561) | async def futures_coin_ping(self):
    method futures_coin_time (line 2566) | async def futures_coin_time(self):
    method futures_coin_exchange_info (line 2571) | async def futures_coin_exchange_info(self):
    method futures_coin_order_book (line 2576) | async def futures_coin_order_book(self, **params):
    method futures_coin_recent_trades (line 2581) | async def futures_coin_recent_trades(self, **params):
    method futures_coin_historical_trades (line 2586) | async def futures_coin_historical_trades(self, **params):
    method futures_coin_aggregate_trades (line 2593) | async def futures_coin_aggregate_trades(self, **params):
    method futures_coin_klines (line 2598) | async def futures_coin_klines(self, **params):
    method futures_coin_continous_klines (line 2603) | async def futures_coin_continous_klines(self, **params):
    method futures_coin_index_price_klines (line 2610) | async def futures_coin_index_price_klines(self, **params):
    method futures_coin_mark_price_klines (line 2617) | async def futures_coin_mark_price_klines(self, **params):
    method futures_coin_premium_index_klines (line 2624) | async def futures_coin_premium_index_klines(self, **params):
    method futures_coin_mark_price (line 2633) | async def futures_coin_mark_price(self, **params):
    method futures_coin_funding_rate (line 2638) | async def futures_coin_funding_rate(self, **params):
    method futures_coin_ticker (line 2643) | async def futures_coin_ticker(self, **params):
    method futures_coin_symbol_ticker (line 2648) | async def futures_coin_symbol_ticker(self, **params):
    method futures_coin_orderbook_ticker (line 2653) | async def futures_coin_orderbook_ticker(self, **params):
    method futures_coin_index_price_constituents (line 2660) | async def futures_coin_index_price_constituents(self, **params):
    method futures_coin_liquidation_orders (line 2667) | async def futures_coin_liquidation_orders(self, **params):
    method futures_coin_open_interest (line 2674) | async def futures_coin_open_interest(self, **params):
    method futures_coin_open_interest_hist (line 2679) | async def futures_coin_open_interest_hist(self, **params):
    method futures_coin_leverage_bracket (line 2686) | async def futures_coin_leverage_bracket(self, **params):
    method new_transfer_history (line 2693) | async def new_transfer_history(self, **params):
    method funding_wallet (line 2700) | async def funding_wallet(self, **params):
    method get_user_asset (line 2707) | async def get_user_asset(self, **params):
    method universal_transfer (line 2714) | async def universal_transfer(self, **params):
    method futures_coin_create_order (line 2721) | async def futures_coin_create_order(self, **params):
    method futures_coin_place_batch_order (line 2728) | async def futures_coin_place_batch_order(self, **params):
    method futures_coin_get_order (line 2742) | async def futures_coin_get_order(self, **params):
    method futures_coin_get_open_orders (line 2747) | async def futures_coin_get_open_orders(self, **params):
    method futures_coin_get_all_orders (line 2754) | async def futures_coin_get_all_orders(self, **params):
    method futures_coin_cancel_order (line 2761) | async def futures_coin_cancel_order(self, **params):
    method futures_coin_cancel_all_open_orders (line 2768) | async def futures_coin_cancel_all_open_orders(self, **params):
    method futures_coin_cancel_orders (line 2775) | async def futures_coin_cancel_orders(self, **params):
    method futures_coin_account_balance (line 2790) | async def futures_coin_account_balance(self, **params):
    method futures_coin_account (line 2797) | async def futures_coin_account(self, **params):
    method futures_coin_change_leverage (line 2804) | async def futures_coin_change_leverage(self, **params):
    method futures_coin_change_margin_type (line 2811) | async def futures_coin_change_margin_type(self, **params):
    method futures_coin_change_position_margin (line 2818) | async def futures_coin_change_position_margin(self, **params):
    method futures_coin_position_margin_history (line 2825) | async def futures_coin_position_margin_history(self, **params):
    method futures_coin_position_information (line 2832) | async def futures_coin_position_information(self, **params):
    method futures_coin_account_trades (line 2839) | async def futures_coin_account_trades(self, **params):
    method futures_coin_income_history (line 2846) | async def futures_coin_income_history(self, **params):
    method futures_coin_change_position_mode (line 2851) | async def futures_coin_change_position_mode(self, **params):
    method futures_coin_get_position_mode (line 2858) | async def futures_coin_get_position_mode(self, **params):
    method futures_coin_stream_get_listen_key (line 2865) | async def futures_coin_stream_get_listen_key(self):
    method futures_coin_stream_keepalive (line 2873) | async def futures_coin_stream_keepalive(self, listenKey):
    method futures_coin_account_order_history_download (line 2881) | async def futures_coin_account_order_history_download(self, **params):
    method futures_coin_account_order_history_download_link (line 2890) | async def futures_coin_account_order_history_download_link(self, **par...
    method futures_coin_account_trade_history_download (line 2899) | async def futures_coin_account_trade_history_download(self, **params):
    method futures_coin_account_trade_history_download_link (line 2908) | async def futures_coin_account_trade_history_download_link(self, **par...
    method futures_coin_stream_close (line 2917) | async def futures_coin_stream_close(self, listenKey):
    method get_all_coins_info (line 2925) | async def get_all_coins_info(self, **params):
    method get_account_snapshot (line 2932) | async def get_account_snapshot(self, **params):
    method disable_fast_withdraw_switch (line 2939) | async def disable_fast_withdraw_switch(self, **params):
    method enable_fast_withdraw_switch (line 2946) | async def enable_fast_withdraw_switch(self, **params):
    method options_ping (line 2961) | async def options_ping(self):
    method options_time (line 2966) | async def options_time(self):
    method options_info (line 2971) | async def options_info(self):
    method options_exchange_info (line 2976) | async def options_exchange_info(self):
    method options_index_price (line 2981) | async def options_index_price(self, **params):
    method options_price (line 2986) | async def options_price(self, **params):
    method options_mark_price (line 2991) | async def options_mark_price(self, **params):
    method options_order_book (line 2996) | async def options_order_book(self, **params):
    method options_klines (line 3001) | async def options_klines(self, **params):
    method options_recent_trades (line 3006) | async def options_recent_trades(self, **params):
    method options_historical_trades (line 3011) | async def options_historical_trades(self, **params):
    method options_account_info (line 3018) | async def options_account_info(self, **params):
    method options_funds_transfer (line 3025) | async def options_funds_transfer(self, **params):
    method options_positions (line 3032) | async def options_positions(self, **params):
    method options_bill (line 3039) | async def options_bill(self, **params):
    method options_place_order (line 3044) | async def options_place_order(self, **params):
    method options_place_batch_order (line 3053) | async def options_place_batch_order(self, **params):
    method options_cancel_order (line 3063) | async def options_cancel_order(self, **params):
    method options_cancel_batch_order (line 3070) | async def options_cancel_batch_order(self, **params):
    method options_cancel_all_orders (line 3077) | async def options_cancel_all_orders(self, **params):
    method options_query_order (line 3084) | async def options_query_order(self, **params):
    method options_query_pending_orders (line 3089) | async def options_query_pending_orders(self, **params):
    method options_query_order_history (line 3096) | async def options_query_order_history(self, **params):
    method options_user_trades (line 3103) | async def options_user_trades(self, **params):
    method get_fiat_deposit_withdraw_history (line 3112) | async def get_fiat_deposit_withdraw_history(self, **params):
    method get_fiat_payments_history (line 3119) | async def get_fiat_payments_history(self, **params):
    method get_c2c_trade_history (line 3128) | async def get_c2c_trade_history(self, **params):
    method get_pay_trade_history (line 3137) | async def get_pay_trade_history(self, **params):
    method get_convert_trade_history (line 3146) | async def get_convert_trade_history(self, **params):
    method convert_request_quote (line 3153) | async def convert_request_quote(self, **params):
    method convert_accept_quote (line 3160) | async def convert_accept_quote(self, **params):
    method papi_stream_get_listen_key (line 3173) | async def papi_stream_get_listen_key(self):
    method papi_stream_keepalive (line 3179) | async def papi_stream_keepalive(self, listenKey):
    method papi_stream_close (line 3187) | async def papi_stream_close(self, listenKey):
    method papi_get_balance (line 3195) | async def papi_get_balance(self, **params):
    method papi_get_rate_limit (line 3199) | async def papi_get_rate_limit(self, **params):
    method papi_get_account (line 3203) | async def papi_get_account(self, **params):
    method papi_get_margin_max_borrowable (line 3208) | async def papi_get_margin_max_borrowable(self, **params):
    method papi_get_margin_max_withdraw (line 3215) | async def papi_get_margin_max_withdraw(self, **params):
    method papi_get_um_position_risk (line 3222) | async def papi_get_um_position_risk(self, **params):
    method papi_get_cm_position_risk (line 3229) | async def papi_get_cm_position_risk(self, **params):
    method papi_set_um_leverage (line 3236) | async def papi_set_um_leverage(self, **params):
    method papi_set_cm_leverage (line 3243) | async def papi_set_cm_leverage(self, **params):
    method papi_change_um_position_side_dual (line 3250) | async def papi_change_um_position_side_dual(self, **params):
    method papi_get_um_position_side_dual (line 3257) | async def papi_get_um_position_side_dual(self, **params):
    method papi_get_cm_position_side_dual (line 3264) | async def papi_get_cm_position_side_dual(self, **params):
    method papi_get_um_leverage_bracket (line 3271) | async def papi_get_um_leverage_bracket(self, **params):
    method papi_get_cm_leverage_bracket (line 3278) | async def papi_get_cm_leverage_bracket(self, **params):
    method papi_get_um_api_trading_status (line 3285) | async def papi_get_um_api_trading_status(self, **params):
    method papi_get_um_comission_rate (line 3292) | async def papi_get_um_comission_rate(self, **params):
    method papi_get_cm_comission_rate (line 3299) | async def papi_get_cm_comission_rate(self, **params):
    method papi_get_margin_margin_loan (line 3306) | async def papi_get_margin_margin_loan(self, **params):
    method papi_get_margin_repay_loan (line 3313) | async def papi_get_margin_repay_loan(self, **params):
    method papi_get_repay_futures_switch (line 3320) | async def papi_get_repay_futures_switch(self, **params):
    method papi_repay_futures_switch (line 3327) | async def papi_repay_futures_switch(self, **params):
    method papi_get_margin_interest_history (line 3334) | async def papi_get_margin_interest_history(self, **params):
    method papi_repay_futures_negative_balance (line 3341) | async def papi_repay_futures_negative_balance(self, **params):
    method papi_get_portfolio_interest_history (line 3348) | async def papi_get_portfolio_interest_history(self, **params):
    method papi_get_portfolio_negative_balance_exchange_record (line 3356) | async def papi_get_portfolio_negative_balance_exchange_record(self, **...
    method papi_fund_auto_collection (line 3362) | async def papi_fund_auto_collection(self, **params):
    method papi_fund_asset_collection (line 3369) | async def papi_fund_asset_collection(self, **params):
    method papi_bnb_transfer (line 3376) | async def papi_bnb_transfer(self, **params):
    method papi_get_um_income_history (line 3383) | async def papi_get_um_income_history(self, **params):
    method papi_get_cm_income_history (line 3390) | async def papi_get_cm_income_history(self, **params):
    method papi_get_um_account (line 3397) | async def papi_get_um_account(self, **params):
    method papi_get_um_account_v2 (line 3404) | async def papi_get_um_account_v2(self, **params):
    method papi_get_cm_account (line 3411) | async def papi_get_cm_account(self, **params):
    method papi_get_um_account_config (line 3418) | async def papi_get_um_account_config(self, **params):
    method papi_get_um_symbol_config (line 3425) | async def papi_get_um_symbol_config(self, **params):
    method papi_get_um_trade_asyn (line 3432) | async def papi_get_um_trade_asyn(self, **params):
    method papi_get_um_trade_asyn_id (line 3439) | async def papi_get_um_trade_asyn_id(self, **params):
    method papi_get_um_order_asyn (line 3446) | async def papi_get_um_order_asyn(self, **params):
    method papi_get_um_order_asyn_id (line 3453) | async def papi_get_um_order_asyn_id(self, **params):
    method papi_get_um_income_asyn (line 3460) | async def papi_get_um_income_asyn(self, **params):
    method papi_get_um_income_asyn_id (line 3467) | async def papi_get_um_income_asyn_id(self, **params):
    method papi_ping (line 3474) | async def papi_ping(self, **params):
    method papi_create_um_order (line 3481) | async def papi_create_um_order(self, **params):
    method papi_create_um_conditional_order (line 3495) | async def papi_create_um_conditional_order(self, **params):
    method papi_create_cm_order (line 3509) | async def papi_create_cm_order(self, **params):
    method papi_create_cm_conditional_order (line 3523) | async def papi_create_cm_conditional_order(self, **params):
    method papi_create_margin_order (line 3537) | async def papi_create_margin_order(self, **params):
    method papi_margin_loan (line 3551) | async def papi_margin_loan(self, **params):
    method papi_repay_loan (line 3563) | async def papi_repay_loan(self, **params):
    method papi_margin_order_oco (line 3575) | async def papi_margin_order_oco(self, **params):
    method papi_cancel_um_order (line 3587) | async def papi_cancel_um_order(self, **params):
    method papi_cancel_um_all_open_orders (line 3599) | async def papi_cancel_um_all_open_orders(self, **params):
    method papi_cancel_um_conditional_order (line 3611) | async def papi_cancel_um_conditional_order(self, **params):
    method papi_cancel_um_conditional_all_open_orders (line 3623) | async def papi_cancel_um_conditional_all_open_orders(self, **params):
    method papi_cancel_cm_order (line 3635) | async def papi_cancel_cm_order(self, **params):
    method papi_cancel_cm_all_open_orders (line 3647) | async def papi_cancel_cm_all_open_orders(self, **params):
    method papi_cancel_cm_conditional_order (line 3659) | async def papi_cancel_cm_conditional_order(self, **params):
    method papi_cancel_cm_conditional_all_open_orders (line 3671) | async def papi_cancel_cm_conditional_all_open_orders(self, **params):
    method papi_cancel_margin_order (line 3683) | async def papi_cancel_margin_order(self, **params):
    method papi_cancel_margin_order_list (line 3695) | async def papi_cancel_margin_order_list(self, **params):
    method papi_cancel_margin_all_open_orders (line 3707) | async def papi_cancel_margin_all_open_orders(self, **params):
    method papi_modify_um_order (line 3719) | async def papi_modify_um_order(self, **params):
    method papi_modify_cm_order (line 3729) | async def papi_modify_cm_order(self, **params):
    method papi_get_um_order (line 3739) | async def papi_get_um_order(self, **params):
    method papi_get_um_all_orders (line 3749) | async def papi_get_um_all_orders(self, **params):
    method papi_get_um_open_order (line 3761) | async def papi_get_um_open_order(self, **params):
    method papi_get_um_open_orders (line 3773) | async def papi_get_um_open_orders(self, **params):
    method papi_get_um_conditional_all_orders (line 3785) | async def papi_get_um_conditional_all_orders(self, **params):
    method papi_get_um_conditional_open_orders (line 3797) | async def papi_get_um_conditional_open_orders(self, **params):
    method papi_get_um_conditional_open_order (line 3809) | async def papi_get_um_conditional_open_order(self, **params):
    method papi_get_um_conditional_order_history (line 3821) | async def papi_get_um_conditional_order_history(self, **params):
    method papi_get_cm_order (line 3833) | async def papi_get_cm_order(self, **params):
    method papi_get_cm_all_orders (line 3843) | async def papi_get_cm_all_orders(self, **params):
    method papi_get_cm_open_order (line 3855) | async def papi_get_cm_open_order(self, **params):
    method papi_get_cm_open_orders (line 3867) | async def papi_get_cm_open_orders(self, **params):
    method papi_get_cm_conditional_all_orders (line 3879) | async def papi_get_cm_conditional_all_orders(self, **params):
    method papi_get_cm_conditional_open_orders (line 3891) | async def papi_get_cm_conditional_open_orders(self, **params):
    method papi_get_cm_conditional_open_order (line 3903) | async def papi_get_cm_conditional_open_order(self, **params):
    method papi_get_cm_conditional_order_history (line 3915) | async def papi_get_cm_conditional_order_history(self, **params):
    method papi_get_um_force_orders (line 3927) | async def papi_get_um_force_orders(self, **params):
    method papi_get_cm_force_orders (line 3939) | async def papi_get_cm_force_orders(self, **params):
    method papi_get_um_order_amendment (line 3951) | async def papi_get_um_order_amendment(self, **params):
    method papi_get_cm_order_amendment (line 3963) | async def papi_get_cm_order_amendment(self, **params):
    method papi_get_margin_force_orders (line 3975) | async def papi_get_margin_force_orders(self, **params):
    method papi_get_um_user_trades (line 3987) | async def papi_get_um_user_trades(self, **params):
    method papi_get_cm_user_trades (line 3999) | async def papi_get_cm_user_trades(self, **params):
    method papi_get_um_adl_quantile (line 4011) | async def papi_get_um_adl_quantile(self, **params):
    method papi_get_cm_adl_quantile (line 4023) | async def papi_get_cm_adl_quantile(self, **params):
    method papi_set_um_fee_burn (line 4035) | async def papi_set_um_fee_burn(self, **params):
    method papi_get_um_fee_burn (line 4047) | async def papi_get_um_fee_burn(self, **params):
    method papi_get_margin_order (line 4059) | async def papi_get_margin_order(self, **params):
    method papi_get_margin_open_orders (line 4071) | async def papi_get_margin_open_orders(self, **params):
    method papi_get_margin_all_orders (line 4083) | async def papi_get_margin_all_orders(self, **params):
    method papi_get_margin_order_list (line 4095) | async def papi_get_margin_order_list(self, **params):
    method papi_get_margin_all_order_list (line 4107) | async def papi_get_margin_all_order_list(self, **params):
    method papi_get_margin_open_order_list (line 4119) | async def papi_get_margin_open_order_list(self, **params):
    method papi_get_margin_my_trades (line 4131) | async def papi_get_margin_my_trades(self, **params):
    method papi_get_margin_repay_debt (line 4143) | async def papi_get_margin_repay_debt(self, **params):
    method create_oco_order (line 4155) | async def create_oco_order(self, **params):
    method ws_create_test_order (line 4166) | async def ws_create_test_order(self, **params):
    method ws_create_order (line 4198) | async def ws_create_order(self, **params):
    method ws_order_limit (line 4213) | async def ws_order_limit(self, timeInForce=BaseClient.TIME_IN_FORCE_GT...
    method ws_order_limit_buy (line 4243) | async def ws_order_limit_buy(
    method ws_order_limit_sell (line 4274) | async def ws_order_limit_sell(
    method ws_order_market (line 4302) | async def ws_order_market(self, **params):
    method ws_order_market_buy (line 4325) | async def ws_order_market_buy(self, **params):
    method ws_order_market_sell (line 4345) | async def ws_order_market_sell(self, **params):
    method ws_get_order (line 4365) | async def ws_get_order(self, **params):
    method ws_cancel_order (line 4380) | async def ws_cancel_order(self, **params):
    method cancel_all_open_orders (line 4385) | async def cancel_all_open_orders(self, **params):
    method cancel_replace_order (line 4390) | async def cancel_replace_order(self, **params):
    method ws_cancel_and_replace_order (line 4397) | async def ws_cancel_and_replace_order(self, **params):
    method ws_get_open_orders (line 4402) | async def ws_get_open_orders(self, **params):
    method ws_cancel_all_open_orders (line 4407) | async def ws_cancel_all_open_orders(self, **params):
    method ws_create_oco_order (line 4412) | async def ws_create_oco_order(self, **params):
    method ws_create_oto_order (line 4417) | async def ws_create_oto_order(self, **params):
    method ws_create_otoco_order (line 4422) | async def ws_create_otoco_order(self, **params):
    method ws_get_oco_order (line 4427) | async def ws_get_oco_order(self, **params):
    method ws_cancel_oco_order (line 4432) | async def ws_cancel_oco_order(self, **params):
    method ws_get_oco_open_orders (line 4437) | async def ws_get_oco_open_orders(self, **params):
    method ws_create_sor_order (line 4442) | async def ws_create_sor_order(self, **params):
    method ws_create_test_sor_order (line 4447) | async def ws_create_test_sor_order(self, **params):
    method ws_get_account (line 4452) | async def ws_get_account(self, **params):
    method ws_get_account_rate_limits_orders (line 4457) | async def ws_get_account_rate_limits_orders(self, **params):
    method ws_get_all_orders (line 4462) | async def ws_get_all_orders(self, **params):
    method ws_get_my_trades (line 4467) | async def ws_get_my_trades(self, **params):
    method ws_get_prevented_matches (line 4472) | async def ws_get_prevented_matches(self, **params):
    method ws_get_allocations (line 4477) | async def ws_get_allocations(self, **params):
    method ws_get_commission_rates (line 4482) | async def ws_get_commission_rates(self, **params):
    method ws_get_order_book (line 4487) | async def ws_get_order_book(self, **params):
    method ws_get_recent_trades (line 4492) | async def ws_get_recent_trades(self, **params):
    method ws_get_historical_trades (line 4497) | async def ws_get_historical_trades(self, **params):
    method ws_get_aggregate_trades (line 4502) | async def ws_get_aggregate_trades(self, **params):
    method ws_get_klines (line 4507) | async def ws_get_klines(self, **params):
    method ws_get_uiKlines (line 4512) | async def ws_get_uiKlines(self, **params):
    method ws_get_avg_price (line 4517) | async def ws_get_avg_price(self, **params):
    method ws_get_ticker (line 4522) | async def ws_get_ticker(self, **params):
    method ws_get_trading_day_ticker (line 4527) | async def ws_get_trading_day_ticker(self, **params):
    method ws_get_symbol_ticker_window (line 4532) | async def ws_get_symbol_ticker_window(self, **params):
    method ws_get_symbol_ticker (line 4537) | async def ws_get_symbol_ticker(self, **params):
    method ws_get_orderbook_ticker (line 4542) | async def ws_get_orderbook_ticker(self, **params):
    method ws_ping (line 4547) | async def ws_ping(self, **params):
    method ws_get_time (line 4552) | async def ws_get_time(self, **params):
    method ws_get_exchange_info (line 4557) | async def ws_get_exchange_info(self, **params):
    method ws_futures_get_order_book (line 4565) | async def ws_futures_get_order_book(self, **params):
    method ws_futures_get_all_tickers (line 4572) | async def ws_futures_get_all_tickers(self, **params):
    method ws_futures_get_order_book_ticker (line 4579) | async def ws_futures_get_order_book_ticker(self, **params):
    method ws_futures_create_order (line 4586) | async def ws_futures_create_order(self, **params):
    method ws_futures_edit_order (line 4619) | async def ws_futures_edit_order(self, **params):
    method ws_futures_cancel_order (line 4626) | async def ws_futures_cancel_order(self, **params):
    method ws_futures_get_order (line 4640) | async def ws_futures_get_order(self, **params):
    method ws_futures_v2_account_position (line 4649) | async def ws_futures_v2_account_position(self, **params):
    method ws_futures_account_position (line 4656) | async def ws_futures_account_position(self, **params):
    method ws_futures_v2_account_balance (line 4663) | async def ws_futures_v2_account_balance(self, **params):
    method ws_futures_account_balance (line 4670) | async def ws_futures_account_balance(self, **params):
    method ws_futures_v2_account_status (line 4677) | async def ws_futures_v2_account_status(self, **params):
    method ws_futures_account_status (line 4684) | async def ws_futures_account_status(self, **params):
    method ws_futures_create_algo_order (line 4691) | async def ws_futures_create_algo_order(self, **params):
    method ws_futures_cancel_algo_order (line 4697) | async def ws_futures_cancel_algo_order(self, **params):
    method gift_card_fetch_token_limit (line 4706) | async def gift_card_fetch_token_limit(self, **params):
    method gift_card_fetch_rsa_public_key (line 4713) | async def gift_card_fetch_rsa_public_key(self, **params):
    method gift_card_verify (line 4722) | async def gift_card_verify(self, **params):
    method gift_card_redeem (line 4729) | async def gift_card_redeem(self, **params):
    method gift_card_create (line 4736) | async def gift_card_create(self, **params):
    method gift_card_create_dual_token (line 4743) | async def gift_card_create_dual_token(self, **params):
    method options_create_block_trade_order (line 4754) | async def options_create_block_trade_order(self, **params):
    method options_cancel_block_trade_order (line 4763) | async def options_cancel_block_trade_order(self, **params):
    method options_extend_block_trade_order (line 4772) | async def options_extend_block_trade_order(self, **params):
    method options_get_block_trade_orders (line 4781) | async def options_get_block_trade_orders(self, **params):
    method options_accept_block_trade_order (line 4790) | async def options_accept_block_trade_order(self, **params):
    method options_get_block_trade_order (line 4799) | async def options_get_block_trade_order(self, **params):
    method options_account_get_block_trades (line 4806) | async def options_account_get_block_trades(self, **params):
    method margin_next_hourly_interest_rate (line 4815) | async def margin_next_hourly_interest_rate(self, **params):
    method margin_interest_history (line 4824) | async def margin_interest_history(self, **params):
    method margin_borrow_repay (line 4831) | async def margin_borrow_repay(self, **params):
    method margin_get_borrow_repay_records (line 4838) | async def margin_get_borrow_repay_records(self, **params):
    method margin_interest_rate_history (line 4847) | async def margin_interest_rate_history(self, **params):
    method margin_max_borrowable (line 4854) | async def margin_max_borrowable(self, **params):
    method futures_historical_data_link (line 4865) | async def futures_historical_data_link(self, **params):
    method margin_v1_get_loan_vip_ongoing_orders (line 4870) | async def margin_v1_get_loan_vip_ongoing_orders(self, **params):
    method margin_v1_get_mining_payment_other (line 4875) | async def margin_v1_get_mining_payment_other(self, **params):
    method futures_coin_v1_get_income_asyn_id (line 4880) | async def futures_coin_v1_get_income_asyn_id(self, **params):
    method margin_v1_get_simple_earn_flexible_history_subscription_record (line 4885) | async def margin_v1_get_simple_earn_flexible_history_subscription_reco...
    method margin_v1_post_lending_auto_invest_one_off (line 4890) | async def margin_v1_post_lending_auto_invest_one_off(self, **params):
    method margin_v1_post_broker_sub_account_api_commission_coin_futures (line 4895) | async def margin_v1_post_broker_sub_account_api_commission_coin_future...
    method v3_post_order_list_otoco (line 4900) | async def v3_post_order_list_otoco(self, **params):
    method futures_v1_get_order_asyn (line 4905) | async def futures_v1_get_order_asyn(self, **params):
    method margin_v1_get_asset_custody_transfer_history (line 4910) | async def margin_v1_get_asset_custody_transfer_history(self, **params):
    method margin_v1_post_broker_sub_account_blvt (line 4915) | async def margin_v1_post_broker_sub_account_blvt(self, **params):
    method margin_v1_post_sol_staking_sol_redeem (line 4920) | async def margin_v1_post_sol_staking_sol_redeem(self, **params):
    method options_v1_get_countdown_cancel_all (line 4925) | async def options_v1_get_countdown_cancel_all(self, **params):
    method margin_v1_get_margin_trade_coeff (line 4930) | async def margin_v1_get_margin_trade_coeff(self, **params):
    method futures_coin_v1_get_order_amendment (line 4935) | async def futures_coin_v1_get_order_amendment(self, **params):
    method margin_v1_get_margin_available_inventory (line 4940) | async def margin_v1_get_margin_available_inventory(self, **params):
    method margin_v1_post_account_api_restrictions_ip_restriction_ip_list (line 4945) | async def margin_v1_post_account_api_restrictions_ip_restriction_ip_li...
    method margin_v2_get_eth_staking_account (line 4950) | async def margin_v2_get_eth_staking_account(self, **params):
    method margin_v1_get_loan_income (line 4955) | async def margin_v1_get_loan_income(self, **params):
    method futures_coin_v1_get_pm_account_info (line 4960) | async def futures_coin_v1_get_pm_account_info(self, **params):
    method margin_v1_get_managed_subaccount_query_trans_log_for_investor (line 4965) | async def margin_v1_get_managed_subaccount_query_trans_log_for_investo...
    method margin_v1_post_dci_product_auto_compound_edit_status (line 4970) | async def margin_v1_post_dci_product_auto_compound_edit_status(self, *...
    method futures_v1_get_trade_asyn (line 4975) | async def futures_v1_get_trade_asyn(self, **params):
    method margin_v1_get_loan_vip_request_interest_rate (line 4980) | async def margin_v1_get_loan_vip_request_interest_rate(self, **params):
    method futures_v1_get_funding_info (line 4985) | async def futures_v1_get_funding_info(self, **params):
    method v3_get_all_orders (line 4990) | async def v3_get_all_orders(self, **params):
    method margin_v2_get_loan_flexible_repay_rate (line 4993) | async def margin_v2_get_loan_flexible_repay_rate(self, **params):
    method margin_v1_get_lending_auto_invest_plan_id (line 4998) | async def margin_v1_get_lending_auto_invest_plan_id(self, **params):
    method margin_v1_post_loan_adjust_ltv (line 5003) | async def margin_v1_post_loan_adjust_ltv(self, **params):
    method margin_v1_get_mining_statistics_user_status (line 5008) | async def margin_v1_get_mining_statistics_user_status(self, **params):
    method margin_v1_get_broker_transfer_futures (line 5013) | async def margin_v1_get_broker_transfer_futures(self, **params):
    method margin_v1_post_algo_spot_new_order_twap (line 5018) | async def margin_v1_post_algo_spot_new_order_twap(self, **params):
    method margin_v1_get_lending_auto_invest_target_asset_list (line 5023) | async def margin_v1_get_lending_auto_invest_target_asset_list(self, **...
    method margin_v1_get_capital_deposit_address_list (line 5028) | async def margin_v1_get_capital_deposit_address_list(self, **params):
    method margin_v1_post_broker_sub_account_bnb_burn_margin_interest (line 5033) | async def margin_v1_post_broker_sub_account_bnb_burn_margin_interest(s...
    method margin_v2_post_loan_flexible_repay (line 5038) | async def margin_v2_post_loan_flexible_repay(self, **params):
    method margin_v2_get_loan_flexible_loanable_data (line 5043) | async def margin_v2_get_loan_flexible_loanable_data(self, **params):
    method margin_v1_post_broker_sub_account_api_permission (line 5048) | async def margin_v1_post_broker_sub_account_api_permission(self, **par...
    method margin_v1_post_broker_sub_account_api (line 5053) | async def margin_v1_post_broker_sub_account_api(self, **params):
    method margin_v1_get_dci_product_positions (line 5058) | async def margin_v1_get_dci_product_positions(self, **params):
    method margin_v1_post_convert_limit_cancel_order (line 5063) | async def margin_v1_post_convert_limit_cancel_order(self, **params):
    method v3_post_order_list_oto (line 5068) | async def v3_post_order_list_oto(self, **params):
    method margin_v1_get_mining_hash_transfer_config_details_list (line 5073) | async def margin_v1_get_mining_hash_transfer_config_details_list(self,...
    method margin_v1_get_mining_hash_transfer_profit_details (line 5078) | async def margin_v1_get_mining_hash_transfer_profit_details(self, **pa...
    method margin_v1_get_broker_sub_account (line 5083) | async def margin_v1_get_broker_sub_account(self, **params):
    method margin_v1_get_portfolio_balance (line 5088) | async def margin_v1_get_portfolio_balance(self, **params):
    method margin_v1_post_sub_account_eoptions_enable (line 5093) | async def margin_v1_post_sub_account_eoptions_enable(self, **params):
    method papi_v1_post_ping (line 5098) | async def papi_v1_post_ping(self, **params):
    method margin_v1_get_loan_loanable_data (line 5103) | async def margin_v1_get_loan_loanable_data(self, **params):
    method margin_v1_post_eth_staking_wbeth_unwrap (line 5108) | async def margin_v1_post_eth_staking_wbeth_unwrap(self, **params):
    method margin_v1_get_eth_staking_eth_history_staking_history (line 5113) | async def margin_v1_get_eth_staking_eth_history_staking_history(self, ...
    method margin_v1_get_staking_staking_record (line 5118) | async def margin_v1_get_staking_staking_record(self, **params):
    method margin_v1_get_broker_rebate_recent_record (line 5123) | async def margin_v1_get_broker_rebate_recent_record(self, **params):
    method v3_delete_user_data_stream (line 5128) | async def v3_delete_user_data_stream(self, **params):
    method v3_get_open_order_list (line 5131) | async def v3_get_open_order_list(self, **params):
    method margin_v1_get_loan_vip_collateral_account (line 5134) | async def margin_v1_get_loan_vip_collateral_account(self, **params):
    method margin_v1_get_algo_spot_open_orders (line 5139) | async def margin_v1_get_algo_spot_open_orders(self, **params):
    method margin_v1_post_loan_repay (line 5144) | async def margin_v1_post_loan_repay(self, **params):
    method futures_coin_v1_get_funding_info (line 5149) | async def futures_coin_v1_get_funding_info(self, **params):
    method margin_v1_get_margin_leverage_bracket (line 5154) | async def margin_v1_get_margin_leverage_bracket(self, **params):
    method margin_v2_get_portfolio_collateral_rate (line 5159) | async def margin_v2_get_portfolio_collateral_rate(self, **params):
    method margin_v2_post_loan_flexible_adjust_ltv (line 5164) | async def margin_v2_post_loan_flexible_adjust_ltv(self, **params):
    method margin_v1_get_convert_order_status (line 5169) | async def margin_v1_get_convert_order_status(self, **params):
    method margin_v1_get_broker_sub_account_api_ip_restriction (line 5174) | async def margin_v1_get_broker_sub_account_api_ip_restriction(self, **...
    method margin_v1_post_dci_product_subscribe (line 5179) | async def margin_v1_post_dci_product_subscribe(self, **params):
    method futures_v1_get_income_asyn_id (line 5184) | async def futures_v1_get_income_asyn_id(self, **params):
    method options_v1_post_countdown_cancel_all (line 5189) | async def options_v1_post_countdown_cancel_all(self, **params):
    method margin_v1_post_mining_hash_transfer_config_cancel (line 5194) | async def margin_v1_post_mining_hash_transfer_config_cancel(self, **pa...
    method margin_v1_get_broker_sub_account_deposit_hist (line 5199) | async def margin_v1_get_broker_sub_account_deposit_hist(self, **params):
    method margin_v1_get_mining_payment_list (line 5204) | async def margin_v1_get_mining_payment_list(self, **params):
    method futures_v1_get_pm_account_info (line 5209) | async def futures_v1_get_pm_account_info(self, **params):
    method futures_coin_v1_get_adl_quantile (line 5214) | async def futures_coin_v1_get_adl_quantile(self, **params):
    method options_v1_get_income_asyn_id (line 5219) | async def options_v1_get_income_asyn_id(self, **params):
    method v3_post_cancel_replace (line 5224) | async def v3_post_cancel_replace(self, **params):
    method v3_post_order_test (line 5229) | async def v3_post_order_test(self, **params):
    method margin_v1_post_account_enable_fast_withdraw_switch (line 5232) | async def margin_v1_post_account_enable_fast_withdraw_switch(self, **p...
    method margin_v1_post_broker_transfer_futures (line 5237) | async def margin_v1_post_broker_transfer_futures(self, **params):
    method margin_v1_get_margin_isolated_transfer (line 5242) | async def margin_v1_get_margin_isolated_transfer(self, **params):
    method v3_post_order_cancel_replace (line 5245) | async def v3_post_order_cancel_replace(self, **params):
    method margin_v1_post_sol_staking_sol_stake (line 5248) | async def margin_v1_post_sol_staking_sol_stake(self, **params):
    method margin_v1_post_loan_borrow (line 5253) | async def margin_v1_post_loan_borrow(self, **params):
    method margin_v1_get_managed_subaccount_info (line 5258) | async def margin_v1_get_managed_subaccount_info(self, **params):
    method margin_v1_post_lending_auto_invest_plan_edit_status (line 5263) | async def margin_v1_post_lending_auto_invest_plan_edit_status(self, **...
    method margin_v1_get_sol_staking_sol_history_unclaimed_rewards (line 5268) | async def margin_v1_get_sol_staking_sol_history_unclaimed_rewards(self...
    method margin_v1_post_asset_convert_transfer_query_by_page (line 5273) | async def margin_v1_post_asset_convert_transfer_query_by_page(self, **...
    method margin_v1_get_sol_staking_sol_history_boost_rewards_history (line 5278) | async def margin_v1_get_sol_staking_sol_history_boost_rewards_history(...
    method margin_v1_get_lending_auto_invest_one_off_status (line 5283) | async def margin_v1_get_lending_auto_invest_one_off_status(self, **par...
    method margin_v1_post_broker_sub_account (line 5288) | async def margin_v1_post_broker_sub_account(self, **params):
    method margin_v1_get_asset_ledger_transfer_cloud_mining_query_by_page (line 5293) | async def margin_v1_get_asset_ledger_transfer_cloud_mining_query_by_pa...
    method margin_v1_get_mining_pub_coin_list (line 5298) | async def margin_v1_get_mining_pub_coin_list(self, **params):
    method margin_v2_get_loan_flexible_repay_history (line 5303) | async def margin_v2_get_loan_flexible_repay_history(self, **params):
    method v3_post_sor_order (line 5308) | async def v3_post_sor_order(self, **params):
    method margin_v1_post_capital_deposit_credit_apply (line 5313) | async def margin_v1_post_capital_deposit_credit_apply(self, **params):
    method futures_v1_put_batch_order (line 5318) | async def futures_v1_put_batch_order(self, **params):
    method v3_get_my_prevented_matches (line 5323) | async def v3_get_my_prevented_matches(self, **params):
    method margin_v1_get_mining_statistics_user_list (line 5326) | async def margin_v1_get_mining_statistics_user_list(self, **params):
    method futures_v1_post_batch_order (line 5331) | async def futures_v1_post_batch_order(self, **params):
    method v3_get_ticker_trading_day (line 5336) | async def v3_get_ticker_trading_day(self, **params):
    method margin_v1_get_mining_worker_detail (line 5341) | async def margin_v1_get_mining_worker_detail(self, **params):
    method margin_v1_get_managed_subaccount_fetch_future_asset (line 5346) | async def margin_v1_get_managed_subaccount_fetch_future_asset(self, **...
    method margin_v1_get_margin_rate_limit_order (line 5351) | async def margin_v1_get_margin_rate_limit_order(self, **params):
    method margin_v1_get_localentity_vasp (line 5356) | async def margin_v1_get_localentity_vasp(self, **params):
    method margin_v1_get_sol_staking_sol_history_rate_history (line 5361) | async def margin_v1_get_sol_staking_sol_history_rate_history(self, **p...
    method margin_v1_post_broker_sub_account_api_ip_restriction (line 5366) | async def margin_v1_post_broker_sub_account_api_ip_restriction(self, *...
    method margin_v1_get_broker_transfer (line 5371) | async def margin_v1_get_broker_transfer(self, **params):
    method margin_v1_get_sol_staking_account (line 5376) | async def margin_v1_get_sol_staking_account(self, **params):
    method margin_v1_get_account_info (line 5381) | async def margin_v1_get_account_info(self, **params):
    method margin_v1_post_portfolio_repay_futures_switch (line 5386) | async def margin_v1_post_portfolio_repay_futures_switch(self, **params):
    method margin_v1_post_loan_vip_borrow (line 5391) | async def margin_v1_post_loan_vip_borrow(self, **params):
    method margin_v2_get_loan_flexible_ltv_adjustment_history (line 5396) | async def margin_v2_get_loan_flexible_ltv_adjustment_history(self, **p...
    method options_v1_delete_all_open_orders_by_underlying (line 5401) | async def options_v1_delete_all_open_orders_by_underlying(self, **para...
    method margin_v1_get_broker_sub_account_futures_summary (line 5406) | async def margin_v1_get_broker_sub_account_futures_summary(self, **par...
    method margin_v1_get_broker_sub_account_spot_summary (line 5411) | async def margin_v1_get_broker_sub_account_spot_summary(self, **params):
    method margin_v1_post_sub_account_blvt_enable (line 5416) | async def margin_v1_post_sub_account_blvt_enable(self, **params):
    method margin_v1_get_algo_spot_historical_orders (line 5421) | async def margin_v1_get_algo_spot_historical_orders(self, **params):
    method margin_v1_get_loan_vip_repay_history (line 5426) | async def margin_v1_get_loan_vip_repay_history(self, **params):
    method margin_v1_get_loan_borrow_history (line 5431) | async def margin_v1_get_loan_borrow_history(self, **params):
    method margin_v1_post_lending_auto_invest_redeem (line 5436) | async def margin_v1_post_lending_auto_invest_redeem(self, **params):
    method v3_get_account (line 5441) | async def v3_get_account(self, **params):
    method v3_delete_order (line 5444) | async def v3_delete_order(self, **params):
    method futures_coin_v1_get_income_asyn (line 5447) | async def futures_coin_v1_get_income_asyn(self, **params):
    method margin_v1_post_managed_subaccount_deposit (line 5452) | async def margin_v1_post_managed_subaccount_deposit(self, **params):
    method margin_v1_post_lending_daily_purchase (line 5457) | async def margin_v1_post_lending_daily_purchase(self, **params):
    method futures_v1_get_trade_asyn_id (line 5462) | async def futures_v1_get_trade_asyn_id(self, **params):
    method margin_v1_delete_sub_account_sub_account_api_ip_restriction_ip_list (line 5467) | async def margin_v1_delete_sub_account_sub_account_api_ip_restriction_...
    method margin_v1_get_copy_trading_futures_user_status (line 5472) | async def margin_v1_get_copy_trading_futures_user_status(self, **params):
    method options_v1_get_margin_account (line 5477) | async def options_v1_get_margin_account(self, **params):
    method margin_v1_post_localentity_withdraw_apply (line 5482) | async def margin_v1_post_localentity_withdraw_apply(self, **params):
    method v3_put_user_data_stream (line 5487) | async def v3_put_user_data_stream(self, **params):
    method margin_v1_get_asset_wallet_balance (line 5490) | async def margin_v1_get_asset_wallet_balance(self, **params):
    method margin_v1_post_broker_transfer (line 5495) | async def margin_v1_post_broker_transfer(self, **params):
    method margin_v1_post_lending_customized_fixed_purchase (line 5500) | async def margin_v1_post_lending_customized_fixed_purchase(self, **par...
    method margin_v1_post_algo_futures_new_order_twap (line 5505) | async def margin_v1_post_algo_futures_new_order_twap(self, **params):
    method margin_v2_post_eth_staking_eth_stake (line 5510) | async def margin_v2_post_eth_staking_eth_stake(self, **params):
    method margin_v1_post_loan_flexible_repay_history (line 5515) | async def margin_v1_post_loan_flexible_repay_history(self, **params):
    method v3_post_user_data_stream (line 5520) | async def v3_post_user_data_stream(self, **params):
    method margin_v1_get_lending_auto_invest_index_info (line 5523) | async def margin_v1_get_lending_auto_invest_index_info(self, **params):
    method margin_v1_get_sol_staking_sol_history_redemption_history (line 5528) | async def margin_v1_get_sol_staking_sol_history_redemption_history(sel...
    method margin_v1_get_broker_rebate_futures_recent_record (line 5533) | async def margin_v1_get_broker_rebate_futures_recent_record(self, **pa...
    method margin_v3_get_broker_sub_account_futures_summary (line 5538) | async def margin_v3_get_broker_sub_account_futures_summary(self, **par...
    method margin_v1_post_margin_manual_liquidation (line 5543) | async def margin_v1_post_margin_manual_liquidation(self, **params):
    method margin_v1_get_lending_auto_invest_target_asset_roi_list (line 5546) | async def margin_v1_get_lending_auto_invest_target_asset_roi_list(self...
    method margin_v1_get_broker_universal_transfer (line 5551) | async def margin_v1_get_broker_universal_transfer(self, **params):
    method futures_v1_put_batch_orders (line 5556) | async def futures_v1_put_batch_orders(self, **params):
    method options_v1_post_countdown_cancel_all_heart_beat (line 5561) | async def options_v1_post_countdown_cancel_all_heart_beat(self, **para...
    method margin_v1_get_loan_collateral_data (line 5566) | async def margin_v1_get_loan_collateral_data(self, **params):
    method margin_v1_get_loan_repay_history (line 5571) | async def margin_v1_get_loan_repay_history(self, **params):
    method margin_v1_post_convert_limit_place_order (line 5576) | async def margin_v1_post_convert_limit_place_order(self, **params):
    method futures_v1_get_convert_exchange_info (line 5581) | async def futures_v1_get_convert_exchange_info(self, **params):
    method v3_get_all_order_list (line 5586) | async def v3_get_all_order_list(self, **params):
    method margin_v1_delete_broker_sub_account_api_ip_restriction_ip_list (line 5591) | async def margin_v1_delete_broker_sub_account_api_ip_restriction_ip_li...
    method margin_v1_post_sub_account_virtual_sub_account (line 5596) | async def margin_v1_post_sub_account_virtual_sub_account(self, **params):
    method margin_v1_put_localentity_deposit_provide_info (line 5601) | async def margin_v1_put_localentity_deposit_provide_info(self, **params):
    method margin_v1_post_portfolio_mint (line 5606) | async def margin_v1_post_portfolio_mint(self, **params):
    method futures_v1_get_order_amendment (line 5611) | async def futures_v1_get_order_amendment(self, **params):
    method margin_v1_post_sol_staking_sol_claim (line 5616) | async def margin_v1_post_sol_staking_sol_claim(self, **params):
    method margin_v1_post_lending_daily_redeem (line 5621) | async def margin_v1_post_lending_daily_redeem(self, **params):
    method margin_v1_post_mining_hash_transfer_config (line 5626) | async def margin_v1_post_mining_hash_transfer_config(self, **params):
    method margin_v1_get_lending_auto_invest_rebalance_history (line 5631) | async def margin_v1_get_lending_auto_invest_rebalance_history(self, **...
    method margin_v1_get_loan_repay_collateral_rate (line 5636) | async def margin_v1_get_loan_repay_collateral_rate(self, **params):
    method futures_v1_get_income_asyn (line 5641) | async def futures_v1_get_income_asyn(self, **params):
    method margin_v1_get_mining_payment_uid (line 5646) | async def margin_v1_get_mining_payment_uid(self, **params):
    method margin_v2_get_loan_flexible_borrow_history (line 5651) | async def margin_v2_get_loan_flexible_borrow_history(self, **params):
    method v3_get_order (line 5656) | async def v3_get_order(self, **params):
    method margin_v1_get_capital_contract_convertible_coins (line 5659) | async def margin_v1_get_capital_contract_convertible_coins(self, **par...
    method margin_v1_post_broker_sub_account_api_permission_vanilla_options (line 5664) | async def margin_v1_post_broker_sub_account_api_permission_vanilla_opt...
    method margin_v1_get_lending_auto_invest_redeem_history (line 5669) | async def margin_v1_get_lending_auto_invest_redeem_history(self, **par...
    method margin_v2_get_localentity_withdraw_history (line 5674) | async def margin_v2_get_localentity_withdraw_history(self, **params):
    method margin_v1_get_eth_staking_eth_history_redemption_history (line 5679) | async def margin_v1_get_eth_staking_eth_history_redemption_history(sel...
    method futures_v1_get_fee_burn (line 5684) | async def futures_v1_get_fee_burn(self, **params):
    method margin_v1_get_lending_auto_invest_index_user_summary (line 5689) | async def margin_v1_get_lending_auto_invest_index_user_summary(self, *...
    method margin_v2_post_loan_flexible_borrow (line 5694) | async def margin_v2_post_loan_flexible_borrow(self, **params):
    method margin_v1_post_loan_vip_repay (line 5699) | async def margin_v1_post_loan_vip_repay(self, **params):
    method futures_coin_v1_get_commission_rate (line 5704) | async def futures_coin_v1_get_commission_rate(self, **params):
    method margin_v1_get_convert_asset_info (line 5709) | async def margin_v1_get_convert_asset_info(self, **params):
    method v3_post_sor_order_test (line 5714) | async def v3_post_sor_order_test(self, **params):
    method margin_v1_post_broker_universal_transfer (line 5719) | async def margin_v1_post_broker_universal_transfer(self, **params):
    method margin_v1_post_account_disable_fast_withdraw_switch (line 5724) | async def margin_v1_post_account_disable_fast_withdraw_switch(self, **...
    method futures_v1_get_asset_index (line 5729) | async def futures_v1_get_asset_index(self, **params):
    method v3_get_rate_limit_order (line 5734) | async def v3_get_rate_limit_order(self, **params):
    method margin_v1_get_account_api_restrictions_ip_restriction (line 5737) | async def margin_v1_get_account_api_restrictions_ip_restriction(self, ...
    method margin_v1_post_broker_sub_account_bnb_burn_spot (line 5742) | async def margin_v1_post_broker_sub_account_bnb_burn_spot(self, **para...
    method futures_coin_v1_put_batch_orders (line 5747) | async def futures_coin_v1_put_batch_orders(self, **params):
    method v3_delete_open_orders (line 5752) | async def v3_delete_open_orders(self, **params):
    method margin_v1_post_broker_sub_account_api_permission_universal_transfer (line 5755) | async def margin_v1_post_broker_sub_account_api_permission_universal_t...
    method v3_get_my_allocations (line 5760) | async def v3_get_my_allocations(self, **params):
    method margin_v1_get_loan_ltv_adjustment_history (line 5763) | async def margin_v1_get_loan_ltv_adjustment_history(self, **params):
    method margin_v1_get_localentity_withdraw_history (line 5768) | async def margin_v1_get_localentity_withdraw_history(self, **params):
    method margin_v2_post_sub_account_sub_account_api_ip_restriction (line 5773) | async def margin_v2_post_sub_account_sub_account_api_ip_restriction(se...
    method futures_v1_get_rate_limit_order (line 5778) | async def futures_v1_get_rate_limit_order(self, **params):
    method margin_v1_get_broker_sub_account_api_commission_futures (line 5783) | async def margin_v1_get_broker_sub_account_api_commission_futures(self...
    method margin_v1_get_sol_staking_sol_history_staking_history (line 5788) | async def margin_v1_get_sol_staking_sol_history_staking_history(self, ...
    method futures_v1_get_open_order (line 5793) | async def futures_v1_get_open_order(self, **params):
    method margin_v1_delete_algo_spot_order (line 5798) | async def margin_v1_delete_algo_spot_order(self, **params):
    method v3_post_order (line 5803) | async def v3_post_order(self, **params):
    method margin_v1_delete_account_api_restrictions_ip_restriction_ip_list (line 5806) | async def margin_v1_delete_account_api_restrictions_ip_restriction_ip_...
    method margin_v1_post_capital_contract_convertible_coins (line 5811) | async def margin_v1_post_capital_contract_convertible_coins(self, **pa...
    method margin_v1_get_managed_subaccount_margin_asset (line 5816) | async def margin_v1_get_managed_subaccount_margin_asset(self, **params):
    method v3_delete_order_list (line 5821) | async def v3_delete_order_list(self, **params):
    method margin_v1_post_sub_account_sub_account_api_ip_restriction_ip_list (line 5826) | async def margin_v1_post_sub_account_sub_account_api_ip_restriction_ip...
    method margin_v1_post_broker_sub_account_api_commission (line 5831) | async def margin_v1_post_broker_sub_account_api_commission(self, **par...
    method futures_v1_post_fee_burn (line 5836) | async def futures_v1_post_fee_burn(self, **params):
    method margin_v1_get_broker_sub_account_margin_summary (line 5841) | async def margin_v1_get_broker_sub_account_margin_summary(self, **para...
    method margin_v1_get_lending_auto_invest_plan_list (line 5846) | async def margin_v1_get_lending_auto_invest_plan_list(self, **params):
    method margin_v1_get_loan_vip_loanable_data (line 5851) | async def margin_v1_get_loan_vip_loanable_data(self, **params):
    method margin_v2_get_loan_flexible_collateral_data (line 5856) | async def margin_v2_get_loan_flexible_collateral_data(self, **params):
    method margin_v1_delete_broker_sub_account_api (line 5861) | async def margin_v1_delete_broker_sub_account_api(self, **params):
    method margin_v1_get_sol_staking_sol_history_bnsol_rewards_history (line 5866) | async def margin_v1_get_sol_staking_sol_history_bnsol_rewards_history(...
    method margin_v1_get_convert_limit_query_open_orders (line 5871) | async def margin_v1_get_convert_limit_query_open_orders(self, **params):
    method v3_get_account_commission (line 5876) | async def v3_get_account_commission(self, **params):
    method v3_post_order_list_oco (line 5881) | async def v3_post_order_list_oco(self, **params):
    method margin_v1_get_managed_subaccount_query_trans_log (line 5884) | async def margin_v1_get_managed_subaccount_query_trans_log(self, **par...
    method margin_v2_post_broker_sub_account_api_ip_restriction (line 5889) | async def margin_v2_post_broker_sub_account_api_ip_restriction(self, *...
    method margin_v1_get_lending_auto_invest_all_asset (line 5894) | async def margin_v1_get_lending_auto_invest_all_asset(self, **params):
    method futures_v1_post_convert_accept_quote (line 5899) | async def futures_v1_post_convert_accept_quote(self, **params):
    method margin_v1_get_spot_delist_schedule (line 5904) | async def margin_v1_get_spot_delist_schedule(self, **params):
    method margin_v1_post_account_api_restrictions_ip_restriction (line 5909) | async def margin_v1_post_account_api_restrictions_ip_restriction(self,...
    method margin_v1_get_dci_product_accounts (line 5914) | async def margin_v1_get_dci_product_accounts(self, **params):
    method margin_v1_get_sub_account_sub_account_api_ip_restriction (line 5919) | async def margin_v1_get_sub_account_sub_account_api_ip_restriction(sel...
    method margin_v1_get_sub_account_transaction_statistics (line 5924) | async def margin_v1_get_sub_account_transaction_statistics(self, **par...
    method margin_v1_get_managed_subaccount_deposit_address (line 5929) | async def margin_v1_get_managed_subaccount_deposit_address(self, **par...
    method margin_v2_get_portfolio_account (line 5934) | async def margin_v2_get_portfolio_account(self, **params):
    method margin_v1_get_simple_earn_locked_history_redemption_record (line 5939) | async def margin_v1_get_simple_earn_locked_history_redemption_record(s...
    method futures_v1_get_order_asyn_id (line 5944) | async def futures_v1_get_order_asyn_id(self, **params):
    method margin_v1_post_managed_subaccount_withdraw (line 5949) | async def margin_v1_post_managed_subaccount_withdraw(self, **params):
    method margin_v1_get_localentity_deposit_history (line 5954) | async def margin_v1_get_localentity_deposit_history(self, **params):
    method margin_v1_post_eth_staking_wbeth_wrap (line 5959) | async def margin_v1_post_eth_staking_wbeth_wrap(self, **params):
    method margin_v1_post_simple_earn_locked_set_redeem_option (line 5964) | async def margin_v1_post_simple_earn_locked_set_redeem_option(self, **...
    method margin_v1_post_broker_sub_account_api_ip_restriction_ip_list (line 5969) | async def margin_v1_post_broker_sub_account_api_ip_restriction_ip_list...
    method margin_v1_post_broker_sub_account_api_commission_futures (line 5974) | async def margin_v1_post_broker_sub_account_api_commission_futures(sel...
    method v3_get_open_orders (line 5979) | async def v3_get_open_orders(self, **params):
    method margin_v1_get_lending_auto_invest_history_list (line 5982) | async def margin_v1_get_lending_auto_invest_history_list(self, **params):
    method margin_v1_post_loan_customize_margin_call (line 5987) | async def margin_v1_post_loan_customize_margin_call(self, **params):
    method margin_v1_get_broker_sub_account_bnb_burn_status (line 5992) | async def margin_v1_get_broker_sub_account_bnb_burn_status(self, **par...
    method margin_v1_get_managed_subaccount_account_snapshot (line 5997) | async def margin_v1_get_managed_subaccount_account_snapshot(self, **pa...
    method margin_v1_post_asset_convert_transfer (line 6002) | async def margin_v1_post_asset_convert_transfer(self, **params):
    method options_v1_get_income_asyn (line 6007) | async def options_v1_get_income_asyn(self, **params):
    method margin_v1_get_broker_sub_account_api_commission_coin_futures (line 6012) | async def margin_v1_get_broker_sub_account_api_commission_coin_futures...
    method margin_v2_get_broker_sub_account_futures_summary (line 6017) | async def margin_v2_get_broker_sub_account_futures_summary(self, **par...
    method margin_v1_get_loan_ongoing_orders (line 6022) | async def margin_v1_get_loan_ongoing_orders(self, **params):
    method margin_v2_get_loan_flexible_ongoing_orders (line 6027) | async def margin_v2_get_loan_flexible_ongoing_orders(self, **params):
    method margin_v1_post_algo_futures_new_order_vp (line 6032) | async def margin_v1_post_algo_futures_new_order_vp(self, **params):
    method futures_v1_post_convert_get_quote (line 6037) | async def futures_v1_post_convert_get_quote(self, **params):
    method margin_v1_get_algo_spot_sub_orders (line 6042) | async def margin_v1_get_algo_spot_sub_orders(self, **params):
    method margin_v1_post_portfolio_redeem (line 6047) | async def margin_v1_post_portfolio_redeem(self, **params):
    method margin_v1_post_lending_auto_invest_plan_add (line 6052) | async def margin_v1_post_lending_auto_invest_plan_add(self, **params):
    method v3_get_order_list (line 6057) | async def v3_get_order_list(self, **params):
    method v3_get_my_trades (line 6062) | async def v3_get_my_trades(self, **params):
    method margin_v1_get_lending_auto_invest_source_asset_list (line 6065) | async def margin_v1_get_lending_auto_invest_source_asset_list(self, **...
    method margin_v1_get_margin_all_order_list (line 6070) | async def margin_v1_get_margin_all_order_list(self, **params):
    method margin_v1_post_eth_staking_eth_redeem (line 6075) | async def margin_v1_post_eth_staking_eth_redeem(self, **params):
    method margin_v1_get_broker_rebate_historical_record (line 6080) | async def margin_v1_get_broker_rebate_historical_record(self, **params):
    method margin_v1_get_simple_earn_locked_history_subscription_record (line 6085) | async def margin_v1_get_simple_earn_locked_history_subscription_record...
    method futures_coin_v1_put_order (line 6090) | async def futures_coin_v1_put_order(self, **params):
    method margin_v1_get_managed_subaccount_asset (line 6095) | async def margin_v1_get_managed_subaccount_asset(self, **params):
    method margin_v1_get_sol_staking_sol_quota (line 6100) | async def margin_v1_get_sol_staking_sol_quota(self, **params):
    method margin_v1_post_loan_vip_renew (line 6105) | async def margin_v1_post_loan_vip_renew(self, **params):
    method margin_v1_get_managed_subaccount_query_trans_log_for_trade_parent (line 6110) | async def margin_v1_get_managed_subaccount_query_trans_log_for_trade_p...
    method margin_v1_post_sub_account_sub_account_api_ip_restriction (line 6115) | async def margin_v1_post_sub_account_sub_account_api_ip_restriction(se...
    method margin_v1_get_simple_earn_flexible_history_redemption_record (line 6120) | async def margin_v1_get_simple_earn_flexible_history_redemption_record...
    method margin_v1_get_broker_sub_account_api (line 6125) | async def margin_v1_get_broker_sub_account_api(self, **params):
    method options_v1_get_exercise_history (line 6130) | async def options_v1_get_exercise_history(self, **params):
    method margin_v1_get_convert_exchange_info (line 6135) | async def margin_v1_get_convert_exchange_info(self, **params):
    method futures_v1_delete_batch_order (line 6140) | async def futures_v1_delete_batch_order(self, **params):
    method margin_v1_get_eth_staking_eth_history_wbeth_rewards_history (line 6145) | async def margin_v1_get_eth_staking_eth_history_wbeth_rewards_history(...
    method margin_v1_get_mining_pub_algo_list (line 6150) | async def margin_v1_get_mining_pub_algo_list(self, **params):
    method options_v1_get_block_trades (line 6155) | async def options_v1_get_block_trades(self, **params):
    method margin_v1_get_copy_trading_futures_lead_symbol (line 6160) | async def margin_v1_get_copy_trading_futures_lead_symbol(self, **params):
    method margin_v1_get_mining_worker_list (line 6165) | async def margin_v1_get_mining_worker_list(self, **params):
    method margin_v1_get_dci_product_list (line 6170) | async def margin_v1_get_dci_product_list(self, **params):
    method futures_v1_get_convert_order_status (line 6175) | async def futures_v1_get_convert_order_status(self, **params):

FILE: binance/base_client.py
  class BaseClient (line 23) | class BaseClient:
    method __init__ (line 158) | def __init__(
    method _get_headers (line 244) | def _get_headers(self) -> Dict:
    method _init_session (line 258) | def _init_session(self):
    method _init_private_key (line 261) | def _init_private_key(
    method _create_api_uri (line 276) | def _create_api_uri(
    method _create_margin_api_uri (line 287) | def _create_margin_api_uri(self, path: str, version: int = 1) -> str:
    method _create_papi_api_uri (line 296) | def _create_papi_api_uri(self, path: str, version: int = 1) -> str:
    method _create_website_uri (line 300) | def _create_website_uri(self, path: str) -> str:
    method _create_futures_api_uri (line 303) | def _create_futures_api_uri(self, path: str, version: int = 1) -> str:
    method _create_futures_data_api_uri (line 316) | def _create_futures_data_api_uri(self, path: str) -> str:
    method _create_futures_coin_api_url (line 322) | def _create_futures_coin_api_url(self, path: str, version: int = 1) ->...
    method _create_futures_coin_data_api_url (line 335) | def _create_futures_coin_data_api_url(self, path: str, version: int = ...
    method _create_options_api_uri (line 341) | def _create_options_api_uri(self, path: str) -> str:
    method _rsa_signature (line 347) | def _rsa_signature(self, query_string: str):
    method encode_uri_component (line 356) | def encode_uri_component(uri, safe="~()*!.'"):
    method convert_to_dict (line 360) | def convert_to_dict(list_tuples):
    method _require_tld (line 364) | def _require_tld(self, required_tld: str, endpoint_name: str = "endpoi...
    method _ed25519_signature (line 376) | def _ed25519_signature(self, query_string: str):
    method _hmac_signature (line 384) | def _hmac_signature(self, query_string: str) -> str:
    method _generate_signature (line 393) | def _generate_signature(self, data: Dict, uri_encode=True) -> str:
    method _sign_ws_params (line 404) | def _sign_ws_params(self, params, signature_func):
    method _generate_ws_api_signature (line 412) | def _generate_ws_api_signature(self, data: Dict) -> str:
    method _ws_futures_api_request (line 422) | async def _ws_futures_api_request(self, method: str, signed: bool, par...
    method _ws_futures_api_request_sync (line 434) | def _ws_futures_api_request_sync(self, method: str, signed: bool, para...
    method _make_sync (line 440) | async def _make_sync(self, method):
    method _ws_api_request (line 443) | async def _ws_api_request(self, method: str, signed: bool, params: dict):
    method _ws_api_request_sync (line 457) | def _ws_api_request_sync(self, method: str, signed: bool, params: dict):
    method _get_version (line 465) | def _get_version(version: int, **kwargs) -> int:
    method uuid22 (line 473) | def uuid22(length=22):
    method _order_params (line 477) | def _order_params(data: Dict) -> List[Tuple[str, str]]:
    method _get_request_kwargs (line 498) | def _get_request_kwargs(

FILE: binance/client.py
  class Client (line 24) | class Client(BaseClient):
    method __init__ (line 25) | def __init__(
    method _init_session (line 58) | def _init_session(self) -> requests.Session:
    method _request (line 65) | def _request(
    method _handle_response (line 110) | def _handle_response(response: requests.Response):
    method _request_api (line 126) | def _request_api(
    method _request_futures_api (line 137) | def _request_futures_api(
    method _request_futures_data_api (line 146) | def _request_futures_data_api(self, method, path, signed=False, **kwar...
    method _request_futures_coin_api (line 152) | def _request_futures_coin_api(
    method _request_futures_coin_data_api (line 161) | def _request_futures_coin_data_api(
    method _request_options_api (line 170) | def _request_options_api(self, method, path, signed=False, **kwargs) -...
    method _request_margin_api (line 179) | def _request_margin_api(
    method _request_papi_api (line 188) | def _request_papi_api(
    method _request_website (line 196) | def _request_website(self, method, path, signed=False, **kwargs) -> Dict:
    method _get (line 200) | def _get(self, path, signed=False, version=BaseClient.PUBLIC_API_VERSI...
    method _post (line 203) | def _post(
    method _put (line 208) | def _put(
    method _delete (line 213) | def _delete(
    method get_products (line 220) | def get_products(self) -> Dict:
    method get_exchange_info (line 236) | def get_exchange_info(self) -> Dict:
    method get_symbol_info (line 302) | def get_symbol_info(self, symbol) -> Optional[Dict]:
    method ping (line 355) | def ping(self) -> Dict:
    method get_server_time (line 371) | def get_server_time(self) -> Dict:
    method get_all_tickers (line 391) | def get_all_tickers(self) -> List[Dict[str, str]]:
    method get_orderbook_tickers (line 419) | def get_orderbook_tickers(self, **params) -> Dict:
    method get_order_book (line 462) | def get_order_book(self, **params) -> Dict:
    method get_recent_trades (line 499) | def get_recent_trades(self, **params) -> Dict:
    method get_historical_trades (line 529) | def get_historical_trades(self, **params) -> Dict:
    method get_aggregate_trades (line 563) | def get_aggregate_trades(self, **params) -> Dict:
    method aggregate_trade_iter (line 602) | def aggregate_trade_iter(self, symbol: str, start_str=None, last_id=No...
    method get_ui_klines (line 685) | def get_ui_klines(self, **params) -> Dict:
    method get_klines (line 727) | def get_klines(self, **params) -> Dict:
    method _klines (line 769) | def _klines(
    method _get_earliest_valid_timestamp (line 811) | def _get_earliest_valid_timestamp(
    method get_historical_klines (line 850) | def get_historical_klines(
    method _historical_klines (line 897) | def _historical_klines(
    method get_historical_klines_generator (line 996) | def get_historical_klines_generator(
    method _historical_klines_generator (line 1039) | def _historical_klines_generator(
    method get_avg_price (line 1128) | def get_avg_price(self, **params):
    method get_ticker (line 1147) | def get_ticker(self, **params):
    method get_symbol_ticker (line 1208) | def get_symbol_ticker(self, **params):
    method get_symbol_ticker_window (line 1245) | def get_symbol_ticker_window(self, **params):
    method get_orderbook_ticker (line 1282) | def get_orderbook_ticker(self, **params):
    method create_order (line 1332) | def create_order(self, **params):
    method order_limit (line 1453) | def order_limit(self, timeInForce=BaseClient.TIME_IN_FORCE_GTC, **para...
    method order_limit_buy (line 1489) | def order_limit_buy(self, timeInForce=BaseClient.TIME_IN_FORCE_GTC, **...
    method order_limit_sell (line 1527) | def order_limit_sell(self, timeInForce=BaseClient.TIME_IN_FORCE_GTC, *...
    method order_market (line 1561) | def order_market(self, **params):
    method order_market_buy (line 1592) | def order_market_buy(self, **params):
    method order_market_sell (line 1620) | def order_market_sell(self, **params):
    method create_oco_order (line 1648) | def create_oco_order(self, **params):
    method order_oco_buy (line 1793) | def order_oco_buy(self, **params):
    method order_oco_sell (line 1835) | def order_oco_sell(self, **params):
    method create_test_order (line 1877) | def create_test_order(self, **params):
    method get_order (line 1915) | def get_order(self, **params):
    method get_all_orders (line 1954) | def get_all_orders(self, **params):
    method cancel_order (line 1999) | def cancel_order(self, **params):
    method cancel_all_open_orders (line 2031) | def cancel_all_open_orders(self, **params):
    method cancel_replace_order (line 2044) | def cancel_replace_order(self, **params):
    method get_open_orders (line 2152) | def get_open_orders(self, **params):
    method get_open_oco_orders (line 2189) | def get_open_oco_orders(self, **params):
    method get_account (line 2224) | def get_account(self, **params):
    method get_asset_balance (line 2263) | def get_asset_balance(self, asset=None, **params):
    method get_my_trades (line 2297) | def get_my_trades(self, **params):
    method get_current_order_count (line 2338) | def get_current_order_count(self, **params):
    method get_prevented_matches (line 2367) | def get_prevented_matches(self, **params):
    method get_allocations (line 2404) | def get_allocations(self, **params):
    method get_system_status (line 2448) | def get_system_status(self):
    method get_account_status (line 2467) | def get_account_status(self, version=1, **params):
    method get_account_api_trading_status (line 2492) | def get_account_api_trading_status(self, **params):
    method get_account_api_permissions (line 2564) | def get_account_api_permissions(self, **params):
    method get_dust_assets (line 2595) | def get_dust_assets(self, **params):
    method get_dust_log (line 2624) | def get_dust_log(self, **params):
    method transfer_dust (line 2696) | def transfer_dust(self, **params):
    method get_asset_dividend_history (line 2734) | def get_asset_dividend_history(self, **params):
    method make_universal_transfer (line 2781) | def make_universal_transfer(self, **params):
    method query_universal_transfer_history (line 2815) | def query_universal_transfer_history(self, **params):
    method get_trade_fee (line 2871) | def get_trade_fee(self, **params):
    method get_asset_details (line 2906) | def get_asset_details(self, **params):
    method get_spot_delist_schedule (line 2939) | def get_spot_delist_schedule(self, **params):
    method withdraw (line 2972) | def withdraw(self, **params):
    method get_deposit_history (line 3015) | def get_deposit_history(self, **params):
    method get_withdraw_history (line 3073) | def get_withdraw_history(self, **params):
    method get_withdraw_history_id (line 3129) | def get_withdraw_history_id(self, withdraw_id, **params):
    method get_deposit_address (line 3174) | def get_deposit_address(self, coin: str, network: Optional[str] = None...
    method stream_get_listen_key (line 3209) | def stream_get_listen_key(self):
    method stream_keepalive (line 3234) | def stream_keepalive(self, listenKey):
    method stream_close (line 3256) | def stream_close(self, listenKey):
    method get_margin_account (line 3280) | def get_margin_account(self, **params):
    method get_isolated_margin_account (line 3338) | def get_isolated_margin_account(self, **params):
    method enable_isolated_margin_account (line 3451) | def enable_isolated_margin_account(self, **params):
    method disable_isolated_margin_account (line 3474) | def disable_isolated_margin_account(self, **params):
    method get_enabled_isolated_margin_account_limit (line 3497) | def get_enabled_isolated_margin_account_limit(self, **params):
    method get_margin_dustlog (line 3515) | def get_margin_dustlog(self, **params):
    method get_margin_dust_assets (line 3586) | def get_margin_dust_assets(self, **params):
    method transfer_margin_dust (line 3614) | def transfer_margin_dust(self, **params):
    method get_cross_margin_collateral_ratio (line 3648) | def get_cross_margin_collateral_ratio(self, **params):
    method get_small_liability_exchange_assets (line 3699) | def get_small_liability_exchange_assets(self, **params):
    method exchange_small_liability_assets (line 3722) | def exchange_small_liability_assets(self, **params):
    method get_small_liability_exchange_history (line 3740) | def get_small_liability_exchange_history(self, **params):
    method get_future_hourly_interest_rate (line 3776) | def get_future_hourly_interest_rate(self, **params):
    method get_margin_capital_flow (line 3805) | def get_margin_capital_flow(self, **params):
    method get_margin_asset (line 3852) | def get_margin_asset(self, **params):
    method get_margin_symbol (line 3882) | def get_margin_symbol(self, **params):
    method get_margin_all_assets (line 3914) | def get_margin_all_assets(self, **params):
    method get_margin_all_pairs (line 3951) | def get_margin_all_pairs(self, **params):
    method create_isolated_margin_account (line 3990) | def create_isolated_margin_account(self, **params):
    method get_isolated_margin_symbol (line 4021) | def get_isolated_margin_symbol(self, **params):
    method get_all_isolated_margin_symbols (line 4054) | def get_all_isolated_margin_symbols(self, **params):
    method get_isolated_margin_fee_data (line 4094) | def get_isolated_margin_fee_data(self, **params):
    method get_isolated_margin_tier_data (line 4131) | def get_isolated_margin_tier_data(self, **params):
    method margin_manual_liquidation (line 4163) | def margin_manual_liquidation(self, **params):
    method toggle_bnb_burn_spot_margin (line 4190) | def toggle_bnb_burn_spot_margin(self, **params):
    method get_bnb_burn_spot_margin (line 4219) | def get_bnb_burn_spot_margin(self, **params):
    method get_margin_price_index (line 4243) | def get_margin_price_index(self, **params):
    method transfer_margin_to_spot (line 4270) | def transfer_margin_to_spot(self, **params):
    method transfer_spot_to_margin (line 4302) | def transfer_spot_to_margin(self, **params):
    method transfer_isolated_margin_to_spot (line 4334) | def transfer_isolated_margin_to_spot(self, **params):
    method transfer_spot_to_isolated_margin (line 4370) | def transfer_spot_to_isolated_margin(self, **params):
    method get_isolated_margin_tranfer_history (line 4406) | def get_isolated_margin_tranfer_history(self, **params):
    method create_margin_loan (line 4469) | def create_margin_loan(self, **params):
    method repay_margin_loan (line 4505) | def repay_margin_loan(self, **params):
    method create_margin_order (line 4545) | def create_margin_order(self, **params):
    method cancel_margin_order (line 4670) | def cancel_margin_order(self, **params):
    method cancel_all_open_margin_orders (line 4715) | def cancel_all_open_margin_orders(self, **params):
    method set_margin_max_leverage (line 4735) | def set_margin_max_leverage(self, **params):
    method get_margin_transfer_history (line 4756) | def get_margin_transfer_history(self, **params):
    method get_margin_loan_details (line 4817) | def get_margin_loan_details(self, **params):
    method get_margin_repay_details (line 4861) | def get_margin_repay_details(self, **params):
    method get_cross_margin_data (line 4911) | def get_cross_margin_data(self, **params):
    method get_margin_interest_history (line 4945) | def get_margin_interest_history(self, **params):
    method get_margin_force_liquidation_rec (line 4990) | def get_margin_force_liquidation_rec(self, **params):
    method get_margin_order (line 5033) | def get_margin_order(self, **params):
    method get_open_margin_orders (line 5079) | def get_open_margin_orders(self, **params):
    method get_all_margin_orders (line 5128) | def get_all_margin_orders(self, **params):
    method get_margin_trades (line 5189) | def get_margin_trades(self, **params):
    method get_max_margin_loan (line 5249) | def get_max_margin_loan(self, **params):
    method get_max_margin_transfer (line 5274) | def get_max_margin_transfer(self, **params):
    method get_margin_delist_schedule (line 5299) | def get_margin_delist_schedule(self, **params):
    method create_margin_oco_order (line 5337) | def create_margin_oco_order(self, **params):
    method cancel_margin_oco_order (line 5447) | def cancel_margin_oco_order(self, **params):
    method get_margin_oco_order (line 5530) | def get_margin_oco_order(self, **params):
    method get_open_margin_oco_orders (line 5576) | def get_open_margin_oco_orders(self, **params):
    method margin_stream_get_listen_key (line 5651) | def margin_stream_get_listen_key(self):
    method margin_stream_keepalive (line 5682) | def margin_stream_keepalive(self, listenKey):
    method margin_stream_close (line 5712) | def margin_stream_close(self, listenKey):
    method margin_create_listen_token (line 5742) | def margin_create_listen_token(self, symbol: Optional[str] = None, is_...
    method isolated_margin_stream_get_listen_key (line 5779) | def isolated_margin_stream_get_listen_key(self, symbol):
    method isolated_margin_stream_keepalive (line 5816) | def isolated_margin_stream_keepalive(self, symbol, listenKey):
    method isolated_margin_stream_close (line 5848) | def isolated_margin_stream_close(self, symbol, listenKey):
    method get_simple_earn_flexible_product_list (line 5882) | def get_simple_earn_flexible_product_list(self, **params):
    method get_simple_earn_locked_product_list (line 5930) | def get_simple_earn_locked_product_list(self, **params):
    method subscribe_simple_earn_flexible_product (line 5980) | def subscribe_simple_earn_flexible_product(self, **params):
    method subscribe_simple_earn_locked_product (line 6010) | def subscribe_simple_earn_locked_product(self, **params):
    method redeem_simple_earn_flexible_product (line 6041) | def redeem_simple_earn_flexible_product(self, **params):
    method redeem_simple_earn_locked_product (line 6071) | def redeem_simple_earn_locked_product(self, **params):
    method get_simple_earn_flexible_product_position (line 6097) | def get_simple_earn_flexible_product_position(self, **params):
    method get_simple_earn_locked_product_position (line 6147) | def get_simple_earn_locked_product_position(self, **params):
    method get_simple_earn_account (line 6192) | def get_simple_earn_account(self, **params):
    method get_fixed_activity_project_list (line 6222) | def get_fixed_activity_project_list(self, **params):
    method change_fixed_activity_to_daily_position (line 6274) | def change_fixed_activity_to_daily_position(self, **params):
    method get_staking_product_list (line 6286) | def get_staking_product_list(self, **params):
    method purchase_staking_product (line 6296) | def purchase_staking_product(self, **params):
    method redeem_staking_product (line 6306) | def redeem_staking_product(self, **params):
    method get_staking_position (line 6316) | def get_staking_position(self, **params):
    method get_staking_purchase_history (line 6326) | def get_staking_purchase_history(self, **params):
    method set_auto_staking (line 6336) | def set_auto_staking(self, **params):
    method get_personal_left_quota (line 6346) | def get_personal_left_quota(self, **params):
    method get_staking_asset_us (line 6358) | def get_staking_asset_us(self, **params):
    method stake_asset_us (line 6368) | def stake_asset_us(self, **params):
    method unstake_asset_us (line 6378) | def unstake_asset_us(self, **params):
    method get_staking_balance_us (line 6388) | def get_staking_balance_us(self, **params):
    method get_staking_history_us (line 6400) | def get_staking_history_us(self, **params):
    method get_staking_rewards_history_us (line 6410) | def get_staking_rewards_history_us(self, **params):
    method get_sub_account_list (line 6424) | def get_sub_account_list(self, **params):
    method get_sub_account_transfer_history (line 6464) | def get_sub_account_transfer_history(self, **params):
    method get_sub_account_futures_transfer_history (line 6516) | def get_sub_account_futures_transfer_history(self, **params):
    method create_sub_account_futures_transfer (line 6568) | def create_sub_account_futures_transfer(self, **params):
    method get_sub_account_assets (line 6602) | def get_sub_account_assets(self, **params):
    method query_subaccount_spot_summary (line 6653) | def query_subaccount_spot_summary(self, **params):
    method get_subaccount_deposit_address (line 6693) | def get_subaccount_deposit_address(self, **params):
    method get_subaccount_deposit_history (line 6725) | def get_subaccount_deposit_history(self, **params):
    method get_subaccount_futures_margin_status (line 6785) | def get_subaccount_futures_margin_status(self, **params):
    method enable_subaccount_margin (line 6816) | def enable_subaccount_margin(self, **params):
    method get_subaccount_margin_details (line 6845) | def get_subaccount_margin_details(self, **params):
    method get_subaccount_margin_summary (line 6914) | def get_subaccount_margin_summary(self, **params):
    method enable_subaccount_futures (line 6953) | def enable_subaccount_futures(self, **params):
    method get_subaccount_futures_details (line 6982) | def get_subaccount_futures_details(self, **params):
    method get_subaccount_futures_summary (line 7034) | def get_subaccount_futures_summary(self, **params):
    method get_subaccount_futures_positionrisk (line 7088) | def get_subaccount_futures_positionrisk(self, **params):
    method make_subaccount_futures_transfer (line 7122) | def make_subaccount_futures_transfer(self, **params):
    method make_subaccount_margin_transfer (line 7154) | def make_subaccount_margin_transfer(self, **params):
    method make_subaccount_to_subaccount_transfer (line 7184) | def make_subaccount_to_subaccount_transfer(self, **params):
    method make_subaccount_to_master_transfer (line 7213) | def make_subaccount_to_master_transfer(self, **params):
    method get_subaccount_transfer_history (line 7240) | def get_subaccount_transfer_history(self, **params):
    method make_subaccount_universal_transfer (line 7292) | def make_subaccount_universal_transfer(self, **params):
    method get_universal_transfer_history (line 7327) | def get_universal_transfer_history(self, **params):
    method futures_ping (line 7385) | def futures_ping(self):
    method futures_time (line 7393) | def futures_time(self):
    method futures_exchange_info (line 7401) | def futures_exchange_info(self):
    method futures_order_book (line 7409) | def futures_order_book(self, **params):
    method futures_rpi_depth (line 7417) | def futures_rpi_depth(self, **params):
    method futures_recent_trades (line 7454) | def futures_recent_trades(self, **params):
    method futures_historical_trades (line 7462) | def futures_historical_trades(self, **params):
    method futures_aggregate_trades (line 7470) | def futures_aggregate_trades(self, **params):
    method futures_klines (line 7479) | def futures_klines(self, **params):
    method futures_mark_price_klines (line 7487) | def futures_mark_price_klines(self, **params):
    method futures_index_price_klines (line 7495) | def futures_index_price_klines(self, **params):
    method futures_premium_index_klines (line 7503) | def futures_premium_index_klines(self, **params):
    method futures_continuous_klines (line 7511) | def futures_continuous_klines(self, **params):
    method futures_historical_klines (line 7519) | def futures_historical_klines(
    method futures_historical_mark_price_klines (line 7547) | def futures_historical_mark_price_klines(
    method futures_historical_klines_generator (line 7575) | def futures_historical_klines_generator(
    method futures_mark_price (line 7601) | def futures_mark_price(self, **params):
    method futures_funding_rate (line 7609) | def futures_funding_rate(self, **params):
    method futures_top_longshort_account_ratio (line 7617) | def futures_top_longshort_account_ratio(self, **params):
    method futures_top_longshort_position_ratio (line 7626) | def futures_top_longshort_position_ratio(self, **params):
    method futures_global_longshort_ratio (line 7635) | def futures_global_longshort_ratio(self, **params):
    method futures_taker_longshort_ratio (line 7644) | def futures_taker_longshort_ratio(self, **params):
    method futures_basis (line 7653) | def futures_basis(self, **params):
    method futures_ticker (line 7662) | def futures_ticker(self, **params):
    method futures_symbol_ticker (line 7670) | def futures_symbol_ticker(self, **params):
    method futures_orderbook_ticker (line 7678) | def futures_orderbook_ticker(self, **params):
    method futures_delivery_price (line 7686) | def futures_delivery_price(self, **params):
    method futures_index_price_constituents (line 7694) | def futures_index_price_constituents(self, **params):
    method futures_insurance_fund_balance_snapshot (line 7702) | def futures_insurance_fund_balance_snapshot(self, **params):
    method futures_liquidation_orders (line 7710) | def futures_liquidation_orders(self, **params):
    method futures_api_trading_status (line 7718) | def futures_api_trading_status(self, **params):
    method futures_commission_rate (line 7805) | def futures_commission_rate(self, **params):
    method futures_adl_quantile_estimate (line 7830) | def futures_adl_quantile_estimate(self, **params):
    method futures_open_interest (line 7838) | def futures_open_interest(self, **params):
    method futures_index_info (line 7846) | def futures_index_info(self, **params):
    method futures_open_interest_hist (line 7854) | def futures_open_interest_hist(self, **params):
    method futures_leverage_bracket (line 7862) | def futures_leverage_bracket(self, **params):
    method futures_account_transfer (line 7870) | def futures_account_transfer(self, **params):
    method transfer_history (line 7878) | def transfer_history(self, **params):
    method futures_loan_borrow_history (line 7886) | def futures_loan_borrow_history(self, **params):
    method futures_loan_repay_history (line 7891) | def futures_loan_repay_history(self, **params):
    method futures_loan_wallet (line 7896) | def futures_loan_wallet(self, **params):
    method futures_cross_collateral_adjust_history (line 7901) | def futures_cross_collateral_adjust_history(self, **params):
    method futures_cross_collateral_liquidation_history (line 7906) | def futures_cross_collateral_liquidation_history(self, **params):
    method futures_loan_interest_history (line 7911) | def futures_loan_interest_history(self, **params):
    method futures_create_order (line 7916) | def futures_create_order(self, **params):
    method futures_limit_order (line 7953) | def futures_limit_order(self, **params):
    method futures_market_order (line 7964) | def futures_market_order(self, **params):
    method futures_limit_buy_order (line 7976) | def futures_limit_buy_order(self, **params):
    method futures_limit_sell_order (line 7988) | def futures_limit_sell_order(self, **params):
    method futures_market_buy_order (line 8000) | def futures_market_buy_order(self, **params):
    method futures_market_sell_order (line 8012) | def futures_market_sell_order(self, **params):
    method futures_modify_order (line 8024) | def futures_modify_order(self, **params):
    method futures_create_test_order (line 8032) | def futures_create_test_order(self, **params):
    method futures_place_batch_order (line 8040) | def futures_place_batch_order(self, **params):
    method futures_get_order (line 8059) | def futures_get_order(self, **params):
    method futures_get_open_orders (line 8083) | def futures_get_open_orders(self, **params):
    method futures_get_all_orders (line 8099) | def futures_get_all_orders(self, **params):
    method futures_cancel_order (line 8115) | def futures_cancel_order(self, **params):
    method futures_cancel_all_open_orders (line 8139) | def futures_cancel_all_open_orders(self, **params):
    method futures_cancel_orders (line 8157) | def futures_cancel_orders(self, **params):
    method futures_countdown_cancel_all (line 8175) | def futures_countdown_cancel_all(self, **params):
    method futures_create_algo_order (line 8202) | def futures_create_algo_order(self, **params):
    method futures_cancel_algo_order (line 8272) | def futures_cancel_algo_order(self, **params):
    method futures_cancel_all_algo_open_orders (line 8291) | def futures_cancel_all_algo_open_orders(self, **params):
    method futures_get_algo_order (line 8308) | def futures_get_algo_order(self, **params):
    method futures_get_open_algo_orders (line 8327) | def futures_get_open_algo_orders(self, **params):
    method futures_get_all_algo_orders (line 8342) | def futures_get_all_algo_orders(self, **params):
    method futures_account_balance (line 8363) | def futures_account_balance(self, **params):
    method futures_account (line 8371) | def futures_account(self, **params):
    method futures_symbol_adl_risk (line 8379) | def futures_symbol_adl_risk(self, **params):
    method futures_change_leverage (line 8420) | def futures_change_leverage(self, **params):
    method futures_change_margin_type (line 8428) | def futures_change_margin_type(self, **params):
    method futures_change_position_margin (line 8436) | def futures_change_position_margin(self, **params):
    method futures_position_margin_history (line 8444) | def futures_position_margin_history(self, **params):
    method futures_position_information (line 8454) | def futures_position_information(self, **params):
    method futures_account_trades (line 8462) | def futures_account_trades(self, **params):
    method futures_income_history (line 8470) | def futures_income_history(self, **params):
    method futures_change_position_mode (line 8478) | def futures_change_position_mode(self, **params):
    method futures_get_position_mode (line 8486) | def futures_get_position_mode(self, **params):
    method futures_change_multi_assets_mode (line 8494) | def futures_change_multi_assets_mode(self, multiAssetsMargin: bool):
    method futures_get_multi_assets_mode (line 8503) | def futures_get_multi_assets_mode(self):
    method futures_stream_get_listen_key (line 8511) | def futures_stream_get_listen_key(self):
    method futures_stream_keepalive (line 8515) | def futures_stream_keepalive(self, listenKey):
    method futures_stream_close (line 8519) | def futures_stream_close(self, listenKey):
    method futures_account_config (line 8526) | def futures_account_config(self, **params):
    method futures_symbol_config (line 8534) | def futures_symbol_config(self, **params):
    method futures_coin_ping (line 8543) | def futures_coin_ping(self):
    method futures_coin_time (line 8551) | def futures_coin_time(self):
    method futures_coin_exchange_info (line 8559) | def futures_coin_exchange_info(self):
    method futures_coin_order_book (line 8567) | def futures_coin_order_book(self, **params):
    method futures_coin_recent_trades (line 8575) | def futures_coin_recent_trades(self, **params):
    method futures_coin_historical_trades (line 8583) | def futures_coin_historical_trades(self, **params):
    method futures_coin_aggregate_trades (line 8591) | def futures_coin_aggregate_trades(self, **params):
    method futures_coin_klines (line 8600) | def futures_coin_klines(self, **params):
    method futures_coin_continous_klines (line 8608) | def futures_coin_continous_klines(self, **params):
    method futures_coin_index_price_klines (line 8616) | def futures_coin_index_price_klines(self, **params):
    method futures_coin_premium_index_klines (line 8624) | def futures_coin_premium_index_klines(self, **params):
    method futures_coin_mark_price_klines (line 8632) | def futures_coin_mark_price_klines(self, **params):
    method futures_coin_mark_price (line 8640) | def futures_coin_mark_price(self, **params):
    method futures_coin_funding_rate (line 8648) | def futures_coin_funding_rate(self, **params):
    method futures_coin_ticker (line 8656) | def futures_coin_ticker(self, **params):
    method futures_coin_symbol_ticker (line 8664) | def futures_coin_symbol_ticker(self, **params):
    method futures_coin_orderbook_ticker (line 8672) | def futures_coin_orderbook_ticker(self, **params):
    method futures_coin_top_longshort_position_ratio (line 8680) | def futures_coin_top_longshort_position_ratio(self, **params):
    method futures_coin_top_longshort_account_ratio (line 8687) | def futures_coin_top_longshort_account_ratio(self, **params):
    method futures_coin_global_longshort_ratio (line 8694) | def futures_coin_global_longshort_ratio(self, **params):
    method futures_coin_taker_buy_sell_volume (line 8701) | def futures_coin_taker_buy_sell_volume(self, **params):
    method futures_coin_basis (line 8708) | def futures_coin_basis(self, **params):
    method futures_coin_index_price_constituents (line 8715) | def futures_coin_index_price_constituents(self, **params):
    method futures_coin_liquidation_orders (line 8723) | def futures_coin_liquidation_orders(self, **params):
    method futures_coin_open_interest (line 8733) | def futures_coin_open_interest(self, **params):
    method futures_coin_open_interest_hist (line 8741) | def futures_coin_open_interest_hist(self, **params):
    method futures_coin_leverage_bracket (line 8751) | def futures_coin_leverage_bracket(self, **params):
    method new_transfer_history (line 8761) | def new_transfer_history(self, **params):
    method funding_wallet (line 8769) | def funding_wallet(self, **params):
    method get_user_asset (line 8779) | def get_user_asset(self, **params):
    method universal_transfer (line 8789) | def universal_transfer(self, **params):
    method futures_coin_create_order (line 8798) | def futures_coin_create_order(self, **params):
    method futures_coin_place_batch_order (line 8808) | def futures_coin_place_batch_order(self, **params):
    method futures_coin_modify_order (line 8826) | def futures_coin_modify_order(self, **params):
    method futures_coin_get_order (line 8834) | def futures_coin_get_order(self, **params):
    method futures_coin_get_open_orders (line 8842) | def futures_coin_get_open_orders(self, **params):
    method futures_coin_get_all_orders (line 8850) | def futures_coin_get_all_orders(self, **params):
    method futures_coin_cancel_order (line 8860) | def futures_coin_cancel_order(self, **params):
    method futures_coin_cancel_all_open_orders (line 8870) | def futures_coin_cancel_all_open_orders(self, **params):
    method futures_coin_cancel_orders (line 8880) | def futures_coin_cancel_orders(self, **params):
    method futures_coin_countdown_cancel_all (line 8898) | def futures_coin_countdown_cancel_all(self, **params):
    method futures_coin_get_open_order (line 8923) | def futures_coin_get_open_order(self, **params):
    method futures_coin_account_balance (line 8933) | def futures_coin_account_balance(self, **params):
    method futures_coin_account (line 8943) | def futures_coin_account(self, **params):
    method futures_coin_change_leverage (line 8953) | def futures_coin_change_leverage(self, **params):
    method futures_coin_change_margin_type (line 8963) | def futures_coin_change_margin_type(self, **params):
    method futures_coin_change_position_margin (line 8973) | def futures_coin_change_position_margin(self, **params):
    method futures_coin_position_margin_history (line 8983) | def futures_coin_position_margin_history(self, **params):
    method futures_coin_position_information (line 8993) | def futures_coin_position_information(self, **params):
    method futures_coin_account_trades (line 9001) | def futures_coin_account_trades(self, **params):
    method futures_coin_income_history (line 9009) | def futures_coin_income_history(self, **params):
    method futures_coin_change_position_mode (line 9017) | def futures_coin_change_position_mode(self, **params):
    method futures_coin_get_position_mode (line 9027) | def futures_coin_get_position_mode(self, **params):
    method futures_coin_stream_get_listen_key (line 9037) | def futures_coin_stream_get_listen_key(self):
    method futures_coin_stream_keepalive (line 9041) | def futures_coin_stream_keepalive(self, listenKey):
    method futures_coin_stream_close (line 9047) | def futures_coin_stream_close(self, listenKey):
    method futures_coin_account_order_history_download (line 9053) | def futures_coin_account_order_history_download(self, **params):
    method futures_coin_accout_order_history_download_link (line 9085) | def futures_coin_accout_order_history_download_link(self, **params):
    method futures_coin_account_trade_history_download (line 9126) | def futures_coin_account_trade_history_download(self, **params):
    method futures_coin_account_trade_history_download_link (line 9154) | def futures_coin_account_trade_history_download_link(self, **params):
    method get_all_coins_info (line 9193) | def get_all_coins_info(self, **params):
    method get_account_snapshot (line 9270) | def get_account_snapshot(self, **params):
    method disable_fast_withdraw_switch (line 9385) | def disable_fast_withdraw_switch(self, **params):
    method enable_fast_withdraw_switch (line 9402) | def enable_fast_withdraw_switch(self, **params):
    method options_ping (line 9426) | def options_ping(self):
    method options_time (line 9434) | def options_time(self):
    method options_info (line 9442) | def options_info(self):
    method options_exchange_info (line 9450) | def options_exchange_info(self):
    method options_index_price (line 9458) | def options_index_price(self, **params):
    method options_price (line 9469) | def options_price(self, **params):
    method options_mark_price (line 9480) | def options_mark_price(self, **params):
    method options_order_book (line 9491) | def options_order_book(self, **params):
    method options_klines (line 9504) | def options_klines(self, **params):
    method options_recent_trades (line 9523) | def options_recent_trades(self, **params):
    method options_historical_trades (line 9536) | def options_historical_trades(self, **params):
    method options_account_info (line 9553) | def options_account_info(self, **params):
    method options_get_bill (line 9564) | def options_get_bill(self, **params):
    method options_funds_transfer (line 9586) | def options_funds_transfer(self, **params):
    method options_positions (line 9603) | def options_positions(self, **params):
    method options_exercise_record (line 9616) | def options_exercise_record(self, **params):
    method options_bill (line 9637) | def options_bill(self, **params):
    method options_place_order (line 9658) | def options_place_order(self, **params):
    method options_place_batch_order (line 9691) | def options_place_batch_order(self, **params):
    method options_cancel_order (line 9709) | def options_cancel_order(self, **params):
    method options_cancel_batch_order (line 9726) | def options_cancel_batch_order(self, **params):
    method options_cancel_all_orders (line 9745) | def options_cancel_all_orders(self, **params):
    method options_query_order (line 9760) | def options_query_order(self, **params):
    method options_query_pending_orders (line 9777) | def options_query_pending_orders(self, **params):
    method options_query_order_history (line 9798) | def options_query_order_history(self, **params):
    method options_user_trades (line 9821) | def options_user_trades(self, **params):
    method options_create_block_trade_order (line 9846) | def options_create_block_trade_order(self, **params):
    method options_cancel_block_trade_order (line 9888) | def options_cancel_block_trade_order(self, **params):
    method options_extend_block_trade_order (line 9909) | def options_extend_block_trade_order(self, **params):
    method options_get_block_trade_orders (line 9946) | def options_get_block_trade_orders(self, **params):
    method options_accept_block_trade_order (line 9991) | def options_accept_block_trade_order(self, **params):
    method options_get_block_trade_order (line 10028) | def options_get_block_trade_order(self, **params):
    method options_account_get_block_trades (line 10065) | def options_account_get_block_trades(self, **params):
    method get_fiat_deposit_withdraw_history (line 10123) | def get_fiat_deposit_withdraw_history(self, **params):
    method get_fiat_payments_history (line 10144) | def get_fiat_payments_history(self, **params):
    method get_c2c_trade_history (line 10169) | def get_c2c_trade_history(self, **params):
    method get_pay_trade_history (line 10221) | def get_pay_trade_history(self, **params):
    method get_convert_trade_history (line 10244) | def get_convert_trade_history(self, **params):
    method convert_request_quote (line 10265) | def convert_request_quote(self, **params):
    method convert_accept_quote (line 10289) | def convert_accept_quote(self, **params):
    method papi_get_balance (line 10313) | def papi_get_balance(self, **params):
    method papi_get_rate_limit (line 10329) | def papi_get_rate_limit(self, **params):
    method papi_stream_get_listen_key (line 10343) | def papi_stream_get_listen_key(self):
    method papi_stream_keepalive (line 10363) | def papi_stream_keepalive(self, listenKey):
    method papi_stream_close (line 10380) | def papi_stream_close(self, listenKey):
    method papi_get_account (line 10395) | def papi_get_account(self, **params):
    method papi_get_margin_max_borrowable (line 10408) | def papi_get_margin_max_borrowable(self, **params):
    method papi_get_margin_max_withdraw (line 10426) | def papi_get_margin_max_withdraw(self, **params):
    method papi_get_um_position_risk (line 10444) | def papi_get_um_position_risk(self, **params):
    method papi_get_cm_position_risk (line 10462) | def papi_get_cm_position_risk(self, **params):
    method papi_set_um_leverage (line 10480) | def papi_set_um_leverage(self, **params):
    method papi_set_cm_leverage (line 10499) | def papi_set_cm_leverage(self, **params):
    method papi_change_um_position_side_dual (line 10518) | def papi_change_um_position_side_dual(self, **params):
    method papi_change_cm_position_side_dual (line 10536) | def papi_change_cm_position_side_dual(self, **params):
    method papi_get_um_position_side_dual (line 10554) | def papi_get_um_position_side_dual(self, **params):
    method papi_get_cm_position_side_dual (line 10569) | def papi_get_cm_position_side_dual(self, **params):
    method papi_get_um_leverage_bracket (line 10584) | def papi_get_um_leverage_bracket(self, **params):
    method papi_get_cm_leverage_bracket (line 10602) | def papi_get_cm_leverage_bracket(self, **params):
    method papi_get_um_api_trading_status (line 10620) | def papi_get_um_api_trading_status(self, **params):
    method papi_get_um_comission_rate (line 10638) | def papi_get_um_comission_rate(self, **params):
    method papi_get_cm_comission_rate (line 10656) | def papi_get_cm_comission_rate(self, **params):
    method papi_get_margin_margin_loan (line 10674) | def papi_get_margin_margin_loan(self, **params):
    method papi_get_margin_repay_loan (line 10692) | def papi_get_margin_repay_loan(self, **params):
    method papi_get_repay_futures_switch (line 10710) | def papi_get_repay_futures_switch(self, **params):
    method papi_repay_futures_switch (line 10725) | def papi_repay_futures_switch(self, **params):
    method papi_get_margin_interest_history (line 10743) | def papi_get_margin_interest_history(self, **params):
    method papi_repay_futures_negative_balance (line 10758) | def papi_repay_futures_negative_balance(self, **params):
    method papi_get_portfolio_interest_history (line 10773) | def papi_get_portfolio_interest_history(self, **params):
    method papi_get_portfolio_negative_balance_exchange_record (line 10789) | def papi_get_portfolio_negative_balance_exchange_record(self, **params):
    method papi_fund_auto_collection (line 10804) | def papi_fund_auto_collection(self, **params):
    method papi_fund_asset_collection (line 10819) | def papi_fund_asset_collection(self, **params):
    method papi_bnb_transfer (line 10834) | def papi_bnb_transfer(self, **params):
    method papi_get_um_income_history (line 10847) | def papi_get_um_income_history(self, **params):
    method papi_get_cm_income_history (line 10860) | def papi_get_cm_income_history(self, **params):
    method papi_get_um_account (line 10873) | def papi_get_um_account(self, **params):
    method papi_get_um_account_v2 (line 10886) | def papi_get_um_account_v2(self, **params):
    method papi_get_cm_account (line 10901) | def papi_get_cm_account(self, **params):
    method papi_get_um_account_config (line 10914) | def papi_get_um_account_config(self, **params):
    method papi_get_um_symbol_config (line 10929) | def papi_get_um_symbol_config(self, **params):
    method papi_get_um_trade_asyn (line 10944) | def papi_get_um_trade_asyn(self, **params):
    method papi_get_um_trade_asyn_id (line 10957) | def papi_get_um_trade_asyn_id(self, **params):
    method papi_get_um_order_asyn (line 10972) | def papi_get_um_order_asyn(self, **params):
    method papi_get_um_order_asyn_id (line 10985) | def papi_get_um_order_asyn_id(self, **params):
    method papi_get_um_income_asyn (line 11000) | def papi_get_um_income_asyn(self, **params):
    method papi_get_um_income_asyn_id (line 11013) | def papi_get_um_income_asyn_id(self, **params):
    method papi_ping (line 11030) | def papi_ping(self, **params):
    method papi_create_um_order (line 11042) | def papi_create_um_order(self, **params):
    method papi_create_um_conditional_order (line 11054) | def papi_create_um_conditional_order(self, **params):
    method papi_create_cm_order (line 11068) | def papi_create_cm_order(self, **params):
    method papi_create_cm_conditional_order (line 11080) | def papi_create_cm_conditional_order(self, **params):
    method papi_create_margin_order (line 11094) | def papi_create_margin_order(self, **params):
    method papi_margin_loan (line 11106) | def papi_margin_loan(self, **params):
    method papi_repay_loan (line 11116) | def papi_repay_loan(self, **params):
    method papi_margin_order_oco (line 11126) | def papi_margin_order_oco(self, **params):
    method papi_cancel_um_order (line 11138) | def papi_cancel_um_order(self, **params):
    method papi_cancel_um_all_open_orders (line 11148) | def papi_cancel_um_all_open_orders(self, **params):
    method papi_cancel_um_conditional_order (line 11160) | def papi_cancel_um_conditional_order(self, **params):
    method papi_cancel_um_conditional_all_open_orders (line 11172) | def papi_cancel_um_conditional_all_open_orders(self, **params):
    method papi_cancel_cm_order (line 11184) | def papi_cancel_cm_order(self, **params):
    method papi_cancel_cm_all_open_orders (line 11194) | def papi_cancel_cm_all_open_orders(self, **params):
    method papi_cancel_cm_conditional_order (line 11206) | def papi_cancel_cm_conditional_order(self, **params):
    method papi_cancel_cm_conditional_all_open_orders (line 11218) | def papi_cancel_cm_conditional_all_open_orders(self, **params):
    method papi_cancel_margin_order (line 11230) | def papi_cancel_margin_order(self, **params):
    method papi_cancel_margin_order_list (line 11242) | def papi_cancel_margin_order_list(self, **params):
    method papi_cancel_margin_all_open_orders (line 11254) | def papi_cancel_margin_all_open_orders(self, **params):
    method papi_modify_um_order (line 11266) | def papi_modify_um_order(self, **params):
    method papi_modify_cm_order (line 11276) | def papi_modify_cm_order(self, **params):
    method papi_get_um_order (line 11286) | def papi_get_um_order(self, **params):
    method papi_get_um_all_orders (line 11296) | def papi_get_um_all_orders(self, **params):
    method papi_get_um_open_order (line 11306) | def papi_get_um_open_order(self, **params):
    method papi_get_um_open_orders (line 11316) | def papi_get_um_open_orders(self, **params):
    method papi_get_um_conditional_all_orders (line 11326) | def papi_get_um_conditional_all_orders(self, **params):
    method papi_get_um_conditional_open_orders (line 11338) | def papi_get_um_conditional_open_orders(self, **params):
    method papi_get_um_conditional_open_order (line 11350) | def papi_get_um_conditional_open_order(self, **params):
    method papi_get_um_conditional_order_history (line 11362) | def papi_get_um_conditional_order_history(self, **params):
    method papi_get_cm_order (line 11374) | def papi_get_cm_order(self, **params):
    method papi_get_cm_all_orders (line 11384) | def papi_get_cm_all_orders(self, **params):
    method papi_get_cm_open_order (line 11394) | def papi_get_cm_open_order(self, **params):
    method papi_get_cm_open_orders (line 11404) | def papi_get_cm_open_orders(self, **params):
    method papi_get_cm_conditional_all_orders (line 11414) | def papi_get_cm_conditional_all_orders(self, **params):
    method papi_get_cm_conditional_open_orders (line 11426) | def papi_get_cm_conditional_open_orders(self, **params):
    method papi_get_cm_conditional_open_order (line 11438) | def papi_get_cm_conditional_open_order(self, **params):
    method papi_get_cm_conditional_order_history (line 11450) | def papi_get_cm_conditional_order_history(self, **params):
    method papi_get_um_force_orders (line 11462) | def papi_get_um_force_orders(self, **params):
    method papi_get_cm_force_orders (line 11472) | def papi_get_cm_force_orders(self, **params):
    method papi_get_um_order_amendment (line 11482) | def papi_get_um_order_amendment(self, **params):
    method papi_get_cm_order_amendment (line 11494) | def papi_get_cm_order_amendment(self, **params):
    method papi_get_margin_force_orders (line 11506) | def papi_get_margin_force_orders(self, **params):
    method papi_get_um_user_trades (line 11518) | def papi_get_um_user_trades(self, **params):
    method papi_get_cm_user_trades (line 11528) | def papi_get_cm_user_trades(self, **params):
    method papi_get_um_adl_quantile (line 11538) | def papi_get_um_adl_quantile(self, **params):
    method papi_get_cm_adl_quantile (line 11548) | def papi_get_cm_adl_quantile(self, **params):
    method papi_set_um_fee_burn (line 11558) | def papi_set_um_fee_burn(self, **params):
    method papi_get_um_fee_burn (line 11568) | def papi_get_um_fee_burn(self, **params):
    method papi_get_margin_order (line 11578) | def papi_get_margin_order(self, **params):
    method papi_get_margin_open_orders (line 11588) | def papi_get_margin_open_orders(self, **params):
    method papi_get_margin_all_orders (line 11600) | def papi_get_margin_all_orders(self, **params):
    method papi_get_margin_order_list (line 11612) | def papi_get_margin_order_list(self, **params):
    method papi_get_margin_all_order_list (line 11624) | def papi_get_margin_all_order_list(self, **params):
    method papi_get_margin_open_order_list (line 11636) | def papi_get_margin_open_order_list(self, **params):
    method papi_get_margin_my_trades (line 11648) | def papi_get_margin_my_trades(self, **params):
    method papi_get_margin_repay_debt (line 11660) | def papi_get_margin_repay_debt(self, **params):
    method close_connection (line 11672) | def close_connection(self):
    method __del__ (line 11676) | def __del__(self):
    method ws_create_test_order (line 11683) | def ws_create_test_order(self, **params):
    method ws_create_order (line 11716) | def ws_create_order(self, **params):
    method ws_order_limit (line 11731) | def ws_order_limit(self, timeInForce=BaseClient.TIME_IN_FORCE_GTC, **p...
    method ws_order_limit_buy (line 11761) | def ws_order_limit_buy(self, timeInForce=BaseClient.TIME_IN_FORCE_GTC,...
    method ws_order_limit_sell (line 11790) | def ws_order_limit_sell(self, timeInForce=BaseClient.TIME_IN_FORCE_GTC...
    method ws_order_market (line 11816) | def ws_order_market(self, **params):
    method ws_order_market_buy (line 11839) | def ws_order_market_buy(self, **params):
    method ws_order_market_sell (line 11859) | def ws_order_market_sell(self, **params):
    method ws_get_order (line 11879) | def ws_get_order(self, **params):
    method ws_cancel_order (line 11893) | def ws_cancel_order(self, **params):
    method ws_cancel_and_replace_order (line 11930) | def ws_cancel_and_replace_order(self, **params):
    method ws_get_open_orders (line 12019) | def ws_get_open_orders(self, **params):
    method ws_cancel_all_open_orders (line 12062) | def ws_cancel_all_open_orders(self, **params):
    method ws_create_oco_order (line 12103) | def ws_create_oco_order(self, **params):
    method ws_create_oto_order (line 12242) | def ws_create_oto_order(self, **params):
    method ws_create_otoco_order (line 12380) | def ws_create_otoco_order(self, **params):
    method ws_get_oco_order (line 12493) | def ws_get_oco_order(self, **params):
    method ws_cancel_oco_order (line 12546) | def ws_cancel_oco_order(self, **params):
    method ws_get_oco_open_orders (line 12647) | def ws_get_oco_open_orders(self, **params):
    method ws_create_sor_order (line 12707) | def ws_create_sor_order(self, **params):
    method ws_create_test_sor_order (line 12794) | def ws_create_test_sor_order(self, **params):
    method ws_get_account (line 12878) | def ws_get_account(self, **params):
    method ws_get_account_rate_limits_orders (line 12935) | def ws_get_account_rate_limits_orders(self, **params):
    method ws_get_all_orders (line 12975) | def ws_get_all_orders(self, **params):
    method ws_get_my_trades (line 13040) | def ws_get_my_trades(self, **params):
    method ws_get_prevented_matches (line 13095) | def ws_get_prevented_matches(self, **params):
    method ws_get_allocations (line 13144) | def ws_get_allocations(self, **params):
    method ws_get_commission_rates (line 13195) | def ws_get_commission_rates(self, **params):
    method ws_get_order_book (line 13237) | def ws_get_order_book(self, **params):
    method ws_get_recent_trades (line 13284) | def ws_get_recent_trades(self, **params):
    method ws_get_historical_trades (line 13323) | def ws_get_historical_trades(self, **params):
    method ws_get_aggregate_trades (line 13364) | def ws_get_aggregate_trades(self, **params):
    method ws_get_klines (line 13420) | def ws_get_klines(self, **params):
    method ws_get_uiKlines (line 13491) | def ws_get_uiKlines(self, **params):
    method ws_get_avg_price (line 13557) | def ws_get_avg_price(self, **params):
    method ws_get_ticker (line 13578) | def ws_get_ticker(self, **params):
    method ws_get_trading_day_ticker (line 13649) | def ws_get_trading_day_ticker(self, **params):
    method ws_get_symbol_ticker_window (line 13710) | def ws_get_symbol_ticker_window(self, **params):
    method ws_get_symbol_ticker (line 13782) | def ws_get_symbol_ticker(self, **params):
    method ws_get_orderbook_ticker (line 13820) | def ws_get_orderbook_ticker(self, **params):
    method ws_ping (line 13866) | def ws_ping(self, **params):
    method ws_get_time (line 13893) | def ws_get_time(self, **params):
    method ws_get_exchange_info (line 13922) | def ws_get_exchange_info(self, **params):
    method ws_futures_get_order_book (line 13983) | def ws_futures_get_order_book(self, **params):
    method ws_futures_get_all_tickers (line 13990) | def ws_futures_get_all_tickers(self, **params):
    method ws_futures_get_order_book_ticker (line 13997) | def ws_futures_get_order_book_ticker(self, **params):
    method ws_futures_create_order (line 14004) | def ws_futures_create_order(self, **params):
    method ws_futures_edit_order (line 14037) | def ws_futures_edit_order(self, **params):
    method ws_futures_cancel_order (line 14044) | def ws_futures_cancel_order(self, **params):
    method ws_futures_get_order (line 14058) | def ws_futures_get_order(self, **params):
    method ws_futures_v2_account_position (line 14067) | def ws_futures_v2_account_position(self, **params):
    method ws_futures_account_position (line 14074) | def ws_futures_account_position(self, **params):
    method ws_futures_v2_account_balance (line 14081) | def ws_futures_v2_account_balance(self, **params):
    method ws_futures_account_balance (line 14088) | def ws_futures_account_balance(self, **params):
    method ws_futures_v2_account_status (line 14095) | def ws_futures_v2_account_status(self, **params):
    method ws_futures_account_status (line 14102) | def ws_futures_account_status(self, **params):
    method ws_futures_create_algo_order (line 14109) | def ws_futures_create_algo_order(self, **params):
    method ws_futures_cancel_algo_order (line 14165) | def ws_futures_cancel_algo_order(self, **params):
    method gift_card_fetch_token_limit (line 14188) | def gift_card_fetch_token_limit(self, **params):
    method gift_card_fetch_rsa_public_key (line 14213) | def gift_card_fetch_rsa_public_key(self, **params):
    method gift_card_verify (line 14235) | def gift_card_verify(self, **params):
    method gift_card_redeem (line 14263) | def gift_card_redeem(self, **params):
    method gift_card_create (line 14305) | def gift_card_create(self, **params):
    method gift_card_create_dual_token (line 14339) | def gift_card_create_dual_token(self, **params):
    method margin_next_hourly_interest_rate (line 14378) | def margin_next_hourly_interest_rate(self, **params):
    method margin_interest_history (line 14406) | def margin_interest_history(self, **params):
    method margin_borrow_repay (line 14449) | def margin_borrow_repay(self, **params):
    method margin_get_borrow_repay_records (line 14477) | def margin_get_borrow_repay_records(self, **params):
    method margin_interest_rate_history (line 14522) | def margin_interest_rate_history(self, **params):
    method margin_max_borrowable (line 14559) | def margin_max_borrowable(self, **params):
    method futures_historical_data_link (line 14587) | def futures_historical_data_link(self, **params):
    method margin_v1_get_loan_vip_ongoing_orders (line 14630) | def margin_v1_get_loan_vip_ongoing_orders(self, **params):
    method margin_v1_get_mining_payment_other (line 14644) | def margin_v1_get_mining_payment_other(self, **params):
    method futures_coin_v1_get_income_asyn_id (line 14658) | def futures_coin_v1_get_income_asyn_id(self, **params):
    method margin_v1_get_simple_earn_flexible_history_subscription_record (line 14672) | def margin_v1_get_simple_earn_flexible_history_subscription_record(sel...
    method margin_v1_post_lending_auto_invest_one_off (line 14686) | def margin_v1_post_lending_auto_invest_one_off(self, **params):
    method margin_v1_post_broker_sub_account_api_commission_coin_futures (line 14698) | def margin_v1_post_broker_sub_account_api_commission_coin_futures(self...
    method v3_post_order_list_otoco (line 14712) | def v3_post_order_list_otoco(self, **params):
    method futures_v1_get_order_asyn (line 14724) | def futures_v1_get_order_asyn(self, **params):
    method margin_v1_get_asset_custody_transfer_history (line 14738) | def margin_v1_get_asset_custody_transfer_history(self, **params):
    method margin_v1_post_broker_sub_account_blvt (line 14752) | def margin_v1_post_broker_sub_account_blvt(self, **params):
    method margin_v1_post_sol_staking_sol_redeem (line 14764) | def margin_v1_post_sol_staking_sol_redeem(self, **params):
    method options_v1_get_countdown_cancel_all (line 14778) | def options_v1_get_countdown_cancel_all(self, **params):
    method margin_v1_get_margin_trade_coeff (line 14792) | def margin_v1_get_margin_trade_coeff(self, **params):
    method futures_coin_v1_get_order_amendment (line 14806) | def futures_coin_v1_get_order_amendment(self, **params):
    method margin_v1_get_margin_available_inventory (line 14820) | def margin_v1_get_margin_available_inventory(self, **params):
    method margin_v1_post_account_api_restrictions_ip_restriction_ip_list (line 14834) | def margin_v1_post_account_api_restrictions_ip_restriction_ip_list(sel...
    method margin_v2_get_eth_staking_account (line 14846) | def margin_v2_get_eth_staking_account(self, **params):
    method margin_v1_get_loan_income (line 14860) | def margin_v1_get_loan_income(self, **params):
    method futures_coin_v1_get_pm_account_info (line 14874) | def futures_coin_v1_get_pm_account_info(self, **params):
    method margin_v1_get_managed_subaccount_query_trans_log_for_investor (line 14888) | def margin_v1_get_managed_subaccount_query_trans_log_for_investor(self...
    method margin_v1_post_dci_product_auto_compound_edit_status (line 14902) | def margin_v1_post_dci_product_auto_compound_edit_status(self, **params):
    method futures_v1_get_trade_asyn (line 14916) | def futures_v1_get_trade_asyn(self, **params):
    method margin_v1_get_loan_vip_request_interest_rate (line 14930) | def margin_v1_get_loan_vip_request_interest_rate(self, **params):
    method futures_v1_get_funding_info (line 14944) | def futures_v1_get_funding_info(self, **params):
    method margin_v2_get_loan_flexible_repay_rate (line 14958) | def margin_v2_get_loan_flexible_repay_rate(self, **params):
    method margin_v1_get_lending_auto_invest_plan_id (line 14972) | def margin_v1_get_lending_auto_invest_plan_id(self, **params):
    method margin_v1_post_loan_adjust_ltv (line 14984) | def margin_v1_post_loan_adjust_ltv(self, **params):
    method margin_v1_get_mining_statistics_user_status (line 14996) | def margin_v1_get_mining_statistics_user_status(self, **params):
    method margin_v1_get_broker_transfer_futures (line 15010) | def margin_v1_get_broker_transfer_futures(self, **params):
    method margin_v1_post_algo_spot_new_order_twap (line 15024) | def margin_v1_post_algo_spot_new_order_twap(self, **params):
    method margin_v1_get_lending_auto_invest_target_asset_list (line 15038) | def margin_v1_get_lending_auto_invest_target_asset_list(self, **params):
    method margin_v1_get_capital_deposit_address_list (line 15050) | def margin_v1_get_capital_deposit_address_list(self, **params):
    method margin_v1_post_broker_sub_account_bnb_burn_margin_interest (line 15064) | def margin_v1_post_broker_sub_account_bnb_burn_margin_interest(self, *...
    method margin_v2_post_loan_flexible_repay (line 15078) | def margin_v2_post_loan_flexible_repay(self, **params):
    method margin_v2_get_loan_flexible_loanable_data (line 15092) | def margin_v2_get_loan_flexible_loanable_data(self, **params):
    method margin_v1_post_broker_sub_account_api_permission (line 15106) | def margin_v1_post_broker_sub_account_api_permission(self, **params):
    method margin_v1_post_broker_sub_account_api (line 15120) | def margin_v1_post_broker_sub_account_api(self, **params):
    method margin_v1_get_dci_product_positions (line 15134) | def margin_v1_get_dci_product_positions(self, **params):
    method margin_v1_post_convert_limit_cancel_order (line 15148) | def margin_v1_post_convert_limit_cancel_order(self, **params):
    method v3_post_order_list_oto (line 15162) | def v3_post_order_list_oto(self, **params):
    method margin_v1_get_mining_hash_transfer_config_details_list (line 15174) | def margin_v1_get_mining_hash_transfer_config_details_list(self, **par...
    method margin_v1_get_mining_hash_transfer_profit_details (line 15188) | def margin_v1_get_mining_hash_transfer_profit_details(self, **params):
    method margin_v1_get_broker_sub_account (line 15202) | def margin_v1_get_broker_sub_account(self, **params):
    method margin_v1_get_portfolio_balance (line 15216) | def margin_v1_get_portfolio_balance(self, **params):
    method margin_v1_post_sub_account_eoptions_enable (line 15230) | def margin_v1_post_sub_account_eoptions_enable(self, **params):
    method papi_v1_post_ping (line 15244) | def papi_v1_post_ping(self, **params):
    method margin_v1_get_loan_loanable_data (line 15256) | def margin_v1_get_loan_loanable_data(self, **params):
    method margin_v1_post_eth_staking_wbeth_unwrap (line 15268) | def margin_v1_post_eth_staking_wbeth_unwrap(self, **params):
    method margin_v1_get_eth_staking_eth_history_staking_history (line 15280) | def margin_v1_get_eth_staking_eth_history_staking_history(self, **para...
    method margin_v1_get_staking_staking_record (line 15294) | def margin_v1_get_staking_staking_record(self, **params):
    method margin_v1_get_broker_rebate_recent_record (line 15306) | def margin_v1_get_broker_rebate_recent_record(self, **params):
    method margin_v1_get_loan_vip_collateral_account (line 15320) | def margin_v1_get_loan_vip_collateral_account(self, **params):
    method margin_v1_get_algo_spot_open_orders (line 15334) | def margin_v1_get_algo_spot_open_orders(self, **params):
    method margin_v1_post_loan_repay (line 15348) | def margin_v1_post_loan_repay(self, **params):
    method futures_coin_v1_get_funding_info (line 15360) | def futures_coin_v1_get_funding_info(self, **params):
    method margin_v1_get_margin_leverage_bracket (line 15374) | def margin_v1_get_margin_leverage_bracket(self, **params):
    method margin_v2_get_portfolio_collateral_rate (line 15388) | def margin_v2_get_portfolio_collateral_rate(self, **params):
    method margin_v2_post_loan_flexible_adjust_ltv (line 15402) | def margin_v2_post_loan_flexible_adjust_ltv(self, **params):
    method margin_v1_get_convert_order_status (line 15416) | def margin_v1_get_convert_order_status(self, **params):
    method margin_v1_get_broker_sub_account_api_ip_restriction (line 15430) | def margin_v1_get_broker_sub_account_api_ip_restriction(self, **params):
    method margin_v1_post_dci_product_subscribe (line 15444) | def margin_v1_post_dci_product_subscribe(self, **params):
    method futures_v1_get_income_asyn_id (line 15458) | def futures_v1_get_income_asyn_id(self, **params):
    method options_v1_post_countdown_cancel_all (line 15472) | def options_v1_post_countdown_cancel_all(self, **params):
    method margin_v1_post_mining_hash_transfer_config_cancel (line 15486) | def margin_v1_post_mining_hash_transfer_config_cancel(self, **params):
    method margin_v1_get_broker_sub_account_deposit_hist (line 15500) | def margin_v1_get_broker_sub_account_deposit_hist(self, **params):
    method margin_v1_get_mining_payment_list (line 15514) | def margin_v1_get_mining_payment_list(self, **params):
    method futures_v1_get_pm_account_info (line 15528) | def futures_v1_get_pm_account_info(self, **params):
    method futures_coin_v1_get_adl_quantile (line 15542) | def futures_coin_v1_get_adl_quantile(self, **params):
    method options_v1_get_income_asyn_id (line 15556) | def options_v1_get_income_asyn_id(self, **params):
    method v3_post_cancel_replace (line 15570) | def v3_post_cancel_replace(self, **params):
    method margin_v1_post_account_enable_fast_withdraw_switch (line 15582) | def margin_v1_post_account_enable_fast_withdraw_switch(self, **params):
    method margin_v1_post_broker_transfer_futures (line 15596) | def margin_v1_post_broker_transfer_futures(self, **params):
    method margin_v1_post_sol_staking_sol_stake (line 15610) | def margin_v1_post_sol_staking_sol_stake(self, **params):
    method margin_v1_post_loan_borrow (line 15624) | def margin_v1_post_loan_borrow(self, **params):
    method margin_v1_get_managed_subaccount_info (line 15636) | def margin_v1_get_managed_subaccount_info(self, **params):
    method margin_v1_post_lending_auto_invest_plan_edit_status (line 15650) | def margin_v1_post_lending_auto_invest_plan_edit_status(self, **params):
    method margin_v1_get_sol_staking_sol_history_unclaimed_rewards (line 15662) | def margin_v1_get_sol_staking_sol_history_unclaimed_rewards(self, **pa...
    method margin_v1_post_asset_convert_transfer_query_by_page (line 15676) | def margin_v1_post_asset_convert_transfer_query_by_page(self, **params):
    method margin_v1_get_sol_staking_sol_history_boost_rewards_history (line 15688) | def margin_v1_get_sol_staking_sol_history_boost_rewards_history(self, ...
    method margin_v1_get_lending_auto_invest_one_off_status (line 15702) | def margin_v1_get_lending_auto_invest_one_off_status(self, **params):
    method margin_v1_post_broker_sub_account (line 15714) | def margin_v1_post_broker_sub_account(self, **params):
    method margin_v1_get_asset_ledger_transfer_cloud_mining_query_by_page (line 15728) | def margin_v1_get_asset_ledger_transfer_cloud_mining_query_by_page(sel...
    method margin_v1_get_mining_pub_coin_list (line 15742) | def margin_v1_get_mining_pub_coin_list(self, **params):
    method margin_v2_get_loan_flexible_repay_history (line 15756) | def margin_v2_get_loan_flexible_repay_history(self, **params):
    method v3_post_sor_order (line 15770) | def v3_post_sor_order(self, **params):
    method margin_v1_post_capital_deposit_credit_apply (line 15782) | def margin_v1_post_capital_deposit_credit_apply(self, **params):
    method futures_v1_put_batch_order (line 15796) | def futures_v1_put_batch_order(self, **params):
    method margin_v1_get_mining_statistics_user_list (line 15808) | def margin_v1_get_mining_statistics_user_list(self, **params):
    method futures_v1_post_batch_order (line 15822) | def futures_v1_post_batch_order(self, **params):
    method v3_get_ticker_trading_day (line 15834) | def v3_get_ticker_trading_day(self, **params):
    method margin_v1_get_mining_worker_detail (line 15846) | def margin_v1_get_mining_worker_detail(self, **params):
    method margin_v1_get_managed_subaccount_fetch_future_asset (line 15860) | def margin_v1_get_managed_subaccount_fetch_future_asset(self, **params):
    method margin_v1_get_margin_rate_limit_order (line 15874) | def margin_v1_get_margin_rate_limit_order(self, **params):
    method margin_v1_get_localentity_vasp (line 15888) | def margin_v1_get_localentity_vasp(self, **params):
    method margin_v1_get_sol_staking_sol_history_rate_history (line 15902) | def margin_v1_get_sol_staking_sol_history_rate_history(self, **params):
    method margin_v1_post_broker_sub_account_api_ip_restriction (line 15916) | def margin_v1_post_broker_sub_account_api_ip_restriction(self, **params):
    method margin_v1_get_broker_transfer (line 15928) | def margin_v1_get_broker_transfer(self, **params):
    method margin_v1_get_sol_staking_account (line 15942) | def margin_v1_get_sol_staking_account(self, **params):
    method margin_v1_get_account_info (line 15956) | def margin_v1_get_account_info(self, **params):
    method margin_v1_post_portfolio_repay_futures_switch (line 15970) | def margin_v1_post_portfolio_repay_futures_switch(self, **params):
    method margin_v1_post_loan_vip_borrow (line 15984) | def margin_v1_post_loan_vip_borrow(self, **params):
    method margin_v2_get_loan_flexible_ltv_adjustment_history (line 15996) | def margin_v2_get_loan_flexible_ltv_adjustment_history(self, **params):
    method options_v1_delete_all_open_orders_by_underlying (line 16010) | def options_v1_delete_all_open_orders_by_underlying(self, **params):
    method margin_v1_get_broker_sub_account_futures_summary (line 16024) | def margin_v1_get_broker_sub_account_futures_summary(self, **params):
    method margin_v1_get_broker_sub_account_spot_summary (line 16036) | def margin_v1_get_broker_sub_account_spot_summary(self, **params):
    method margin_v1_post_sub_account_blvt_enable (line 16050) | def margin_v1_post_sub_account_blvt_enable(self, **params):
    method margin_v1_get_algo_spot_historical_orders (line 16062) | def margin_v1_get_algo_spot_historical_orders(self, **params):
    method margin_v1_get_loan_vip_repay_history (line 16076) | def margin_v1_get_loan_vip_repay_history(self, **params):
    method margin_v1_get_loan_borrow_history (line 16090) | def margin_v1_get_loan_borrow_history(self, **params):
    method margin_v1_post_lending_auto_invest_redeem (line 16104) | def margin_v1_post_lending_auto_invest_redeem(self, **params):
    method futures_coin_v1_get_income_asyn (line 16116) | def futures_coin_v1_get_income_asyn(self, **params):
    method margin_v1_post_managed_subaccount_deposit (line 16130) | def margin_v1_post_managed_subaccount_deposit(self, **params):
    method margin_v1_post_lending_daily_purchase (line 16144) | def margin_v1_post_lending_daily_purchase(self, **params):
    method futures_v1_get_trade_asyn_id (line 16156) | def futures_v1_get_trade_asyn_id(self, **params):
    method margin_v1_delete_sub_account_sub_account_api_ip_restriction_ip_list (line 16170) | def margin_v1_delete_sub_account_sub_account_api_ip_restriction_ip_lis...
    method margin_v1_get_copy_trading_futures_user_status (line 16184) | def margin_v1_get_copy_trading_futures_user_status(self, **params):
    method options_v1_get_margin_account (line 16198) | def options_v1_get_margin_account(self, **params):
    method options_get_market_maker_protection_config (line 16212) | def options_get_market_maker_protection_config(self, **params):
    method options_post_market_maker_protection_config (line 16225) | def options_post_market_maker_protection_config(self, **params):
    method options_reset_market_maker_protection_config (line 16246) | def options_reset_market_maker_protection_config(self, **params):
    method margin_v1_post_localentity_withdraw_apply (line 16259) | def margin_v1_post_localentity_withdraw_apply(self, **params):
    method margin_v1_get_asset_wallet_balance (line 16273) | def margin_v1_get_asset_wallet_balance(self, **params):
    method margin_v1_post_broker_transfer (line 16287) | def margin_v1_post_broker_transfer(self, **params):
    method margin_v1_post_lending_customized_fixed_purchase (line 16301) | def margin_v1_post_lending_customized_fixed_purchase(self, **params):
    method margin_v1_post_algo_futures_new_order_twap (line 16313) | def margin_v1_post_algo_futures_new_order_twap(self, **params):
    method margin_v2_post_eth_staking_eth_stake (line 16327) | def margin_v2_post_eth_staking_eth_stake(self, **params):
    method margin_v1_post_loan_flexible_repay_history (line 16341) | def margin_v1_post_loan_flexible_repay_history(self, **params):
    method margin_v1_get_lending_auto_invest_index_info (line 16353) | def margin_v1_get_lending_auto_invest_index_info(self, **params):
    method margin_v1_get_sol_staking_sol_history_redemption_history (line 16365) | def margin_v1_get_sol_staking_sol_history_redemption_history(self, **p...
    method margin_v1_get_broker_rebate_futures_recent_record (line 16379) | def margin_v1_get_broker_rebate_futures_recent_record(self, **params):
    method margin_v3_get_broker_sub_account_futures_summary (line 16393) | def margin_v3_get_broker_sub_account_futures_summary(self, **params):
    method margin_v1_get_lending_auto_invest_target_asset_roi_list (line 16407) | def margin_v1_get_lending_auto_invest_target_asset_roi_list(self, **pa...
    method margin_v1_get_broker_universal_transfer (line 16419) | def margin_v1_get_broker_universal_transfer(self, **params):
    method futures_v1_put_batch_orders (line 16433) | def futures_v1_put_batch_orders(self, **params):
    method options_v1_post_countdown_cancel_all_heart_beat (line 16447) | def options_v1_post_countdown_cancel_all_heart_beat(self, **params):
    method margin_v1_get_loan_collateral_data (line 16461) | def margin_v1_get_loan_collateral_data(self, **params):
    method margin_v1_get_loan_repay_history (line 16473) | def margin_v1_get_loan_repay_history(self, **params):
    method margin_v1_post_convert_limit_place_order (line 16487) | def margin_v1_post_convert_limit_place_order(self, **params):
    method futures_v1_get_convert_exchange_info (line 16501) | def futures_v1_get_convert_exchange_info(self, **params):
    method v3_get_all_order_list (line 16515) | def v3_get_all_order_list(self, **params):
    method margin_v1_delete_broker_sub_account_api_ip_restriction_ip_list (line 16527) | def margin_v1_delete_broker_sub_account_api_ip_restriction_ip_list(sel...
    method margin_v1_post_sub_account_virtual_sub_account (line 16541) | def margin_v1_post_sub_account_virtual_sub_account(self, **params):
    method margin_v1_put_localentity_deposit_provide_info (line 16555) | def margin_v1_put_localentity_deposit_provide_info(self, **params):
    method margin_v1_post_portfolio_mint (line 16569) | def margin_v1_post_portfolio_mint(self, **params):
    method futures_v1_get_order_amendment (line 16583) | def futures_v1_get_order_amendment(self, **params):
    method margin_v1_post_sol_staking_sol_claim (line 16597) | def margin_v1_post_sol_staking_sol_claim(self, **params):
    method margin_v1_post_lending_daily_redeem (line 16611) | def margin_v1_post_lending_daily_redeem(self, **params):
    method margin_v1_post_mining_hash_transfer_config (line 16623) | def margin_v1_post_mining_hash_transfer_config(self, **params):
    method margin_v1_get_lending_auto_invest_rebalance_history (line 16637) | def margin_v1_get_lending_auto_invest_rebalance_history(self, **params):
    method margin_v1_get_loan_repay_collateral_rate (line 16649) | def margin_v1_get_loan_repay_collateral_rate(self, **params):
    method futures_v1_get_income_asyn (line 16661) | def futures_v1_get_income_asyn(self, **params):
    method margin_v1_get_mining_payment_uid (line 16675) | def margin_v1_get_mining_payment_uid(self, **params):
    method margin_v2_get_loan_flexible_borrow_history (line 16689) | def margin_v2_get_loan_flexible_borrow_history(self, **params):
    method margin_v1_get_capital_contract_convertible_coins (line 16703) | def margin_v1_get_capital_contract_convertible_coins(self, **params):
    method margin_v1_post_broker_sub_account_api_permission_vanilla_options (line 16715) | def margin_v1_post_broker_sub_account_api_permission_vanilla_options(s...
    method margin_v1_get_lending_auto_invest_redeem_history (line 16727) | def margin_v1_get_lending_auto_invest_redeem_history(self, **params):
    method margin_v2_get_localentity_withdraw_history (line 16741) | def margin_v2_get_localentity_withdraw_history(self, **params):
    method margin_v1_get_eth_staking_eth_history_redemption_history (line 16755) | def margin_v1_get_eth_staking_eth_history_redemption_history(self, **p...
    method futures_v1_get_fee_burn (line 16769) | def futures_v1_get_fee_burn(self, **params):
    method margin_v1_get_lending_auto_invest_index_user_summary (line 16783) | def margin_v1_get_lending_auto_invest_index_user_summary(self, **params):
    method margin_v2_post_loan_flexible_borrow (line 16795) | def margin_v2_post_loan_flexible_borrow(self, **params):
    method margin_v1_post_loan_vip_repay (line 16809) | def margin_v1_post_loan_vip_repay(self, **params):
    method futures_coin_v1_get_commission_rate (line 16823) | def futures_coin_v1_get_commission_rate(self, **params):
    method margin_v1_get_convert_asset_info (line 16837) | def margin_v1_get_convert_asset_info(self, **params):
    method v3_post_sor_order_test (line 16851) | def v3_post_sor_order_test(self, **params):
    method margin_v1_post_broker_universal_transfer (line 16863) | def margin_v1_post_broker_universal_transfer(self, **params):
    method margin_v1_post_account_disable_fast_withdraw_switch (line 16877) | def margin_v1_post_account_disable_fast_withdraw_switch(self, **params):
    method futures_v1_get_asset_index (line 16891) | def futures_v1_get_asset_index(self, **params):
    method margin_v1_get_account_api_restrictions_ip_restriction (line 16905) | def margin_v1_get_account_api_restrictions_ip_restriction(self, **para...
    method margin_v1_post_broker_sub_account_bnb_burn_spot (line 16917) | def margin_v1_post_broker_sub_account_bnb_burn_spot(self, **params):
    method futures_coin_v1_put_order (line 16931) | def futures_coin_v1_put_order(self, **params):
    method futures_coin_v1_put_batch_orders (line 16945) | def futures_coin_v1_put_batch_orders(self, **params):
    method margin_v1_get_margin_delist_schedule (line 16959) | def margin_v1_get_margin_delist_schedule(self, **params):
    method margin_v1_post_broker_sub_account_api_permission_universal_transfer (line 16971) | def margin_v1_post_broker_sub_account_api_permission_universal_transfe...
    method margin_v1_get_loan_ltv_adjustment_history (line 16985) | def margin_v1_get_loan_ltv_adjustment_history(self, **params):
    method margin_v1_get_localentity_withdraw_history (line 16999) | def margin_v1_get_localentity_withdraw_history(self, **params):
    method margin_v2_post_sub_account_sub_account_api_ip_restriction (line 17011) | def margin_v2_post_sub_account_sub_account_api_ip_restriction(self, **...
    method futures_v1_get_rate_limit_order (line 17025) | def futures_v1_get_rate_limit_order(self, **params):
    method margin_v1_get_broker_sub_account_api_commission_futures (line 17039) | def margin_v1_get_broker_sub_account_api_commission_futures(self, **pa...
    method margin_v1_get_sol_staking_sol_history_staking_history (line 17053) | def margin_v1_get_sol_staking_sol_history_staking_history(self, **para...
    method futures_v1_get_open_order (line 17067) | def futures_v1_get_open_order(self, **params):
    method margin_v1_delete_algo_spot_order (line 17081) | def margin_v1_delete_algo_spot_order(self, **params):
    method margin_v1_delete_account_api_restrictions_ip_restriction_ip_list (line 17095) | def margin_v1_delete_account_api_restrictions_ip_restriction_ip_list(s...
    method margin_v1_post_capital_contract_convertible_coins (line 17107) | def margin_v1_post_capital_contract_convertible_coins(self, **params):
    method margin_v1_get_managed_subaccount_margin_asset (line 17119) | def margin_v1_get_managed_subaccount_margin_asset(self, **params):
    method v3_delete_order_list (line 17133) | def v3_delete_order_list(self, **params):
    method margin_v1_post_sub_account_sub_account_api_ip_restriction_ip_list (line 17145) | def margin_v1_post_sub_account_sub_account_api_ip_restriction_ip_list(...
    method margin_v1_post_broker_sub_account_api_commission (line 17157) | def margin_v1_post_broker_sub_account_api_commission(self, **params):
    method futures_v1_post_fee_burn (line 17171) | def futures_v1_post_fee_burn(self, **params):
    method margin_v1_get_broker_sub_account_margin_summary (line 17185) | def margin_v1_get_broker_sub_account_margin_summary(self, **params):
    method margin_v1_get_lending_auto_invest_plan_list (line 17199) | def margin_v1_get_lending_auto_invest_plan_list(self, **params):
    method margin_v1_get_loan_vip_loanable_data (line 17211) | def margin_v1_get_loan_vip_loanable_data(self, **params):
    method margin_v2_get_loan_flexible_collateral_data (line 17225) | def margin_v2_get_loan_flexible_collateral_data(self, **params):
    method margin_v1_delete_broker_sub_account_api (line 17239) | def margin_v1_delete_broker_sub_account_api(self, **params):
    method margin_v1_get_sol_staking_sol_history_bnsol_rewards_history (line 17253) | def margin_v1_get_sol_staking_sol_history_bnsol_rewards_history(self, ...
    method margin_v1_get_convert_limit_query_open_orders (line 17267) | def margin_v1_get_convert_limit_query_open_orders(self, **params):
    method v3_get_account_commission (line 17281) | def v3_get_account_commission(self, **params):
    method margin_v1_get_managed_subaccount_query_trans_log (line 17293) | def margin_v1_get_managed_subaccount_query_trans_log(self, **params):
    method margin_v2_post_broker_sub_account_api_ip_restriction (line 17307) | def margin_v2_post_broker_sub_account_api_ip_restriction(self, **params):
    method margin_v1_get_lending_auto_invest_all_asset (line 17321) | def margin_v1_get_lending_auto_invest_all_asset(self, **params):
    method futures_v1_post_convert_accept_quote (line 17333) | def futures_v1_post_convert_accept_quote(self, **params):
    method margin_v1_get_spot_delist_schedule (line 17347) | def margin_v1_get_spot_delist_schedule(self, **params):
    method margin_v1_post_account_api_restrictions_ip_restriction (line 17361) | def margin_v1_post_account_api_restrictions_ip_restriction(self, **par...
    method margin_v1_get_dci_product_accounts (line 17373) | def margin_v1_get_dci_product_accounts(self, **params):
    method margin_v1_get_sub_account_sub_account_api_ip_restriction (line 17387) | def margin_v1_get_sub_account_sub_account_api_ip_restriction(self, **p...
    method margin_v1_get_sub_account_transaction_statistics (line 17401) | def margin_v1_get_sub_account_transaction_statistics(self, **params):
    method margin_v1_get_managed_subaccount_deposit_address (line 17415) | def margin_v1_get_managed_subaccount_deposit_address(self, **params):
    method margin_v2_get_portfolio_account (line 17429) | def margin_v2_get_portfolio_account(self, **params):
    method margin_v1_get_simple_earn_locked_history_redemption_record (line 17443) | def margin_v1_get_simple_earn_locked_history_redemption_record(self, *...
    method futures_v1_get_order_asyn_id (line 17457) | def futures_v1_get_order_asyn_id(self, **params):
    method margin_v1_post_managed_subaccount_withdraw (line 17471) | def margin_v1_post_managed_subaccount_withdraw(self, **params):
    method margin_v1_get_localentity_deposit_history (line 17485) | def margin_v1_get_localentity_deposit_history(self, **params):
    method margin_v1_post_eth_staking_wbeth_wrap (line 17499) | def margin_v1_post_eth_staking_wbeth_wrap(self, **params):
    method margin_v1_post_simple_earn_locked_set_redeem_option (line 17513) | def margin_v1_post_simple_earn_locked_set_redeem_option(self, **params):
    method margin_v1_post_broker_sub_account_api_ip_restriction_ip_list (line 17527) | def margin_v1_post_broker_sub_account_api_ip_restriction_ip_list(self,...
    method margin_v1_post_broker_sub_account_api_commission_futures (line 17539) | def margin_v1_post_broker_sub_account_api_commission_futures(self, **p...
    method margin_v1_get_lending_auto_invest_history_list (line 17553) | def margin_v1_get_lending_auto_invest_history_list(self, **params):
    method margin_v1_post_loan_customize_margin_call (line 17565) | def margin_v1_post_loan_customize_margin_call(self, **params):
    method margin_v1_get_broker_sub_account_bnb_burn_status (line 17577) | def margin_v1_get_broker_sub_account_bnb_burn_status(self, **params):
    method margin_v1_get_managed_subaccount_account_snapshot (line 17591) | def margin_v1_get_managed_subaccount_account_snapshot(self, **params):
    method margin_v1_post_asset_convert_transfer (line 17605) | def margin_v1_post_asset_convert_transfer(self, **params):
    method options_v1_get_income_asyn (line 17617) | def options_v1_get_income_asyn(self, **params):
    method margin_v1_get_broker_sub_account_api_commission_coin_futures (line 17631) | def margin_v1_get_broker_sub_account_api_commission_coin_futures(self,...
    method margin_v2_get_broker_sub_account_futures_summary (line 17645) | def margin_v2_get_broker_sub_account_futures_summary(self, **params):
    method margin_v1_get_loan_ongoing_orders (line 17657) | def margin_v1_get_loan_ongoing_orders(self, **params):
    method margin_v2_get_loan_flexible_ongoing_orders (line 17669) | def margin_v2_get_loan_flexible_ongoing_orders(self, **params):
    method margin_v1_post_algo_futures_new_order_vp (line 17683) | def margin_v1_post_algo_futures_new_order_vp(self, **params):
    method futures_v1_post_convert_get_quote (line 17697) | def futures_v1_post_convert_get_quote(self, **params):
    method margin_v1_get_algo_spot_sub_orders (line 17711) | def margin_v1_get_algo_spot_sub_orders(self, **params):
    method margin_v1_post_portfolio_redeem (line 17725) | def margin_v1_post_portfolio_redeem(self, **params):
    method margin_v1_post_lending_auto_invest_plan_add (line 17739) | def margin_v1_post_lending_auto_invest_plan_add(self, **params):
    method v3_get_order_list (line 17751) | def v3_get_order_list(self, **params):
    method margin_v1_get_lending_auto_invest_source_asset_list (line 17763) | def margin_v1_get_lending_auto_invest_source_asset_list(self, **params):
    method margin_v1_get_margin_all_order_list (line 17775) | def margin_v1_get_margin_all_order_list(self, **params):
    method margin_v1_post_eth_staking_eth_redeem (line 17789) | def margin_v1_post_eth_staking_eth_redeem(self, **params):
    method margin_v1_get_broker_rebate_historical_record (line 17803) | def margin_v1_get_broker_rebate_historical_record(self, **params):
    method margin_v1_get_simple_earn_locked_history_subscription_record (line 17815) | def margin_v1_get_simple_earn_locked_history_subscription_record(self,...
    method margin_v1_get_managed_subaccount_asset (line 17829) | def margin_v1_get_managed_subaccount_asset(self, **params):
    method margin_v1_get_sol_staking_sol_quota (line 17843) | def margin_v1_get_sol_staking_sol_quota(self, **params):
    method margin_v1_post_loan_vip_renew (line 17857) | def margin_v1_post_loan_vip_renew(self, **params):
    method margin_v1_get_managed_subaccount_query_trans_log_for_trade_parent (line 17869) | def margin_v1_get_managed_subaccount_query_trans_log_for_trade_parent(...
    method margin_v1_post_sub_account_sub_account_api_ip_restriction (line 17883) | def margin_v1_post_sub_account_sub_account_api_ip_restriction(self, **...
    method margin_v1_get_simple_earn_flexible_history_redemption_record (line 17895) | def margin_v1_get_simple_earn_flexible_history_redemption_record(self,...
    method margin_v1_get_broker_sub_account_api (line 17909) | def margin_v1_get_broker_sub_account_api(self, **params):
    method options_v1_get_exercise_history (line 17923) | def options_v1_get_exercise_history(self, **params):
    method options_open_interest (line 17937) | def options_open_interest(self, **params):
    method margin_v1_get_convert_exchange_info (line 17952) | def margin_v1_get_convert_exchange_info(self, **params):
    method futures_v1_delete_batch_order (line 17966) | def futures_v1_delete_batch_order(self, **params):
    method margin_v1_get_eth_staking_eth_history_wbeth_rewards_history (line 17978) | def margin_v1_get_eth_staking_eth_history_wbeth_rewards_history(self, ...
    method margin_v1_get_mining_pub_algo_list (line 17992) | def margin_v1_get_mining_pub_algo_list(self, **params):
    method options_v1_get_block_trades (line 18006) | def options_v1_get_block_trades(self, **params):
    method margin_v1_get_copy_trading_futures_lead_symbol (line 18020) | def margin_v1_get_copy_trading_futures_lead_symbol(self, **params):
    method margin_v1_get_mining_worker_list (line 18034) | def margin_v1_get_mining_worker_list(self, **params):
    method margin_v1_get_dci_product_list (line 18048) | def margin_v1_get_dci_product_list(self, **params):
    method futures_v1_get_convert_order_status (line 18062) | def futures_v1_get_convert_order_status(self, **params):

FILE: binance/enums.py
  class HistoricalKlinesType (line 74) | class HistoricalKlinesType(Enum):
  class FuturesType (line 84) | class FuturesType(Enum):
  class ContractType (line 89) | class ContractType(Enum):

FILE: binance/exceptions.py
  class BinanceAPIException (line 5) | class BinanceAPIException(Exception):
    method __init__ (line 6) | def __init__(self, response, status_code, text):
    method __str__ (line 21) | def __str__(self):  # pragma: no cover
  class BinanceRequestException (line 25) | class BinanceRequestException(Exception):
    method __init__ (line 26) | def __init__(self, message):
    method __str__ (line 29) | def __str__(self):
  class BinanceOrderException (line 33) | class BinanceOrderException(Exception):
    method __init__ (line 34) | def __init__(self, code, message):
    method __str__ (line 38) | def __str__(self):
  class BinanceOrderMinAmountException (line 42) | class BinanceOrderMinAmountException(BinanceOrderException):
    method __init__ (line 43) | def __init__(self, value):
  class BinanceOrderMinPriceException (line 48) | class BinanceOrderMinPriceException(BinanceOrderException):
    method __init__ (line 49) | def __init__(self, value):
  class BinanceOrderMinTotalException (line 54) | class BinanceOrderMinTotalException(BinanceOrderException):
    method __init__ (line 55) | def __init__(self, value):
  class BinanceOrderUnknownSymbolException (line 60) | class BinanceOrderUnknownSymbolException(BinanceOrderException):
    method __init__ (line 61) | def __init__(self, value):
  class BinanceOrderInactiveSymbolException (line 66) | class BinanceOrderInactiveSymbolException(BinanceOrderException):
    method __init__ (line 67) | def __init__(self, value):
  class BinanceWebsocketUnableToConnect (line 72) | class BinanceWebsocketUnableToConnect(Exception):
  class BinanceWebsocketQueueOverflow (line 76) | class BinanceWebsocketQueueOverflow(Exception):
  class BinanceWebsocketClosed (line 80) | class BinanceWebsocketClosed(Exception):
  class ReadLoopClosed (line 84) | class ReadLoopClosed(Exception):
  class NotImplementedException (line 88) | class NotImplementedException(Exception):
    method __init__ (line 89) | def __init__(self, value):
  class UnknownDateFormat (line 94) | class UnknownDateFormat(Exception):
  class BinanceRegionException (line 98) | class BinanceRegionException(Exception):
    method __init__ (line 101) | def __init__(
    method __str__ (line 113) | def __str__(self):

FILE: binance/helpers.py
  function date_to_milliseconds (line 14) | def date_to_milliseconds(date_str: str) -> int:
  function interval_to_milliseconds (line 38) | def interval_to_milliseconds(interval: str) -> Optional[int]:
  function round_step_size (line 62) | def round_step_size(
  function convert_ts_str (line 76) | def convert_ts_str(ts_str):
  function convert_list_to_json_array (line 84) | def convert_list_to_json_array(l):
  function get_loop (line 91) | def get_loop():

FILE: binance/ws/constants.py
  class WSListenerState (line 6) | class WSListenerState(Enum):

FILE: binance/ws/depthcache.py
  class DepthCache (line 12) | class DepthCache(object):
    method __init__ (line 13) | def __init__(self, symbol, conv_type: Callable = float):
    method add_bid (line 29) | def add_bid(self, bid):
    method add_ask (line 40) | def add_ask(self, ask):
    method get_bids (line 51) | def get_bids(self):
    method get_asks (line 84) | def get_asks(self):
    method sort_depth (line 120) | def sort_depth(vals, reverse=False, conv_type: Callable = float):
  class BaseDepthCacheManager (line 138) | class BaseDepthCacheManager:
    method __init__ (line 141) | def __init__(
    method __aenter__ (line 182) | async def __aenter__(self):
    method __aexit__ (line 187) | async def __aexit__(self, *args, **kwargs):
    method recv (line 191) | async def recv(self):
    method _init_cache (line 203) | async def _init_cache(self):
    method _start_socket (line 216) | async def _start_socket(self):
    method _get_socket (line 223) | def _get_socket(self):
    method _depth_event (line 226) | async def _depth_event(self, msg):
    method _process_depth_message (line 245) | async def _process_depth_message(self, msg):
    method _apply_orders (line 265) | def _apply_orders(self, msg):
    method get_depth_cache (line 275) | def get_depth_cache(self):
    method close (line 283) | async def close(self):
    method get_symbol (line 290) | def get_symbol(self):
  class DepthCacheManager (line 298) | class DepthCacheManager(BaseDepthCacheManager):
    method __init__ (line 299) | def __init__(
    method _init_cache (line 330) | async def _init_cache(self):
    method _start_socket (line 361) | async def _start_socket(self):
    method _get_socket (line 371) | def _get_socket(self):
    method _process_depth_message (line 374) | async def _process_depth_message(self, msg):
  class FuturesDepthCacheManager (line 410) | class FuturesDepthCacheManager(BaseDepthCacheManager):
    method _process_depth_message (line 411) | async def _process_depth_message(self, msg):
    method _apply_orders (line 421) | def _apply_orders(self, msg):
    method _get_socket (line 429) | def _get_socket(self):
  class OptionsDepthCacheManager (line 434) | class OptionsDepthCacheManager(BaseDepthCacheManager):
    method _get_socket (line 435) | def _get_socket(self):
  class ThreadedDepthCacheManager (line 439) | class ThreadedDepthCacheManager(ThreadedApiManager):
    method __init__ (line 440) | def __init__(
    method _start_depth_cache (line 450) | def _start_depth_cache(
    method start_depth_cache (line 481) | def start_depth_cache(
    method start_futures_depth_socket (line 502) | def start_futures_depth_socket(
    method start_options_depth_socket (line 521) | def start_options_depth_socket(

FILE: binance/ws/keepalive_websocket.py
  class KeepAliveWebsocket (line 8) | class KeepAliveWebsocket(ReconnectingWebsocket):
    method __init__ (line 9) | def __init__(
    method __aexit__ (line 39) | async def __aexit__(self, *args, **kwargs):
    method _build_path (line 56) | def _build_path(self):
    method _before_connect (line 62) | async def _before_connect(self):
    method connect (line 120) | async def connect(self):
    method recv (line 140) | async def recv(self):
    method _after_connect (line 155) | async def _after_connect(self):
    method _start_socket_timer (line 159) | def _start_socket_timer(self):
    method _subscribe_to_user_data_stream (line 164) | async def _subscribe_to_user_data_stream(self):
    method _subscribe_to_margin_data_stream (line 174) | async def _subscribe_to_margin_data_stream(self):
    method _subscribe_to_isolated_margin_data_stream (line 193) | async def _subscribe_to_isolated_margin_data_stream(self, symbol: str):
    method _unsubscribe_from_user_data_stream (line 212) | async def _unsubscribe_from_user_data_stream(self):
    method _get_listen_key (line 224) | async def _get_listen_key(self):
    method _keepalive_socket (line 242) | async def _keepalive_socket(self):

FILE: binance/ws/reconnecting_websocket.py
  class ReconnectingWebsocket (line 45) | class ReconnectingWebsocket:
    method __init__ (line 52) | def __init__(
    method json_dumps (line 81) | def json_dumps(self, msg) -> str:
    method json_loads (line 86) | def json_loads(self, msg):
    method __aenter__ (line 91) | async def __aenter__(self):
    method close (line 95) | async def close(self):
    method __aexit__ (line 98) | async def __aexit__(self, exc_type, exc_val, exc_tb):
    method connect (line 110) | async def connect(self):
    method _kill_read_loop (line 146) | async def _kill_read_loop(self):
    method _before_connect (line 152) | async def _before_connect(self):
    method _after_connect (line 155) | async def _after_connect(self):
    method _handle_message (line 158) | def _handle_message(self, evt):
    method _read_loop (line 180) | async def _read_loop(self):
    method _run_reconnect (line 258) | async def _run_reconnect(self):
    method recv (line 276) | async def recv(self):
    method _wait_for_reconnect (line 289) | async def _wait_for_reconnect(self):
    method _get_reconnect_wait (line 296) | def _get_reconnect_wait(self, attempts: int) -> int:
    method before_reconnect (line 300) | async def before_reconnect(self):
    method _reconnect (line 309) | def _reconnect(self):

FILE: binance/ws/streams.py
  class BinanceSocketType (line 19) | class BinanceSocketType(str, Enum):
  class BinanceSocketManager (line 27) | class BinanceSocketManager:
    method __init__ (line 43) | def __init__(
    method _get_stream_url (line 78) | def _get_stream_url(self, stream_url: Optional[str] = None):
    method _get_socket (line 88) | def _get_socket(
    method _get_account_socket (line 114) | def _get_account_socket(
    method _get_futures_socket (line 138) | def _get_futures_socket(
    method _get_options_socket (line 156) | def _get_options_socket(self, path: str, prefix: str = "ws/"):
    method _exit_socket (line 166) | async def _exit_socket(self, path: str):
    method depth_socket (line 169) | def depth_socket(
    method kline_socket (line 247) | def kline_socket(self, symbol: str, interval=AsyncClient.KLINE_INTERVA...
    method kline_futures_socket (line 291) | def kline_futures_socket(
    method miniticker_socket (line 345) | def miniticker_socket(self, update_time: int = 1000):
    method trade_socket (line 377) | def trade_socket(self, symbol: str):
    method aggtrade_socket (line 409) | def aggtrade_socket(self, symbol: str):
    method aggtrade_futures_socket (line 440) | def aggtrade_futures_socket(
    method symbol_miniticker_socket (line 472) | def symbol_miniticker_socket(self, symbol: str):
    method symbol_ticker_socket (line 501) | def symbol_ticker_socket(self, symbol: str):
    method ticker_socket (line 544) | def ticker_socket(self):
    method futures_ticker_socket (line 588) | def futures_ticker_socket(self):
    method futures_coin_ticker_socket (line 626) | def futures_coin_ticker_socket(self):
    method index_price_socket (line 664) | def index_price_socket(self, symbol: str, fast: bool = True):
    method symbol_mark_price_socket (line 685) | def symbol_mark_price_socket(
    method all_mark_price_socket (line 713) | def all_mark_price_socket(
    method symbol_ticker_futures_socket (line 739) | def symbol_ticker_futures_socket(
    method individual_symbol_ticker_futures_socket (line 764) | def individual_symbol_ticker_futures_socket(
    method all_ticker_futures_socket (line 785) | def all_ticker_futures_socket(
    method symbol_book_ticker_socket (line 816) | def symbol_book_ticker_socket(self, symbol: str):
    method book_ticker_socket (line 842) | def book_ticker_socket(self):
    method multiplex_socket (line 860) | def multiplex_socket(self, streams: List[str]):
    method options_multiplex_socket (line 881) | def options_multiplex_socket(self, streams: List[str]):
    method futures_multiplex_socket (line 891) | def futures_multiplex_socket(
    method user_socket (line 916) | def user_socket(self):
    method futures_user_socket (line 933) | def futures_user_socket(self):
    method coin_futures_user_socket (line 950) | def coin_futures_user_socket(self):
    method margin_socket (line 962) | def margin_socket(self):
    method futures_socket (line 978) | def futures_socket(self):
    method coin_futures_socket (line 994) | def coin_futures_socket(self):
    method portfolio_margin_socket (line 1010) | def portfolio_margin_socket(self):
    method isolated_margin_socket (line 1027) | def isolated_margin_socket(self, symbol: str):
    method options_ticker_socket (line 1046) | def options_ticker_socket(self, symbol: str):
    method options_ticker_by_expiration_socket (line 1059) | def options_ticker_by_expiration_socket(self, symbol: str, expiration_...
    method options_recent_trades_socket (line 1074) | def options_recent_trades_socket(self, symbol: str):
    method options_kline_socket (line 1087) | def options_kline_socket(
    method options_depth_socket (line 1109) | def options_depth_socket(self, symbol: str, depth: str = "10"):
    method futures_depth_socket (line 1124) | def futures_depth_socket(self, symbol: str, depth: str = "10", futures...
    method futures_rpi_depth_socket (line 1139) | def futures_rpi_depth_socket(self, symbol: str, futures_type=FuturesTy...
    method options_new_symbol_socket (line 1155) | def options_new_symbol_socket(self):
    method options_open_interest_socket (line 1176) | def options_open_interest_socket(self, symbol: str, expiration_date: s...
    method options_mark_price_socket (line 1199) | def options_mark_price_socket(self, symbol: str):
    method options_index_price_socket (line 1219) | def options_index_price_socket(self, symbol: str):
    method _stop_socket (line 1237) | async def _stop_socket(self, conn_key):
  class ThreadedWebsocketManager (line 1251) | class ThreadedWebsocketManager(ThreadedApiManager):
    method __init__ (line 1252) | def __init__(
    method _before_socket_listener_start (line 1277) | async def _before_socket_listener_start(self):
    method _start_async_socket (line 1284) | def _start_async_socket(
    method start_depth_socket (line 1304) | def start_depth_socket(
    method start_kline_socket (line 1321) | def start_kline_socket(
    method start_kline_futures_socket (line 1336) | def start_kline_futures_socket(
    method start_miniticker_socket (line 1355) | def start_miniticker_socket(
    method start_trade_socket (line 1366) | def start_trade_socket(self, callback: Callable, symbol: str) -> str:
    method start_aggtrade_socket (line 1375) | def start_aggtrade_socket(self, callback: Callable, symbol: str) -> str:
    method start_aggtrade_futures_socket (line 1384) | def start_aggtrade_futures_socket(
    method start_symbol_miniticker_socket (line 1399) | def start_symbol_miniticker_socket(self, callback: Callable, symbol: s...
    method start_symbol_ticker_socket (line 1408) | def start_symbol_ticker_socket(self, callback: Callable, symbol: str) ...
    method start_ticker_socket (line 1417) | def start_ticker_socket(self, callback: Callable) -> str:
    method start_index_price_socket (line 1422) | def start_index_price_socket(
    method start_symbol_mark_price_socket (line 1431) | def start_symbol_mark_price_socket(
    method start_all_mark_price_socket (line 1444) | def start_all_mark_price_socket(
    method start_symbol_ticker_futures_socket (line 1456) | def start_symbol_ticker_futures_socket(
    method start_individual_symbol_ticker_futures_socket (line 1468) | def start_individual_symbol_ticker_futures_socket(
    method start_all_ticker_futures_socket (line 1480) | def start_all_ticker_futures_socket(
    method start_symbol_book_ticker_socket (line 1489) | def start_symbol_book_ticker_socket(self, callback: Callable, symbol: ...
    method start_book_ticker_socket (line 1496) | def start_book_ticker_socket(self, callback: Callable) -> str:
    method start_multiplex_socket (line 1501) | def start_multiplex_socket(self, callback: Callable, streams: List[str...
    method start_options_multiplex_socket (line 1508) | def start_options_multiplex_socket(
    method start_futures_multiplex_socket (line 1517) | def start_futures_multiplex_socket(
    method start_user_socket (line 1529) | def start_user_socket(self, callback: Callable) -> str:
    method start_futures_user_socket (line 1534) | def start_futures_user_socket(self, callback: Callable) -> str:
    method start_coin_futures_user_socket (line 1539) | def start_coin_futures_user_socket(self, callback: Callable) -> str:
    method start_margin_socket (line 1544) | def start_margin_socket(self, callback: Callable) -> str:
    method start_futures_socket (line 1549) | def start_futures_socket(self, callback: Callable) -> str:
    method start_coin_futures_socket (line 1554) | def start_coin_futures_socket(self, callback: Callable) -> str:
    method start_isolated_margin_socket (line 1559) | def start_isolated_margin_socket(self, callback: Callable, symbol: str...
    method start_options_ticker_socket (line 1566) | def start_options_ticker_socket(self, callback: Callable, symbol: str)...
    method start_options_ticker_by_expiration_socket (line 1573) | def start_options_ticker_by_expiration_socket(
    method start_options_recent_trades_socket (line 1582) | def start_options_recent_trades_socket(
    method start_options_kline_socket (line 1591) | def start_options_kline_socket(
    method start_options_depth_socket (line 1603) | def start_options_depth_socket(
    method start_futures_depth_socket (line 1612) | def start_futures_depth_socket(

FILE: binance/ws/threaded_stream.py
  class ThreadedApiManager (line 10) | class ThreadedApiManager(threading.Thread):
    method __init__ (line 11) | def __init__(
    method _before_socket_listener_start (line 57) | async def _before_socket_listener_start(self): ...
    method socket_listener (line 59) | async def socket_listener(self):
    method start_listener (line 72) | async def start_listener(self, socket, path: str, callback):
    method run (line 95) | def run(self):
    method stop_socket (line 98) | def stop_socket(self, socket_name):
    method stop_client (line 102) | async def stop_client(self):
    method stop (line 107) | def stop(self):

FILE: binance/ws/websocket_api.py
  class WebsocketAPI (line 11) | class WebsocketAPI(ReconnectingWebsocket):
    method __init__ (line 12) | def __init__(self, url: str, tld: str = "com", testnet: bool = False, ...
    method register_subscription_queue (line 21) | def register_subscription_queue(self, subscription_id: str, queue: asy...
    method unregister_subscription_queue (line 25) | def unregister_subscription_queue(self, subscription_id: str) -> None:
    method connection_lock (line 30) | def connection_lock(self) -> asyncio.Lock:
    method _handle_message (line 36) | def _handle_message(self, msg):
    method _ensure_ws_connection (line 82) | async def _ensure_ws_connection(self) -> None:
    method request (line 128) | async def request(self, id: str, payload: dict) -> dict:
    method __aexit__ (line 160) | async def __aexit__(self, exc_type, exc_val, exc_tb):

FILE: code-generator.py
  function fetch_endpoints (line 80) | def fetch_endpoints():
  function get_request_function_and_path (line 127) | def get_request_function_and_path(endpoint: str) -> tuple[str | None, st...
  function check_method_in_file (line 175) | def check_method_in_file(method, endpoint, file_name):
  function convert_to_function_name (line 241) | def convert_to_function_name(method: str, endpoint: str) -> str:
  function check_function (line 310) | def check_function(method, request_function, cleaned_endpoint, version_a...
  function generate_function_code (line 346) | def generate_function_code(method, endpoint, type="sync", file_name="./b...
  function write_function_to_endpoints_md (line 413) | def write_function_to_endpoints_md(method, endpoint):
  function main (line 442) | def main():

FILE: docs/conf.py
  function skip (line 187) | def skip(app, what, name, obj, skip, options):
  function setup (line 194) | def setup(app):

FILE: examples/binace_socket_manager.py
  function main (line 12) | async def main():

FILE: examples/create_oco_order.py
  function create_oco_order (line 16) | def create_oco_order():
  function main (line 89) | def main():

FILE: examples/create_order.py
  function create_futures_order (line 16) | def create_futures_order():
  function create_spot_order (line 27) | def create_spot_order():
  function main (line 34) | def main():

FILE: examples/create_order_async.py
  function main (line 12) | async def main():

FILE: examples/depth_cache_example.py
  function main (line 17) | async def m
Condensed preview — 109 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,716K chars).
[
  {
    "path": ".github/CODEOWNERS",
    "chars": 14,
    "preview": "* @carlosmiei\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 927,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
  },
  {
    "path": ".github/workflows/python-app.yml",
    "chars": 2649,
    "preview": "# This workflow will install Python dependencies, run tests and lint with a single version of Python\n# For more informat"
  },
  {
    "path": ".gitignore",
    "chars": 147,
    "preview": ".tox\n.cache/v/cache\ndocs/_build\nbinance/__pycache__/\nbuild/\ndist/\npython_binance.egg-info/\n*__pycache__\n*.egg-info/\n.ide"
  },
  {
    "path": ".pre-commit-config.yaml",
    "chars": 408,
    "preview": "repos:\n-   repo: https://github.com/pre-commit/pre-commit-hooks\n    rev: v4.5.0\n    hooks:\n    -   id: check-yaml\n    - "
  },
  {
    "path": ".readthedocs.yaml",
    "chars": 1065,
    "preview": "# Read the Docs configuration file for Sphinx projects\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html f"
  },
  {
    "path": ".travis.yml",
    "chars": 241,
    "preview": "dist: xenial\n\nlanguage: python\n\npython:\n  - \"3.6\"\n  - \"3.7\"\n  - \"3.8\"\n  - \"3.9\"\n\ninstall:\n  - pip install -r test-requir"
  },
  {
    "path": "Endpoints.md",
    "chars": 88838,
    "preview": "> :warning: **Disclaimer**: \n\n > * Before using the endpoints, please check the [API documentation](https://binance-docs"
  },
  {
    "path": "LICENSE",
    "chars": 1067,
    "preview": "MIT License\n\nCopyright (c) 2017 sammchardy\n\nPermission is hereby granted, free of charge, to any person obtaining a copy"
  },
  {
    "path": "PYPIREADME.rst",
    "chars": 10216,
    "preview": ".. image:: https://img.shields.io/pypi/v/python-binance.svg\n    :target: https://pypi.python.org/pypi/python-binance\n\n.."
  },
  {
    "path": "README.rst",
    "chars": 12892,
    "preview": "=================================\nWelcome to python-binance v1.0.35\n=================================\n\n.. image:: https:"
  },
  {
    "path": "binance/__init__.py",
    "chars": 813,
    "preview": "\"\"\"An unofficial Python wrapper for the Binance exchange API v3\n\n.. moduleauthor:: Sam McHardy\n\n\"\"\"\n\n__version__ = \"1.0."
  },
  {
    "path": "binance/async_client.py",
    "chars": 267597,
    "preview": "import asyncio\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Optional, Union\nfrom urllib.parse import url"
  },
  {
    "path": "binance/base_client.py",
    "chars": 20850,
    "preview": "from base64 import b64encode\nfrom pathlib import Path\nimport random\nfrom typing import Dict, Optional, List, Tuple, Unio"
  },
  {
    "path": "binance/client.py",
    "chars": 682441,
    "preview": "from pathlib import Path\nfrom typing import Dict, Optional, List, Union, Any\n\nimport requests\nimport time\nimport warning"
  },
  {
    "path": "binance/enums.py",
    "chars": 2537,
    "preview": "from enum import Enum\n\nSYMBOL_TYPE_SPOT = \"SPOT\"\n\nORDER_STATUS_NEW = \"NEW\"\nORDER_STATUS_PARTIALLY_FILLED = \"PARTIALLY_FI"
  },
  {
    "path": "binance/exceptions.py",
    "chars": 3358,
    "preview": "# coding=utf-8\nimport json\n\n\nclass BinanceAPIException(Exception):\n    def __init__(self, response, status_code, text):\n"
  },
  {
    "path": "binance/helpers.py",
    "chars": 3016,
    "preview": "import asyncio\nfrom decimal import Decimal\nimport json\nfrom typing import Union, Optional, Dict\n\nimport dateparser\nimpor"
  },
  {
    "path": "binance/ws/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "binance/ws/constants.py",
    "chars": 214,
    "preview": "from enum import Enum\n\nKEEPALIVE_TIMEOUT = 5 * 60  # 5 minutes\n\n\nclass WSListenerState(Enum):\n    INITIALISING = \"Initia"
  },
  {
    "path": "binance/ws/depthcache.py",
    "chars": 15288,
    "preview": "import logging\nfrom operator import itemgetter\nimport asyncio\nimport time\nfrom typing import Optional, Dict, Callable\n\nf"
  },
  {
    "path": "binance/ws/keepalive_websocket.py",
    "chars": 11586,
    "preview": "import asyncio\nimport uuid\nfrom binance.async_client import AsyncClient\nfrom binance.ws.reconnecting_websocket import Re"
  },
  {
    "path": "binance/ws/reconnecting_websocket.py",
    "chars": 11095,
    "preview": "import asyncio\nimport gzip\nimport json\nimport logging\nfrom socket import gaierror\nfrom typing import Optional\nfrom async"
  },
  {
    "path": "binance/ws/streams.py",
    "chars": 59710,
    "preview": "import asyncio\nimport time\nfrom enum import Enum\nfrom typing import Optional, List, Dict, Callable, Any\nimport logging\n\n"
  },
  {
    "path": "binance/ws/threaded_stream.py",
    "chars": 4529,
    "preview": "import asyncio\nimport logging\nimport threading\nfrom typing import Optional, Dict, Any\n\nfrom binance.async_client import "
  },
  {
    "path": "binance/ws/websocket_api.py",
    "chars": 7217,
    "preview": "from typing import Dict, Optional\nimport asyncio\n\nfrom websockets import WebSocketClientProtocol  # type: ignore\n\nfrom ."
  },
  {
    "path": "code-generator.py",
    "chars": 19792,
    "preview": "import re\nimport requests\nfrom bs4 import BeautifulSoup\nimport os\n\nfrom binance.client import Client\nfrom binance.except"
  },
  {
    "path": "docs/Makefile",
    "chars": 649,
    "preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS    =\nSPHI"
  },
  {
    "path": "docs/account.rst",
    "chars": 6912,
    "preview": "Account Endpoints\n=================\n\nOrders\n------\n\nOrder Validation\n^^^^^^^^^^^^^^^^\n\nBinance has a number of rules aro"
  },
  {
    "path": "docs/binance.rst",
    "chars": 942,
    "preview": "Binance API\n===========\n\nClient module\n-------------\n\n.. automodule:: binance.client\n    :members:\n    :undoc-members:\n "
  },
  {
    "path": "docs/changelog.rst",
    "chars": 20574,
    "preview": "Changelog\n\nv1.0.35 - 2026-02-16\n^^^^^^^^^^^^^^^^^^^^\n\n**Added**\n\n- chore: normalize package name by @carlosmiei in https"
  },
  {
    "path": "docs/conf.py",
    "chars": 5701,
    "preview": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# python-binance documentation build configuration file, created by\n# s"
  },
  {
    "path": "docs/constants.rst",
    "chars": 2340,
    "preview": "Binance Constants\n=================\n\nBinance requires specific string constants for Order Types, Order Side, Time in For"
  },
  {
    "path": "docs/depth_cache.rst",
    "chars": 7221,
    "preview": "Depth Cache\n===========\n\nTo follow the depth cache updates for a symbol there are 2 options similar to websockets.\n\nUse "
  },
  {
    "path": "docs/exceptions.rst",
    "chars": 601,
    "preview": "Exceptions\n==========\n\nBinanceRequestException\n------------------------\n\nRaised if a non JSON response is returned\n\nBina"
  },
  {
    "path": "docs/faqs.rst",
    "chars": 1336,
    "preview": "FAQ\n=======\n\n*Q: Why do I get \"Timestamp for this request is not valid\"*\n\n*A*: This occurs in 2 different cases.\n\nThe ti"
  },
  {
    "path": "docs/general.rst",
    "chars": 2130,
    "preview": "General Endpoints\n=================\n\n`Ping the server <binance.html#binance.client.Client.ping>`_\n^^^^^^^^^^^^^^^^^^^^^^"
  },
  {
    "path": "docs/helpers.rst",
    "chars": 158,
    "preview": "Helper Functions\n================\n\n.. autoclass:: binance.helpers\n    :members: date_to_milliseconds, interval_to_millis"
  },
  {
    "path": "docs/index.rst",
    "chars": 416,
    "preview": ".. python-binance documentation master file, created by\n   sphinx-quickstart on Thu Sep 21 20:24:54 2017.\n\n.. include:: "
  },
  {
    "path": "docs/margin.rst",
    "chars": 9530,
    "preview": "Margin Trading Endpoints\n========================\n\n.. note ::  \n\n    **Cross-margin vs isolated margin trading**\n\n    Bi"
  },
  {
    "path": "docs/market_data.rst",
    "chars": 4284,
    "preview": "Market Data Endpoints\n=====================\n\n\n`Get Market Depth <binance.html#binance.client.Client.get_order_book>`_\n^^"
  },
  {
    "path": "docs/overview.rst",
    "chars": 13940,
    "preview": "Getting Started\n===============\n\nInstallation\n------------\n\n``python-binance`` is available on `PYPI <https://pypi.pytho"
  },
  {
    "path": "docs/requirements.txt",
    "chars": 63,
    "preview": "sphinx==8.1.3\nsphinx_rtd_theme==3.0.1\nsphinx-copybutton>=0.5.0\n"
  },
  {
    "path": "docs/sub_accounts.rst",
    "chars": 872,
    "preview": "Sub Account Endpoints\n=====================\n\n\n`Get Sub Account list <binance.html#binance.client.Client.get_sub_account_"
  },
  {
    "path": "docs/websockets.rst",
    "chars": 14084,
    "preview": "Websockets\n==========\n\nAPI Requests via Websockets\n--------------------------\n\nSome API endpoints can be accessed via we"
  },
  {
    "path": "docs/withdraw.rst",
    "chars": 1990,
    "preview": "Withdraw Endpoints\n==================\n\n`Place a withdrawal <binance.html#binance.client.Client.withdraw>`_\n^^^^^^^^^^^^^"
  },
  {
    "path": "examples/binace_socket_manager.py",
    "chars": 904,
    "preview": "import os\nimport sys\nimport asyncio\nimport time\n\nroot = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nsys."
  },
  {
    "path": "examples/create_oco_order.py",
    "chars": 2875,
    "preview": "import os\nimport sys\n\nroot = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nsys.path.append(root)\n\nfrom bin"
  },
  {
    "path": "examples/create_order.py",
    "chars": 786,
    "preview": "import os\nimport sys\n\nroot = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nsys.path.append(root)\n\nfrom bin"
  },
  {
    "path": "examples/create_order_async.py",
    "chars": 636,
    "preview": "import os\nimport sys\nimport asyncio\n\nroot = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nsys.path.append("
  },
  {
    "path": "examples/depth_cache_example.py",
    "chars": 1876,
    "preview": "#!/usr/bin/env python3\n\nimport os\nimport sys\n\nroot = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nsys.pat"
  },
  {
    "path": "examples/depth_cache_threaded_example.py",
    "chars": 1172,
    "preview": "#!/usr/bin/env python3\n\nimport os\nimport sys\n\nroot = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nsys.pat"
  },
  {
    "path": "examples/futures_algo_order_examples.py",
    "chars": 6230,
    "preview": "#!/usr/bin/env python\n\"\"\"\nExamples of how to use the Futures Algo Order API.\n\nNew Algo Order supports various conditiona"
  },
  {
    "path": "examples/save_historical_data.py",
    "chars": 4657,
    "preview": "import time\nimport dateparser\nimport pytz\nimport json\n\nfrom datetime import datetime\nfrom binance.client import Client\n\n"
  },
  {
    "path": "examples/verbose_example.py",
    "chars": 3643,
    "preview": "#!/usr/bin/env python\n\"\"\"\nComprehensive verbose mode example for python-binance\n\nThis example demonstrates verbose loggi"
  },
  {
    "path": "examples/websocket.py",
    "chars": 1233,
    "preview": "import os\nimport sys\n\nroot = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nsys.path.append(root)\n\nfrom bin"
  },
  {
    "path": "examples/ws_create_order.py",
    "chars": 538,
    "preview": "import os\nimport sys\n\n\nroot = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nsys.path.append(root)\n\nfrom bi"
  },
  {
    "path": "examples/ws_create_order_async.py",
    "chars": 618,
    "preview": "import os\nimport sys\nimport asyncio\n\n\nroot = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nsys.path.append"
  },
  {
    "path": "pyproject.toml",
    "chars": 251,
    "preview": "[tool.ruff]\npreview = true\nlint.ignore = [\"F722\",\"F841\",\"F821\",\"E402\",\"E501\",\"E902\",\"E713\",\"E741\",\"E714\", \"E275\",\"E721\","
  },
  {
    "path": "pyrightconfig.json",
    "chars": 175,
    "preview": "{\n\t\"include\": [\n\t\t\"binance\"\n\t],\n\t\"reportMissingImports\": false,\n\t\"reportMissingModuleSource\": false,\n\t\"typeCheckingMode\""
  },
  {
    "path": "pytest.ini",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "requirements.txt",
    "chars": 93,
    "preview": "aiohttp\ndateparser\npycryptodome\nrequests\nwebsockets\nwebsockets_proxy; python_version >= '3.8'"
  },
  {
    "path": "setup.cfg",
    "chars": 50,
    "preview": "[bdist_wheel]\nuniversal = 1\n\n[pep8]\nignore = E501\n"
  },
  {
    "path": "setup.py",
    "chars": 1809,
    "preview": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\nimport codecs\nimport os\nimport re\n\nwith codecs.open(\n "
  },
  {
    "path": "test-requirements.txt",
    "chars": 151,
    "preview": "coverage\npytest\npytest-asyncio\npytest-cov\npytest-xdist\npytest-rerunfailures\npytest-timeout\nrequests-mock\ntox\nsetuptools\n"
  },
  {
    "path": "tests/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "tests/conftest.py",
    "chars": 7141,
    "preview": "import pytest\nimport pytest_asyncio\nfrom binance.client import Client\nfrom binance.async_client import AsyncClient\nimpor"
  },
  {
    "path": "tests/test_api_request.py",
    "chars": 1712,
    "preview": "from binance.client import Client\nfrom binance.exceptions import BinanceAPIException, BinanceRequestException\nimport pyt"
  },
  {
    "path": "tests/test_async_client.py",
    "chars": 10012,
    "preview": "import pytest\nimport sys\n\nfrom binance.async_client import AsyncClient\nfrom .conftest import proxy, api_key, api_secret,"
  },
  {
    "path": "tests/test_async_client_futures.py",
    "chars": 31909,
    "preview": "from datetime import datetime\n\nimport pytest\nfrom .test_order import assert_contract_order\nfrom .test_get_order_book imp"
  },
  {
    "path": "tests/test_async_client_gift_card copy.py",
    "chars": 1741,
    "preview": "import pytest\n\npytestmark = [pytest.mark.gift_card, pytest.mark.asyncio]\n\n\nasync def test_gift_card_fetch_token_limit(li"
  },
  {
    "path": "tests/test_async_client_margin.py",
    "chars": 15143,
    "preview": "import pytest\n\npytestmark = [pytest.mark.margin, pytest.mark.asyncio]\n\nasync def test_margin__get_account_status(asyncCl"
  },
  {
    "path": "tests/test_async_client_options.py",
    "chars": 3847,
    "preview": "import pytest\nimport sys\n\npytestmark = [pytest.mark.options, pytest.mark.asyncio, pytest.mark.skipif(sys.version_info < "
  },
  {
    "path": "tests/test_async_client_portfolio.py",
    "chars": 9734,
    "preview": "import pytest\n\n# Apply the 'portfolio' mark to all tests in this file\npytestmark = [pytest.mark.portfolio, pytest.mark.a"
  },
  {
    "path": "tests/test_async_client_ws_api.py",
    "chars": 1774,
    "preview": "import pytest\nimport sys\npytestmark = [pytest.mark.skipif(sys.version_info < (3, 8), reason=\"websockets_proxy Python 3.8"
  },
  {
    "path": "tests/test_async_client_ws_futures_requests.py",
    "chars": 10406,
    "preview": "import asyncio\nimport pytest\nimport sys\n\nfrom binance.exceptions import BinanceAPIException, BinanceWebsocketUnableToCon"
  },
  {
    "path": "tests/test_client.py",
    "chars": 7406,
    "preview": "import sys\nimport pytest\nfrom binance.client import Client\nfrom binance.exceptions import BinanceAPIException, BinanceRe"
  },
  {
    "path": "tests/test_client_futures.py",
    "chars": 34648,
    "preview": "from datetime import datetime\nimport re\n\nimport pytest\nimport requests_mock\nfrom .test_order import assert_contract_orde"
  },
  {
    "path": "tests/test_client_gift_card.py",
    "chars": 2182,
    "preview": "import pytest\nimport requests_mock\n\npytestmark = pytest.mark.gift_card\n\n\ndef test_mock_gift_card_fetch_token_limit(liveC"
  },
  {
    "path": "tests/test_client_margin.py",
    "chars": 14426,
    "preview": "import pytest\n\n\npytestmark = pytest.mark.margin\n\n\ndef test_margin__get_account_status(client):\n    client.get_account_st"
  },
  {
    "path": "tests/test_client_options.py",
    "chars": 3316,
    "preview": "import pytest\nimport sys\n\n\npytestmark = [pytest.mark.options, pytest.mark.skipif(sys.version_info < (3, 8), reason=\"webs"
  },
  {
    "path": "tests/test_client_portfolio.py",
    "chars": 8547,
    "preview": "import pytest\n\n# Apply the 'portfolio' mark to all tests in this file\npytestmark = pytest.mark.portfolio\n\n\ndef test_papi"
  },
  {
    "path": "tests/test_client_ws_api.py",
    "chars": 2371,
    "preview": "import sys\nimport pytest\nfrom binance.client import Client\nfrom .conftest import proxies, api_key, api_secret, testnet\nf"
  },
  {
    "path": "tests/test_client_ws_futures_requests.py",
    "chars": 6427,
    "preview": "import pytest\nimport sys\nfrom binance.exceptions import BinanceAPIException\nfrom .test_get_order_book import assert_ob\nf"
  },
  {
    "path": "tests/test_cryptography.py",
    "chars": 6296,
    "preview": "from binance.client import Client\n\ntest_cases = [\n    {\n        \"description\": \"Unencrypted PKCS8 ed22519 private key\",\n"
  },
  {
    "path": "tests/test_depth_cache.py",
    "chars": 1191,
    "preview": "from binance.ws.depthcache import DepthCache\nfrom decimal import Decimal\nimport pytest\n\nTEST_SYMBOL = \"BNBBTC\"\n\n\n@pytest"
  },
  {
    "path": "tests/test_futures.py",
    "chars": 3610,
    "preview": "import requests_mock\nimport json\nfrom binance.client import Client\nimport re\n\nclient = Client(api_key=\"api_key\", api_sec"
  },
  {
    "path": "tests/test_get_order_book.py",
    "chars": 2199,
    "preview": "import pytest\nimport sys\nfrom binance.exceptions import BinanceAPIException\n\n\ndef assert_ob(order_book):\n    assert isin"
  },
  {
    "path": "tests/test_headers.py",
    "chars": 2944,
    "preview": "import requests_mock\nimport pytest\nfrom aioresponses import aioresponses\n\nfrom binance import Client, AsyncClient\n\nclien"
  },
  {
    "path": "tests/test_historical_klines.py",
    "chars": 9017,
    "preview": "#!/usr/bin/env python\n# coding=utf-8\n\nfrom binance.client import Client\nimport pytest\nimport requests_mock\n\nclient = Cli"
  },
  {
    "path": "tests/test_ids.py",
    "chars": 13413,
    "preview": "import re\nimport requests_mock\nimport pytest\nfrom aioresponses import aioresponses\n\nfrom binance import Client, AsyncCli"
  },
  {
    "path": "tests/test_init.py",
    "chars": 1795,
    "preview": "from binance import (\n    AsyncClient,\n    Client,\n    DepthCacheManager,\n    OptionsDepthCacheManager,\n    ThreadedDept"
  },
  {
    "path": "tests/test_keepalive_reconnect.py",
    "chars": 7003,
    "preview": "\"\"\"\nTest to verify that KeepAliveWebsocket doesn't create duplicate keepalive loops on reconnection.\n\nThis test reproduc"
  },
  {
    "path": "tests/test_order.py",
    "chars": 180,
    "preview": "def assert_contract_order(client, order):\n    assert isinstance(order, dict)\n\n    assert order[\"clientOrderId\"].startswi"
  },
  {
    "path": "tests/test_ping.py",
    "chars": 1136,
    "preview": "import os\nimport pytest\n\n\nproxies = {}\nproxy = os.getenv(\"PROXY\")\n\n\ndef test_papi_ping_sync(client):\n    ping_response ="
  },
  {
    "path": "tests/test_reconnecting_websocket.py",
    "chars": 7894,
    "preview": "import sys\nimport pytest\nimport gzip\nimport json\nfrom unittest.mock import patch, create_autospec, Mock\nfrom binance.ws."
  },
  {
    "path": "tests/test_region_exception.py",
    "chars": 7405,
    "preview": "\"\"\"Tests for BinanceRegionException and region validation.\"\"\"\n\nimport pytest\nfrom binance.client import Client\nfrom bina"
  },
  {
    "path": "tests/test_socket_manager.py",
    "chars": 622,
    "preview": "from binance import BinanceSocketManager, AsyncClient\nimport pytest\nfrom .conftest import proxy\n\n\ndef assert_message(msg"
  },
  {
    "path": "tests/test_streams.py",
    "chars": 3556,
    "preview": "import sys\nfrom binance import BinanceSocketManager\nimport pytest\n\nfrom binance.async_client import AsyncClient\nfrom .co"
  },
  {
    "path": "tests/test_streams_options.py",
    "chars": 5940,
    "preview": "import sys\nimport pytest\nimport logging\nfrom binance import BinanceSocketManager\n\npytestmark = [\n    pytest.mark.skipif("
  },
  {
    "path": "tests/test_threaded_socket_manager.py",
    "chars": 7250,
    "preview": "from binance import ThreadedWebsocketManager\nfrom binance.client import Client\nimport asyncio\nimport time\nfrom .conftest"
  },
  {
    "path": "tests/test_threaded_stream.py",
    "chars": 5716,
    "preview": "import pytest\nimport asyncio\n\nimport websockets\nfrom binance.ws.threaded_stream import ThreadedApiManager\nfrom unittest."
  },
  {
    "path": "tests/test_user_socket_integration.py",
    "chars": 7904,
    "preview": "\"\"\"\nIntegration tests for user socket with ws_api subscription routing.\n\nThese tests verify that the user socket correct"
  },
  {
    "path": "tests/test_verbose_mode.py",
    "chars": 1833,
    "preview": "\"\"\"Tests for verbose mode functionality\"\"\"\n\nimport pytest\nimport logging\nfrom binance.client import Client\nfrom binance."
  },
  {
    "path": "tests/test_websocket_verbose.py",
    "chars": 3582,
    "preview": "\"\"\"Tests for WebSocket verbose logging\"\"\"\n\nimport logging\nimport pytest\n\n\ndef test_websocket_logger_exists():\n    \"\"\"Tes"
  },
  {
    "path": "tests/test_ws_api.py",
    "chars": 8992,
    "preview": "import json\nimport sys\nimport pytest\nimport asyncio\nfrom binance import AsyncClient\n\nfrom binance.exceptions import Bina"
  },
  {
    "path": "tests/utils.py",
    "chars": 492,
    "preview": "def test_multiple_objects(obj_list, assertion_func):\n    \"\"\"\n    Generic test function for validating multiple objects\n\n"
  },
  {
    "path": "tox.ini",
    "chars": 412,
    "preview": "[tox]\nenvlist = py38, py39, py310, py311, py312\n\n[testenv]\ndeps =\n  -rtest-requirements.txt\n  -rrequirements.txt\npassenv"
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the sammchardy/python-binance GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 109 files (1.6 MB), approximately 381.7k tokens, and a symbol index with 3068 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!