roq-dydx¶
Links¶
Supports¶
Spot |
|
Futures |
✓ |
Options |
|
Combos |
Reference Data |
✓ |
Market Status |
✓ |
Top of Book |
|
Market by Price |
✓ |
Market by Order |
|
Trade Summary |
✓ |
Statistics |
✓ |
Create |
|
Modify |
|
Cancel |
|
Cancel All |
|
Auto-Cancel |
Positions |
|
Funds |
Installing¶
$ mamba install \
--channel https://roq-trading.com/conda/stable \
roq-dydx
$ mamba install \
--channel https://roq-trading.com/conda/unstable \
roq-dydx
Using¶
$ roq-dydx \
--name "dydx" \
--config_file $CONFIG_FILE_PATH \
--client_listen_address $UNIX_SOCKET_PATH \
--flagfile $ENVIRONMENT_FLAGFILE
Flags¶
$ roq-dydx --help
--exchange
("dydx
)Exchange identifier
--rest_uri
({"https://api.stage.dydx.exchange"s}
)Exchange end-point
--rest_proxy
({""s}
)Proxy end-point
--rest_ping_freq
({5s}
)Ping frequency
--rest_ping_path
("/v3/time
)Ping path
--rest_request_timeout
({30s}
)Request timeout
--ws_uri
({"wss://api.stage.dydx.exchange/v3/ws"s}
)Exchange end-point
--ws_ping_freq
({5s}
)Ping frequency
--request_limit
(8
)Request limit per interval
--request_limit_interval
({5s}
)Request limit monitor interval
--encode_buffer_size
(1048576
)Encode buffer size
--decode_buffer_size
(10485760
)Decode buffer size
--mbp_allow_price_inversion
(true
)Allow price inversion?
--mbp_max_depth
({}
)Max depth levels (count)
Environments¶
$ $CONDA_PREFIX/share/roq-dydx/flags/prod/flags.cfg
# flagfile for the roq-dydx gateway
--rest_uri=https://api.dydx.exchange
--ws_uri=wss://api.dydx.exchange/v3/ws
$ $CONDA_PREFIX/share/roq-dydx/flags/test/flags.cfg
# flagfile for the roq-dydx gateway
--rest_uri=https://api.stage.dydx.exchange
--ws_uri=wss://api.stage.dydx.exchange
Configuration¶
$ $CONDA_PREFIX/share/roq-dydx/config.toml
Important
The template will be replaced when the software is upgraded. Make a copy and modify to your needs.
symbols = [
"^BTC-[A-Z]{3}$",
"^ETH-[A-Z]{3}$"
]
[accounts]
[accounts.A1]
master = true
login = "YOUR_DYDX_API_KEY_GOES_HERE"
secret = "YOUR_DYDX_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¶
Event |
Stream |
Messages |
Comments |
---|---|---|---|
MarketData |
v3_markets |
||
MarketData |
v3_markets |
||
Unavailable |
|||
MarketData |
v3_orderbook |
||
Unavailable |
|||
MarketData |
v3_trades |
||
MarketData |
v3_markets |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
MarketData |
v3_markets |
||
MarketData |
v3_markets |
||
Unavailable |
|||
MarketData |
v3_orderbook |
||
Unavailable |
|||
Not used |
|||
MarketData |
v3_markets |
Statistics¶
Type |
Comments |
---|---|
|
(v3_markets) |
|
(v3_markets) |
|
(v3_markets) |
|
(v3_markets) |
Order Management¶
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Streams¶
Type |
Comments |
---|---|
WebSocket |
Primary purpose
One connection |
Type |
Comments |
---|---|
REST |
Currently not used One connection |
Comments¶