Kraken FIX Spot/Futures Trade Connector
Features
fix-krakenConnector KeyNotes
Connectivity
Before logging into their FIX session, clients must have their incoming IP addresses whitelisted and establish a secure channel to the provided FIX API.
Kraken will provide a pair of designated compIDs, URL and ports to establish a FIX session.
Trading and market data endpoints will be served over different ports.
Connection with the FIX API need to be done using TCP SSL with TLS 1.3.
Hours of Operation
Both market data and trading sessions operate 24/7 with a logical session rollover every day at 22:00 UTC.
The rollover lasts approximately 30 seconds; both Trading and Market Data sequence numbers are reset to 0.
Margin trading
Leverage can be set via (in increasing priority order):
krakenLeverageinstrument attribute6001custom attribute.
Order Replacement
Replacement functionality is supported for Spot FIX sessions only.
Replacement for Futures is (still) not supported by exchange.
Order Status Request
Order Status Request is not supported for Futures.
Rate Limits
Symbology
-
Spot
Currency pairs using Kraken's ticker codes concatenated with/, e.g.XBT/USD,LTC/USD. -
Derivatives
Configuration
Connector settings
| Parameter | Default Value | Description |
|---|---|---|
| apiKey | Api Key. | |
| apiSecret | Api Secret. | |
| clientId | Client Id. | |
| cancelOnDisconnect | true | Whether or not session orders should be cancelled upon disconnect. |
| selfMatchPreventionInstruction | Defines the strategy of dealing with matching orders if SMP is triggered. Valid values: CANCEL_RESTING, CANCEL_TAKING, CANCEL_BOTH. | |
| orderMapperType | UUID | Defines how to compose ClOrdID(11). Supported values: UUID, SEQUENCE (Spot Only). |
| resetClientOrderId | false | Indicate if you want to reset your ClOrdID(11) sequence while relogging. Suggestion is to use this feature in emergency only. |
Supported order attributes
| Key | Description |
|---|---|
| 18 | ExecInst(18). If more than one instruction is applicable to an order, this field may contain multiple instructions separated by space. |
| 62 | ValidUntilTime(62). The engine will reject any order entered into the matching engine after this time. This provides extra protection against latency on time sensitive orders. The timestamp should be at least 2 seconds and at most 60 seconds in the future. Format: YYYYDD-HH:MM:SS.uuu. |
| 168 | EffectiveTime(168). Scheduled start time on the order expressed in UTC. the order won't be visible on the book and won't match before that time. (Spot only). |
| 388 | DiscretionInst(388). The reference price to track for triggering orders. Possible values: 1 - Related to index price 5 - Related to last trade price. Default value - 5. |
| 6001 | Leverage(388). Use margin account for the order funding. (Spot only). |
| 7928 | SelfMatchPrevention(7928). Defines the strategy of dealing with matching orders if SMP is triggered. Valid values: 2 - Cancel resting order, 1 - Cancel aggressing order, 0 - Cancel both. |
Config sample
connectors {
KRAKEN: ${template.connector.fix.kraken} {
settings {
host = "<STUNNEL_HOST>"
port = <STUNNEL_PORT>
senderCompId = "<SENDER_COMP_ID>"
targetCompId = "<TARGET_COMP_ID>"
apiKey = "<API_KEY>"
apiSecret = "<API_SECRET>"
}
}
}