roq-bitfinex#

Important

This gateway needs sponsorship to complete certain features.

Purpose#

  • Maintain network connectivity with the Bitfinex 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: TBD

Conda#

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

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

Config#

Flags#

$ roq-bitfinex --help

Environments#

# flagfile

--rest_uri=https://api-pub.bitfinex.com/
--ws_public_uri=wss://api-pub.bitfinex.com/ws/2
--ws_prvate_uri=wss://api.bitfinex.com/ws/2

Market Data#

Event

Stream

Messages

Comments

roq::ReferenceData

roq::MarketStatus

roq::TopOfBook

MarketData

ticker

roq::MarketByPriceUpdate

MarketData

book

roq::MarketByOrderUpdate

MarketData

book (prec=R0)

roq::TradeSummary

MarketData

trades

roq::StatisticsUpdate

MarketData

status

Event

Stream

Messages

Comments

roq::ReferenceData

Rest

/v2/tickers?symbols=ALL (!!! CONTAINS NO REFERENCE DATA !!!)

roq::MarketStatus

roq::TopOfBook

roq::MarketByPriceUpdate

roq::MarketByOrderUpdate

roq::TradeSummary

roq::StatisticsUpdate

Statistics#

Type

Comments

HIGHEST_TRADED_PRICE

(ticker) high

LOWEST_TRADED_PRICE

(ticker) low

TRADE_VOLUME

(ticker) volume

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

  • discover the full list of symbols

Type

Comments

WebSocket

Primary purpose

  • live market data

Each connection

  • supports a slice of the symbols

Constraints#

  • The exchange rate limiter is VERY strict. You should therefore try to not subscribe too many symbols.

Comments#

  • General

    • Messages are NOT self-describing. There is a risk that message meta data change in a non-backwards-compatible way thereby causing production breaks. Except for perhaps scraping the web-site, there doesn’t appear to be an easy way to infer meta data.

  • Market data

    • The are NO reference data !!!