BitStamp

roq-bitstamp

Note

You will have to contact BitStamp support to enable FIX connectivity.

There are restrictions

  • You must have a fixed IP address

  • You must choose which access key to use for access: only one access key can be configured

Environments

Production

Option

Value

Type

Comment(s)

--rest-uri

https://www.bitstamp.net

REST

Incapsula

--ws-uri

wss://ws.bitstamp.net

WebSocket

--fix-uri

tcp+ssl://fix.bitstamp.net:8905

FIX

Data center

eu-central-1, AWS, Germany, Frankfurt

Test

Warning

Does not exist.

Installation

Conda

Install

conda install -y roq-bitstamp

Configuration

cp $CONDA_PREFIX/share/roq/bitstamp/config.toml $CONFIG_FILE_PATH

# then modify $CONFIG_FILE_PATH to match your specific configuration

Using

roq-bitstamp \
      --name "bitstamp" \
      --config-file "$CONFIG_FILE_PATH" \
      --client-listen-address "$UNIX_SOCKET_PATH" \
      --metrics-listen-address "$TCP_LISTEN_PORT" \
      --rest-uri "$REST_URI" \
      --ws-uri "$WS_URI" \
      --fix-uri "$FIX_URI"

Flags

Only notable flags are mentioned here. Please refer to roq-bitstamp --help for all flags.

--allow-price-inversion

The gateway will fail with an exception (order book in bad state) unless you set this option. This is necessary because the exchange sometimes publish inverted order book prices…

Ansible

Add your host to the roq_bitstamp group

[roq_bitstamp]
MY_SERVER

Docker

docker pull roqtrading/roq-bitstamp

Implementation

Restrictions

OrderAck, OrderUpdate, TradeUpdate, CreateOrder, CancelOrder

Work in progress.

Incoming Events

Event

Connection

Message(s)

Comment(s)

ReferenceData

REST

trading_pairs_info

MarketStatus

REST

trading_pairs_info

TopOfBook

Not available

MarketByPrice

WS

order_book

See note below

MarketByOrder

WS

live_orders

Not implemented

TradeSummary

WS

live_trades

SessionStatistics

Not available

DailyStatistics

Not available

OrderAck

FIX

ExecutionReport, OrderCancelReject, Reject

Not implemented

OrderUpdate

FIX

ExecutionReport

Not implemented

TradeUpdate

FIX

ExecutionReport

Not implemented

PositionUpdate

FundsUpdate

Notes

  • 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. This implementation may change if FIX connectivity really is an option.

  • Price inversion is possible…

Outgoing Events

Event

Connection

Message(s)

Comment(s)

CreateOrder

FIX

NewOrderSingle

Not implemented

ModifyOrder

Not available

CancelOrder

FIX

OrderCancelRequest

Not implemented

Notes

  • The FIX interface does not support automatic order cancellation following a disconnect.