roq-coinbase-pro#
Links#
Purpose#
Maintain network connectivity with the Coinbase PRO exchange
Route exchange updates to connected clients
Route client requests to the relevant exchange accounts
Stream all messages to an event-log
Overview#
Spot |
✓ |
Futures |
|
Options |
Reference Data |
✓ |
Market Status |
✓ |
Top of Book |
✓ |
Market by Price (L2) |
✓ |
Market by Order (L3) |
✓ |
Trade Summary |
✓ |
Statistics |
✓ |
Create |
✓ |
Modify |
|
Cancel |
✓ |
Cancel All |
✓ |
Auto Cancellation |
✓ |
Positions |
|
Funds |
✓ |
Conda#
$ mamba install \
--channel https://roq-trading.com/conda/stable \
roq-coinbase-pro
$ cp $CONDA_PREFIX/share/roq-coinbase-pro/config.toml $CONFIG_FILE_PATH
# Then modify $CONFIG_FILE_PATH to match your specific configuration
$ roq-coinbase-pro \
--name "coinbase-pro" \
--config_file "$CONFIG_FILE_PATH" \
--client_listen_address "$UNIX_SOCKET_PATH" \
--service_listen_address "$TCP_LISTEN_PORT" \
--flagfile "$FLAG_FILE"
Config#
Flags#
set(AUTOGEN_SCHEMAS common.json fix.json rest.json ws.json flags.json)
$ roq-coinbase-pro --help
--exchange
(coinbase-pro
)exchange identifier (string)
--enable_market_by_order
(false
)include market-by-order? (bool)
--encode_buffer_size
(1048576
)encode buffer size
--decode_buffer_size
(10485760
)decode buffer size
--mbp_allow_price_inversion
(true
)allow price inversion?
--fix_uri
(tcp+ssl://fix-public.sandbox.pro.coinbase.com:4198
)FIX end-point (URI)
--fix_ping_freq
(5s
)ping frequency
--fix_request_timeout
(15s
)request timeout
--fix_cancel_on_disconnect
(true
)cancel orders on disconnect? (bool)
--fix_self_trade_prevention
(N
)self trade prevention: N=incoming order, B=both orders (string)
--fix_debug
(false
)log fix messages?
--rest_uri
(https://api-public.sandbox.pro.coinbase.com
)REST end-point (URI)
--rest_proxy
proxy end-point (URI)
--rest_ping_freq
(5s
)ping frequency
--rest_ping_path
(/time
)URI path used for REST connection keep-alive messages
--rest_request_timeout
(30s
)request: timeout
--ws_uri
(wss://ws-feed-public.sandbox.pro.coinbase.com
)WebSocket end-point (URI)
--ws_ping_freq
(5s
)ping frequency
--ws_max_subscriptions_per_stream
(16
)max subscriptions per connection (count)
--ws_include_status
(false
)include status updates? (bool)
Environments#
$ $CONDA_PREFIX/share/roq-coinbase-pro/flags
# flagfile for the roq-coinbase-pro gateway
--fix_uri=tcp+ssl://fix.pro.coinbase.com:4198
--ws_uri=wss://ws-feed.pro.coinbase.com
--rest_uri=https://api.pro.coinbase.com
# flagfile for the roq-coinbase-pro gateway
--fix_uri=tcp+ssl://fix.pro.coinbase.com:4198
--ws_uri=wss://ws-feed.pro.coinbase.com
--rest_uri=https://api.pro.coinbase.com
Market Data#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Rest |
status |
||
Rest |
status |
||
MarketData |
ticker |
No quantity from exchange |
|
MarketData |
snapshot, l2update |
||
MarketData |
open, change, done |
||
MarketData |
match |
||
MarketData |
ticker |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Statistics#
Type |
Comments |
---|---|
|
|
|
|
|
Order Management#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
ExecutionReport (8) |
||
DropCopy |
Match |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
NewOrderSingle (D) |
||
OrderEntry |
OrderCancelRequest (F) |
||
Not implemented |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
ExecutionReport (8), OrderCancelReject (9) |
Order Types#
Type |
Comments |
---|---|
|
Mapped to |
|
Mapped to |
|
Mapped to |
Time in Force#
Type |
Comments |
---|---|
|
Mapped to |
|
Mapped to |
|
Mapped to |
Note
A non-standard value of 'P'
(FIX) is used to indicate “Post-Only.
This value is derived from Execution Instruction (see below) and will override any other value
of Time in Force.
Position Effect#
Note
Not supported
Execution Instructions#
Type |
Comments |
---|---|
|
Mapped to the |
Account Management#
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Unavailable |
|||
Unavailable |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Unavailable |
|||
Rest |
accounts |
Streams#
Type |
Comments |
---|---|
FIX |
Primary purpose
Each connection
|
Type |
Comments |
---|---|
WebSocket |
Primary purpose
Each connection
|
Type |
Comments |
---|---|
WebSocket |
Primary purpose
Each connection
|
Type |
Comments |
---|---|
REST |
Primary purpose
|
Constraints#
Rate-limit usage is not communicated by the exchange
FIX OrderMassCancelRequest (q) is not supported and orders must therefore be canceled one by one
Comments#
WebSocket is through a third-party CDN (CloudFlare) with all the issues such a solution entails.
FIX support is minimal and only supporting very basic order management.
Fills are not available from the FIX connection and there is a probability Match messages are lost from WebSocket connection. YOU SHOULD NOT RELY ON TRADE UPDATES FOR YOUR POSITION KEEPING !!!
TradeUpdate
You should not rely on this feed for your position keeping.
FundsUpdate
Only downloaded immediately after connection has been established.