Public FIX Interface v2

For FIX Interface access, contact support.

1 Introduction

This is a public FIX Interface. It describes FIX messaging interface (messages, component blocks, and fields) supported by Bitstamp FIX Gateway. This interface is based on standard FIX 4.4 (Financial Information eXchange protocol, http://www.fixtradingcommunity.org/) and is adopted to Bitstamp FIX Gateway specifics.

Bitstamp FIX Gateway supports only those messages, component blocks and fields, which are described in this document. Note that all fields, which are required or conditionally required by FIX 4.4 standard, but absent in Bitstamp Public FIX Interface specification are optional and will be ignored. Messages containing fields, which are absent in FIX 4.4 standard and in this document, will be considered as invalid and will be rejected.

Note: View the previous FIX documentation.

1.1 System Overview

Bitstamp FIX Gateway is FIX compliant gateway that provides a direct connectivity to the core Bitstamp trading infrastructure. The communication is done via appropriate FIX messages.

Bitstamp FIX Gateway operates in UTC time zone.

1.2 Reading Instructions

Each message or component block is presented in table. Each table row is a message field or component block having the following characteristics:

Tag unique field identifier
Name field name
Req’d
shows whether the field is required or not in appropriate message or component block:
‘Y’ tag is required (mandatory)
‘N’ tag is not required (optional)
‘C’ tag is conditionally required.
‘Y*’ tag is required by Bitstamp FIX Gateway, but not required by the standard FIX 4.4 protocol
‘N*’ tag is not required by Bitstamp FIX Gateway, but required by the standard FIX 4.4 protocol
Type field type
Comments comments, list of valid values and additional information for the tag.

1.3 Changelog

2025-10-16

  • Introduced apiVersion V2.2. New features availabe in this version.
  • Added new fields:
    • isRejectedSelfTrade (30017) – added to indicate self-trade rejection events
    • FeeRate (30018) – introduced to report the net trade fee rate applied at execution time
      • - Tag: 30018
      • - Description: The rate (in decimal form) at which the trade fee was calculated.
      • - Example: 0.0015 = 0.15% fee.
      • - Available in: Execution Report (35=8) messages.
  • Tag 58 - Text field enhancement:
    Updated to include limit breach diagnostic information for rate limit or throttling events.
    Text (58) now provides structured data in human-readable format:
    • - Rate limit breach. Scope: [SESSION | USER | MARKET]

2025-09-25

  • Consume MarketEventId as execId in V2 execution reports.
    This update aligns execution identifiers with market event IDs, ensuring consistency across trade reporting.

2025-09-08

  • Introduced apiVersion parameter in Logon message:
    {"apiVersion": "V2.1"}
    Enables clients to negotiate feature sets at session start.
  • Added new fields for Spot & Derivatives markets:
    • MakerOrCancel (30007) – force order to be maker or cancel
    • RelTxID (30012) – unique transaction identifier for reconciliation
    • UTI (30013) – MiFID reporting transaction ID (derivatives only)
    • TradeType (30014) – categorizes trades (ORDERBOOK, POSITION_LIQUIDATION, etc.)
    • OrderStatusRequestVersion (30016) – choose V1 (latest only) or V2 (full order history)
    • LastLiquidityInd (851) – indicates maker vs taker in fills
  • Sequence number auto-reset at 1,000,000.
    Server sends a FIX News event, clients have 5 seconds to reconnect, else session logs out with ResetSeqNumFlag=Y.
  • Support for up to three concurrent FIX sessions per trade account.
    Inbound orders accepted from any session; fills broadcast to all. Session origin still controls order acknowledgments.
  • Multi-session configuration.
    Append suffixes (-BTS1, -BTS2) to SenderSubID to identify parallel sessions.
  • Precision validation for numeric fields.
    Enforced on price (tick size) and orderQty (step size). Trailing zeros ignored; leading zeros counted.

2 Supported FIX Messages

Session level messages

All FIX 4.4 session-level messages are supported. The structure and semantics of FIX messages are identical to the standard.

Application level messages

The following FIX application-level messages are supported:

 

Other application-level messages are not supported. All unsupported messages are rejected with Session Level Reject (MsgType = '3').

3 FIX Session Layer

3.1 FIX Session Management

3.1.1 FIX Session Establishment & Authentication

In order to establish FIX session, each FIX Client must initiate secure (SSL) TCP/IP socket connection to Bitstamp FIX Gateway and submit Logon (MsgType = ‘A’) FIX message equipped with Username (553) and Password (554).

FIX Session Parameters
Host: fixserver.bitstamp.net
Port: 5001
SSL Required: Yes
SenderCompID (49): Your Customer ID
SenderSubID (50): Your Trade account ID* (0 in case of main account)
TargetCompID (56): Always equals ‘BITSTAMP’ constant
Heartbeat Interval (108): 30 (recommended)
Username (553): Must contain API key, assigned to the Customer ID
Password (554): Must contain API SECRET, assigned to the Customer ID

*Trade account id needs to match the sub-account unique id of the API key used for login. Trade account id for main account is 0.

3.1.1.1 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 (50) field. The authentication and session establishment process remains identical across all sessions.

Example (customerId: abcd1234, uniqueTradeAccountId: 99999):

SenderCompID -> SenderSubID :: abcd1234 -> 99999
SenderCompID -> SenderSubID :: abcd1234 -> 99999-BTS1
SenderCompID -> SenderSubID :: abcd1234 -> 99999-BTS2

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

In case of using multiple FIX sessions, you will receive an execution report similar to this:
'FIX.4.4:1/0-BTS1->BITSTAMP: 8=FIX.4.4|​9=276|​35=8|​34=2|​49=BITSTAMP|​52=20250813-11:11:19.132|​56=1|​57=0-BTS1|​6=0.00000000|​11=ClOrdId1234-141|​14=0.00000000|​17=1909753874321408|​31=1600.00000000|​37=1909753874194432|​38=0.10000000|​39=0|​40=2|​44=1600.00000000|​54=1|​55=BTC/USD|​60=20250813-11:11:19.112|​150=0|​151=0.10000000|​30007=N|​10=009|'

For FIX Interface access, contact support.

3.1.2 FIX Session Termination

In order to close FIX session, FIX Client should submit Logout (MsgType = ‘5’) message, wait for confirming Logout and close TCP/IP socket connection to Bitstamp FIX Gateway host. FIX Client is allowed to start and stop FIX session at any time.

3.1.3 FIX Server Restart

Occasionally servers need to be restarted (e.g. due to software updates). When this happens, clients get a news message notifying them to reconnect. Clients have 10 seconds to reconnect, otherwise server logs them out automatically. To recover, users should send a Logon message.

Example:

  1. Server needs to be restarted. It sends the following FIX message: '8=FIX.4.4|9=109|35=B|34=44|49=BITSTAMP|52=20220401-12:01:11.145|56=<user_id>|148=Server is about to restart. Please reconnect|10=113|'
  2. Server waits for 10 seconds.
  3. If clients have not reconnected, the server logs them out, by sending the following message: '8=FIX.4.4|9=121|35=5|34=65|49=BITSTAMP|52=20220401-12:01:16.146|56=<user_id>|58=Disconnected due to server going under restart procedure.|10=109|'.
  4. Clients have to send a Logon message to reconnect.

3.1.4 Sequence Numbers Reset

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

When the user reaches the sequence number threshold, the server sends a fix news event notifying the user of the upcoming sequence number reset. After that user has 5 seconds to reconnect and reset the sequence numbers. If the user does not respond, the server sends an OnLogout event with ResetSeqNumFlag set to ‘Y’.

Example:

  1. User exceeds a threshold.
  2. Server sends the following FIX message: '8=FIX.4.4|9=132|35=B|34=1000002|49=BITSTAMP|52=20220401-12:01:11.145|56=<user_id>|148=Sequence number threshold reached. Please reset sequence numbers.|10=234|'.
  3. Server waits for 5 seconds.
  4. If user has not reconnected, the server logs them out, by sending the following message: '8=FIX.4.4|9=130|35=5|34=1|49=BITSTAMP|52=20220401-12:01:16.146|56=<user_id>|58=Sequence number threshold reached. Resetting sequence number.|141=Y|10=231|'.
  5. User has to send a Logon message to reconnect.

3.1.5 Reject Handling

Bitstamp FIX Gateway will reject message deviating from expected ones as follows:

FIX Message Reject Reason
Session Level Reject (MsgType = ‘3’)

Received FIX message violates FIX session level rules.

Example:

  • message lacking a mandatory tag
  • message with an incorrect value for a specific tag
  • tag without a value
  • unknown message type
  • tag appears more than once
  • number of repeating group entries does not comply with leading tag, etc

3.2 FIX Session Level Messages

3.2.1 Logon (MsgType = ‘A’)

The Logon (A) message authenticates a user establishing a connection to a remote system. The Logon (A) message must be the first message sent by the application requesting to initiate a FIX session.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'A'
58 Text N String We support the following parameters:
  • Parameter {"asyncSession":true} 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).
    Default value: false.
  • Parameter {"preserveOrders":true} preserves orders on logout. On default the orders are canceled on logout. If this is left out, the default value ('{preserveOrders:false}') is considered.
    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.
  • Parameter {"includeTradeInfo":true} ensures that trade ID of the associated trade is included in AgreementID (914).
    Default value: false.
  • Parameter {"logoutOnInactivity":true} offers to automatically disconnect the session on inactivity. It prevents unexpected behavior when the session becomes stale.
    Default value: false.
  • The apiVersion parameter specifies the API version to use. Available values are: V1, V2, V2.1, and V2.2. This allows compatibility with different feature sets or behaviors depending on the version selected.
    Default value: "V1".
