Bitfinex Trade Connector
Features
crypto-bitfinexConnector KeyNotes
Price Rounding
Bitfinex silently rounds order prices if they are not adjusted to the price increment.
It is very important to always adjust order price according its increment/precision.
Cancel/Replace
Bitfinex does not support In-Flight Mitigation:
the feature that allows submitting cancel/replace messages to prevent overfilling in the event that the original order is filled while the cancel/replace message is "in-flight" during processing.
Although the connector formally supports order replaces, in-flight trades can lead to overfills. Therefore it is not recommended to use replace functionality.
Symbology
https://docs.bitfinex.com/docs/rest-general#supported-pairs
All pairs available in the platform are supported.
A symbol can be a trading pair or a margin currency.
All symbols are in uppercase (i.e. btcusd is invalid, BTCUSD is valid).
Trading pairs are prepended by a t before the pair (e.g. tBTCUSD, tETHUSD, ...).
Margin currencies are prepended by an f before the currency (e.g. fUSD, fBTC, ...).
Lists of available currencies and pairs can be retrieved through the Configs endpoint.
For a list of all currencies on the platform, look to:
https://api-pub.bitfinex.com/v2/conf/pub:list:currency
For a list of all trading pairs on the platform, look to:
https://api-pub.bitfinex.com/v2/conf/pub:list:pair:exchange
For a list of all margin trading pairs on the platform, look to:
https://api-pub.bitfinex.com/v2/conf/pub:list:pair:margin
Configuration
Connector settings
| Parameter | Default Value | Description |
|---|---|---|
| tradingType | EXCHANGE | Order kind. Valid values: EXCHANGE, MARGIN |
| cancelOnDisconnect | true | Dead-Man-Switch flag. When websocket is closed, cancel all account orders. |
| leverage | 1 | Leverage. For Futures only. |
| useTradeEventWithoutFee | false | Switches between handling trade execution update (tu - with fees) event and trade executed (te - without fees) one. |
| logHeartbeat | false | Enables heartbeat logging. |
Supported order attributes
| Key | Description |
|---|---|
| 18 | 6 value used for post only orders submission. |
Config sample
connectors {
BITFINEX: ${template.connector.crypto.bitfinex} {
settings {
restUrl = "https://api.bitfinex.com"
websocketUrl = "wss://api.bitfinex.com/ws/2"
tradingType = EXCHANGE
useTradeEventWithoutFee = false
apiKeys: [
{
apiKey = "<API_KEY>"
apiSecret = "<API_SECRET>"
}
]
}
}
}