roq-coinbase-pro¶
$ conda install \
--channel https://roq-trading.com/conda/unstable \
roq-coinbase-pro
$ conda install \
--channel https://roq-trading.com/conda/stable \
roq-coinbase-pro
Supports¶
✅ |
❶ |
|
✅ |
❶ |
|
✅ |
||
✅ |
||
✅ |
||
✅ |
||
✅ |
||
❌ |
Note
✅ = Available.
❎ = Not implemented.
❌ = Unavailable.
❶ The exchange protocol does not support streaming updates for reference data and market status.
Using¶
$ roq-coinbase-pro [FLAGS]
Flags¶
$ roq-coinbase-pro --help
--exchange(coinbase-pro)Exchange identifier
--fix_uri(tcp+ssl://fix-public.sandbox.pro.coinbase.com:4198)Exchange end-point
--fix_ping_freq(5s)Ping frequency
--fix_request_timeout(15s)Request timeout
--fix_cancel_on_disconnect(true)Cancel orders on disconnect?
--fix_self_trade_prevention(N)Self trade prevention: N=incoming order, B=both orders (string)
--fix_debug(false)(DEBUG) log fix messages?
--rest_uri(https://api-public.sandbox.pro.coinbase.com)Exchange end-point
--rest_proxyProxy end-point
--rest_ping_freq(5s)Ping frequency
--rest_ping_path(/time)Ping path
--rest_request_timeout(30s)Request timeout
--ws_uri(wss://ws-feed-public.sandbox.pro.coinbase.com)Exchange end-point
--ws_ping_freq(5s)Ping frequency
--ws_max_subscriptions_per_stream(16)Maximum number of symbols per connection
--ws_include_status(false)Include status updates?
--enable_market_by_order(false)Include market-by-order?
--encode_buffer_size(1048576)Encode buffer size
--decode_buffer_size(10485760)Decode buffer size
--mbp_allow_price_inversion(true)Allow price inversion?
Environments¶
$ --flagfile $CONDA_PREFIX/share/roq-coinbase-pro/flags/prod/flags.cfg
# 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 $CONDA_PREFIX/share/roq-coinbase-pro/flags/test/flags.cfg
# flagfile for the roq-coinbase-pro gateway
--fix_uri=tcp+ssl://fix-public.sandbox.pro.coinbase.com:4198
--ws_uri=wss://ws-feed-public.sandbox.pro.coinbase.com
--rest_uri=https://api-public.sandbox.pro.coinbase.com
Configuration¶
$ --flagfile $CONDA_PREFIX/share/roq-coinbase-pro/config.toml
Important
This template will be replaced when the software is upgraded. Make a copy and modify to your own needs.
# config template for the roq-coinbase-pro gateway
symbols = [
"^BTC-USD[A-Z]?$",
"^ETH-USD[A-Z]?$"
]
[accounts]
[accounts.A1]
master = true
login = "YOUR_COINBASE_PRO_API_KEY_GOES_HERE"
password = "YOUR_COINBASE_PRO_PASSPHRASE_GOES_HERE"
secret = "YOUR_COINBASE_PRO_SECRET_GOES_HERE"
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¶
Inbound¶
Event |
Field |
||
|---|---|---|---|
|
|
⇒ |
|
|
|
⇒ |
|
|
|
⇒ |
Order Management¶
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 |
Comments¶
Rate-limit usage is not communicated by the exchange
FIX OrderMassCancelRequest (q) is not supported and orders must therefore be canceled one by one
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.