public class ESPTradeTimer
extends java.lang.Object
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
There should be one ESPTradeTimer per trade channel.
Modifier and Type | Class and Description |
---|---|
static class |
ESPTradeTimer.GapTimeMode |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.String> |
getGapTimeErrorCode(java.lang.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(java.lang.String currencyPair)
Invalidates an entry in the deal log.
|
java.lang.String |
toString() |
@Nonnull public java.util.Optional<java.lang.String> getGapTimeErrorCode(java.lang.String currencyPair)
public void invalidateEntry(java.lang.String currencyPair)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2019 Caplin Systems.