Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/binance/binance-connector-rust
/ functions
Functions
7,900 in github.com/binance/binance-connector-rust
⨍
Functions
7,900
◇
Types & classes
3,316
↓ 3,930 callers
Method
build
Builds a `ConfigurationRestApi` instance with configured HTTP client and signature generator. # Returns A `Result` containing the fully configured `
src/common/config.rs:175
↓ 2,383 callers
Method
data
Executes the data retrieval function and returns the result. # Returns A `Result` containing the data of type `T` if successful, or a `ConnectorErro
src/common/models.rs:104
↓ 882 callers
Function
init
Initializes the global tracing subscriber with a configured log level and formatting. This function sets up a tracing subscriber with a default log l
src/common/logger.rs:14
↓ 355 callers
Method
on_message
Handles an incoming WebSocket message # Arguments `msg` - The received message as a string `connection` - A shared reference to the WebSocket connec
src/common/websocket.rs:732
↓ 258 callers
Function
replace_websocket_streams_placeholders
Replaces placeholders in a WebSocket stream key with corresponding values from a variables map. # Arguments `input` - The input string containing pl
src/common/utils.rs:1111
↓ 158 callers
Method
connect
Connects to a WebSocket server with a configurable timeout and connection handling. This method attempts to establish a WebSocket connection if not a
src/common/websocket.rs:1533
↓ 147 callers
Method
disconnect
Disconnects the WebSocket connection. # Returns A `Result` indicating whether the disconnection was successful. Returns an error if the disconnectio
src/spot/websocket_api/mod.rs:143
↓ 102 callers
Method
into_iter
(self)
src/common/websocket.rs:1452
↓ 89 callers
Function
remove_empty_value
Removes entries with empty or null values from an iterator of key-value pairs. # Arguments `entries` - An iterator of key-value pairs where keys are
src/common/utils.rs:1031
↓ 80 callers
Function
create_websocket_streams
( ws_url: Option<&str>, conns: Option<Vec<Arc<WebsocketConnection>>>, url_paths: Optio
src/common/websocket.rs:3115
↓ 72 callers
Method
as_str
(&self)
src/spot/websocket_api/apis/trade_api.rs:126
↓ 62 callers
Function
build_user_agent
(product: &str)
src/common/utils.rs:390
↓ 57 callers
Function
make_streams_base
()
src/derivatives_trading_coin_futures/websocket_streams/apis/websocket_market_streams_api.rs:1502
↓ 53 callers
Method
signed
(mut self)
src/common/websocket.rs:1424
↓ 52 callers
Method
send
Sends a WebSocket message and optionally waits for a reply. # Arguments `payload` - The message payload to send `id` - Optional request identifier,
src/common/websocket.rs:1325
↓ 45 callers
Function
make_streams_base
()
src/spot/websocket_streams/apis/web_socket_streams_api.rs:1477
↓ 45 callers
Function
make_streams_base
()
src/derivatives_trading_usds_futures/websocket_streams/apis/market_api.rs:1127
↓ 45 callers
Function
setup
()
src/spot/websocket_api/apis/trade_api.rs:8281
↓ 45 callers
Function
setup
()
src/spot/websocket_api/apis/market_api.rs:2340
↓ 42 callers
Function
setup
()
src/spot/websocket_api/apis/account_api.rs:1326
↓ 36 callers
Method
as_str
(&self)
src/derivatives_trading_usds_futures/websocket_api/apis/trade_api.rs:89
↓ 30 callers
Method
as_str
(&self)
src/spot/websocket_api/apis/market_api.rs:128
↓ 27 callers
Method
set_handler
(&self, handler: Arc<dyn WebsocketHandler>)
src/common/websocket.rs:261
↓ 24 callers
Function
setup
()
src/derivatives_trading_usds_futures/websocket_api/apis/trade_api.rs:1686
↓ 22 callers
Function
create_websocket_api
( time_unit: Option<TimeUnit>, mode: Option<WebsocketMode>, auto_session_relogon: Opti
src/common/websocket.rs:3083
↓ 22 callers
Method
unsubscribe
Unsubscribes from specified WebSocket streams. # Arguments `streams` - A vector of stream names to unsubscribe from `id` - An optional identifier fo
src/derivatives_trading_usds_futures/websocket_streams/mod.rs:210
↓ 21 callers
Method
as_str
(&self)
src/spot/rest_api/apis/trade_api.rs:127
↓ 21 callers
Function
make_config
(server_url: &str)
src/common/utils.rs:2138
↓ 21 callers
Method
unsubscribe
Unsubscribes from specified WebSocket streams. # Arguments `streams` - A vector of stream names to unsubscribe from `id` - An optional identifier fo
src/derivatives_trading_coin_futures/websocket_streams/mod.rs:202
↓ 20 callers
Method
as_str
(&self)
src/spot/websocket_streams/apis/web_socket_streams_api.rs:123
↓ 20 callers
Method
as_str
(&self)
src/derivatives_trading_coin_futures/websocket_api/apis/trade_api.rs:77
↓ 20 callers
Method
handle_stream_assignment
Handles stream assignment by finding or creating WebSocket connections for a list of streams. This method attempts to assign streams to existing WebS
src/common/websocket.rs:2526
↓ 19 callers
Function
build_query_string
Builds a query string from a map of key-value parameters. Converts various JSON `Value` types into URL query string segments, handling: - Strings, bo
src/common/utils.rs:496
↓ 18 callers
Method
get_signature
Generates a signature for the given query parameters using either HMAC-SHA256 or asymmetric key signing. # Arguments `query_params` - A map of query
src/common/utils.rs:241
↓ 17 callers
Method
unsubscribe
Unsubscribes from specified WebSocket streams. # Arguments `streams` - A vector of stream names to unsubscribe from `id` - An optional identifier fo
src/spot/websocket_streams/mod.rs:207
↓ 16 callers
Function
create_websocket_api_and_conn
()
src/common/websocket.rs:6503
↓ 16 callers
Method
init_connect
Initializes a WebSocket connection for a specific connection in the pool # Arguments `url` - The WebSocket server URL to connect to `is_renewal` - F
src/common/websocket.rs:879
↓ 16 callers
Function
mk_map
(pairs: Vec<(&str, Value)>)
src/common/utils.rs:1464
↓ 16 callers
Method
subscribe
Subscribes to WebSocket events and returns a `Subscription` that allows event processing. This method creates an unbounded channel for receiving WebS
src/common/websocket.rs:125
↓ 15 callers
Function
make_streams_base
()
src/derivatives_trading_usds_futures/websocket_streams/apis/public_api.rs:442
↓ 15 callers
Function
make_streams_base
()
src/derivatives_trading_options/websocket_streams/apis/public_api.rs:454
↓ 15 callers
Function
make_streams_base
()
src/derivatives_trading_options/websocket_streams/apis/market_api.rs:419
↓ 15 callers
Function
setup
()
src/derivatives_trading_coin_futures/websocket_api/apis/trade_api.rs:1125
↓ 14 callers
Function
create_connection
( id: &str, has_writer: bool, reconnection_pending: bool, renewal_pending: boo
src/common/websocket.rs:3061
↓ 14 callers
Method
on
Registers a callback function for a specific event on the WebSocket stream. This method currently only supports the "message" event. When a message i
src/common/websocket.rs:2791
↓ 14 callers
Method
unsubscribe
Cancels the ongoing WebSocket event subscription and stops the event processing task. This method aborts the background task responsible for receivin
src/common/websocket.rs:70
↓ 13 callers
Function
build_websocket_api_message
Builds a WebSocket API message with optional authentication and signature generation. # Arguments `configuration` - Configuration for the WebSocket
src/common/utils.rs:1184
↓ 13 callers
Method
emit
Emits a WebSocket event to all registered subscribers. This method sends the given event to all active subscribers. If a subscriber has been dropped
src/common/websocket.rs:154
↓ 13 callers
Method
get_reconnect_url
Retrieves the URL to use for reconnecting to the WebSocket. # Arguments `default_url` - The default URL to use if no custom reconnect URL is provide
src/common/websocket.rs:637
↓ 13 callers
Method
prepare_url
Prepares a WebSocket URL by appending a validated time unit parameter. This method checks if a time unit is configured and validates it. If valid, th
src/common/websocket.rs:1754
↓ 12 callers
Function
setup
()
src/spot/websocket_api/apis/general_api.rs:443
↓ 12 callers
Function
setup
()
src/spot/websocket_api/apis/user_data_stream_api.rs:299
↓ 12 callers
Function
setup
()
src/derivatives_trading_usds_futures/websocket_api/apis/account_api.rs:310
↓ 11 callers
Function
random_string
()
src/common/utils.rs:955
↓ 11 callers
Method
stream_key
Generates a unique key for a stream based on its name and optional URL path. # Arguments `stream` - The name of the stream `url_path` - An optional
src/common/websocket.rs:2445
↓ 11 callers
Method
unsubscribe
Unsubscribes from specified WebSocket streams. # Arguments `streams` - A vector of stream names to unsubscribe from `id` - An optional identifier fo
src/derivatives_trading_options/websocket_streams/mod.rs:212
↓ 10 callers
Function
normalize_stream_id
(id: Option<StreamId>, stream_id_is_strictly_number: bool)
src/common/utils.rs:987
↓ 10 callers
Method
on_open
Handles the WebSocket connection opening event. This method is called when a WebSocket connection is successfully established. It performs the follow
src/common/websocket.rs:675
↓ 9 callers
Method
connect_pool
Connects to a WebSocket URL for all connections in the connection pool concurrently # Arguments `url` - The WebSocket server URL to connect to `conn
src/common/websocket.rs:822
↓ 9 callers
Method
get_connection
Retrieves a WebSocket connection from the connection pool. # Arguments `allow_non_established` - If `true`, allows selecting a connection that is no
src/common/websocket.rs:543
↓ 9 callers
Function
setup
()
src/spot/websocket_api/apis/auth_api.rs:235
↓ 9 callers
Function
setup
()
src/derivatives_trading_usds_futures/websocket_api/apis/market_data_api.rs:257
↓ 9 callers
Function
setup
()
src/derivatives_trading_usds_futures/websocket_api/apis/user_data_streams_api.rs:221
↓ 9 callers
Function
setup
()
src/derivatives_trading_coin_futures/websocket_api/apis/user_data_streams_api.rs:221
↓ 9 callers
Function
validate_time_unit
Validates the time unit string and returns an optional normalized time unit. # Arguments `time_unit` - A string representing the time unit to valida
src/common/utils.rs:429
↓ 8 callers
Method
as_str
(&self)
src/spot/websocket_api/apis/general_api.rs:84
↓ 7 callers
Method
close_user_data_stream
Close User Data Stream (`USER_STREAM`) Close out a user data stream. Weight: 3000 # Arguments - `params`: [`CloseUserDataStreamParams`] The parame
src/margin_trading/rest_api/mod.rs:1547
↓ 7 callers
Method
is_connected
Checks if a WebSocket connection is established. # Arguments `connection` - Optional specific WebSocket connection to check # Returns `true` if a
src/common/websocket.rs:474
↓ 7 callers
Method
keepalive_user_data_stream
Keepalive User Data Stream (`USER_STREAM`) Keepalive a user data stream to prevent a time out. Weight: 1 # Arguments - `params`: [`KeepaliveUserDa
src/margin_trading/rest_api/mod.rs:1589
↓ 7 callers
Method
send_subscription_payload
Sends a WebSocket subscription payload for the specified streams. # Arguments `connection` - The WebSocket connection to send the subscription on `s
src/common/websocket.rs:2598
↓ 7 callers
Method
start_user_data_stream
Start User Data Stream (`USER_STREAM`) Start a new user data stream. Weight: 1 # Arguments - `params`: [`StartUserDataStreamParams`] The parameter
src/margin_trading/rest_api/mod.rs:1634
↓ 6 callers
Function
build_client
( timeout: u64, keep_alive: bool, proxy: Option<&ProxyConfig>, agent: Option<HttpAgent>, )
src/common/utils.rs:333
↓ 6 callers
Method
connect
( config: ConfigurationWebsocketApi, mode: Option<WebsocketMode>, )
src/spot/websocket_api/mod.rs:57
↓ 6 callers
Method
disconnect
Gracefully disconnects all active WebSocket connections. This method attempts to close all connections in the connection pool within a 30-second time
src/common/websocket.rs:1214
↓ 6 callers
Function
eventually_async
(max_wait: Duration, mut f: F)
src/common/websocket.rs:3154
↓ 6 callers
Method
get_available_connections
Retrieves available WebSocket connections from the connection pool. # Arguments `allow_non_established` - If `true`, includes connections that are n
src/common/websocket.rs:504
↓ 6 callers
Method
new_order
New order Send in a new order. This adds 1 order to the `EXCHANGE_MAX_ORDERS` filter and the `MAX_NUM_ORDERS` filter. Weight: 1 # Arguments - `par
src/spot/rest_api/mod.rs:1789
↓ 6 callers
Method
pool_size
(&self)
src/common/models.rs:199
↓ 6 callers
Function
setup
()
src/derivatives_trading_coin_futures/websocket_api/apis/account_api.rs:187
↓ 6 callers
Function
subscribe_to_emitter
(emitter: &WebsocketEventEmitter)
src/common/websocket.rs:3139
↓ 6 callers
Method
with_api_key
(mut self)
src/common/websocket.rs:1418
↓ 5 callers
Method
close_connection_gracefully
Gracefully closes a WebSocket connection by waiting for pending requests to complete. # Arguments `ws_write_tx_to_close` - Sender channel for sendin
src/common/websocket.rs:588
↓ 5 callers
Function
get_timestamp
()
src/common/utils.rs:456
↓ 5 callers
Function
parse_rate_limit_headers
(headers: &HashMap<String, String, S>)
src/common/utils.rs:570
↓ 5 callers
Function
sort_object_params
(params: &BTreeMap<String, Value>)
src/common/utils.rs:1066
↓ 5 callers
Function
spawn_mock_ws_listener
Spawn a mock WebSocket listener that accepts a single connection and holds it open until the client disconnects, then exits. The returned guard aborts
src/common/websocket.rs:3038
↓ 4 callers
Method
account_information
Account Information (`USER_DATA`) Get current account information. for One-way Mode user, the "positions" will only show the "BOTH" positions for He
src/derivatives_trading_coin_futures/rest_api/mod.rs:162
↓ 4 callers
Method
all_orders
All orders Get all account orders; active, canceled, or filled. Weight: 20 # Arguments - `params`: [`AllOrdersParams`] The parameters for this oper
src/spot/rest_api/mod.rs:249
↓ 4 callers
Method
cancel_order
Cancel Order (TRADE) Cancel an active order. Either `orderId` or `origClientOrderId` must be sent. Weight: 1 # Arguments - `params`: [`CancelOrde
src/derivatives_trading_usds_futures/rest_api/mod.rs:3334
↓ 4 callers
Method
connect
( config: ConfigurationWebsocketApi, mode: Option<WebsocketMode>, )
src/derivatives_trading_usds_futures/websocket_api/mod.rs:50
↓ 4 callers
Method
is_connection_ready
Checks if a WebSocket connection is ready for use. # Arguments `connection` - The WebSocket connection to check `allow_non_established` - If true, a
src/common/websocket.rs:448
↓ 4 callers
Function
mk_headers
(pairs: Vec<(&str, &str)>)
src/common/utils.rs:2052
↓ 4 callers
Function
mk_http_error
(code: u16)
src/common/utils.rs:1965
↓ 4 callers
Method
modify_order
Modify Order (TRADE) Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queu
src/derivatives_trading_usds_futures/rest_api/mod.rs:3895
↓ 4 callers
Method
open_interest
Open Interest Get open interest for specific underlying asset on specific expiration date. Weight: 0 # Arguments - `params`: [`OpenInterestParams`
src/derivatives_trading_options/rest_api/mod.rs:481
↓ 4 callers
Method
order_book
Order Book Check orderbook depth on specific symbol Weight: limit | weight ------------ | ------------ 5, 10, 20, 50 | 1 100 | 5
src/derivatives_trading_options/rest_api/mod.rs:572
↓ 4 callers
Method
query_order
Query Order (`USER_DATA`) Check an order's status. These orders will not be found: order status is `CANCELED` or `EXPIRED` **AND** order has NO fill
src/derivatives_trading_usds_futures/rest_api/mod.rs:4411
↓ 4 callers
Function
random_integer
()
src/common/utils.rs:970
↓ 4 callers
Method
should_reconnect
(&self)
src/common/errors.rs:74
↓ 4 callers
Method
test_connectivity
Test Connectivity Test connectivity to the Rest API. Weight: 1 # Arguments - `params`: [`TestConnectivityParams`] The parameters for this operatio
src/derivatives_trading_options/rest_api/mod.rs:703
next →
1–100 of 7,900, ranked by callers