Class ESPTradeTimer
java.lang.Object
com.caplin.motif.fx.ret.fxtrading.submission.esp.ESPTradeTimer
Contains rules that ensure a trade conforms to gap-time rules.
Use this class to check whether the trade should be rejected because of a gap-time limit.
The gap-time limit is best described as the time a user must wait between one-click trades. If the user tries to submit consecutive trades within the gap-time period, the first trade should pass and the remaining trades should fail. Gap-time is a concept supported in TrAPI, however the native implementation limits trades per proxy-client, which results in unpredictable behaviour when combined with our connection pool model involving shared proxy clients.
There are three settings for gap-time validation
- Same pair -- will limit consecutive trades on the same currency by a user
- All pairs -- will limit consecutive trades globally for a user
- None -- won't limit consecutive trades
There should be one ESPTradeTimer per trade channel.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetGapTimeErrorCode
(String currencyPair) Returns false if the trade would breach the gap-time limit (too soon after the last trade) according to the mode; otherwise true.void
invalidateEntry
(String currencyPair) Invalidates an entry in the deal log.toString()
-
Method Details
-
getGapTimeErrorCode
Returns false if the trade would breach the gap-time limit (too soon after the last trade) according to the mode; otherwise true. -
invalidateEntry
Invalidates an entry in the deal log. Use this method if a deal has failed or been withdrawn to permit the submission of a new deal that may be within the gap time limit. -
toString
-