Of course all parameters can be used in any combination. When some parameter is left out, the default value is considered.
Examples:
  • {"asyncSession":true, "preserveOrders":true}
  • {"asyncSession":true, "logoutOnInactivity":true}
  • {"asyncSession":true, "logoutOnInactivity":true, "preserveOrders":false}
  • {"apiVersion":"V2.2", "logoutOnInactivity":true}

98 EncryptMethod Y Int

Method of encryption. Supported values:

  • '0' — None
108 HeartBtInt Y Int Heartbeat interval in seconds.
141 ResetSeqNumFlag N Boolean Indicates that the both sides of the FIX session should reset sequence numbers.
553 Username Y* String Must contain API key assigned to the customer.
554 Password Y* String Must contain API secret assigned to the customer.
<Standard Message Trailer> Y

3.2.2 Heartbeat (MsgType = ‘0’)

The Heartbeat (0) monitors the status of the communication link and identifies when the last of a string of messages was not received.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = '0'
112 TestReqID N String Identifier included in Test Request (1) message to be returned in resulting Heartbeat (0).
<Standard Message Trailer> Y

3.2.3 Test Request (MsgType = ‘1’)

The Test Request (1) message forces a heartbeat from the opposing application. The Test Request (1) message checks sequence numbers or verifies communication line status. The opposite application responds to the Test Request (1) with a Heartbeat (0) containing the TestReqID (112).

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = '1'
112 TestReqID Y String Identifier included in Test Request (1) message to be returned in resulting Heartbeat (0).
<Standard Message Trailer> Y

3.2.4 Resend Request (MsgType = ‘2’)

