roq-binance-options#

Important

PLACEHOLDER! This gateway is in early development.

Purpose#

  • Maintain network connectivity with the Binance Options exchange

  • Route exchange updates to connected clients

  • Route client requests to the relevant exchange accounts

  • Stream all messages to an event-log

Overview#

Products

Spot

Futures

Options

Market Data

Reference Data

Market Status

Top of Book

Market by Price (L2)

Market by Order (L3)

Trade Summary

Statistics

Order Management

Create

Modify

Cancel

Cancel All

Auto Cancellation

Account Management

Positions

Funds

  • Data center located in Japan (to be confirmed)

  • No test environment

Conda#

$ mamba install \
  --channel https://roq-trading.com/conda/stable \
  roq-binance-options
$ cp $CONDA_PREFIX/share/roq-binance-options/config.toml $CONFIG_FILE_PATH

# Then modify $CONFIG_FILE_PATH to match your specific configuration
$ roq-binance-options \
      --name "binance-options" \
      --config_file "$CONFIG_FILE_PATH" \
      --client_listen_address "$UNIX_SOCKET_PATH" \
      --service_listen_address "$TCP_LISTEN_PORT" \
      --flagfile "$FLAG_FILE"

Config#

Flags#

$ roq-binance-options --help
--exchange (binance-options)

exchange identifier (string)

--api (fapi)

what api to use (fapi, dapi)

--request_limit (8)

request limit per interval

--request_limit_interval (5s)

request limit monitor interval

--encode_buffer_size (1048576)

encode buffer size

--decode_buffer_size (10485760)

decode buffer size

--mbp_allow_price_inversion (false)

allow price inversion?

--rest_uri (https://testnet.binancefuture.com)

REST end-point (URI)

--rest_proxy

proxy end-point (URI)

--rest_ping_freq (5s)

ping frequency

--rest_ping_path (/v1/time)

URI path used for REST connection keep-alive messages (without the api prefix)

--rest_request_timeout (30s)

request: timeout

--rest_listen_key_refresh (1800s)

listen key refresh period

--rest_order_countdown (30s)

auto-cancel countdown time

--rest_order_recv_window (5000ms)

receive window, please refer to Binance documentation!

--rest_cancel_on_disconnect (false)

cancel orders on disconnect? (bool)

--ws_uri (wss://stream.binancefuture.com)

WebSocket end-point (URI)

--ws_ping_freq (5s)

ping frequency

--ws_max_subscriptions_per_stream (40)

max symbols per connection (count)

--ws_subscribe_depth_levels (1000)

depth levels (count)

--ws_subscribe_depth_freq (100ms)

depth update frequency

--ws_mbp_request_delay (10s)

request delay

--ws_mbp_request_max_retries (0)

request max retries

Environments#

$ $CONDA_PREFIX/share/roq-binance-options/flags
# flagfile for the roq-binance-options gateway

--rest_uri=https://vapi.binance.com
--ws_uri=wss://vstream.binance.com/ws

Market Data#

Statistics#

TBD

Order Management#

Event

Stream

Messages

Comments

roq::OrderUpdate

roq::TradeUpdate

Event

Stream

Messages

Comments

roq::OrderUpdate

roq::TradeUpdate

Event

Stream

Messages

Comments

roq::OrderAck

Order Types#

TBD

Time in Force#

TBD

Position Effect#

TBD

Execution Instructions#

TBD

Account Management#

Event

Stream

Messages

Comments

roq::PositionUpdate

roq::FundsUpdate

Event

Stream

Messages

Comments

roq::PositionUpdate

roq::FundsUpdate

Streams#

Type

Comments

REST

Primary purpose

  • support order management

Each connection

  • supports a single account

  • maintains a listen key (used by the DropCopy stream)

Type

Comments

WebSocket

Primary purpose

  • live account updates, including orders and fills

Each connection

  • supports a single account

Type

Comments

WebSocket

Primary purpose

  • live market data

Each connection

  • supports a slice of the symbols

Type

Comments

REST

Primary purpose

  • download reference data

One connection

Constraints#