Skip to main content

PowerTrade Trade Connector

Features

fix-powertradeConnector Key
Instruments
FXFUTUREOPTION
Request Types
SUBMITCANCELREPLACE
Order Types
MARKETLIMIT
Time In Force
IOCFOKGTCGTD
Order ID Mapper
SEQUENCE
Order Status Request
Cancel On Disconnect
Commission
Post Only
Fast Cancel
Fast Replace

Notes

API Keys

PowerTrade FIX requires API Key with FIX API type and Order Entry permission.

ParameterValue
SenderCompIDAPI Key
PrivateKeySecret Key

Market Type

ID of the market to trade on is defined by optional marketType setting.
Table below provides the setting mapping to SymbolSfx(65) FIX tag.

Market TypeMarket ID (FIX value)Description
NORMAL0Normal order book (where firm orders being matched)
P2P2P2P order book
INDICATIVEnoneIndicative order book (RFQ)
null (not defined)Do not send SymbolSfx(65) FIX tag

P2P Orders

When marketType is set to P2P, all orders are sent as Direct Cross Orders by setting TargetOrderID (10001) to none.
To target a specific order, override this via order attribute 10001.

Managing Cycles

A cycle represents a logical division of time within a trading session, so a trading session may go through multiple cycles.

Cancel on Disconnect

Cancel on Disconnect is configured at the API Key level on the exchange and can be enabled at API Key creation time.

Discard on Reconnect

The exchange does not support OrderStatus requests. When discardOnReconnect is enabled, all remaining open orders are discarded after reconnect.

Note: orders may execute during the interval between a connection failure and the exchange recognizing the disconnect. Regardless of the state of Cancel on Disconnect and discardOnReconnect options, there will be a discrepancy in the state of such orders between Ember and the Exchange. Cancel on Disconnect option turned on will reduce the probability of such event, while discardOnReconnect may slow down the detection of such situation.

Post Only Orders

PowerTrade FIX supports PostOnly orders. The Exchange will cancel a PostOnly order if it is to be immediately executed as an aggressive order.

Immediate Or Cancel Orders

PowerTrade FIX cancels the full quantity of an IOC order if it cannot be completely filled.

Good Till Cancel Orders

The Exchange changes TimeInForce(59) from GTC(59=1) to GTD(59=6) and sets the ExpireTime(126) of the order far into the future.

Good Till Date Orders

The Exchange extends expiration time for GTD orders to the nearest trading session cycle end time.

Order Replacement

Partially filled orders (where CumQty is not "0") can be replaced, and the CumQty value will be preserved.
If the new order’s Quantity is less than the original order’s CumQty, the original order will be cancelled without replacement.

Client Order ID

PowerTrade FIX requires that ClOrdID(11) tag be unique and monotonically increased and be in range 0..72057594037927935 (2^56-1). The request sequence ID is therefore used as Client Order ID. Since monotonicity is checked per API Key, different Ember instances sharing the same PowerTrade account must use different API Keys.

Orders are rejected with error ‘32 invalid_token’ when monotonicity is violated. Creating a new API Key will allow trading to resume.

Secondary Client Order ID

Order ID from OrderNewRequest and Correlation Order ID from OrderReplaceRequest are sent as SecondaryClOrdID(526) tag. PowerTrade FIX requires that SecondaryClOrdID(526) tag consist of ASCII characters in range 32-127 and be no longer than 16 characters. Thus, if the length of Order ID or Correlation Order ID exceeds the specified limit, only the last 16 characters are sent.

Trading Session Status

The exchange does not recommend sending order-related requests while the trading session is CLOSED. The connector rejects OrderNew, OrderCancel, and OrderReplace requests with 'Trading session is closed' when the session status is CLOSED.

Note: the session status is assumed CLOSED until the connector receives an OPEN status update from the exchange. Rejections may therefore occur immediately after connect, before the first status update is received.

Stunnel

PowerTrade FIX requires an SSL connection via stunnel.

Symbology

http://marketproxy.power.trade/v1/api/exchangeInfo

Configuration

Connector settings

ParameterDefault ValueDescription
privateKeySecret Key. Line breaks can be replaced with '#' character.
discardOnReconnectfalseDiscard open order upon reconnect. See Discard on Reconnect section for detailed explanation.
marketTypeThe market for corresponding order book. Possible values: NORMAL, P2P, INDICATIVE. See Market Type section for detailed explanation.

Supported order attributes

KeyDescription
18ExecInst(18). Valid values: 6 for PostOnly orders.
7701,10001TargetOrderID(10001). Target Order ID to be matched against. See P2P Orders section for detailed explanation.

Config sample

connectors {
POWERTRADE : ${template.connector.fix.powertrade} {
settings {
host = "<STUNNEL_HOST>" # stunnel host
port = <STUNNEL_PORT> # stunnel local port

senderCompId = "<SENDER_COMP_ID>"
targetCompId = "<TARGET_COMP_ID>"

privateKey = "<SECRET_KEY>"
}
}
}