The resend request is sent by the receiving application to initiate the retransmission of messages. This function is utilized if a sequence number gap is detected, if the receiving application lost a message, or as a function of the initialization process.

The resend request can be used to request a single message, a range of messages or all messages subsequent to a particular message.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = '2'
7 BeginSeqNo Y SeqNum Message sequence number of first message in range to be resent.
16 EndSeqNo Y SeqNum Message sequence number of last message in range to be resent. If request is for a single message BeginSeqNo (7) = EndSeqNo (16). If request is for all messages subsequent to a particular message, EndSeqNo (16) = '0' (representing infinity).
<Standard Message Trailer> Y

3.2.5 Session Level Reject (MsgType = ‘3’)

Session Level Reject message is be used issued to reject message, which cannot be properly processed due to a session-level rule violation.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = '3'
45 RefSeqNum Y SeqNum MsgSeqNum (34) of rejected message.
371 RefTagID N Int The tag number of the FIX field being referenced.
372 RefMsgType N String(10) The MsgType (35) of the FIX message being referenced.
373 SessionRejectReason N Int

Code to identify reason for reject.

Supported values:

  • '0' (Invalid tag number)
  • '1' (Required tag missing)
  • '2' (Tag not defined for this message type)
  • '3' (Undefined tag)
  • '4' (Tag specified without a value)
  • '5' (Value is incorrect (out of range) for this tag)
  • '6' (Incorrect data format for value)
  • '7' (Decryption problem)
  • '8' (Signature problem)
  • '9' (CompID problem)
  • '10' (SendingTime accuracy problem)
  • '11' (Invalid MsgType (35))
  • '13' (Tag appears more than once)
  • '14' (Tag specified out of required order)
  • '15' (Repeating group fields out of order)
  • '16' (Incorrect NumInGroup count for repeating group)
  • '17' (Non "data" value includes field delimiter)
  • '99' (Other)
58 Text N String Message to explain reason for rejection.
<Standard Message Trailer> Y

3.2.6 Reset Sequence (MsgType = ‘4’)

The Sequence Reset (4) message has two modes: Gap Fill mode and Reset mode.

Gap Fill mode

Gap Fill mode is used in response to a Resend Request (2) when one or more messages must be skipped over for the following reasons:

  • During normal resend processing, the sending application may choose not to send a message (e.g. an aged order).
  • During normal resend processing, a number of administrative messages are skipped and not resent (such as Heart Beats, Test Requests).

Gap Fill mode is indicated by GapFillFlag (123) field = 'Y'.

Reset mode

Reset mode involves specifying an arbitrarily higher new sequence number to be expected by the receiver of the Sequence Reset (4) message, and is used to re-establish a FIX session after an unrecoverable application failure.

Reset mode is indicated by the GapFillFlag (123) field = 'N' or if the field is omitted.

For more details, please read the following information.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = '4'
123 GapFillFlag N Boolean

Indicates that the Sequence Reset (4) message is replacing administrative or application messages which will not be resent.

Supported values:

  • ‘Y' (Gap Fill message, MsgSeqNum field valid)
  • 'N' (Sequence Reset, ignore MsgSeqNum)
36 NewSeqNo Y SeqNum New sequence number.
<Standard Message Trailer> Y

3.2.7 Logout (MsgType = ‘5’)

The Logout (5) message initiates or confirms the termination of a FIX session. Disconnection without the exchange of Logout (5) messages should be interpreted as an abnormal condition. To recover from this a user should send a Logon message with a 'ResetSeqNumFlag' field set to 'Y'.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = '5'
58 Text N String Logout reason.
<Standard Message Trailer> Y

3.3 FIX Application Level Messages

3.3.1 FIX Component Blocks

3.3.1.1 Standard Message Header

Each administrative or application message is preceded by a standard header. The header identifies the message type, length, destination, sequence number, origination point and time.

Tag Field Name Req'd Type Comments
8 BeginString Y String

Identifies beginning of new message and protocol version.

Always unencrypted, must be first field in message.

9 BodyLength Y Length

Message length, in bytes, forward to the CheckSum field.

Always unencrypted, must be second field in message.

35 MsgType Y String

Defines message type.

Always unencrypted, must be third field in message.

49 SenderCompID Y String

Assigned value used to identify firm sending message.

Always unencrypted.

56 TargetCompID Y String

Assigned value used to identify receiving firm.

Always unencrypted.

34 MsgSeqNum Y SeqNum Integer message sequence number.
43 PossDupFlag N Boolean

Indicates possible retransmission of message with this sequence number. Required for retransmitted messages.

Supported values:

  • ‘Y’ (Possible duplicate)
  • 'N' (Original transmission)
97 PossResend N Boolean

Indicates that message may contain information that has been sent under another sequence number.

Supported values:

  • ‘Y’ (Possible resend)
  • 'N' (Original transmission)
52 SendingTime Y UTCTimestamp

Time of message transmission (expressed in UTC).

YYYYMMDD-HH:MM:SS.sss

122 OrigSendingTime N UTCTimestamp

Original time of message transmission when transmitting messages as the result of resend request (expressed in UTC).

Required for message resent as a result of a resend request.

3.3.1.2 Standard Message Trailer

Each administrative or application message is terminated by a standard trailer. The trailer is used to segregate messages and contains the three-digit character representation of the Checksum value.

Tag Field Name Req'd Type Comments
10 CheckSum Y String

Three bytes, simple checksum.

Always unencrypted, always last field in message.

3.3.2 General

3.3.2.1 News (MsgType = ‘B’)

FIX message “News (B)” is used to inform user about the incoming actions.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'B'
148 Headline Y String Specifies the headline text
<Standard Message Trailer> Y

3.3.3 Market Data

