Coinbase Pro¶
roq-coinbase-pro
Environments¶
Production¶
Option |
Value |
Type |
Comment(s) |
---|---|---|---|
|
|
FIX |
|
|
|
WebSocket |
Cloudflare |
|
|
REST |
Cloudflare |
Installation¶
Conda¶
Install
conda install -y roq-coinbase-pro
Configuration
cp $CONDA_PREFIX/share/roq-coinbase-pro/config.toml $CONFIG_FILE_PATH
# then modify $CONFIG_FILE_PATH to match your specific configuration
Using
roq-coinbase-pro \
--name "coinbase-pro" \
--config-file "$CONFIG_FILE_PATH" \
--client-listen-address "$UNIX_SOCKET_PATH" \
--metrics-listen-address "$TCP_LISTEN_PORT" \
--rest-uri "$REST_URI" \
--fix-uri "$FIX_URI" \
--ws-uri "$WS_URI"
Flags¶
Only notable flags are mentioned here.
Please refer to roq-coinbase-pro --help
for all flags.
- --cancel-on-disconnect
The
Logon
FIX message can be used to instruct the exchange to automatically cancel all orders if the exchange detects a disconnect.- --self-trade-prevention
The
NewOrderSingle
FIX message has a policy field to prevent self trading in the case a new order would match a resting order. Please refer to the API for possible values.
Ansible¶
Edit your inventory file and add your server to the
roq_coinbase_pro
group
[roq_coinbase_pro]
MY_SERVER
Docker¶
docker pull roqtrading/roq-coinbase-pro
Note
Please contact us, if you want to use the Docker image.
Implementation¶
Restrictions¶
- FundsUpdate
Only downloaded immediately after connection has been established.
- TradeUpdate
You should not rely on this feed for your position keeping.
Incoming Events¶
Event |
Connection |
Message(s) |
Comment(s) |
---|---|---|---|
ReferenceData |
WS |
status |
|
MarketStatus |
WS |
status |
|
TopOfBook |
Not available |
||
MarketByPrice |
WS |
snapshot, l2update |
|
MarketByOrder |
WS |
open, change done |
|
TradeSummary |
WS |
match |
|
SessionStatistics |
WS |
ticker |
|
DailyStatistics |
WS |
ticker |
|
OrderAck |
FIX |
ExecutionReport, OrderCancelReject |
|
OrderUpdate |
FIX |
ExecutionReport |
|
TradeUpdate |
WS |
Match |
|
PositionUpdate |
Not available |
||
FundsUpdate |
REST |
accounts |
Outgoing Events¶
Event |
Connection |
Message(s) |
Comment(s) |
---|---|---|---|
CreateOrder |
FIX |
NewOrderSingle |
|
ModifyOrder |
Not available |
||
CancelOrder |
FIX |
OrderCancelRequest |
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 !!!