roq-bitstamp¶
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¶
$ conda install \
--channel https://roq-trading.com/conda/stable \
roq-bitstamp
$ conda install \
--channel https://roq-trading.com/conda/unstable \
roq-bitstamp
Using¶
$ roq-bitstamp \
--name "bitstamp" \
--config_file $CONFIG_FILE_PATH \
--client_listen_address $UNIX_SOCKET_PATH \
--flagfile $ENVIRONMENT_FLAGFILE
Flags¶
$ roq-bitstamp --help
--exchange
(bitstamp
)Exchange identifier
--fix_uri
(tcp+ssl://fix.bitstamp.com:8905
)FIX end-point (URI)
--fix_ping_freq
(5s
)ping frequency
--fix_request_timeout
(15s
)request timeout
--fix_debug
(false
)log fix messages?
--rest_uri
(https://www.bitstamp.net
)Exchange end-point
--rest_proxy
Proxy end-point
--rest_ping_freq
(5s
)Ping frequency
--rest_ping_path
(/api/v2/ticker/btcusd
)Ping path
--rest_request_timeout
(30s
)Request timeout
--ws_uri
(wss://ws.bitstamp.net
)Exchange end-point
--ws_ping_freq
(5s
)Ping frequency
--ws_max_subscriptions_per_stream
(256
)Maximum number of symbols per connection
--encode_buffer_size
(1048576
)Encode buffer size
--decode_buffer_size
(10485760
)Decode buffer size
Environments¶
$ $CONDA_PREFIX/share/roq-bitstamp/flags/prod/flags.cfg
# flagfile for the roq-bitstamp gateway
--rest_uri=https://www.bitstamp.net
--ws_uri=wss://ws.bitstamp.net
--fix_uri=tcp+ssl://fix.bitstamp.net:8905
Configuration¶
$ $CONDA_PREFIX/share/roq-bitstamp/config.toml
Important
The template will be replaced when the software is upgraded. Make a copy and modify to your needs.
symbols = [
"^btcusd[a-z]?$",
"^ethusd[a-z]?$"
]
[accounts]
[accounts.A1]
master = true
user = "YOUR_BITSTAMP_USER_ID_GOES_HERE"
login = "YOUR_BITSTAMP_API_KEY_GOES_HERE"
secret = "YOUR_BITSTAMP_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 |
---|---|---|---|
Unavailable |
|||
MarketData |
order_book |
See note below |
|
MarketData |
live_orders |
Not implemented |
|
MarketData |
live_trades |
||
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Rest |
/api/v2/trading-pairs-info/ |
||
Rest |
/api/v2/trading-pairs-info/ |
||
Rest |
/api/v2/ticker/<currency_pair>/ |
Not implemented |
Statistics¶
Order Management¶
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
ExecutionReport (8) |
Not implemented |
|
OrderEntry |
ExecutionReport (8) |
Not implemented |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Rest |
api/v2/open_orders/all/ |
Not implemented, It is only possible to download open orders |
|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
NewOrderSingle (D) |
Not implemented |
|
Unavailable |
|||
OrderEntry |
OrderCancelRequest (F) |
Not implemented |
|
OrderEntry |
OrderMassCancelRequest (q) |
Event |
Stream |
Messages |
Comments |
---|---|---|---|
OrderEntry |
ExecutionReport (8), OrderCancelReject (9), BusinessMessageReject (j) |
Not implemented |
Order Types¶
TBD
Time in Force¶
TBD
Position Effect¶
TBD
Execution Instructions¶
TBD
Account Management¶
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Event |
Stream |
Messages |
Comments |
---|---|---|---|
Rest |
/api/v2/balance/ |
Not implemented |
Streams¶
Type |
Comments |
---|---|
REST |
Primary purpose
Each connection
|
Type |
Comments |
---|---|
WebSocket |
Primary purpose * live market data Each connection
|
Type |
Comments |
---|---|
REST |
Primary purpose
|
Constraints¶
The exchange API does not support a pass-through value
It is only possible to download open orders
It does not appear to be possible to download historical order fills
The FIX interface does not support automatic order cancellation following a disconnect
Rate-limit usage is not communicated by the exchange
Only possible to support order book snapshots (see notes below)
Choice or inverted prices is a real thing
Comments¶
The WebSocket protocol to receive differential L2 order book updates does not support correct initialisation through synchronisation. The conclusion is that only the (top 100) snapshot L2 order book updates can be used.
The (top 100) snapshot L2 order book sometimes include choice or inverted prices (bid >= ask).