3.3.3.1 Market Data Request (MsgType = ‘V’)

FIX message “Market Data Request (V)” is used to subscribe for Order Book (events/changes) or Live Trades. Note that sending subsequent market data request invalidates previous subscriptions. To subscribe to more than one trading pair send a request containing all the wanted pairs (a repeating group).

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'V'
262 MDReqID Y String Unique identifier for Market Data Request (V).
263 SubscriptionRequestType Y Char

Subscription Request Type.

Supported values:

  • 1 - Subscribe
  • 2 - Unsubscribe
264 MarketDepth Y Int

Depth of market for Order Book Snapshot.

Supported values: from 0 to 20, where 0 means full Book (same as 20), but every other value means that received events contain at most that given amount of price levels of Book.
Example: If given value of 5, up to 5 price levels will be sent.

267 NoMDEntryTypes Y NumInGroup Number of MDEntryType (269) fields requested
=>269 MDEntryType Y Char

Type Market Data Entry.

Supported values:

  • 0 – Bid
  • 1 – Offer
  • 2 – Trade
146 NoRelatedSym Y NumInGroup Number of symbols (instruments) requested.
=>55 Symbol Y String

Trading pair.

Supported values:

<Currency Pairs>

<Standard Message Trailer> Y

3.3.3.2 Market Data – Full Refresh (MsgType = ‘W’)

FIX message “Market Data – Snapshot/Full Refresh (W)” is used to deliver updates of Order Book.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'W'
262 MDReqID Y* String Unique identifier for Market Data Request (V) this message is sent in reply to.
55 Symbol Y String

Trading pair.

Valid values:

<Currency Pairs>

268 NoMDEntries Y NumInGroup Number of entries following.
=>269 MDEntryType Y Char

Type of Market Data Entry.

Valid values:

  • 0 – Bid
  • 1 – Offer
=>270 MDEntryPx Y* Price Price of the Market Data Entry.
=>271 MDEntrySize Y* Qty Quantity or volume represented by the Market Data Entry.
<Standard Message Trailer> Y

3.3.3.3 Market Data – Incremental Refresh (MsgType = ‘X’)

FIX message “Market Data – Incremental Refresh (X)” is used to deliver live ticker.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'X'
262 MDReqID Y* String Unique identifier for Market Data Request (V) this message is sent in reply to.
268 NoMDEntries Y NumInGroup Number of entries following.
=>279 MDUpdateAction Y Char

Type of Market Data update action.

Valid values:

  • 0 – New
=>269 MDEntryType Y* Char

Type of Market Data entry.

Valid values:

  • 2 – Trade
=>278 MDEntryID Y* String Trade unique ID.
=>55 Symbol Y* String

Trading pair.

Valid values:

<Currency Pairs>

=>270 MDEntryPx Y* Price Price of the Market Data Entry.
=>271 MDEntrySize Y* Qty Quantity or volume represented by the Market Data Entry.
=>272 MDEntryDate Y* UTCDateOnly Date of Market Data Entry.
=>273 MDEntryTime Y* UTCTimeOnly Time of Market Data Entry.
288 MDEntryBuyer Y* Int This value represents a BuyOrderID*.
289 MDEntrySeller Y* Int This value represents a SellOrderID*.
<Standard Message Trailer> Y

* NOTE: The lower ID value between MDEntryBuyer and MDEntrySeller represents a maker side, and the higher ID value represents a taker side.

3.3.3.4 Market Data Request Reject (MsgType = ‘Y’)

FIX message “Market Data Request Reject (Y)” is used to reject the Market Data Request, due to business or technical reasons.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'Y'
262 MDReqID Y String Must refer to the MDReqID (262) of the request.
281 MDReqRejReason Y* Char

Reason for the rejection of a Market Data Request (V).

Valid values:

  • '0' — Unknown symbol
  • '1' — Duplicate MDReqID (262)
  • '4' — Unsupported SubscriptionRequestType (263)
  • '5' — Unsupported MarketDepth (264)
  • '8' — Unsupported MDEntryType (269)
  • 'y' — Unknown MDReqID (262)
<Standard Message Trailer> Y

3.3.4 Trading

3.3.4.1 New Order – Single (MsgType = 'D')

FIX message "New Order – Single (D)" is used to submit orders to the Bitstamp Trading System. This message can be used for two purposes: placing new orders and closing existing positions.

Place Order

Use the following fields to place a new order:

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'D'
11 ClOrdID Y String Unique identifier of the order as assigned by the client
55 Symbol Y String

Trading pair.

Valid values:

<Currency Pairs>

54 Side Y Char

Side of order.

Valid values:

  • '1' - Buy
  • '2' - Sell
58 Text N String

Optional JSON that extends FIX with MOC order type

MOC Support

FIX protocol does not support TimeInForce MOC (Maker Or Cancel) by default. By setting text value of {"moc":true} and TimeInForce value '1' (Good Till Cancel), we consider the order to have Maker Or Cancel TimeInForce.

60 TransactTime N* UTCTimestamp Timestamp provided by the client.
38 OrderQty Y Qty Quantity ordered.
40 OrdType Y Char

Order type.

Valid values:

  • '1' - Market
  • '2' - Limit
  • '3' - Stop
  • '4' - Stop Limit
44 Price C Price Price of the limit order. Required for OrderType(40) = ‘2’ (Limit)
59 TimeInForce Y* Char

Specifies how long the order remains in effect.

Valid values:

  • '0' - Day
  • '1' - Good Till Cancel (GTC)
  • '3' - Immediate Or Cancel (IOC)
  • '4' – Fill or Kill (FOK)
  • '6' – Good Till Date (GTD)
