Connection Endpoints
The FIX server can be reached at:-
Production:
fix.deribit.com:9881(raw tcp)fix.deribit.com:9883(ssl)
-
Test Network:
fix-test.deribit.com:9881(raw tcp)fix-test.deribit.com:9883(ssl)
Message Structure
Request Message Headers
Each request message can include:| Tag | Name | Type | Required | Comments |
|---|---|---|---|---|
| 8 | BeginString | String | Yes | Identifies beginning of new message and protocol version. Must always be first in the message |
| 9 | BodyLength | Length | Yes | Message length in bytes, not including fields BeginString(8), BodyLength(9) and CheckSum(10). The length must be calculated by counting the number of octets in the message up to and including the end of field delimiter (Start of Heading) of the field immediately preceding the CheckSum(10) field. Must always be the second in the message. Please refer to FIX specification for more details |
| 35 | MsgType | String | Yes | The type of the message. See below for available types |
| 49 | SenderCompID | String | Yes | A user defined client name |
| 56 | TargetCompID | String | Yes | Constant value: DERIBITSERVER |
| 34 | MsgSeqNum | SeqNum | Yes | A sequence number for the message, starts with 1, and must be incremented by 1 for every message |
| 52 | SendingTime | UTCTimestamp | No | The time the request is sent. This field is ignored by the server |
| 10 | CheckSum | String | Yes | The checksum of all of all preceding messages. In order to calculate checksum, sum up the binary value of each octet up to and including the end of field delimiter (Start of Heading) of the field immediately preceding the CheckSum(10). Afterwards calculate modulo 256 of that sum. The calculated modulo 256 checksum must then be encoded as an ISO 8859-1 three-octet representation of the decimal value. For example, if the message length sum of character values has been calculated to be 274 then the modulo 256 value is 18 (256 + 18 = 274). This value would be encoded in the CheckSum(10) field as “10=018”. CheckSum must always be the last field in the message. Please refer to FIX specification Annex A for more details |
Response Message Headers
Responses sent by the server will at least include:| Tag | Name | Type | Comments |
|---|---|---|---|
| 8 | BeginString | String | Identifies beginning of new message and protocol version. Must always be first in the message |
| 9 | BodyLength | Length | Message length in bytes, not including fields BeginString(8), BodyLength(9) and CheckSum(10). Please refer to FIX specification for more details |
| 35 | MsgType | String | The type of the message. See below for available types |
| 49 | SenderCompID | String | Constant value: DERIBITSERVER |
| 56 | TargetCompID | String | A user defined client name |
| 34 | MsgSeqNum | SeqNum | A server-chosen sequence number for the message |
| 52 | SendingTime | UTCTimestamp | The time the request is sent. This field is ignored by the server |
| 10 | CheckSum | String | The checksum of all of all preceding messages. Please refer to FIX specification Annex A for more details |
Message Types
The FIX API supports the following message types organized by category:Session Management
- Logon (A) - Initiate a session
- Logout (5) - Terminate a session
- Heartbeat (0) - Keep connection alive
- Test Request (1) - Force a heartbeat
- Resend Request (2) - Request message retransmission
- Reject (3) - Reject invalid messages
- Sequence Reset (4) - Recover from sequence loss
Market Data
- Security List Request (x) - Request list of instruments
- Security List (y) - Response with instrument list
- Market Data Request (V) - Request market data
- Market Data Request Reject (Y) - Reject market data request
- Market Data Snapshot/Full Refresh (W) - Market data snapshot
- Market Data Incremental Refresh (X) - Incremental market data updates
- Security Status Request (e) - Request security status
- Security Status (f) - Security status response
Order Management
- New Order Single (D) - Submit new order
- Order Cancel Request (F) - Cancel an order
- Order Cancel Reject (9) - Reject cancel request
- Order Cancel/Replace Request (G) - Modify an order
- Order Mass Cancel Request (q) - Cancel multiple orders
- Order Mass Cancel Report (r) - Mass cancel response
- Order Mass Status Request (AF) - Request order status
- Execution Reports (8) - Order execution notifications
Position Management
- Request For Positions (AN) - Request position report
- Position Report (AP) - Position report response
User Management
- User Request (BE) - Request user account info
- User Response (BF) - User account info response
Market Maker Protection
- MMProtection Limits (MM) - Set/get MMP limits
- MMProtection Limits Result/Reject (MR) - MMP limits response
- MMProtection Reset (MZ) - Reset MMP after trigger
Mass Quoting
- Mass Quote (i) - Place multiple quotes
- Mass Quote Acknowledgement (b) - Mass quote response
- Quote Cancel (Z) - Cancel quotes
Trade Capture
- TradeCaptureReportRequest (AD) - Request trade reports
- TradeCaptureReportRequestAck (AQ) - Trade request acknowledgment
- TradeCaptureReport (AE) - Trade capture report
Security Definition
- Security Definition Request (c) - Request combo security
- Security Definition (d) - Security definition response
Changes Log
- Changes Log - Release history and changes