public ICollection<ISecurity> GetSecurities(ExternalIdBundle bundle)
        {
            ArgumentChecker.NotEmpty(bundle.Identifiers, "bundle");

            var parameters = UriEncoding.GetParameters(bundle);
            return _restTarget.Resolve("securities", parameters).Get<FudgeListWrapper<ISecurity>>().List;
        }
        public ISecurity GetSecurity(ExternalIdBundle bundle)
        {
            ArgumentChecker.NotEmpty(bundle.Identifiers, "bundle");

            Tuple<string, string>[] parameters = UriEncoding.GetParameters(bundle);
            return _restTarget.Resolve("securitySearches").Resolve("single", parameters).Get<ISecurity>();
        }
 protected ManageableSecurity(string name, string securityType, UniqueId uniqueId, ExternalIdBundle identifiers)
 {
     _name = name;
     _securityType = string.Intern(securityType); // Should be a small static set
     _uniqueId = uniqueId;
     _identifiers = identifiers;
 }
        public Tuple<UniqueId, ILocalDateDoubleTimeSeries> GetHistoricalTimeSeries(ExternalIdBundle identifierBundle, DateTimeOffset identifierValidityDate, string dataSource, string dataProvider, string dataField, DateTimeOffset start, bool includeStart, DateTimeOffset end, bool includeEnd)
        {
            RestTarget target = _rest.Resolve("htsSearches", "single");
            target = identifierBundle.Identifiers.Aggregate(target, (current, id) => current.WithParam("id", id.ToString()));

            target = target.WithParam("idValidityDate", identifierValidityDate != default(DateTimeOffset) ? EncodeDate(identifierValidityDate) : "ALL");
            if (dataSource != null)
            {
                target = target.WithParam("dataSource", dataSource);
            }
            if (dataProvider != null)
            {
                target = target.WithParam("dataProvider", dataProvider);
            }
            if (dataField != null)
            {
                target = target.WithParam("dataField", dataField);
            }
            if (start != default(DateTimeOffset))
            {
                target = target.WithParam("start", EncodeDate(start));
                target = target.WithParam("includeStart", includeStart);
            }
            if (end != default(DateTimeOffset))
            {
                target = target.WithParam("end", EncodeDate(end));
                target = target.WithParam("includeEnd", includeEnd);
            }
            return DecodePairMessage(target.GetFudge());
        }
Esempio n. 5
0
 public SimplePosition(UniqueId identifier, decimal quantity, ExternalIdBundle securityKey, IList<ITrade> trades)
 {
     _securityKey = securityKey;
     _trades = trades;
     _identifier = identifier;
     _quantity = quantity;
 }
Esempio n. 6
0
 public SimpleTrade(UniqueId uniqueId, DateTimeOffset tradeDate, ExternalIdBundle securityKey, CounterpartyImpl counterparty, decimal quantity)
 {
     _uniqueId = uniqueId;
     _quantity = quantity;
     _securityKey = securityKey;
     _counterparty = counterparty;
     _tradeDate = tradeDate;
 }
Esempio n. 7
0
 public BondSecurity(string name, string securityType, UniqueId uniqueId, ExternalIdBundle identifiers,
                     string issuerName, string issuerType, string issuerDomicile, string market, string currency // ... you get the idea, I'm not going to write all of these out
     )
     : base(name, securityType, uniqueId, identifiers)
 {
     _issuerName = issuerName;
     _issuerType = issuerType;
     _issuerDomicile = issuerDomicile;
     _market = market;
     _currency = currency;
 }
Esempio n. 8
0
 public FinancialSecurity(string name, string securityType, UniqueId uniqueId, ExternalIdBundle identifiers)
     : base(name, securityType, uniqueId, identifiers)
 {
 }
Esempio n. 9
0
        internal static Tuple<string, string>[] GetParameters(ExternalIdBundle bundle)
        {
            var ids = bundle.Identifiers.ToList();

            return ids.Select(s => new Tuple<string, string>("id", s.ToString())).ToArray();
        }
Esempio n. 10
0
 public EquitySecurity(string name, string securityType, UniqueId uniqueId, ExternalIdBundle identifiers, string shortName)
     : base(name, securityType, uniqueId, identifiers)
 {
     _shortName = shortName;
 }
 public Tuple<UniqueId, ILocalDateDoubleTimeSeries> GetHistoricalTimeSeries(ExternalIdBundle identifierBundle, DateTimeOffset identifierValidityDate, string dataSource, string dataProvider, string dataField)
 {
     return GetHistoricalTimeSeries(identifierBundle, identifierValidityDate, dataSource, dataProvider, dataField, default(DateTimeOffset), false, default(DateTimeOffset), true);
 }
Esempio n. 12
0
 public EquityOptionSecurity(string name, string securityType, UniqueId uniqueId, ExternalIdBundle identifiers, ExternalId underlyingIdentifier)
     : base(name, securityType, uniqueId, identifiers)
 {
     _underlyingIdentifier = underlyingIdentifier;
 }
Esempio n. 13
0
 public RawSecurity(string name, string securityType, UniqueId uniqueId, ExternalIdBundle identifiers, byte[] rawData)
     : base(name, securityType, uniqueId, identifiers)
 {
     _rawData = rawData;
 }