99 StopPx N Decimal Stop price for stop or stop-limit orders.
126 ExpireTime Y* UTCTimestamp Time/Date of order expiration (always expressed in UTC (Universal Time Coordinated, also known as "GMT") This is the expiration time of a 'Good Till Date' TimeInForce <59>. UTCTimestamp is string field representing Time/date combination represented in either YYYYMMDD-HH:MM:SS (whole seconds) or YYYYMMDD-HH:MM:SS.sss (milliseconds) format, colons, dash, and period required.
30000 Margin Mode Y String (Enum)

Specifies the margin mode for derivatives markets. This field is required for orders placed in either CROSS or ISOLATED margin mode.

Valid values:

  • 'C' = Cross
  • 'I' = Isolated

Usage: Applicable for margin trading, defining how margin is applied to the order.

30001 Leverage Y String

Leverage rate for margin trading. This field is required for CROSS/ISOLATED margin mode.

Usage: Applicable for margin orders to define the leverage rate.

30002 Trigger Y String (Enum)

Specifies the type of price that the stop order will trigger on. This defines whether the stop price is compared to the last traded price, the index price, or the mark price.

Valid values:

  • 'T' = Last Traded Price
  • 'I' = Index Price
  • 'M' = Mark Price

Usage: Used with stop orders to define the market condition that triggers the order.

30003 Activation Price Y String (Decimal)

Activation price for trailing stop order. When this price is reached, the order starts trailing the market price in a favorable direction.

Usage: Used in trailing stop orders to define the price at which the trailing behavior is activated.

30004 Trailing Delta Y String (Integer)

The trailing delta represents how much the price can move in the unfavorable direction, from the highest or lowest price, before the trailing stop order is triggered. The value is in basis points (bps), where 5% equals 500, and the range is between 1 and 2000.

Usage: Used in trailing stop orders to define the amount by which the market price can move unfavorably before the order is executed.

30005 Reduce Only N Boolean

If set to 1, this field ensures that the order only reduces the existing position without opening a new one.

Valid values:

  • 'Y' = Yes, reduce only
  • 'N' = No

Usage: Used to ensure that an order only reduces the existing position, commonly applied in margin trading scenarios. This field applies to all order types including Limit, Market, Stop, and Stop Limit orders.

30007 MakerOrCancel N Boolean

Defines if an order is MoC order.

Valid values:

  • 'Y' = Yes, maker or cancel
  • 'N' = No
30006 White Label Account N String

Indicates on behalf of which account the order is placed.

30010 StopOrdType Y String (Enum)

Specifies whether a stop order is a stop-loss or take-profit type.

Valid values:

  • 'L' = Stop Loss
  • 'P' = Take Profit

Usage: Used with stop orders to define the market condition that triggers the order.

<Standard Message Trailer> Y

Note: In apiVersion V2, V2.1 and V2.2, the Price and OrderQty fields are subject to precision validation. A value is accepted if the number of non-zero digits after the decimal point is less than or equal to the instrument's allowed precision (derived from market tick size for Price and from quantity step size for OrderQty). Trailing zeros after the decimal point do not count toward precision (e.g., 10.1200 is treated as 2 decimals), while leading zeros do (e.g., 0.0001 has 4 decimals). Examples: if Price precision = 2 → allowed: 10, 10.1, 10.12, 10.1200; rejected: 10.123, 10.1205. If OrderQty precision = 3 → allowed: 1, 0.5, 1.125; rejected: 1.1257. You can find the precision values for each instrument in the /api/v2/markets/ endpoint.

Close Position

Use the following fields to close an existing position.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'D'
11 ClOrdID N String Unique identifier of the order as assigned by the client
30008 PositionID Y Uint64 ID of the position to close
<Standard Message Trailer> Y

Note: For close position requests, other required fields (Symbol, Side, OrderQty, OrdType, etc.) can be set to default values as they are ignored by the system when PositionID is provided.

3.3.4.2 Order Cancel Request (MsgType = ‘F’)

FIX message “Order Cancel Request (F)” is used to cancel a specific order previously submitted to the Bitstamp Trading System.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'F'
41 OrigClOrdID Y String ClOrdID (11) of the previous non-rejected order when canceling an order. This will be used for the cancel attempt if OrderID is not present.
11 ClOrdID Y String Unique ID of cancel request as assigned by the client
37 OrderID Y* String Unique identifier of the order in Bitstamp Trading System. This ID will be used to find the order to be cancelled.
60 TransactTime N* UTCTimestamp Timestamp provided by the client.
<Standard Message Trailer> Y

3.3.4.3 Order Mass Cancel Request (MsgType = ‘q’)

FIX message "Order Mass Cancel Request (q)" is used to cancel all client orders in the Bitstamp Trading System.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'q'
11 ClOrdID Y String Unique ID of Order Mass Cancel Request (q) as assigned by the client
530 MassCancelRequestType Y Char

Specifies the type of cancellation requested.

Valid values:

  • '7' - Cancel all orders
60 TransactTime N* UTCTimestamp Time of order creation.
<Standard Message Trailer> Y

3.3.4.4 Execution Report (MsgType = ‘8’)

FIX message "Execution Report (8)" is used to:

  • confirm the receipt of an order;
  • confirm changes to an existing order (i.e. accept cancel request, replace order request);
  • relay order status information;
  • relay fill information on working orders;
  • reject orders.
Self-Trade Events

In case of disabled self-trading, you will receive an execution report similar to this:
'8=FIX.4.4|​9=406|​35=8|​34=3|​49=BITSTAMP|​52=20251125-11:47:20.619|​56= |​57=0|​6=0.00000000|​11=ClOrdId123-MARKET2|​14=0.10000000|​17=64375e92-c9d4-4ce6-a9f9-c172246b2555|​31=94525.00000000|​32=0.10000000|​37=1946567745335296|​38=0.10000000|​39=2|​40=1|​44=94525.00000000|​54=2|​55=BTC/USD|​60=20251125-11:47:20.608|​136=1|​137=0.04726000|​139=7|​150=F|​151=0.00000000|​851=2|​914=639|​30007=N|​30012=639|​30014=ORDERBOOK|​30017=N|​30018=0.00000000|​10=121|'

Liquidation Events

Bitstamp sends execution reports originating from liquidation events. Collateral, Assignment and ADL liquidation is not done via Order book, consequently reports originate from transaction events.

In case of liquidation, you will receive an execution report similar to this:
'8=FIX.4.4|​9=353|​35=8|​34=6|​49=BITSTAMP|​52=20250509-05:14:01.640|​56=1|​57=98765|​6=0.00000000|​11=|​14=0.00000000|​17=1875692203950080|​31=94844.00000000|​37=|​38=0.00023000|​39=2|​40=1|​54=1|​55=BTC/USD-PERP|​60=19700523-21:21:18.890|​136=1|​137=0.00000000|​139=7|​150=F|​151=0.00000000|​914=1547035|​30001=0.00000000|​30008=1234567890|​30009=Y|​30012=1547035|​30013=|​32=0.00023000|​30000=C|​10=146|'

Notes on liquidation event values:

  • OrdType(40) is always set as Market ('1'), since there is no originating order
  • OrdStatus(39) is always set as Filled ('2'), since there is no originating order
  • IsLiquidation(30009) is set to 'Y' to indicate this is a liquidation event
  • The only difference between collateral liquidation and Assignment/ADL liquidation is visible in the Market instrument - BTC/USD for collateral liquidation vs BTC/USD-PERP for Assignment/ADL
Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = '8'
11 ClOrdID Y* String Unique identifier of the order or cancel request this Execution Report relates to, as assigned by the client.
37 OrderID Y String Unique identifier of the order assigned by Bitstamp Trading System.
41 OrigClOrdID C String ClOrdID (11) of the cancelled order. Conditionally required in response to Cancel request (ExecType (150) = Canceled).
17 ExecID Y String Unique identifier of Execution Report (8) message as assigned by Bitstamp.
150 ExecType Y Char

Describes the specific Execution Report (8) type.

Valid values:

  • '0' - New
  • '4' - Canceled
  • '8' - Rejected
  • 'F' - Trade (partial fill or fill)
39 OrdStatus Y Char

Identifies current status of order.

Valid values:

  • '0' - New
  • '1' - Partially filled
  • '2' - Filled
  • '4' - Canceled
  • '8' - Rejected
55 Symbol Y String

Trading pair.

Valid values:

<Currency Pairs>

54 Side Y Char

Side of order.

Valid values:

  • '1' - Buy
  • '2' - Sell
40 OrdType N Char

Order type.

Valid values:

  • '1' - Market
  • '2' - Limit
  • '3' - Stop
  • '4' - Stop Limit
32 LastQty С Qty

Quantity bought/sold on this fill.

Required if ExecType (150) = ‘F’ (Trade).

31 LastPx С Price

Price of this fill.

Required if ExecType (150) = ‘F’ (Trade).

151 LeavesQty Y Qty Quantity open for further execution. Always 0 for ExecType=’8’ (Rejected).
14 CumQty Y Qty Currently quantity for the order. Always 0 for ExecType=’8’ (Rejected).
6 AvgPx Y Price Always 0.
60 TransactTime N UTCTimestamp Time of execution.
58 Text N String

The error message for ER_REJECT is a general-purpose text field that carries structured diagnostic data for rate limit violations.

New format for rate limit errors:

  • Rate limit breach. Scope: [SESSION | USER | MARKET]
103 OrdRejReason N Int Code to identify reason for cancel rejection. If present, value is always '99' - Other.
137 MiscFeeAmt N Amt Fees applied on this trade.
851 LastLiquidityInd N Int

Indicator to identify whether this fill was a result of a liquidity provider providing or liquidity taker taking the liquidity. It is present in ER_TRADE events.

Valid values:

  • 1 = Added Liquidity (maker)
  • 2 = Remove Liquidity (taker)
30006 White Label Account N String

Identifies the white label account associated with this execution report.

30007 MakerOrCancel N Boolean

Identifies if the order is MoC.

Valid values:

  • 'Y' = Yes, maker or cancel
  • 'N' = No
30009 IsLiquidation N Boolean

Identifies if trade is result of liquidation.

Valid values:

  • 'Y' = Yes, trade is a result of a liquidation
  • 'N' = No
30012 RelTxID N Uint64

Unique identifier of the transaction related to the execution report. When {"includeTradeInfo": true} is set in the Logon message, additional trade-related fields are included in ExecutionReport, including the transaction identifier. AgreementID (914) is equivalent to RelTxID (30012), ensuring each trade can be referenced unambiguously across systems.

30013 UTI N String

Unique identifier of the transaction used for regulatory reports.

30014 TradeType N String (Enum)

Classifies the nature of the trade.

Valid values:

  • 'ORDERBOOK' = Normal trade, applicable to both spot and derivatives markets.
  • 'POSITION_LIQUIDATION' = Trade resulting from a liquidated position, regardless of mechanism.
  • 'POSITION_ADL' = Trade representing the opposite side of an ADL (Auto-Deleveraging) event.
  • 'POSITION_ASSIGNMENT' = Liquidates position assigned to LAP participant.
  • 'POSITION_MARKET_WIDE_CLOSURE' = Bitstamp-initiated market-wide position closure.
  • 'COLLATERAL_LIQUIDATION' = Trade related to collateral liquidation.
30015 EstimatedNextSettlementTime N FIXUTCField

Standard FIX UTC timestamp format representing estimated time for the next settlement. Information is received in collateral liquidation events.

30017 isRejectedSelfTrade N Boolean

Indicates whether self-trade order is discarded due to client configuration.

Valid values:

  • 'Y' = Yes, self-trade order is discarded.
  • 'N' = No, self-trade order is accepted.
30018 FeeRate N Float

Rate at which the net trade fee was calculated. Expressed as a decimal fraction (e.g., 0.001 = 0.1%).

<Standard Message Trailer> Y

3.3.4.5 Order Status Request (MsgType = ‘H’)

FIX message "Order Status Request (H)" is used to obtain the status of an order. Response to this message is an Execution Report.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'H'
37 OrderID N String Unique identifier of the order in Bitstamp Trading System. If this field is included, ClOrdID is ignored.
11 ClOrdID Y String Unique ID of cancel request as assigned by the client. If OrderID is included, this field is ignored. This field can be left empty.
54 Side Y Char

Side of order.

Valid values:

  • '1' - Buy
  • '2' - Sell
30016 OrderStatusRequest N String

If set to 'V2', the system will return all execution reports that have occurred for the specified order. If not set or set to 'V1', the system will return only the most recent (latest) execution report for the order.

Valid values:

  • 'V1' - Version 1 (default)
  • 'V2' - Returns full order history
<Standard Message Trailer> Y

3.3.4.6 Order Cancel Reject (MsgType = ‘9’)

FIX message "Order Cancel Reject (9)" is used to reply to a Cancel Request (F) message which cannot be honored.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = '9'
37 OrderID Y String Unique identifier of the order in Bitstamp Trading System.
11 ClOrdID Y String Unique ID of cancel request as assigned by the client.
41 OrigClOrdID Y String ClOrdID (11) of the previous non-rejected order when canceling an order.
39 OrdStatus Y Char

Identifies current status of order.

Valid values:

  • '8' - Order Cancel Rejected (8)
434 CxlRejResponseTo Y Char

Identifies the type of request that an Order Cancel Reject (9) is in response to.

Valid values:

  • '1' - Order Cancel Request (F)
60 TransactTime N UTCTimestamp Timestamp of the reject being sent.
102 CxlRejReason N Int

Code to identify reason for cancel rejection.

Valid values:

  • '1' - Unknown order
  • '99' - Other
58 Text N String Free format text string – the reason for the reject.
<Standard Message Trailer> Y

3.3.4.7 Order Mass Cancel Report (MsgType = ‘r’)

FIX message "Order Mass Cancel Report (r)" is used to acknowledge an Order Mass Cancel Request (q).

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'D'
11 ClOrdID Y* String ClOrdID provided on the Order Mass Cancel Request (q)
37 OrderID Y String

Unique Identifier for the Order Mass Cancel Request (q) assigned by the recipient of the Order Mass Cancel Request (q).

Valid values:

  • '' (empty string)
60 TransactTime N UTCTimestamp Time this report was initiated/released.
530 MassCancelRequestType Y Char Order Mass Cancel Request Type accepted by the system.
531 MassCancelResponse Y Char

Specifies the action taken by system as a result of the Order Mass Cancel Request (q).

Valid values:

  • '0' - Cancel Request Rejected
  • '7' - Cancel all orders
532 MassCancelRejectReason N Int

Reason Order Mass Cancel Request (q) was rejected.

Valid values:

  • '99' - Other
58 Text N String Free format text string – the reason for the reject.
<Standard Message Trailer> Y

3.3.4.8 Business Message Reject (MsgType = ‘j’)

FIX message " Business Message Reject (j)" is used to reject an application-level message which fulfills session-level rules and cannot be rejected via any other means.

Tag Field Name Req'd Type Comments
<Standard Message Header> Y MsgType = 'j'
45 RefSeqNum N SeqNum Reference message sequence number.
372 RefMsgType Y String The MsgType (35) of the FIX message being referenced.
379 BusinessRejectRefID N String The value of the business-level "ID" field on the message being referenced.
380 BusinessRejectReason Y Int

Code to identify reason for a Business Message Reject (j) message.

Valid values:

  • '0' - Other
  • '1' - Unknown ID
  • '2' - Unknown Security
  • '3' - Unsupported Message Type
  • '4' - Application not available
  • '5' - Conditionally Required Field Missing
  • '6' - Not authorized
58 Text N String Free format text string – the reason for the reject.
<Standard Message Trailer> Y

4 Appendix

4.1 Currency Pairs

This is the complete list of supported currency pairs:

  • BTC/USD,
    BTC/EUR,
    BTC/GBP,
    BTC/USDC,
    BTC/USDT,
    BTC/RLUSD,
    BTC/EURC,
    BTC/EURCV
  • GBP/USD
  • EUR/USD
  • XRP/USD,
    XRP/EUR,
    XRP/BTC,
    XRP/GBP,
    XRP/USDT,
    XRP/RLUSD,
    XRP/USDC
  • LTC/BTC,
    LTC/USD,
    LTC/EUR
  • ETH/BTC,
    ETH/USD,
    ETH/EUR,
    ETH/GBP,
    ETH/USDC,
    ETH/USDT,
    ETH/RLUSD,
    ETH/EURC,
    ETH/EURCV
  • BCH/USD,
    BCH/EUR
  • XLM/USD,
    XLM/EUR,
    XLM/GBP
  • LINK/USD,
    LINK/EUR,
    LINK/GBP
  • USDC/USD,
    USDC/EUR,
    USDC/USDT
  • ETH2/ETH
  • AAVE/USD,
    AAVE/EUR,
    AAVE/BTC
  • BAT/USD,
    BAT/EUR
  • UMA/USD,
    UMA/EUR
  • DAI/USD
  • KNC/USD,
    KNC/EUR
  • MKR/USD,
    MKR/EUR
  • ZRX/USD,
    ZRX/EUR
  • ALGO/USD,
    ALGO/EUR
  • AUDIO/USD,
    AUDIO/EUR
  • CRV/USD,
    CRV/EUR
  • SNX/USD,
    SNX/EUR
  • UNI/USD,
    UNI/EUR
  • YFI/USD,
    YFI/EUR
  • COMP/USD,
    COMP/EUR
  • GRT/USD,
    GRT/EUR
  • LRC/USD,
    LRC/EUR
  • USDT/USD,
    USDT/EUR
  • FLR/USD,
    FLR/EUR
  • MANA/USD,
    MANA/EUR
  • SUSHI/USD,
    SUSHI/EUR
  • CHZ/USD,
    CHZ/EUR
  • ENJ/USD,
    ENJ/EUR
  • HBAR/USD,
    HBAR/EUR
  • AXS/USD,
    AXS/EUR
  • SAND/USD,
    SAND/EUR
  • STORJ/USD,
    STORJ/EUR
  • ADA/USD,
    ADA/EUR
  • FET/USD,
    FET/EUR
  • SKL/USD,
    SKL/EUR
  • AVAX/USD,
    AVAX/EUR
  • FTM/USD,
    FTM/EUR
  • SHIB/USD,
    SHIB/EUR
  • AMP/USD,
    AMP/EUR
  • ENS/USD,
    ENS/EUR
  • GALA/USD,
    GALA/EUR
  • PERP/USD,
    PERP/EUR
  • WBTC/BTC
  • CTSI/USD,
    CTSI/EUR
  • IMX/USD,
    IMX/EUR
  • INJ/USD,
    INJ/EUR
  • RNDR/USD,
    RNDR/EUR
  • 1INCH/USD,
    1INCH/EUR
  • SOL/USD,
    SOL/EUR,
    SOL/USDC
  • APE/USD,
    APE/EUR
  • EURC/USDC,
    EURC/EUR
  • DOT/USD,
    DOT/EUR
  • NEAR/USD,
    NEAR/EUR
  • LDO/USD,
    LDO/EUR
  • DOGE/USD,
    DOGE/EUR
  • SUI/USD,
    SUI/EUR
  • EURCV/USDT,
    EURCV/EUR,
    EURCV/USDC
  • PYUSD/USD,
    PYUSD/EUR
  • TRAC/USD,
    TRAC/EUR
  • WECAN/USD,
    WECAN/EUR
  • BLUR/USD,
    BLUR/EUR
  • LMWR/USD,
    LMWR/EUR
  • PEPE/USD,
    PEPE/EUR
  • CSPR/USD,
    CSPR/EUR
  • GYEN/USD
  • VCHF/USD,
    VCHF/EUR
  • VEUR/USD,
    VEUR/EUR
  • ZUSD/USD
  • BONK/USD,
    BONK/EUR
  • JUP/USD,
    JUP/EUR
  • PYTH/USD,
    PYTH/EUR
  • WIF/USD,
    WIF/EUR
  • ONDO/USD,
    ONDO/EUR
  • SMT/USD,
    SMT/EUR
  • TRUF/USD,
    TRUF/EUR
  • EGLD/USD,
    EGLD/EUR
  • ICP/USD,
    ICP/EUR
  • XDC/USD,
    XDC/EUR
  • COREUM/USD,
    COREUM/EUR
  • FLOKI/USD,
    FLOKI/EUR
  • STRK/USD,
    STRK/EUR
  • XCHNG/USD,
    XCHNG/EUR
  • CTX/USD,
    CTX/EUR
  • MOG/USD,
    MOG/EUR
  • WEN/USD,
    WEN/EUR
  • ARB/USD,
    ARB/EUR
  • XSGD/USD,
    XSGD/USDT
  • ZETA/USD,
    ZETA/EUR
  • MEW/USD,
    MEW/EUR
  • RLUSD/USD,
    RLUSD/EUR,
    RLUSD/USDT
  • WOO/USD,
    WOO/EUR
  • SEI/USD,
    SEI/EUR
  • OP/USD,
    OP/EUR
  • BOME/USD,
    BOME/EUR
  • CXT/USD,
    CXT/EUR
  • POPCAT/USD,
    POPCAT/EUR
  • SYRUP/USD,
    SYRUP/EUR
  • MELANIA/USD,
    MELANIA/EUR
  • TRUMP/USD,
    TRUMP/EUR
  • POL/USD,
    POL/EUR
  • FARTCOIN/USD,
    FARTCOIN/EUR
  • PENGU/USD,
    PENGU/EUR
  • PNUT/USD,
    PNUT/EUR
  • ETC/USD,
    ETC/EUR
  • SGD/USD
  • VIRTUAL/EUR,
    VIRTUAL/USD
  • XCN/USD,
    XCN/EUR
  • MOODENG/USD,
    MOODENG/EUR
  • TAI/USD,
    TAI/EUR
  • TON/USD,
    TON/EUR
  • XPL/USD,
    XPL/EUR
  • BIO/USD,
    BIO/EUR
  • ENA/USD,
    ENA/EUR
  • SPK/USD,
    SPK/EUR
  • WLFI/USD,
    WLFI/EUR
  • HYPE/USD,
    HYPE/EUR
  • ASTER/USD,
    ASTER/EUR
  • AVNT/USD,
    AVNT/EUR
  • BNB/USD,
    BNB/EUR
  • MON/USD,
    MON/EUR
  • PENDLE/USD,
    PENDLE/EUR
  • ZORA/USD,
    ZORA/EUR