MCPcopy Create free account

hub / github.com/binance/binance-connector-python / functions

Functions17,815 in github.com/binance/binance-connector-python

↓ 3,334 callersMethodmodel_validate
(cls, data)
common/tests/unit/test_websocket.py:1249
↓ 2,421 callersMethoddata
Lazily retrieves the response data. :return: The parsed data of type T.
common/src/binance_common/models.py:49
↓ 1,653 callersMethodinfo
(self, *message)
common/src/binance_common/logger.py:56
↓ 1,401 callersFunctionis_one_of_model
Checks if the given model class is a one-of model. Args: model_cls (Type[BaseModel]): The model class to check. Returns: bool
common/src/binance_common/utils.py:204
↓ 891 callersMethoderror
(self, *message)
common/src/binance_common/logger.py:64
↓ 750 callersFunctionsend_request
Sends an HTTP request with the specified configuration, method, path, and optional payload and time unit. The `send_request` function is resp
common/src/binance_common/utils.py:341
↓ 409 callersFunctionnormalize_query_values
Normalizes the values in a parsed query dictionary. Args: parsed (dict): The parsed query dictionary with string values. expected
common/src/binance_common/utils.py:708
↓ 406 callersFunctionsnake_to_camel
Converts a snake_case string to camelCase. Args: snake_str (str): The snake_case string to convert. Returns: str: The convert
common/src/binance_common/utils.py:128
↓ 212 callersMethodfrom_dict
Create an instance of AlgoUpdate from a dict
clients/derivatives_trading_portfolio_margin/src/binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/algo_update.py:93
↓ 179 callersMethodfrom_dict
Create an instance of Ticker24hrResponse2 from a dict
clients/derivatives_trading_usds_futures/src/binance_sdk_derivatives_trading_usds_futures/rest_api/models/basis_response.py:79
↓ 171 callersFunctionparse_ws_rate_limit_headers
Parses WebSocket API rate limit headers from the response headers. Args: headers (List[Dict[str, Union[str, int]]]): A list of dictionari
common/src/binance_common/utils.py:691
↓ 147 callersMethodcreate_connection
(self)
common/src/binance_common/websocket.py:767
↓ 133 callersFunctionws_streams_placeholder
Replaces placeholders in the stream string with values from the params dictionary. Args: stream (str): The stream string with placeholder
common/src/binance_common/utils.py:649
↓ 126 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/derivatives_trading_portfolio_margin/tests/unit/rest_api/test_trade_api.py:374
↓ 122 callersMethodfrom_dict
Create an instance of Ticker24hrResponse2 from a dict
clients/derivatives_trading_coin_futures/src/binance_sdk_derivatives_trading_coin_futures/rest_api/models/basis_response.py:79
↓ 107 callersMethodfrom_dict
Create an instance of Liststatus from a dict
clients/margin_trading/src/binance_sdk_margin_trading/websocket_streams/models/liststatus.py:114
↓ 94 callersMethodfrom_dict
Create an instance of RateLimits from a dict
clients/spot/src/binance_sdk_spot/rest_api/models/rate_limits.py:103
↓ 91 callersMethodfrom_dict
Create an instance of TransferToMasterResponse from a dict
clients/sub_account/src/binance_sdk_sub_account/rest_api/models/transfer_to_master_response.py:88
↓ 90 callersMethodfrom_dict
Create an instance of DustlogResponse from a dict
clients/wallet/src/binance_sdk_wallet/rest_api/models/dustlog_response.py:101
↓ 84 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/derivatives_trading_portfolio_margin/tests/unit/rest_api/test_account_api.py:162
↓ 83 callersMethodfrom_dict
Create an instance of RedeemRwusdResponse from a dict
clients/simple_earn/src/binance_sdk_simple_earn/rest_api/models/redeem_rwusd_response.py:96
↓ 77 callersFunctionRequestStream
Decorator to create a request stream for a specific stream. Args: websocket_base (WebSocketStreamBase or WebSocketAPIBase): WebSocket bas
common/src/binance_common/websocket.py:1091
↓ 76 callersMethodfrom_dict
Create an instance of GreekUpdate from a dict
clients/derivatives_trading_options/src/binance_sdk_derivatives_trading_options/websocket_streams/models/greek_update.py:96
↓ 75 callersMethodfrom_dict
Create an instance of WrapBethResponse from a dict
clients/staking/src/binance_sdk_staking/rest_api/models/wrap_beth_response.py:90
↓ 70 callersMethodclose_connection
Closes the WebSocket connection and optionally the session. Args: connection (WebSocketConnection, optional): The WebSocket conne
clients/spot/src/binance_sdk_spot/websocket_api/websocket_api.py:320
↓ 64 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/derivatives_trading_usds_futures/tests/unit/rest_api/test_trade_api.py:214
↓ 63 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/derivatives_trading_usds_futures/tests/unit/rest_api/test_market_data_api.py:171
↓ 52 callersMethodfrom_dict
Create an instance of GetQuoteResponse from a dict
clients/w3w_prediction/src/binance_sdk_w3w_prediction/rest_api/models/get_quote_response.py:158
↓ 52 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/margin_trading/tests/unit/rest_api/test_trade_api.py:96
↓ 48 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/simple_earn/tests/unit/rest_api/test_flexible_locked_api.py:68
↓ 48 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/derivatives_trading_coin_futures/tests/unit/rest_api/test_market_data_api.py:155
↓ 47 callersMethodfrom_dict
Create an instance of Risklevelchange from a dict
clients/derivatives_trading_portfolio_margin_pro/src/binance_sdk_derivatives_trading_portfolio_margin_pro/websocket_streams/models/risklevelchange.py:89
↓ 46 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/sub_account/tests/unit/rest_api/test_asset_management_api.py:94
↓ 44 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/derivatives_trading_coin_futures/tests/unit/rest_api/test_trade_api.py:153
↓ 42 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/derivatives_trading_usds_futures/tests/unit/rest_api/test_account_api.py:99
↓ 40 callersMethodon
Registers a callback function for a specific WebSocket event. Args: event (str): The event type to listen for (e.g., 'message', '
clients/derivatives_trading_usds_futures/src/binance_sdk_derivatives_trading_usds_futures/websocket_streams/websocket_streams.py:81
↓ 40 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/derivatives_trading_portfolio_margin_pro/tests/unit/rest_api/test_account_api.py:96
↓ 38 callersMethodclose_connection
Closes the WebSocket connection and optionally the session. Args: connection (WebSocketConnection, optional): The WebSocket conne
clients/derivatives_trading_usds_futures/src/binance_sdk_derivatives_trading_usds_futures/websocket_api/websocket_api.py:159
↓ 38 callersMethodon
Registers a callback function for a specific WebSocket event. Args: event (str): The event type to listen for (e.g., 'message', '
clients/derivatives_trading_coin_futures/src/binance_sdk_derivatives_trading_coin_futures/websocket_streams/websocket_streams.py:79
↓ 37 callersMethodget_signer
Automatically detects the key type (RSA or Ed25519) and returns the appropriate signer. Raises ValueError if the key is not supported
common/src/binance_common/signature.py:70
↓ 37 callersMethodis_array
(cls)
clients/spot/src/binance_sdk_spot/websocket_api/models/rate_limits.py:65
↓ 35 callersMethodfrom_dict
Create an instance of FlexibleLoanRepayResponse from a dict
clients/crypto_loan/src/binance_sdk_crypto_loan/rest_api/models/flexible_loan_repay_response.py:104
↓ 33 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/wallet/tests/unit/rest_api/test_asset_api.py:59
↓ 32 callersMethodon
Registers a callback function for a specific WebSocket event. Args: event (str): The event type to listen for (e.g., 'message', '
clients/spot/src/binance_sdk_spot/websocket_streams/websocket_streams.py:87
↓ 31 callersMethodsend_signed_message
Sends a signed message to the WebSocket server. Args: payload (Dict): The message payload to send. signer (Optional[S
clients/spot/src/binance_sdk_spot/websocket_api/websocket_api.py:286
↓ 30 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/spot/tests/unit/rest_api/test_market_api.py:71
↓ 30 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/spot/tests/unit/rest_api/test_trade_api.py:168
↓ 29 callersMethodclose_connection
Closes the WebSocket connection and optionally the session. Args: connection (WebSocketConnection, optional): The WebSocket conne
clients/derivatives_trading_coin_futures/src/binance_sdk_derivatives_trading_coin_futures/websocket_api/websocket_api.py:144
↓ 28 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/spot/tests/unit/rest_api/test_account_api.py:55
↓ 27 callersMethodfrom_dict
Create an instance of VipLoanRepayResponse from a dict
clients/vip_loan/src/binance_sdk_vip_loan/rest_api/models/vip_loan_repay_response.py:106
↓ 27 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/wallet/tests/unit/rest_api/test_travel_rule_api.py:52
↓ 26 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/derivatives_trading_coin_futures/tests/unit/rest_api/test_account_api.py:75
↓ 26 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/derivatives_trading_options/tests/unit/rest_api/test_trade_api.py:90
↓ 25 callersMethodfrom_dict
Create an instance of AccountListResponse from a dict
clients/mining/src/binance_sdk_mining/rest_api/models/account_list_response.py:100
↓ 24 callersMethodsend_message
Sends a message to the WebSocket server. Args: payload (Dict): The message payload to send. promised (bool): Whether
clients/spot/src/binance_sdk_spot/websocket_api/websocket_api.py:260
↓ 24 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/mining/tests/unit/rest_api/test_mining_api.py:49
↓ 24 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/crypto_loan/tests/unit/rest_api/test_flexible_rate_api.py:58
↓ 24 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/staking/tests/unit/rest_api/test_on_chain_yields_api.py:68
↓ 23 callersMethodfrom_dict
Create an instance of QuerySubOrdersSpotAlgoResponse from a dict
clients/algo/src/binance_sdk_algo/rest_api/models/query_sub_orders_spot_algo_response.py:108
↓ 22 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/sub_account/tests/unit/rest_api/test_managed_sub_account_api.py:69
↓ 22 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/staking/tests/unit/rest_api/test_sol_staking_api.py:47
↓ 22 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/staking/tests/unit/rest_api/test_eth_staking_api.py:47
↓ 22 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/margin_trading/tests/unit/rest_api/test_account_api.py:63
↓ 21 callersMethodsend_message
Send a message to the WebSocket server. Args: payload (Dict): Payload to send. connection (WebSocketConnection): WebS
common/src/binance_common/websocket.py:316
↓ 21 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/margin_trading/tests/unit/rest_api/test_market_data_api.py:61
↓ 21 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/derivatives_trading_options/tests/unit/rest_api/test_market_data_api.py:64
↓ 20 callersMethodon
Registers a callback function for a specific WebSocket event. Args: event (str): The event type to listen for (e.g., 'message', '
clients/derivatives_trading_options/src/binance_sdk_derivatives_trading_options/websocket_streams/websocket_streams.py:81
↓ 20 callersMethodunsubscribe
Unsubscribes from the specified WebSocket streams. Args: streams (list): A list of WebSocket streams to unsubscribe from.
clients/derivatives_trading_usds_futures/src/binance_sdk_derivatives_trading_usds_futures/websocket_streams/websocket_streams.py:72
↓ 19 callersMethodfrom_dict
Create an instance of AcceptQuoteResponse from a dict
clients/convert/src/binance_sdk_convert/rest_api/models/accept_quote_response.py:90
↓ 19 callersMethodunsubscribe
Unsubscribes from the specified WebSocket streams. Args: streams (list): A list of WebSocket streams to unsubscribe from.
clients/derivatives_trading_coin_futures/src/binance_sdk_derivatives_trading_coin_futures/websocket_streams/websocket_streams.py:70
↓ 18 callersMethodis_array
(cls)
clients/derivatives_trading_usds_futures/src/binance_sdk_derivatives_trading_usds_futures/rest_api/models/basis_response.py:51
↓ 17 callersMethodunsubscribe
Unsubscribes from the specified WebSocket streams. Args: streams (list): A list of WebSocket streams to unsubscribe from.
clients/spot/src/binance_sdk_spot/websocket_streams/websocket_streams.py:78
↓ 16 callersMethodavg_price
Current average price Current average price for a symbol. Weight: 2 Args:
clients/spot/src/binance_sdk_spot/rest_api/rest_api.py:866
↓ 16 callersFunctionmake_serializable
Converts a value to a serializable format. Args: val: The value to convert. Returns: The converted value, which can be a dict
common/src/binance_common/utils.py:141
↓ 16 callersMethodmodify_order
Modify Order (TRADE) PUT /fapi/v1/order https://developers.binance.com/docs/derivatives/usds-margined
clients/derivatives_trading_usds_futures/src/binance_sdk_derivatives_trading_usds_futures/rest_api/api/trade_api.py:1172
↓ 16 callersMethodnew_algo_order
New Algo Order(TRADE) POST /fapi/v1/algoOrder https://developers.binance.com/docs/derivatives/usds-ma
clients/derivatives_trading_usds_futures/src/binance_sdk_derivatives_trading_usds_futures/rest_api/api/trade_api.py:1262
↓ 16 callersMethodorder_cancel_replace
Cancel an Existing Order and Send a New Order * Cancels an existing order and places a new order on the same symbol.
clients/spot/src/binance_sdk_spot/rest_api/rest_api.py:1584
↓ 16 callersMethodreference_price
Query Reference Price Weight: 2 Args: symbol (Union[str, None]): Retu
clients/spot/src/binance_sdk_spot/rest_api/rest_api.py:1038
↓ 16 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/wallet/tests/unit/rest_api/test_capital_api.py:47
↓ 16 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/sub_account/tests/unit/rest_api/test_account_management_api.py:54
↓ 16 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/simple_earn/tests/unit/rest_api/test_rwusd_api.py:44
↓ 16 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/simple_earn/tests/unit/rest_api/test_bfusd_api.py:44
↓ 16 callersFunctionshould_retry_request
Determines whether a request should be retried based on the error. :param error: The error object to check. :param method: The HTTP method of
common/src/binance_common/utils.py:314
↓ 16 callersMethodsor_order_test
Test new order using SOR Test new order creation and signature/recvWindow using smart order routing (SOR). C
clients/spot/src/binance_sdk_spot/rest_api/rest_api.py:2655
↓ 14 callersFunctionclean_none_value
Removes any `None` values from the input dictionary `d` and returns a new dictionary with only non-`None` values. Args: d (dict): The
common/src/binance_common/utils.py:83
↓ 14 callersMethodmodify_order
Modify Order (TRADE) PUT /dapi/v1/order https://developers.binance.com/docs/derivatives/coin-margined
clients/derivatives_trading_coin_futures/src/binance_sdk_derivatives_trading_coin_futures/rest_api/api/trade_api.py:908
↓ 14 callersMethodnew_order
New Order(TRADE) POST /fapi/v1/order https://developers.binance.com/docs/derivatives/usds-margined-fu
clients/derivatives_trading_usds_futures/src/binance_sdk_derivatives_trading_usds_futures/rest_api/api/trade_api.py:1416
↓ 14 callersMethodnew_order
New Order (TRADE) POST /dapi/v1/order https://developers.binance.com/docs/derivatives/coin-margined-f
clients/derivatives_trading_coin_futures/src/binance_sdk_derivatives_trading_coin_futures/rest_api/api/trade_api.py:988
↓ 14 callersMethodorder_test
Test new order Test new order creation and signature/recvWindow long. Creates and validates a new order but
clients/spot/src/binance_sdk_spot/rest_api/rest_api.py:2498
↓ 14 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/wallet/tests/unit/rest_api/test_account_api.py:43
↓ 14 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/convert/tests/unit/rest_api/test_trade_api.py:43
↓ 14 callersMethodset_mock_response
Helper method to setup mock response for the client's session request.
clients/derivatives_trading_options/tests/unit/rest_api/test_market_maker_block_trade_api.py:59
↓ 14 callersMethodticker
Rolling window price change statistics Weight: 4 for each requested <tt>symbol</tt> regardless of <tt>windowSize</tt>. <br/
clients/spot/src/binance_sdk_spot/rest_api/rest_api.py:1086
↓ 14 callersMethodtime
Check server time Test connectivity to the Rest API and get the current server time. Weight: 1
clients/spot/src/binance_sdk_spot/rest_api/rest_api.py:814
↓ 13 callersMethodfrom_dict
Create an instance of FetchTokenLimitResponse from a dict
clients/gift_card/src/binance_sdk_gift_card/rest_api/models/fetch_token_limit_response.py:101
↓ 13 callersMethodis_array
(cls)
clients/spot/src/binance_sdk_spot/rest_api/models/rate_limits.py:65
↓ 13 callersMethodmargin_account_new_oto
Margin Account New OTO (TRADE) POST /sapi/v1/margin/order/oto https://developers.binance.com/docs/mar
clients/margin_trading/src/binance_sdk_margin_trading/rest_api/api/trade_api.py:809
↓ 12 callersFunctionhmac_hashing
Generates an HMAC-SHA256 hash of the provided payload using the given API secret. Args: api_secret (str): The API secret to use for the H
common/src/binance_common/utils.py:68
↓ 12 callersMethodklines
Kline/Candlestick data Kline/candlestick bars for a symbol. Klines are uniquely identified by their open tim
clients/spot/src/binance_sdk_spot/rest_api/rest_api.py:1002
↓ 12 callersMethodmargin_account_new_otoco
Margin Account New OTOCO (TRADE) POST /sapi/v1/margin/order/otoco https://developers.binance.com/docs
clients/margin_trading/src/binance_sdk_margin_trading/rest_api/api/trade_api.py:972
next →1–100 of 17,815, ranked by callers