LSEG Data Library for .NET

About Financial Contracts FxCross

A FxCross is an instrument type that can be requested using the FinancialContracts definition.

Syntax

FinancialContracts.Definition(JObject fxCrossRequest)

Parameters

Value Description Data type Optional Default value
fxCrossRequest An JObject describing the requested instrument and its details. JObject No null

Returned value

FinancialContractsDefinition object.

Usage

The following examples demonstrate how to create a FinancialContractsDefinition instance by providing a request object for FxCross:

  1. An example retrieving specific fields for FxSpot instrument type for USDAUD instrument code.

    The universe instrumentType must be FxCross and the fxCrossType must be FxSpot to retrieve relevant data for this example.
 var fxSpotRequest = new JObject()
 {
     ["fields"] = new JArray("FxSpot_BidMidAsk", "Ccy1SpotDate", "Ccy2SpotDate", "ErrorCode"),
     ["universe"] = new JArray(new JObject()
     {
         ["instrumentType"] = "FxCross",
         ["instrumentDefinition"] = new JObject()
         {
             ["fxCrossType"] = "FxSpot",
             ["fxCrossCode"] = "USDAUD"
         }
     }),
     ["marketData"] = new JObject()
     {
         ["fxSpots"] = new JArray()
         {
             new JObject()
             {
                 ["spotDefinition"] = new JObject()
                 {
                     ["fxCrossCode"] = "AUDUSD",
                     ["Source"] = "Composite"
                 }
             }
         }
     }
 };

 var fxSpotData = FinancialContracts.Definition(fxSpotRequest).GetData();

  1. An example retrieving specific fields for FxSwap instrument type for CHFJPY instrument code.

    The universe instrumentType must be FxCross and the fxCrossType must be FxSwap to retrieve relevant data for this example.
var fxSwapRequest = new JObject()
{
    ["fields"] = new JArray("InstrumentDescription", "ValuationDate", "EndDate",
                            "FxSwapsCcy1", "FxSwapsCcy2", "FxSwapsCcy1Ccy2",
                            "FxOutrightCcy1Ccy2"),
    ["universe"] = new JArray(new JObject()
    {
        ["instrumentType"] = "FxCross",
        ["instrumentDefinition"] = new JObject()
        {
            ["fxCrossType"] = "FxSwap",
            ["fxCrossCode"] = "CHFJPY",
            ["legs"] = new JArray(new JObject()
            {
                ["dealCcyBuySell"] = "Buy",
                ["fxLegType"] = "SwapNear",
                ["dealAmount"] = 1000000,
                ["contraAmount"] = 897008.3,
                ["tenor"] = "1M"
            }, new JObject()
            {
                ["dealCcyBuySell"] = "Sell",
                ["fxLegType"] = "SwapFar",
                ["dealAmount"] = 1000000,
                ["contraAmount"] = 900000,
                ["tenor"] = "1Y"
            })
        }
    }),
    ["pricingParameters"] = new JObject()
    {
        ["valuationDate"] = "2018-02-17T00:00:00Z",
        ["priceSide"] = "Ask"
    }
};

var data = FinancialContracts.Definition(fxSwapRequest).GetData();