new module:ct-fx /providers /Web Service Business Date Service(sUrl)
Provides an implementation of a module:ct-fx/services/BusinessDateService
which retrieves
business dates from a web service.
Parameters:
Name | Type | Description |
---|---|---|
sUrl |
String | The URL of the web service. |
- Implements:
Methods
add Settlement Dates Listener(sInstrument, pTenors, fCallback)
Adds a listener to listen to settlement date changes for a set of tenors.
Parameters:
Name | Type | Description |
---|---|---|
sInstrument |
String | The instrument for the wanted settlement dates. |
pTenors |
Array | The list of tenors for the wanted settlement dates. |
fCallback |
function | 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. |
- Implements:
- See:
add Tenor Listener(sInstrument, sSettlement Date, 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'.
Parameters:
Name | Type | Description |
---|---|---|
sInstrument |
String | The instrument for the wanted tenor. |
sSettlementDate |
String | The settlement date for the wanted tenor, in the format yyyymmdd. |
fCallback |
function | The function to call back when the tenor is known. function arguments: sInstrument The instrument for the requested tenor. sTenor The tenor or 'broken'. |
- Implements:
- See:
-
- removeTenorListener
add Trade Date Listener(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.
Parameters:
Name | Type | Description |
---|---|---|
sInstrument |
String | The instrument for the submitted trade. |
fCallback |
function | The function to be called when the trade date is known. function arguments: sInstrument The instrument for the trade date sTradeDate The trade date in format yyyymmdd. |
- Implements:
- See:
add Transaction Date Listener(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.
Parameters:
Name | Type | Description |
---|---|---|
sInstrument |
String | The instrument for the submitted trade. |
fCallback |
function | The function to be called when the transaction date is known. function arguments: sInstrument The instrument for the transaction date sTransactionDate The transaction date in format yyyymmdd. |
- Implements:
- See:
get Settlement Calendar(sInstrument, sYear, sMonth, fCallback)
Retrieves settlement calendar information for the specified instrument, year and month.
Parameters:
Name | Type | Description |
---|---|---|
sInstrument |
String | The instrument to get the settlement calendar information for. |
sYear |
String | The year for the wanted calendar information, in the format yyyy. |
sMonth |
String | The month for the wanted calendar information, in the format mm. |
fCallback |
function | 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 |
is Valid Business Date(sInstrument, sDate, fCallback)
Checks to see if the specified instrument can be settled on the specified settlement date.
Parameters:
Name | Type | Description |
---|---|---|
sInstrument |
String | The instrument to check the date for. |
sDate |
Date | the settlement date to check to see if the instrument can be settled on. |
fCallback |
function | 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. |
remove Settlement Dates Listener(fCallback)
Removes a listener that was previously listening for settlement date changes.
Parameters:
Name | Type | Description |
---|---|---|
fCallback |
function | The function previously listening to callback changes. |
- Implements:
- See:
remove Tenor Listener(fCallback)
Removes a listener that was previously listening for tenor changes.
Parameters:
Name | Type | Description |
---|---|---|
fCallback |
function | The function previously listening to callback changes. |
- Implements:
- See:
remove Trade Date Listener(fCallback)
Removes a listener that was previously listening for trade date changes.
Parameters:
Name | Type | Description |
---|---|---|
fCallback |
function | The function previously listening to callback changes. |
- Implements:
- See:
remove Transaction Date Listener(fCallback)
Removes a listener that was previously listening for transaction date changes.
Parameters:
Name | Type | Description |
---|---|---|
fCallback |
function | The function previously listening to callback changes. |