### Install BingX Python SDK Source: https://github.com/ccxt/bingx-python/blob/main/build/templates/README.md Install the BingX Python SDK using pip. ```bash pip install __PYTHON_PACKAGE_NAME__ ``` -------------------------------- ### Public POST Request Example Source: https://github.com/ccxt/bingx-python/blob/main/README.md Demonstrates how to construct and send a custom public POST request to an implicit endpoint. Requires 'coin', 'tf', 'since', and 'until' variables to be defined. ```Python request = { 'type': 'candleSnapshot', 'req': { 'coin': coin, 'interval': tf, 'startTime': since, 'endTime': until, }, } response = await instance.public_post_info(request) ``` -------------------------------- ### user_auth_private_post_userdatastream Source: https://github.com/ccxt/bingx-python/blob/main/README.md Starts a user data stream (v1, private). ```APIDOC ## POST /user_auth/v1/private/userdatastream ### Description Starts a user data stream. ### Method POST ### Endpoint /user_auth/v1/private/userdatastream ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### Fetch Order Book (Async) Source: https://github.com/ccxt/bingx-python/blob/main/README.md Shows how to fetch an order book asynchronously using the BingxAsync client. Remember to close the instance when done. ```Python import sys import asyncio from bingx import BingxAsync ### on Windows, uncomment below: # if sys.platform == 'win32': # asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) async def main(): instance = BingxAsync({}) ob = await instance.fetch_order_book("BTC/USDC") print(ob) # # balance = await instance.fetch_balance() # order = await instance.create_order("BTC/USDC", "limit", "buy", 1, 100000) # once you are done with the exchange await instance.close() asyncio.run(main()) ``` -------------------------------- ### Fetch Order Book (Async) Source: https://github.com/ccxt/bingx-python/blob/main/build/templates/README.md Use the asynchronous client to fetch the order book for a given symbol. Ensure to close the instance when done. ```python import sys import asyncio from __exchangeName__ import __ExchangeName__Async ### on Windows, uncomment below: # if sys.platform == 'win32': # asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) async def main(): instance = __ExchangeName__Async({}) ob = await instance.fetch_order_book("__EXAMPLE_SYMBOL__") print(ob) # # balance = await instance.fetch_balance() # order = await instance.create_order("__EXAMPLE_SYMBOL__", "limit", "buy", 1, 100000) # once you are done with the exchange await instance.close() asyncio.run(main()) ``` -------------------------------- ### Account Settings Source: https://github.com/ccxt/bingx-python/blob/main/README.md Methods for configuring account settings like leverage and position mode. ```APIDOC ## Set Leverage ### Description Sets the leverage for a given symbol. ### Method `set_leverage(self, leverage: int, symbol: Str = None, params={})` ## Set Margin Mode ### Description Sets the margin mode for a given symbol. ### Method `set_margin_mode(self, marginMode: str, symbol: Str = None, params={})` ## Set Position Mode ### Description Sets the position mode (e.g., hedged) for a given symbol. ### Method `set_position_mode(self, hedged: bool, symbol: Str = None, params={})` ## Set Sandbox Mode ### Description Enables or disables sandbox mode. ### Method `set_sandbox_mode(self, enable: bool)` ``` -------------------------------- ### wallets_v1_private_get_capital_config_getall Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves all capital configuration for wallets (v1, private). ```APIDOC ## GET /wallets/v1/private/capital/config/getall ### Description Retrieves all capital configuration for wallets. ### Method GET ### Endpoint /wallets/v1/private/capital/config/getall ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### copytrading_v1_private_post_swap_trace_settpsl Source: https://github.com/ccxt/bingx-python/blob/main/README.md Sets take profit/stop loss for swap trace copy trading (v1, private). ```APIDOC ## POST /copytrading/v1/private/swap/trace/settpsl ### Description Sets take profit/stop loss for swap trace copy trading. ### Method POST ### Endpoint /copytrading/v1/private/swap/trace/settpsl ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### Fetch Order Book (Sync) Source: https://github.com/ccxt/bingx-python/blob/main/build/templates/README.md Use the synchronous client to fetch the order book for a given symbol. ```python from __exchangeName__ import __ExchangeName__Sync def main(): instance = __ExchangeName__Sync({}) ob = instance.fetch_order_book("__EXAMPLE_SYMBOL__") print(ob) # # balance = instance.fetch_balance() # order = instance.create_order("__EXAMPLE_SYMBOL__", "limit", "buy", 1, 100000) main() ``` -------------------------------- ### spot_v3_private_post_post_asset_transfer Source: https://github.com/ccxt/bingx-python/blob/main/README.md Initiates an asset transfer (v3). ```APIDOC ## POST /spot/v3/private/post_asset_transfer ### Description Initiates an asset transfer (v3). ### Method POST ### Endpoint /spot/v3/private/post_asset_transfer ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ### Request Body - **fromAccount** (string) - Required - The source account. - **toAccount** (string) - Required - The destination account. - **asset** (string) - Required - The asset to transfer. - **amount** (string) - Required - The amount to transfer. ``` -------------------------------- ### Account and Balance Source: https://github.com/ccxt/bingx-python/blob/main/README.md Methods for fetching account balance, deposits, withdrawals, and fees. ```APIDOC ## Fetch Balance ### Description Fetches the account balance. ### Method `fetch_balance(self, params={})` ## Fetch Deposit Address ### Description Fetches the deposit address for a given currency code. ### Method `fetch_deposit_address(self, code: str, params={})` ## Fetch Deposit Addresses By Network ### Description Fetches deposit addresses for a given currency code across different networks. ### Method `fetch_deposit_addresses_by_network(self, code: str, params={})` ## Fetch Deposit Withdraw Fees ### Description Fetches deposit and withdrawal fees for specified currencies. ### Method `fetch_deposit_withdraw_fees(self, codes: Strings = None, params={})` ## Fetch Deposits ### Description Fetches a list of deposits for a given currency code. ### Method `fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={})` ## Fetch Withdrawals ### Description Fetches a list of withdrawals for a given currency code. ### Method `fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={})` ## Add Margin ### Description Adds margin to a trading position. ### Method `add_margin(self, symbol: str, amount: float, params={})` ## Reduce Margin ### Description Reduces margin from a trading position. ### Method `reduce_margin(self, symbol: str, amount: float, params={})` ## Set Margin ### Description Sets the margin for a trading position. ### Method `set_margin(self, symbol: str, amount: float, params={})` ## Transfer Funds ### Description Transfers funds between accounts. ### Method `transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={})` ## Withdraw Funds ### Description Withdraws funds to a specified address. ### Method `withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={})` ``` -------------------------------- ### Watch Order Book (Websockets) Source: https://github.com/ccxt/bingx-python/blob/main/build/templates/README.md Use the WebSocket client to continuously watch the order book for a given symbol. Ensure to close the instance when done. ```python import sys from __exchangeName__ import __ExchangeName__Ws ### on Windows, uncomment below: # if sys.platform == 'win32': # asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) async def main(): instance = __ExchangeName__Ws({}) while True: ob = await instance.watch_order_book("__EXAMPLE_SYMBOL__") print(ob) # orders = await instance.watch_orders("__EXAMPLE_SYMBOL__") # once you are done with the exchange await instance.close() asyncio.run(main()) ``` -------------------------------- ### swap_v1_private_post_trade_getvst Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves VST for trades on the swap market (v1). ```APIDOC ## POST /swap/v1/private/trade/getvst ### Description Retrieves VST for trades on the swap market (v1). ### Method POST ### Endpoint /swap/v1/private/trade/getvst ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v2_private_post_trade_getvst Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves VST for trades on the swap market (v2). ```APIDOC ## POST /swap/v2/private/trade/getvst ### Description Retrieves VST for trades on the swap market (v2). ### Method POST ### Endpoint /swap/v2/private/trade/getvst ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v1_public_get_tradingrules Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves trading rules for the swap market (v1). ```APIDOC ## GET /swap/v1/public/tradingrules ### Description Retrieves trading rules for the swap market (v1). ### Method GET ### Endpoint /swap/v1/public/tradingrules ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### copytrading_v1_private_get_spot_profithistorysummarys Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves profit history summary for spot copy trading (v1, private). ```APIDOC ## GET /copytrading/v1/private/spot/profithistorysummarys ### Description Retrieves profit history summary for spot copy trading. ### Method GET ### Endpoint /copytrading/v1/private/spot/profithistorysummarys ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### wallets_v1_private_post_capital_deposit_createsubaddress Source: https://github.com/ccxt/bingx-python/blob/main/README.md Creates a sub-address for deposit for capital (v1, private). ```APIDOC ## POST /wallets/v1/private/capital/deposit/createsubaddress ### Description Creates a sub-address for deposit for capital. ### Method POST ### Endpoint /wallets/v1/private/capital/deposit/createsubaddress ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### swap_v1_public_get_trade_multiassetsrules Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves multi-asset mode rules for trading on the swap market (v1). ```APIDOC ## GET /swap/v1/public/trade/multiassetsrules ### Description Retrieves multi-asset mode rules for trading on the swap market (v1). ### Method GET ### Endpoint /swap/v1/public/trade/multiassetsrules ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### subaccount_v1_private_post_apikey_create Source: https://github.com/ccxt/bingx-python/blob/main/README.md Creates an API key for a sub-account (v1, private). ```APIDOC ## POST /subaccount/v1/private/apikey/create ### Description Creates an API key for a sub-account. ### Method POST ### Endpoint /subaccount/v1/private/apikey/create ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### spot_v1_private_get_oco_openorderlist Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves a list of open OCO orders for the authenticated user on the spot market. ```APIDOC ## GET /spot/v1/private/oco/openorderlist ### Description Retrieves a list of open OCO orders for the authenticated user on the spot market. ### Method GET ### Endpoint /spot/v1/private/oco/openorderlist ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### Utilities Source: https://github.com/ccxt/bingx-python/blob/main/README.md Utility methods for encoding, describing the exchange, and generating nonces. ```APIDOC ## Custom Encode ### Description Encodes custom parameters. ### Method `custom_encode(self, params)` ## Describe Exchange ### Description Describes the exchange's capabilities and configuration. ### Method `describe(self)` ## Generate Nonce ### Description Generates a nonce value. ### Method `nonce(self)` ``` -------------------------------- ### copytrading_v1_private_get_pfutures_profithistorysummarys Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves profit history summary for perpetual futures copy trading (v1, private). ```APIDOC ## GET /copytrading/v1/private/pfutures/profithistorysummarys ### Description Retrieves profit history summary for perpetual futures copy trading. ### Method GET ### Endpoint /copytrading/v1/private/pfutures/profithistorysummarys ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### swap_v1_private_get_maintmarginratio Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves the maintenance margin ratio for the authenticated user on the swap market (v1). ```APIDOC ## GET /swap/v1/private/maintmarginratio ### Description Retrieves the maintenance margin ratio for the authenticated user on the swap market (v1). ### Method GET ### Endpoint /swap/v1/private/maintmarginratio ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v2_private_get_trade_leverage Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves the leverage settings for the authenticated user on the swap market (v2). ```APIDOC ## GET /swap/v2/private/trade/leverage ### Description Retrieves the leverage settings for the authenticated user on the swap market (v2). ### Method GET ### Endpoint /swap/v2/private/trade/leverage ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### spot_v1_private_post_trade_batchorders Source: https://github.com/ccxt/bingx-python/blob/main/README.md Places multiple trade orders simultaneously on the spot market. ```APIDOC ## POST /spot/v1/private/trade/batchorders ### Description Places multiple trade orders simultaneously on the spot market. ### Method POST ### Endpoint /spot/v1/private/trade/batchorders ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ### Request Body - **orders** (array) - Required - An array of order objects, each with symbol, side, type, quantity, and price. ``` -------------------------------- ### copytrading_v1_private_get_swap_trace_currenttrack Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves current tracking for swap copy trading (v1, private). ```APIDOC ## GET /copytrading/v1/private/swap/trace/currenttrack ### Description Retrieves current tracking for swap copy trading. ### Method GET ### Endpoint /copytrading/v1/private/swap/trace/currenttrack ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### swap_v2_private_post_trade_batchorders Source: https://github.com/ccxt/bingx-python/blob/main/README.md Places multiple trade orders simultaneously on the swap market (v2). ```APIDOC ## POST /swap/v2/private/trade/batchorders ### Description Places multiple trade orders simultaneously on the swap market (v2). ### Method POST ### Endpoint /swap/v2/private/trade/batchorders ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ### Request Body - **orders** (array) - Required - An array of order objects, each with symbol, side, type, quantity, and price. ``` -------------------------------- ### swap_v1_private_get_positionside_dual Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves dual-position side settings for the authenticated user on the swap market (v1). ```APIDOC ## GET /swap/v1/private/positionside/dual ### Description Retrieves dual-position side settings for the authenticated user on the swap market (v1). ### Method GET ### Endpoint /swap/v1/private/positionside/dual ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v2_private_get_trade_openorders Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves a list of open orders for the authenticated user on the swap market (v2). ```APIDOC ## GET /swap/v2/private/trade/openorders ### Description Retrieves a list of open orders for the authenticated user on the swap market (v2). ### Method GET ### Endpoint /swap/v2/private/trade/openorders ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v2_private_get_trade_forceorders Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves liquidation orders for the authenticated user on the swap market (v2). ```APIDOC ## GET /swap/v2/private/trade/forceorders ### Description Retrieves liquidation orders for the authenticated user on the swap market (v2). ### Method GET ### Endpoint /swap/v2/private/trade/forceorders ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### spot_v3_private_get_capital_withdraw_history Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves withdrawal history for capital management (v3). ```APIDOC ## GET /spot/v3/private/capital/withdraw/history ### Description Retrieves withdrawal history for capital management (v3). ### Method GET ### Endpoint /spot/v3/private/capital/withdraw/history ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### spot_v1_public_get_server_time Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves the current server time for the spot API. ```APIDOC ## GET /spot/v1/public/server/time ### Description Retrieves the current server time for the spot API. ### Method GET ### Endpoint /spot/v1/public/server/time ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### spot_v1_private_get_trade_openorders Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves a list of open orders for the authenticated user on the spot market. ```APIDOC ## GET /spot/v1/private/trade/openorders ### Description Retrieves a list of open orders for the authenticated user on the spot market. ### Method GET ### Endpoint /spot/v1/private/trade/openorders ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### spot_v1_private_get_account_balance Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves the account balance information for the spot API. ```APIDOC ## GET /spot/v1/private/account/balance ### Description Retrieves the account balance information for the spot API. ### Method GET ### Endpoint /spot/v1/private/account/balance ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### wallets_v1_private_post_capital_withdraw_apply Source: https://github.com/ccxt/bingx-python/blob/main/README.md Applies for withdrawal for capital (v1, private). ```APIDOC ## POST /wallets/v1/private/capital/withdraw/apply ### Description Applies for withdrawal for capital. ### Method POST ### Endpoint /wallets/v1/private/capital/withdraw/apply ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### swap_v2_public_get_quote_bookticker Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves the best bid and ask prices for a given trading symbol on the swap market (v2). ```APIDOC ## GET /swap/v2/public/quote/bookticker ### Description Retrieves the best bid and ask prices for a given trading symbol on the swap market (v2). ### Method GET ### Endpoint /swap/v2/public/quote/bookticker ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v2_private_get_user_income_export Source: https://github.com/ccxt/bingx-python/blob/main/README.md Initiates an export of income history for the authenticated user on the swap market (v2). ```APIDOC ## GET /swap/v2/private/user/income/export ### Description Initiates an export of income history for the authenticated user on the swap market (v2). ### Method GET ### Endpoint /swap/v2/private/user/income/export ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### subaccount_v1_private_post_create Source: https://github.com/ccxt/bingx-python/blob/main/README.md Creates a sub-account (v1, private). ```APIDOC ## POST /subaccount/v1/private/create ### Description Creates a sub-account. ### Method POST ### Endpoint /subaccount/v1/private/create ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### swap_v2_private_get_trade_allfillorders Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves all filled orders for the authenticated user on the swap market (v2). ```APIDOC ## GET /swap/v2/private/trade/allfillorders ### Description Retrieves all filled orders for the authenticated user on the swap market (v2). ### Method GET ### Endpoint /swap/v2/private/trade/allfillorders ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### copytrading_v1_private_get_spot_historyorder Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves order history for spot copy trading (v1, private). ```APIDOC ## GET /copytrading/v1/private/spot/historyorder ### Description Retrieves order history for spot copy trading. ### Method GET ### Endpoint /copytrading/v1/private/spot/historyorder ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### swap_v1_private_get_user_marginassets Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves margin assets for the authenticated user on the swap market (v1). ```APIDOC ## GET /swap/v1/private/user/marginassets ### Description Retrieves margin assets for the authenticated user on the swap market (v1). ### Method GET ### Endpoint /swap/v1/private/user/marginassets ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### wallets_v1_private_post_capital_innertransfer_apply Source: https://github.com/ccxt/bingx-python/blob/main/README.md Applies for inner transfer for capital (v1, private). ```APIDOC ## POST /wallets/v1/private/capital/innertransfer/apply ### Description Applies for inner transfer for capital. ### Method POST ### Endpoint /wallets/v1/private/capital/innertransfer/apply ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### account_v1_private_get_apikey_query Source: https://github.com/ccxt/bingx-python/blob/main/README.md Queries API key information (v1, private). ```APIDOC ## GET /account/v1/private/apikey/query ### Description Queries API key information. ### Method GET ### Endpoint /account/v1/private/apikey/query ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### swap_v2_private_post_trade_leverage Source: https://github.com/ccxt/bingx-python/blob/main/README.md Sets the leverage for the authenticated user on the swap market (v2). ```APIDOC ## POST /swap/v2/private/trade/leverage ### Description Sets the leverage for the authenticated user on the swap market (v2). ### Method POST ### Endpoint /swap/v2/private/trade/leverage ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ### Request Body - **symbol** (string) - Required - The trading symbol. - **leverage** (integer) - Required - The leverage amount. ``` -------------------------------- ### spot_v1_public_get_ticker_bookticker Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves the best bid and ask prices for a given trading symbol on the spot market. ```APIDOC ## GET /spot/v1/public/ticker/bookticker ### Description Retrieves the best bid and ask prices for a given trading symbol on the spot market. ### Method GET ### Endpoint /spot/v1/public/ticker/bookticker ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### spot_v3_private_get_get_asset_transfer Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves asset transfer history (v3). ```APIDOC ## GET /spot/v3/private/get_asset_transfer ### Description Retrieves asset transfer history (v3). ### Method GET ### Endpoint /spot/v3/private/get_asset_transfer ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### Order Management Source: https://github.com/ccxt/bingx-python/blob/main/README.md Methods for creating, managing, and canceling orders on BingX. ```APIDOC ## Create Market Buy Order with Cost ### Description Creates a market buy order with a specified cost. ### Method `create_market_buy_order_with_cost(self, symbol: str, cost: float, params={})` ## Create Market Order with Cost ### Description Creates a market order with a specified cost and side. ### Method `create_market_order_with_cost(self, symbol: str, side: OrderSide, cost: float, params={})` ## Create Market Sell Order with Cost ### Description Creates a market sell order with a specified cost. ### Method `create_market_sell_order_with_cost(self, symbol: str, cost: float, params={})` ## Create Order Request ### Description Creates a general order request with specified parameters. ### Method `create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={})` ## Create Order ### Description Creates a new order. ### Method `create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={})` ## Create Orders ### Description Creates multiple orders at once. ### Method `create_orders(self, orders: List[OrderRequest], params={})` ## Fetch Canceled and Closed Orders ### Description Fetches a list of canceled and closed orders for a given symbol. ### Method `fetch_canceled_and_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})` ## Fetch Canceled Orders ### Description Fetches a list of canceled orders for a given symbol. ### Method `fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})` ## Fetch Closed Orders ### Description Fetches a list of closed orders for a given symbol. ### Method `fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})` ## Fetch Open Orders ### Description Fetches a list of open orders for a given symbol. ### Method `fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})` ## Fetch Orders ### Description Fetches a list of orders for a given symbol. ### Method `fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})` ## Cancel All Orders After Timeout ### Description Cancels all orders after a specified timeout. ### Method `cancel_all_orders_after(self, timeout: Int, params={})` ## Cancel All Orders ### Description Cancels all open orders for a given symbol. ### Method `cancel_all_orders(self, symbol: Str = None, params={})` ## Cancel Order ### Description Cancels a specific order by its ID. ### Method `cancel_order(self, id: str, symbol: Str = None, params={})` ## Cancel Orders ### Description Cancels multiple orders by their IDs. ### Method `cancel_orders(self, ids: List[str], symbol: Str = None, params={})` ## Edit Order ### Description Edits an existing order. ### Method `edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={})` ## Close All Positions ### Description Closes all open positions. ### Method `close_all_positions(self, params={})` ## Close Position ### Description Closes a specific open position. ### Method `close_position(self, symbol: str, side: OrderSide = None, params={})` ``` -------------------------------- ### spot_v1_private_get_trade_query Source: https://github.com/ccxt/bingx-python/blob/main/README.md Queries the status of a trade on the spot market. ```APIDOC ## GET /spot/v1/private/trade/query ### Description Queries the status of a trade on the spot market. ### Method GET ### Endpoint /spot/v1/private/trade/query ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v2_public_get_quote_contracts Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves a list of available contracts on the swap market (v2). ```APIDOC ## GET /swap/v2/public/quote/contracts ### Description Retrieves a list of available contracts on the swap market (v2). ### Method GET ### Endpoint /swap/v2/public/quote/contracts ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### cswap_v1_public_get_market_premiumindex Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves premium index information for cross-swaps (v1, public). ```APIDOC ## GET /cswap/v1/public/market/premiumindex ### Description Retrieves premium index information for cross-swaps. ### Method GET ### Endpoint /cswap/v1/public/market/premiumindex ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### wallets_v1_private_get_capital_deposit_riskrecords Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves risk deposit records for capital (v1, private). ```APIDOC ## GET /wallets/v1/private/capital/deposit/riskrecords ### Description Retrieves risk deposit records for capital. ### Method GET ### Endpoint /wallets/v1/private/capital/deposit/riskrecords ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### copytrading_v1_private_get_spot_profitdetail Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves profit details for spot copy trading (v1, private). ```APIDOC ## GET /copytrading/v1/private/spot/profitdetail ### Description Retrieves profit details for spot copy trading. ### Method GET ### Endpoint /copytrading/v1/private/spot/profitdetail ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### copytrading_v1_private_post_spot_trader_sellorder Source: https://github.com/ccxt/bingx-python/blob/main/README.md Places a sell order for spot copy trading (v1, private). ```APIDOC ## POST /copytrading/v1/private/spot/trader/sellorder ### Description Places a sell order for spot copy trading. ### Method POST ### Endpoint /copytrading/v1/private/spot/trader/sellorder ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### spot_v3_private_get_capital_deposit_hisrec Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves deposit history for capital management (v3). ```APIDOC ## GET /spot/v3/private/capital/deposit/hisrec ### Description Retrieves deposit history for capital management (v3). ### Method GET ### Endpoint /spot/v3/private/capital/deposit/hisrec ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### copytrading_v1_private_post_swap_trace_closetrackorder Source: https://github.com/ccxt/bingx-python/blob/main/README.md Closes a tracked order for swap copy trading (v1, private). ```APIDOC ## POST /copytrading/v1/private/swap/trace/closetrackorder ### Description Closes a tracked order for swap copy trading. ### Method POST ### Endpoint /copytrading/v1/private/swap/trace/closetrackorder ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### spot_v1_private_get_oco_historyorderlist Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves a history of OCO orders for the authenticated user on the spot market. ```APIDOC ## GET /spot/v1/private/oco/historyorderlist ### Description Retrieves a history of OCO orders for the authenticated user on the spot market. ### Method GET ### Endpoint /spot/v1/private/oco/historyorderlist ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v1_private_post_trade_autoaddmargin Source: https://github.com/ccxt/bingx-python/blob/main/README.md Enables or disables auto-add margin for a position on the swap market (v1). ```APIDOC ## POST /swap/v1/private/trade/autoaddmargin ### Description Enables or disables auto-add margin for a position on the swap market (v1). ### Method POST ### Endpoint /swap/v1/private/trade/autoaddmargin ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ### Request Body - **symbol** (string) - Required - The trading symbol. - **autoAddMargin** (string) - Required - 'true' to enable, 'false' to disable. ``` -------------------------------- ### swap_v2_public_get_server_time Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves the current server time for the swap API (v2). ```APIDOC ## GET /swap/v2/public/server/time ### Description Retrieves the current server time for the swap API (v2). ### Method GET ### Endpoint /swap/v2/public/server/time ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v2_private_get_quote_bookticker Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves the best bid and ask prices for a given trading symbol on the swap market (v2). ```APIDOC ## GET /swap/v2/private/quote/bookticker ### Description Retrieves the best bid and ask prices for a given trading symbol on the swap market (v2). ### Method GET ### Endpoint /swap/v2/private/quote/bookticker ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### spot_v3_private_get_asset_transfer Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves asset transfer history (v3). ```APIDOC ## GET /spot/v3/private/asset_transfer ### Description Retrieves asset transfer history (v3). ### Method GET ### Endpoint /spot/v3/private/asset_transfer ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### spot_v1_private_post_trade_order Source: https://github.com/ccxt/bingx-python/blob/main/README.md Places a new trade order on the spot market. ```APIDOC ## POST /spot/v1/private/trade/order ### Description Places a new trade order on the spot market. ### Method POST ### Endpoint /spot/v1/private/trade/order ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ### Request Body - **symbol** (string) - Required - The trading symbol. - **side** (string) - Required - The order side (BUY or SELL). - **type** (string) - Required - The order type (e.g., LIMIT, MARKET). - **quantity** (string) - Required - The order quantity. - **price** (string) - Optional - The order price (required for LIMIT orders). - **timeInForce** (string) - Optional - The time in force for the order. ``` -------------------------------- ### spot_v1_private_get_oco_orderlist Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves a list of OCO (One-Cancels-the-Other) orders for the authenticated user on the spot market. ```APIDOC ## GET /spot/v1/private/oco/orderlist ### Description Retrieves a list of OCO (One-Cancels-the-Other) orders for the authenticated user on the spot market. ### Method GET ### Endpoint /spot/v1/private/oco/orderlist ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### cswap_v1_public_get_market_openinterest Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves open interest information for cross-swaps (v1, public). ```APIDOC ## GET /cswap/v1/public/market/openinterest ### Description Retrieves open interest information for cross-swaps. ### Method GET ### Endpoint /cswap/v1/public/market/openinterest ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### copytrading_v1_private_get_spot_traderdetail Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves trader details for spot copy trading (v1, private). ```APIDOC ## GET /copytrading/v1/private/spot/traderdetail ### Description Retrieves trader details for spot copy trading. ### Method GET ### Endpoint /copytrading/v1/private/spot/traderdetail ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### wallets_v1_private_post_capital_subaccountinnertransfer_apply Source: https://github.com/ccxt/bingx-python/blob/main/README.md Applies for sub-account inner transfer for capital (v1, private). ```APIDOC ## POST /wallets/v1/private/capital/subaccountinnertransfer/apply ### Description Applies for sub-account inner transfer for capital. ### Method POST ### Endpoint /wallets/v1/private/capital/subaccountinnertransfer/apply ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### swap_v2_private_get_trade_allorders Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves all orders (open and closed) for the authenticated user on the swap market (v2). ```APIDOC ## GET /swap/v2/private/trade/allorders ### Description Retrieves all orders (open and closed) for the authenticated user on the swap market (v2). ### Method GET ### Endpoint /swap/v2/private/trade/allorders ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v2_private_post_trade_order_test Source: https://github.com/ccxt/bingx-python/blob/main/README.md Tests a new trade order on the swap market (v2) without actually placing it. ```APIDOC ## POST /swap/v2/private/trade/order/test ### Description Tests a new trade order on the swap market (v2) without actually placing it. ### Method POST ### Endpoint /swap/v2/private/trade/order/test ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ### Request Body - **symbol** (string) - Required - The trading symbol. - **side** (string) - Required - The order side (BUY or SELL). - **type** (string) - Required - The order type (e.g., LIMIT, MARKET). - **quantity** (string) - Required - The order quantity. - **price** (string) - Optional - The order price (required for LIMIT orders). - **timeInForce** (string) - Optional - The time in force for the order. ``` -------------------------------- ### api_asset_v1_public_get_transfer_supportcoins Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves supported coins for asset transfer (v1, public). ```APIDOC ## GET /api_asset/v1/public/transfer/supportcoins ### Description Retrieves supported coins for asset transfer. ### Method GET ### Endpoint /api_asset/v1/public/transfer/supportcoins ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### swap_v1_private_get_twap_openorders Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves open TWAP orders for the authenticated user on the swap market (v1). ```APIDOC ## GET /swap/v1/private/twap/openorders ### Description Retrieves open TWAP orders for the authenticated user on the swap market (v1). ### Method GET ### Endpoint /swap/v1/private/twap/openorders ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v2_private_get_trade_fillhistory Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves the fill history for the authenticated user on the swap market (v2). ```APIDOC ## GET /swap/v2/private/trade/fillhistory ### Description Retrieves the fill history for the authenticated user on the swap market (v2). ### Method GET ### Endpoint /swap/v2/private/trade/fillhistory ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### api_v3_private_post_post_asset_transfer Source: https://github.com/ccxt/bingx-python/blob/main/README.md Initiates an asset transfer (v3, private). ```APIDOC ## POST /api/v3/private/post/asset/transfer ### Description Initiates an asset transfer. ### Method POST ### Endpoint /api/v3/private/post/asset/transfer ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### swap_v1_private_get_trade_fullorder Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves details of a full order on the swap market (v1). ```APIDOC ## GET /swap/v1/private/trade/fullorder ### Description Retrieves details of a full order on the swap market (v1). ### Method GET ### Endpoint /swap/v1/private/trade/fullorder ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v3_private_get_user_balance Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves user balance information for swaps (v3, private). ```APIDOC ## GET /swap/v3/private/user/balance ### Description Retrieves user balance information for swaps. ### Method GET ### Endpoint /swap/v3/private/user/balance ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### cswap_v1_public_get_market_depth Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves market depth information for cross-swaps (v1, public). ```APIDOC ## GET /cswap/v1/public/market/depth ### Description Retrieves market depth information for cross-swaps. ### Method GET ### Endpoint /cswap/v1/public/market/depth ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### wallets_v1_private_get_capital_deposit_address Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves deposit address for capital (v1, private). ```APIDOC ## GET /wallets/v1/private/capital/deposit/address ### Description Retrieves deposit address for capital. ### Method GET ### Endpoint /wallets/v1/private/capital/deposit/address ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### spot_v1_private_get_trade_historyorders Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves a history of orders for the authenticated user on the spot market. ```APIDOC ## GET /spot/v1/private/trade/historyorders ### Description Retrieves a history of orders for the authenticated user on the spot market. ### Method GET ### Endpoint /spot/v1/private/trade/historyorders ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ``` -------------------------------- ### swap_v2_private_post_trade_order Source: https://github.com/ccxt/bingx-python/blob/main/README.md Places a new trade order on the swap market (v2). ```APIDOC ## POST /swap/v2/private/trade/order ### Description Places a new trade order on the swap market (v2). ### Method POST ### Endpoint /swap/v2/private/trade/order ### Parameters #### Query Parameters - **request** (object) - Required - Parameters for the request. ### Request Body - **symbol** (string) - Required - The trading symbol. - **side** (string) - Required - The order side (BUY or SELL). - **type** (string) - Required - The order type (e.g., LIMIT, MARKET). - **quantity** (string) - Required - The order quantity. - **price** (string) - Optional - The order price (required for LIMIT orders). - **timeInForce** (string) - Optional - The time in force for the order. ``` -------------------------------- ### agent_v1_private_get_account_inviteaccountlist Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves the invite account list for agents (v1, private). ```APIDOC ## GET /agent/v1/private/account/inviteaccountlist ### Description Retrieves the invite account list for agents. ### Method GET ### Endpoint /agent/v1/private/account/inviteaccountlist ### Parameters #### Request Body - **request** (object) - Required - The request payload. ``` -------------------------------- ### account_transfer_v1_private_post_subaccount_transferasset_supportcoins Source: https://github.com/ccxt/bingx-python/blob/main/README.md Retrieves supported coins for sub-account asset transfer (v1, private). ```APIDOC ## POST /account_transfer/v1/private/subaccount/transferasset/supportcoins ### Description Retrieves supported coins for sub-account asset transfer. ### Method POST ### Endpoint /account_transfer/v1/private/subaccount/transferasset/supportcoins ### Parameters #### Request Body - **request** (object) - Required - The request payload. ```