Skip to main content

Binance Futures

Binance Futures Market Data Connector

Binance Futures Data Connector based on WebSocket/REST.

Configuration

Data Connector Parameters

ParameterDefault ValueDescription
WebSocket URLwss://fstream.binance.com/WebSocket root URL.

To start the connector in "USDS-M Futures" mode use the following URL:
wss://fstream.binance.com/

To start the connector in "COIN-M Futures" mode use the following URL:
wss://dstream.binance.com/

By default URL for "USDS-M Futures" mode is chosen.
REST URLhttps://fapi.binance.com/fapi/v1/REST root URL.

To start the connector in "USDS-M Futures" mode use the following URL:
https://fapi.binance.com/fapi/v1/

To start the connector in "COIN-M Futures" mode use the following URL:
https://dapi.binance.com/dapi/v1/

By default URL for "USDS-M Futures" mode is chosen.
Read Timeout15000Read timeout (in milliseconds).
Reconnect Timeout15000Reconnect timeout (in milliseconds).
Use Real-Time L2 StreamfalseUse real-time '@depth@0ms' diff depth stream for getting L2 updates instead of standard '@depth@100ms' diff depth stream.

Note from Binance:
In order to provide users with more secure and stable services, the update time of '@depth@0ms' stream is dynamically adjusted according to the total amount of data traffic and other objective conditions.

Default value for this option is false.
Use Real-Time L1 StreamfalseUse real-time 'bookTicker' stream for getting L1 (BBO) updates instead of order book based 'depth' stream.
Use Real-Time Trades StreamfalseUse undocumented real-time 'trade' stream for getting trade updates instead of standard 'aggTrade' stream.

Note:
This parameter can only be used when the data connector is running in "COIN-M Futures" mode.

Default value for this option is false.
Exchange NameBINANCEFUTExchange name for this session.
Output Book Size20Size of the output book.
Snapshot Interval10SThis property sets an interval in seconds between periodical Level2 snapshots which sent to Aggregator.

Snapshots will be generated as soon as this threshold is exceeded AND the next increment message arrives. Conversely, snapshots are NOT generated every period if no data is coming in.

Default value is 10 seconds.
Max Saved Depth Updates Count1000Limit of saved depth updates count. After it is exceeded initialization of the local depth book will be started from scratch.
Usually you don't have to change the default value.

Symbology

Supported symbol notations:

ModeSymbol NotationExamples
FuturesSYMBOLNAME (upper case)
SYMBOLNAME#OUTPUT_BOOK_SIZE
BTCUSDT
ETHUSDT
ETHUSDT#40
DeliverySYMBOLNAME (upper case)
SYMBOLNAME#OUTPUT_BOOK_SIZE
BTCUSD_200925
BTCUSD_PERP
BTCUSD_PERP#110

Full symbol list for “Futures” mode: https://fapi.binance.com/fapi/v1/exchangeInfo

Full symbol list for “Delivery” mode: https://dapi.binance.com/dapi/v1/exchangeInfo