Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Filter inputs

...

NameTypeDescriptionAvailable from version
BrickIdGuidThe internal id of the instrument
InstrumentTypeIntInstrument
CurrencyCodeStringISO-code for currency in which the instrument is traded
ISINStringThe International Securities Identification Number of the instrument
NameStringThe name of the instrument
LastSubscriptionDateDateTimeLast subscription date of the instrument (Securities terms - Date concepts within the securities market)
ExpirationDateDateTimeThe expiration date of the instrument (Securities terms - Date concepts within the securities market)
PriceDoubleThe current price of the instrument
QuantityDecimalsIntNumber of decimals for the units of the instrument
DisplayDecimalsPriceintNumber of decimals for the price of the instrument
MinAmountDecimalThe minimum number of units allowed for trading
MaxAmountDecimalThe maximum number of units allowed for trading
ExternalReferenceStringExternal reference of the instrument
CommentStringComment of the instrument2.09
VisibleStatusKeyStringInstrument
DisplayPercentagePriceboolTrue if BFS should display percentage price2.02
SymbolStringThe short name symbol for the instrument2.02
MICStringThe MIC-code of the default marketplace for the instrument2.02
ValueMultiplierDoubleThe value multiplier for the instrument2.02
InstrumentCategorizationInstrumentCategorizationItem[]Will return an array of InstrumentCategorizationItems if any2.02
DefaultMarketPlaceGuidThe BrickId of the default marketplace2.02
IssuerGuidThe BrickId of the Issuer of the instrument.
CustomFieldsobject[]CustomFields is an array of CustomField objects. Each CustomField consists of two strings, FieldName and Value. There are no datatypes associated with these properties, they are just a way for api-users to add custimized data to the object.


Code examples

Code Block
languagec#
themeRDark
titleC# - GetInstruments
linenumberstrue
collapsetrue
//Use the GetInstruments method
var client = new BFSServiceReference.bfsapiSoapClient();

var credentials = new BFSServiceReference.Credentials()
{
    UserName = bfsusername, //Username of administrative user in your instance of BFS
    Password = bfspassword, //Password of the administrative user in your instance of BFS
};

var orders = client.GetInstruments(new BFSServiceReference.GetInstrumentsRequest()
{
    Credentials = credentials,

    identify = bfsidentifier, //Identifier is a unique token for your instance of BFS 

    Args = new GetInstrumentsArgs()
    {
        MICs = new string[]
        {
            "MIC2",
        },        

    },

    Fields = new BFSServiceReference.GetInstrumentsFields()
    {
        BrickId = true,
        VisibleStatusKey = true,
        ExternalReference = true,
        Name = true,
        CurrencyCode = true,
        Price = true,
        DisplayDecimalsPrice = true,
        InstrumentType = true,
        ISIN = true,
        QuantityDecimals = true,
        Symbol = true,
        LastSubscriptionDate = true,
        MIC = true,
        ValueMultiplier = true,
        InstrumentCategorization = true,
        DefaultMarketPlace = true,
        ExpirationDate = true,
        MaxAmount = true,
        MinAmount = true
    },

});

foreach (var c in orders.Result)
{
    Console.WriteLine(c.BrickId + ";" + c.VisibleStatusKey + ";" + c.ExternalReference + ";" + c.Name + ";" + c.CurrencyCode + ";" + c.Price + ";" + c.DisplayDecimalsPrice + ";" +
        c.InstrumentType + ";" + c.ISIN + ";" + c.QuantityDecimals + ";" + c.Symbol + ";" + c.LastSubscriptionDate + ";" + c.MIC + ";" + c.ValueMultiplier + ";" + c.DefaultMarketPlace + ";" +
        c.ExpirationDate + ";" + c.MaxAmount + ";" + c.MinAmount);
    if (c.InstrumentCategorization != null)
    { 
        foreach (var d in c.InstrumentCategorization.Array)
        {
            Console.WriteLine("Categorization");
            Console.WriteLine(d.GroupKey + ", " + d.Key + ", " + d.Weight);
        }
    }

}

...