roq-gemini#

Supports#

Products

Spot

Futures

Options

Combos

Market Data

Reference Data

Market Status

Top of Book

Market by Price

Market by Order

Trade Summary

Statistics

Order Management

Create

Modify

Cancel

Cancel All

Auto-Cancel

Account Management

Positions

Funds

Installing#

$ mamba install \
      --channel https://roq-trading.com/conda/stable \
      roq-gemini
$ mamba install \
      --channel https://roq-trading.com/conda/unstable \
      roq-gemini

Using#

$ roq-gemini \
      --name "gemini" \
      --config_file $CONFIG_FILE_PATH \
      --client_listen_address $UNIX_SOCKET_PATH \
      --flagfile $ENVIRONMENT_FLAGFILE

Flags#

$ roq-gemini --help
--exchange (gemini)

Exchange identifier

--fix_mkt_uri (tcp://3.220.21.165:1514)

Exchange end-point

--fix_mkt_ping_freq (30s)

Ping frequency

--fix_mkt_request_timeout (15s)

Request timeout

--fix_mkt_debug (false)

(DEBUG) Log fix messages?

--fix_ord_uri (tcp://3.220.21.165:1514)

Exchange end-point

--fix_ord_ping_freq (30s)

Ping frequency

--fix_ord_cancel_on_disconnect (true)

Cancel orders on disconnect?

--fix_ord_debug (false)

(DEBUG) Log fix messages?

--fix_drp_uri (tcp://3.220.21.165:1514)

Exchange end-point

--fix_drp_ping_freq (30s)

Ping frequency

--fix_drp_debug (false)

(DEBUG) Log fix messages?

--rest_uri (https://api.sandbox.gemini.com/v1)

Exchange end-point

--rest_ping_freq (30s)

Ping frequency

--rest_rate_limit_interval (60s)

Rate limit monitor interval

--rest_rate_limit_max_requests (600)

Rate limit max requests (per interval)

--encode_buffer_size (1048576)

Encode buffer size

--decode_buffer_size (10485760)

Decode buffer size

--mbp_allow_price_inversion (true)

Allow price inversion?

Environments#

Configuration#

$ $CONDA_PREFIX/share/roq-gemini/config.toml

Important

The template will be replaced when the software is upgraded. Make a copy and modify to your needs.

symbols = ".*"

[order_entry]
  sender = "YOUR_GEMINI_ORDER_ENTRY_SENDER_GOES_HERE"
  target = "YOUR_GEMINI_ORDER_ENTRY_TARGET_GOES_HERE"

[market_data]
  sender = "YOUR_GEMINI_MARKET_DATA_SENDER_GOES_HERE"
  target = "YOUR_GEMINI_MARKET_DATA_TARGET_GOES_HERE"

[drop_copy]
  sender = "YOUR_GEMINI_DROP_COPY_SENDER_GOES_HERE"
  target = "YOUR_GEMINI_DROP_COPY_TARGET_GOES_HERE"

[accounts]

  [accounts.A1]
  master = true
  symbols = ".*"

[users]

  [users.test]
  password = "1234"
  symbols = ".*"

  [users.trader]
  password = "secret"
  accounts = [ "A1" ]
  symbols = [ ".*BTC.*", ".*ETH.*" ]

[rate_limits]

  [rate_limits.global]
    type = "ORDER_ACTION"
    aggregate = true
    request_limit = 100
    monitor_period = "10s"
    ban_period = "5m"

Market Data#

Event

Stream

Messages

Comments

roq::ReferenceData

MarketData

SecurityList (y)

Incomplete

roq::MarketStatus

MarketData

SecurityList (y)

Incomplete

roq::TopOfBook

Unavailable

roq::MarketByPriceUpdate

MarketData

MarketDataSnapshotFullRefresh (W), MarketDataIncrementalRefresh (X)

roq::MarketByOrderUpdate

Unavailable

roq::TradeSummary

MarketData

MarketDataIncrementalRefresh (X)

roq::StatisticsUpdate

Unavailable

Statistics#

Order Management#

Event

Stream

Messages

Comments

roq::OrderUpdate

OrderEntry

ExecutionReport (8)

roq::TradeUpdate

OrderEntry

ExecutionReport (8)

Event

Stream

Messages

Comments

roq::OrderUpdate

roq::TradeUpdate

Event

Stream

Messages

Comments

roq::CreateOrder

OrderEntry

NewOrderSingle (D)

roq::ModifyOrder

Unavailable

roq::CancelOrder

OrderEntry

OrderCancelRequest (F)

roq::CancelAllOrders

Rest

/v1/order/cancel/all

Not implemented

Event

Stream

Messages

Comments

roq::OrderAck

OrderEntry

ExecutionReport (8), OrderCancelReject (9)

Order Types#

Type

Comments

MARKET

Mapped to '1' (FIX)

LIMIT

Mapped to '2' (FIX)

STOP_LIMIT

Mapped to '4' (FIX)

Time in Force#

Type

Comments

GTC

Mapped to '1' (FIX)

IOC

Mapped to '3' (FIX)

FOK

Mapped to '4' (FIX)

AT_THE_CLOSE

Mapped to '7' (FIX)

Position Effect#

Note

Not supported

Execution Instructions#

Type

Comments

PARTICIPATE_DO_NOT_INITIATE

Mapped to '6' (FIX)

Account Management#

Event

Stream

Messages

Comments

roq::PositionUpdate

roq::FundsUpdate

Event

Stream

Messages

Comments

roq::PositionUpdate

Unavailable

roq::FundsUpdate

Rest

balaneces

Not implemented

Streams#

Type

Comments

FIX

Primary purpose

  • support order management

Each connection

  • supports a single account

Type

Comments

FIX

Primary purpose

  • live account updates, including orders and fills

Each connection

  • supports a single account

The master account is used to

  • discover the full list of symbols (by downloading exchange info)

  • request depth snapshots

Type

Comments

FIX

Primary purpose

  • live market data

Each connection

  • supports a slice of the symbols

Comments#

  • FIX supports both order management and market data.

  • Support for reference data and market status is completely missing from all API interfaces. YOU SHOULD NOT RELY ON REFERENCE DATA AND MARKET STATUS FOR ANYTHING.

  • REST

    • Not implemented.

  • ReferenceData, MarketStatus

    • You should not rely on these feeds.