Scan your whole stack
From OX Research Newsroom
Are you using binance-sdk-derivatives-trading-coin-futures?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v14.5.0
binance-sdk-derivatives-trading-coin-futures was last scanned on 27 Nov 2026 at version 14.5.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 14.5.0 LATEST | 27 Nov 2026 | No rules fired |
| 14.4.0 | 17 Nov 2026 | No rules fired |
| 14.3.0 | 6 Nov 2026 | No rules fired |
| 14.2.0 | 29 Oct 2026 | Not shown |
| 14.1.0 | 23 Oct 2026 | Not shown |
Findings for v14.5.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 14.5.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
This is a client library for the Binance Derivatives Trading COIN-M Futures API SDK, enabling developers to interact programmatically with Binance's API to suit their derivative trading needs, through three distinct endpoints:
/dapi/*To use this library, ensure your environment is running Python version 3.11 or later.
pip install binance-sdk-derivatives-trading-coin-futures
For detailed information, refer to the Binance API Documentation.
All REST API endpoints are available through the rest_api module. The REST API enables you to fetch market data, manage trades, and access account information. Note that some endpoints require authentication using your Binance API credentials.
from binance_common.configuration import ConfigurationRestAPI
from binance_common.constants import DERIVATIVES_TRADING_COIN_FUTURES_REST_API_PROD_URL
from binance_sdk_derivatives_trading_coin_futures.derivatives_trading_coin_futures import DerivativesTradingCoinFutures
from binance_sdk_derivatives_trading_coin_futures.rest_api.models import ExchangeInformationResponse
logging.basicConfig(level=logging.INFO)
configuration = ConfigurationRestAPI(api_key="your-api-key", api_secret="your-api-secret", base_path=DERIVATIVES_TRADING_COIN_FUTURES_REST_API_PROD_URL)
client = DerivativesTradingCoinFutures(config_rest_api=configuration)
try:
response = client.rest_api.exchange_information()
data: ExchangeInformationResponse = response.data()
logging.info(f"exchange_information() response: {data}")
except Exception as e:
logging.error(f"exchange_information() error: {e}")
More examples can be found in the examples/rest_api folder.
The REST API supports the following advanced configuration options:
timeout: Timeout for requests in milliseconds (default: 1000 ms).proxy: Proxy configuration:host: Proxy server hostname.port: Proxy server port.protocol: Proxy protocol (http or https).auth: Proxy authentication credentials:username: Proxy username.password: Proxy password.keep_alive: Enable HTTP keep-alive (default: true).compression: Enable response compression (default: true).retries: Number of retry attempts for failed requests (default: 3).backoff: Delay in milliseconds between retries (default: 1000 ms).https_agent: Custom HTTPS agent for advanced TLS configuration.private_key: RSA or ED25519 private key for authentication.private_key_passphrase: Passphrase for the private key, if encrypted.You can configure a timeout for requests in milliseconds. If the request exceeds the specified timeout, it will be aborted. See the Timeout example for detailed usage.
The REST API supports HTTP/HTTPS proxy configurations. See the Proxy example for detailed usage.
Enable HTTP keep-alive for persistent connections. See the Keep-Alive example for detailed usage.
Enable or disable response compression. See the Compression example for detailed usage.
Configure the number of retry attempts and delay in milliseconds between retries for failed requests. See the Retries example for detailed usage.
Customize the HTTPS agent for advanced TLS configurations. See the HTTPS Agent example for detailed usage.
The REST API supports key pair-based authentication for secure communication. You can use RSA or ED25519 keys for signing requests. See the Key Pair Based Authentication example for detailed usage.
To enhance security, you can use certificate pinning with the https_agent option in the configuration. This ensures the client only communicates with servers using specific certificates. See the Certificate Pinning example for detailed usage.
The REST API provides detailed error types to help you handle issues effectively:
ClientError: Represents an error that occurred in the SDK client.RequiredError: Thrown when a required parameter is missing or undefined.UnauthorizedError: Indicates missing or invalid authentication credentials.ForbiddenError: Access to the requested resource is forbidden.TooManyRequestsError: Rate limit exceeded.RateLimitBanError: IP address banned for exceeding rate limits.ServerError: Internal server error, optionally includes a status code.NetworkError: Issues with network connectivity.NotFoundError: Resource not found.BadRequestError: Invalid request or one that cannot be served.See the Error Handling example for detailed usage.
For testing purposes, /dapi/* endpoints can be used in the Futures Testnet. Update the base_path in your configuration:
from binance_common.configuration import ConfigurationRestAPI
from binance_common.constants import DERIVATIVES_TRADING_COIN_FUTURES_REST_API_TESTNET_URL
from binance_sdk_derivatives_trading_coin_futures.derivatives_trading_coin_futures import DerivativesTradingCoinFutures
configuration = ConfigurationRestAPI(api_key="your-api-key", api_secret="your-api-secret", base_path=DERIVATIVES_TRADING_COIN_FUTURES_REST_API_TESTNET_URL)
client = DerivativesTradingCoinFutures(config_rest_api=configuration)
If base_path is not provided, it defaults to https://dapi.binance.com.
The WebSocket API provides request-response communication for market data and trading actions. Use the websocket_api module to interact with these endpoints.
from binance_common.configuration import ConfigurationWebSocketAPI
from binance_common.constants import DERIVATIVES_TRADING_COIN_FUTURES_WS_API_PROD_URL
from binance_sdk_derivatives_trading_coin_futures.derivatives_trading_coin_futures import DerivativesTradingCoinFutures
configuration = ConfigurationWebsocketAPI(api_key="your-api-key", api_secret="your-api-secret", base_path=DERIVATIVES_TRADING_COIN_FUTURES_WS_API_PROD_URL)
client = DerivativesTradingCoinFutures(configuration_websocket_api=configuration)
More examples are available in the examples/websocket_api folder.
The WebSocket API supports the following advanced configuration options:
timeout: Set the timeout for WebSocket requests (default: 5000 ms).reconnect_delay: Delay (ms) between reconnections.compression: Enable response compression.proxy: Proxy configuration:host: Proxy server hostname.port: Proxy server port.protocol: Proxy protocol (http or https).auth: Proxy authentication credentials:username: Proxy username.password: Proxy password.mode: Choose between single and pool connection modes.single: A single WebSocket connection.pool: A pool of WebSocket connections.pool_size: Define the number of WebSocket connections in pool mode.private_key: RSA or ED25519 private key for authentication.private_key_passphrase: Passphrase for the private key, if encrypted.https_agent: Custom HTTPS agent for advanced TLS configuration.user_agent: Custom user agent string for WebSocket Streams.reconnect_attempts: Maximum number of WebSocket reconnection attempts (max: 10).Set the timeout for WebSocket API requests in milliseconds. See the Timeout example for detailed usage.
Specify the delay in milliseconds between WebSocket reconnection attempts. See the Reconnect Delay example for detailed usage.
Enable or disable compression for WebSocket messages. See the Compression example for detailed usage.
The WebSocket API supports HTTP/HTTPS proxy configurations. See the Proxy example for detailed usage.
Choose between single and pool connection modes for WebSocket connections. The single mode uses a single WebSocket connection, while the pool mode uses a pool of WebSocket connections. See the Connection Mode example for detailed usage.
Use RSA or ED25519 private keys for WebSocket API authentication. See the Key Pair Authentication example for detailed usage.
Customize the agent for advanced configurations. See the WebSocket Http Agent example for detailed usage.
Specify how many times a failed reconnection is retried before the connection is given up on. A value between 1 and 10 is accepted; See the Reconnect Attempts example for detailed usage.
For testing purposes, the Websocket API also supports a testnet environment. Update the wsURL in your configuration:
from binance_common.configuration import ConfigurationWebSocketAPI
from binance_common.constants import DERIVATIVES_TRADING_COIN_FUTURES_WS_API_TESTNET_URL
from binance_sdk_derivatives_trading_coin_futures.derivatives_trading_coin_futures import DerivativesTradingCoinFutures
configuration_ws_api = ConfigurationWebSocketAPI(
api_key="your-api-key",
api_secret="your-api-secret",
stream_url=DERIVATIVES_TRADING_COIN_FUTURES_WS_API_TESTNET_URL
)
client = DerivativesTradingCoinFutures(config_ws_api=configuration_ws_api)
If wsURL is not provided, it defaults to wss://ws-api.binance.com:443/ws-api/v3.
WebSocket Streams provide real-time data feeds for market trades, candlesticks, and more. Use the websocket-streams module to subscribe to these streams.
import asyncio
import logging
from binance_common.configuration import ConfigurationWebSocketStreams
from binance_common.constants import DERIVATIVES_TRADING_COIN_FUTURES_WS_STREAMS_PROD_URL
from binance_sdk_derivatives_trading_coin_futures.derivatives_trading_coin_futures import DerivativesTradingCoinFutures
logging.basicConfig(level=logging.INFO)
configuration_ws_streams = ConfigurationWebSocketStreams(
stream_url=DERIVATIVES_TRADING_COIN_FUTURES_WS_STREAMS_PROD_URL,
)
client = DerivativesTradingCoinFutures(config_ws_streams=configuration_ws_streams)
More examples are available in the examples/websocket-streams folder.
The WebSocket Streams API supports the following advanced configuration options:
reconnect_delay: Delay (ms) between reconnections.compression: Enable response compression.proxy: Proxy configuration:host: Proxy server hostname.port: Proxy server port.protocol: Proxy protocol (http or https).auth: Proxy authentication credentials:username: Proxy username.password: Proxy password.mode: Choose between single and pool connection modes.single: A single WebSocket connection.pool: A pool of WebSocket connections.pool_size: Define the number of WebSocket connections in pool mode.https_agent: Custom HTTPS agent for advanced TLS configuration.user_agent: Custom user agent string for WebSocket Streams.reconnect_attempts: Maximum number of WebSocket reconnection attempts (max: 10).Specify the delay in milliseconds between WebSocket reconnection attempts for streams. See the Reconnect Delay example for detailed usage.
Enable or disable compression for WebSocket Streams messages. See the Compression example for detailed usage.
The WebSocket Streams supports HTTP/HTTPS proxy configurations. See the Proxy example for detailed usage.
Choose between single and pool connection modes for WebSocket Streams. The single mode uses a single WebSocket connection, while the pool mode uses a pool of WebSocket connections. See the Connection Mode example for detailed usage.
Customize the agent for advanced configurations. See the WebSocket Http Agent example for detailed usage.
Specify how many times a failed reconnection is retried before the connection is given up on. A value between 1 and 10 is accepted; See the Reconnect Attempts example for detailed usage.
You can unsubscribe from specific WebSocket streams using the unsubscribe method. This is useful for managing active subscriptions without closing the connection.
import asyncio
import logging
from binance_common.configuration import ConfigurationWebSocketStreams
from binance_sdk_derivatives_trading_coin_futures.derivatives_trading_coin_futures import DerivativesTradingCoinFutures
logging.basicConfig(level=logging.INFO)
client = DerivativesTradingCoinFutures(config_ws_streams=ConfigurationWebSocketStreams())
async def all_book_tickers_stream():
connection = None
try:
connection = await client.websocket_streams.create_connection()
stream = await connection.all_book_tickers_stream()
stream.on("message", lambda data: print(f"{data}"))
await asyncio.sleep(5)
await stream.unsubscribe()
except Exception as e:
logging.error(f"all_book_tickers_stream() error: {e}")
finally:
if connection:
await connection.close_connection(close_session=True)
if __name__ == "__main__":
asyncio.run(all_book_tickers_stream())
Websocket Streams also support a testnet environment for development and testing. Update the wsURL in your configuration:
from binance_common.configuration import ConfigurationWebSocketStreams
from binance_common.constants import DERIVATIVES_TRADING_COIN_FUTURES_WS_STREAMS_TESTNET_URL
from binance_sdk_derivatives_trading_coin_futures.derivatives_trading_coin_futures import DerivativesTradingCoinFutures
config_ws_streams = ConfigurationWebSocketStreams(
stream_url=DERIVATIVES_TRADING_COIN_FUTURES_WS_STREAMS_TESTNET_URL
)
client = DerivativesTradingCoinFutures(config_ws_streams=config_ws_streams)
If wsURL is not provided, it defaults to wss://dstream.binance.com.
The WebSocket connection is automatically renewed for both WebSocket API and WebSocket Streams connections, before the 24 hours expiration of the API key. This ensures continuous connectivity.
To run the tests, ensure you have Poetry installed, then execute the following commands:
poetry install
poetry run pytest ./tests
The tests cover:
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.