Binance¶
roq-binance
Environments¶
Production¶
Option |
Value |
Type |
Comment(s) |
---|---|---|---|
|
|
REST |
|
|
|
WebSocket |
- Data center
Japan (to be confirmed)
Test¶
Warning
Does not exist.
Installation¶
Conda¶
Install
conda install -y roq-binance
Configuration
cp $CONDA_PREFIX/share/roq-binance/config.toml $CONFIG_FILE_PATH
# then modify $CONFIG_FILE_PATH to match your specific configuration
Using
roq-binance \
--name "binance" \
--config_file "$CONFIG_FILE_PATH" \
--client_listen_address "$UNIX_SOCKET_PATH" \
--metrics_listen_address "$TCP_LISTEN_PORT" \
--rest_uri "$REST_URI" \
--ws_uri "$WS_URI"
Flags¶
Only notable flags are mentioned here.
Please refer to roq-binance --help
for all flags.
- --rest_depth_limit
Depth limit. This choice has influence on request limits, please refer to exchange documentation.
- --rest_listen_key_refresh_secs
Time between listen key refresh.
- --ws_depth_levels
Max levels for snapshots.
- --ws_depth_freq_msecs
Conflated depth updates are published at a frequency of either 100ms or 1000ms.
- --ws_trade_details
Report individual matches for trade summary?
- --ws_max_subscriptions
Subscription limit per web-socket connection
Implementation¶
Market by Price is currently subscribed as full snapshot (with limited depth) due to rate limitations on fetching the initial images from the REST connection.
Restrictions¶
Incoming Events¶
Event |
Connection |
Message(s) |
Comment(s) |
---|---|---|---|
ReferenceData |
REST |
/api/v3/exchangeInfo |
|
MarketStatus |
REST |
/api/v3/exchangeInfo |
|
TopOfBook |
WS_MARKET |
<symbol>@bookTicker |
|
MarketByPrice |
REST |
/api/v3/depth?limit=<levels> |
See Flags |
WS_MARKET |
<symbol>@depth@<freq> or <symbol>@depth<levels>@<freq> |
See Flags |
|
MarketByOrder |
Not available |
||
TradeSummary |
WS_MARKET |
<symbol>@trade or <symbol>@aggTrade |
See Flags |
SessionStatistics |
WS_MARKET |
<symbol>@miniTicker |
|
DailyStatistics |
WS_MARKET |
<symbol>@miniTicker |
|
OrderAck |
REST |
/api/v3/order |
|
WS_USER |
executionReport |
||
OrderUpdate |
WS_USER |
executionReport |
|
TradeUpdate |
WS_USER |
executionReport |
|
PositionUpdate |
|||
FundsUpdate |
REST |
/api/v3/account |
|
WS_USER |
outboundAccountInfo and outboundAccountPosition |
Outgoing Events¶
Event |
Connection |
Message(s) |
Comment(s) |
---|---|---|---|
CreateOrder |
REST |
/api/v3/order (POST) |
|
ModifyOrder |
Not available |
||
CancelOrder |
REST |
/api/v3/order (DELETE) |