The interface represents a service that retrieves FX business date information. The implementors of this interface should allow for listeners to be added so that if a day roll occurs, they can be notified of changing business dates.
Note that this interface supports asynchronous calls for business dates via callbacks, but if this is not required, the implementor can immediately invoke the callback with the required information.
Attributes | Name and Description |
---|---|
|
caplin.fx.services.BusinessDateService()
|
Attributes | Name and Description |
---|---|
|
void
addSettlementDatesListener(String sInstrument, Array pTenors, Function fCallback)
Adds a listener to listen to settlement date changes for a set of tenors. |
|
void
addTenorListener(String sInstrument, String sSettlementDate, Function fCallback)
Adds a listener for changes to a tenor for the specified settlement date. |
|
void
addTradeDateListener(String sInstrument, fCallback)
Adds a listener to listen for trade date changes. |
|
void
addTransactionDateListener(String sInstrument, fCallback)
Adds a listener to listen for transaction date changes. |
|
void
getSettlementCalendar(String sInstrument, String sYear, String sMonth, Function fCallback)
Retrieves settlement calendar information for the specified instrument, year and month. |
|
void
isValidBusinessDate(String sInstrument, Date sDate, Function fCallback)
Checks to see if the specified instrument can be settled on the specified settlement date. |
|
void
removeSettlementDatesListener(Function fCallback)
Removes a listener that was previously listening for settlement date changes. |
|
void
removeTenorListener(Function fCallback)
Removes a listener that was previously listening for tenor changes. |
|
void
removeTradeDateListener(Function fCallback)
Removes a listener that was previously listening for trade date changes. |
|
void
removeTransactionDateListener(Function fCallback)
Removes a listener that was previously listening for transaction date changes. |
►
caplin.fx.services.BusinessDateService()
►
void
addSettlementDatesListener(String sInstrument, Array pTenors, Function fCallback)
Adds a listener to listen to settlement date changes for a set of tenors.
String | sInstrument | The instrument for the wanted settlement dates. |
Array | pTenors | The list of tenors for the wanted settlement dates. |
Function | fCallback | The function to call back when the settlement dates are known. function arguments: sInstrument The instrument for the requested settlement dates mSettlementDates The map of tenor keys -> settlement dates values. |
►
void
addTenorListener(String sInstrument, String sSettlementDate, Function fCallback)
Adds a listener for changes to a tenor for the specified settlement date. If there is no corresponding tenor, the method should callback with a value of "broken".
String | sInstrument | The instrument for the wanted tenor. |
String | sSettlementDate | The settlement date for the wanted tenor, in the format yyyymmdd. |
Function | fCallback | The function to call back when the tenor is known. function arguments: sInstrument The instrument for the requested tenor. sTenor The tenor or "broken". |
►
void
addTradeDateListener(String sInstrument, fCallback)
Adds a listener to listen for trade date changes. If there is a date roll, the listener should be informed with the new trade date.
String | sInstrument | The instrument for the submitted trade. |
fCallback |
►
void
addTransactionDateListener(String sInstrument, fCallback)
Adds a listener to listen for transaction date changes. If there is a date roll, the listener should be informed with the new transaction date.
String | sInstrument | The instrument for the submitted trade. |
fCallback |
►
void
getSettlementCalendar(String sInstrument, String sYear, String sMonth, Function fCallback)
Retrieves settlement calendar information for the specified instrument, year and month.
String | sInstrument | The instrument to get the settlement calendar information for. |
String | sYear | The year for the wanted calendar information, in the format yyyy. |
String | sMonth | The month for the wanted calendar information, in the format mm. |
Function | fCallback | The callback function that will be called with the calendar information function arguments: sInstrument The instrument the calendar information is for sYear The year the information is for sMonth The month the information is for pDates A list of valid settlement dates |
►
void
isValidBusinessDate(String sInstrument, Date sDate, Function fCallback)
Checks to see if the specified instrument can be settled on the specified settlement date.
String | sInstrument | The instrument to check the date for. |
Date | sDate | the settlement date to check to see if the instrument can be settled on. |
Function | fCallback | The function to callback with the validity of the settlement date. function arguments: sInstrument The instrument to check the settlement date for sSettlementDate The settlement Date that this request was for. bValid True if the instrument can be settled on the date, false otherwise. |
►
void
removeSettlementDatesListener(Function fCallback)
Removes a listener that was previously listening for settlement date changes.
Function | fCallback | The function previously listening to callback changes. |
►
void
removeTenorListener(Function fCallback)
Removes a listener that was previously listening for tenor changes.
Function | fCallback | The function previously listening to callback changes. |
►
void
removeTradeDateListener(Function fCallback)
Removes a listener that was previously listening for trade date changes.
Function | fCallback | The function previously listening to callback changes. |
►
void
removeTransactionDateListener(Function fCallback)
Removes a listener that was previously listening for transaction date changes.
Function | fCallback | The function previously listening to callback changes. |