public class BlockHandler
extends java.lang.Object
Constructor and Description |
---|
BlockHandler(com.caplin.motif.fx.trading.block.BlockTrade blockTrade,
BlockQuoteFactory quoteFactory,
org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
void |
addExtraFieldsFromTrade(com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> event)
Adds extra field from the BlockTrade ResponderEvent
|
com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> |
createClientCloseAckEvent(java.lang.String tradeID)
Creates a client close ack event
|
com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> |
createExecuteAckEvent(java.lang.String tradeID)
Creates a Execute Ack Event based on the tradeID
|
com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> |
createExpiredEvent(java.lang.String tradeID)
Creates a Expired Event based on the tradeID
|
com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> |
createHeldEvent()
Creates a held event
|
com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> |
createPickUpEvent(java.lang.String tradeID)
Creates a pick up event
|
com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> |
createQuoteEvent(java.lang.String tradeID,
long timePriceReceived,
java.lang.String receivedNanotime,
MappedBlockQuote rfsQuote)
Creates the quote event
|
com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> |
createQuoteEvent(java.lang.String tradeID,
long timePriceReceived,
java.lang.String receivedNanotime,
MappedBlockQuote rfsQuote,
int timeout)
Creates the quote event
|
com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> |
createSubmitAckEvent(java.util.Map<java.lang.String,java.lang.String> fields)
Creates a Execute Ack Event based on the tradeID
|
com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> |
createTradeConfirmationEvent(java.lang.String tradeID,
com.caplin.ret.trapi.fx.execution.QuoteEvent quote)
Creates the trade confirmation Event
|
com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> |
createWithdrawEvent(java.lang.String tradeID)
Creates a Withdraw Event based on the tradeID
|
int |
getLegCount()
Returns the number of legs
|
java.util.List<com.caplin.ret.trapi.fx.Side> |
getLegExecutionSides(java.util.List<com.caplin.motif.fx.trading.BuySell> directions)
Returns the list of Execution Sides based on the BuySell directions
|
com.caplin.motif.datasource.Message |
getQuote(com.caplin.ret.trapi.fx.execution.QuoteEvent trapiQuote)
Returns the quote from the trapiQuote coming from RET
|
com.caplin.motif.fx.trading.block.BlockTrade |
getTrade()
Returns the BlockTrade
|
com.caplin.ret.trapi.fx.FXTradeType |
getTradeType()
Returns the FXTradeType
|
void |
setupTradeLeg(com.caplin.ret.trapi.fx.FXLeg leg,
java.lang.String legNum)
Sets up the the BlockTradeLeg based on the RET leg
|
public BlockHandler(com.caplin.motif.fx.trading.block.BlockTrade blockTrade, BlockQuoteFactory quoteFactory, org.slf4j.Logger logger)
public com.caplin.ret.trapi.fx.FXTradeType getTradeType()
public java.util.List<com.caplin.ret.trapi.fx.Side> getLegExecutionSides(java.util.List<com.caplin.motif.fx.trading.BuySell> directions)
directions
- BuySell valuespublic int getLegCount()
public com.caplin.motif.datasource.Message getQuote(com.caplin.ret.trapi.fx.execution.QuoteEvent trapiQuote) throws QuoteCreationException
trapiQuote
- the quote coming from RETQuoteCreationException
public void setupTradeLeg(com.caplin.ret.trapi.fx.FXLeg leg, java.lang.String legNum)
leg
- RET leglegNum
- the leg idpublic void addExtraFieldsFromTrade(com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> event)
event
- the responder eventpublic com.caplin.motif.fx.trading.block.BlockTrade getTrade()
public com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> createTradeConfirmationEvent(java.lang.String tradeID, com.caplin.ret.trapi.fx.execution.QuoteEvent quote) throws java.lang.Exception
tradeID
- the tradeIDquote
- RET quotejava.lang.Exception
public com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> createWithdrawEvent(java.lang.String tradeID)
tradeID
- the tradeIDpublic com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> createExpiredEvent(java.lang.String tradeID)
tradeID
- the tradeIDpublic com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> createExecuteAckEvent(java.lang.String tradeID)
tradeID
- the tradeIDpublic com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> createQuoteEvent(java.lang.String tradeID, long timePriceReceived, java.lang.String receivedNanotime, MappedBlockQuote rfsQuote, int timeout) throws java.lang.Exception
java.lang.Exception
public com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> createQuoteEvent(java.lang.String tradeID, long timePriceReceived, java.lang.String receivedNanotime, MappedBlockQuote rfsQuote) throws java.lang.Exception
java.lang.Exception
public com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> createSubmitAckEvent(java.util.Map<java.lang.String,java.lang.String> fields)
fields
- the fields containing the datapublic com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> createClientCloseAckEvent(java.lang.String tradeID)
public com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> createPickUpEvent(java.lang.String tradeID)
public com.caplin.motif.fx.trading.ResponderEvent<com.caplin.motif.fx.trading.block.BlockTrade> createHeldEvent()
Copyright © 2019 Caplin Systems.