Skip to main content

Bitstamp FIX Trade Connector

Features​

fix-bitstampConnector Key
Instruments
FXFUTURE
Request Types
SUBMITCANCELREPLACE
Order Types
LIMITMARKET
Time In Force
DAYGTCFOKIOCGTD
Order ID Mapper
COMPOSITE
✗
Order Status Request
✓
Cancel On Disconnect
✓
Commission
✓
Post Only
✗
Fast Cancel
✓
Fast Replace

Notes​

FIX API Access​

FIX API endpoint is not available by default.
Contact Bitstamp support to enable access.

Cancel on Disconnect​

On default the orders are canceled on logout.

note

In the vast majority of scenarios all orders will be canceled as expected on disconnect. However, there is a possibility that a network (or other similar) anomaly may result in some orders not being canceled.

To preserves orders on logout set preserveOrders = true.

Zero Average Price​

Bitstamp sends zero as the average price even for executed orders.
For filled orders, the connector uses LastPx(31) as the average price.

Connectivity​

Bitstamp requires secure (SSL) TCP/IP socket connection to Bitstamp FIX Gateway.

Stunnel configuration:

[BITSTAMP]
client = yes
accept = 15001
connect = fixserver.bitstamp.net:5001
verify = 0

Multiple FIX Sessions​

With multiple session feature, clients can establish up to three concurrent sessions on the same trade account by adding -BTS1 or -BTS2 to the end of senderSubId field. The authentication and session establishment process remains identical across all sessions.

Together with the original session, this allows up to three active sessions at once.

FIX Server Restart​

Occasionally servers need to be restarted (e.g. due to software updates).

Symbology​

Currency pairs in BASE/QUOTE format, e.g. BTC/USDT.

Schedule​

Bitstamp FIX session operates 24/7.

Sequence numbers will be reset when a user reaches a predefined threshold.
The threshold of sequence number is currently set to 1,000,000.

Configuration​

Connector settings​

ParameterDefault ValueDescription
senderSubId0Trade account ID. It needs to match the sub-account unique id of the API key used for login. Trade account id for main account is 0
asyncSessionfalseThis flag enables an async session. An async session enables significantly higher throughput, but does not guarantee an execution order (i.e. orders that were sent sooner might be placed later and vice versa).
preserveOrdersfalseThis flag allows to preserves order on logout. On default the orders are canceled on logout.
marginTypeCROSSMargin type. Valid values: ISOLATED, CROSS.
leverage1Valid values for leverage are decimal numbers greater than, or equal to 1.

Supported order attributes​

KeyDescription
18ExecInst(18). Valid values: 6 for PostOnly orders.
30000, 6030Margin Type. Valid values: I - ISOLATED, C - CROSS. Specifies the margin mode for derivatives markets. This field is required for orders placed in either CROSS or ISOLATED margin mode. Applicable for margin trading, defining how margin is applied to the order.
30001, 6031Leverage. The decimal number greater than, or equal to 1. Leverage rate for margin trading. This field is required for CROSS/ISOLATED margin mode. Applicable for margin orders to define the leverage rate.
30006White Label Account. Indicates on behalf of which account the order is placed.

Config sample​

connectors {
BITSTAMP: ${template.connector.fix.bitstamp} {
settings {
host = "<STUNNEL_HOST>"
port = <STUNNEL_PORT>

senderCompId = "<CUSTOMER_ID>"
targetCompId = BITSTAMP

username = "<USERNAME>"
password = "<PASSWORD>"

account = 0 # Trade account ID (0 means main account)
}
}
}