LMEX Futures Trade Connector
Features
crypto-lmexfutConnector Key✗
Order Status Request
✓
Cancel On Disconnect
✓
Commission
✓
Post Only
✓
Fast Cancel
✗
Fast Replace
Notes
Cancel/Replace
warning
Only price change is allowed.
Time In Force
Time In Force for orders may be overridden with 59 (TimeInForce) attribute. The attribute is passed to the Exchange as is.
Reduce Only
Reduce Only order behaves differently depending on the Position Mode account setting.
ONE_WAYposition mode: order reduces position without switching the position typeHEDGEposition mode:SELLorder reducesLONGposition,BUYorder reducesSHORTposition
Reduce only switch can be specified via the 6201 (ReduceOnly) or 6470 (Offset) attributes. 6470 (Offset) attribute's value sets Reduce only switch to true.
Symbology
Symbols use the currency short code and perpetual abbreviation. For example:
| accountType | symbol |
|---|---|
| REGULAR | BTCPFC, XRPPFC, etc. |
| UNIFIED | BTC-PERP, ETH-PERP, etc. |
Configuration
Connector settings
| Parameter | Default Value | Description |
|---|---|---|
| accountType | REGULAR | Futures account type. Valid values: REGULAR or UNIFIED. |
| positionMode | ONE_WAY | Position mode. Valid values: ONE_WAY or HEDGE. |
| cancelAllOrdersAfter | not enabled | Has two settings: period, timeout. This feature can work like Cancel-On-Disconnect behavior. https://docs.lmex.io/pages/futures.html#/operations/post-api-v2.1-order-cancelAllAfter |
| websocketHeartbeatInterval | 10 seconds | Websocket ping interval. |
| tradesSyncSettings.allTradesRequestSizeLimit | 200 | Limitation for the number of trades in the account trade list history response. Maximum value is 500. |
| tradesSyncSettings.orderTradesRequestSizeLimit | 500 | Limitation for the number of trades in the single order trade list history response. Maximum value is 500. |
| tradesSyncSettings.tradeHistoryLookBackPeriod | 5s | The time interval from order creation to the past for the start time filter of the trade history requests (all trade history and trade history for a single order). |
| tradesSyncSettings.maxInactiveOrderAge | 5m | Delay before INACTIVE order cancellation after synchronization. The delay counts from the orders submission. Inactive state is reported by the exchange for unknown or closed orders. |
Supported order attributes
| Key | Description |
|---|---|
| 18 | 18 (PostOnly) attribute is relevant for LIMIT orders only. Possible values: 6. |
| 59 | TimeInForce override for an order. Expected values: GTC, IOC, FOK, HALFMIN, FIVEMIN, HOUR, TWELVEHOUR, DAY, WEEK or MONTH. |
| 6201 | reduceOnly switch. Valid values: true or false. Default: false. See Reduce Only section for detailed explanation. |
| 6340 | Position mode. Valid values: ONE_WAY or HEDGE. |
| 6470 | 6470 (Offset) attribute allows to configure reduceOnly switch. CLOSE attribute's value sets reduceOnly value to true. Possible values: OPEN or CLOSE. See Reduce Only section for detailed explanation. |
Config sample
connectors {
LMEXFUT: ${template.connector.crypto.lmexfut} {
settings {
restUrl = "https://api.lmex.io"
websocketUrl = "wss://ws.lmex.io/ws/futures"
apiKeys: [
{
apiKey = "<API_KEY>"
apiSecret = "<API_SECRET>"
}
]
}
}
}