Struct SecurityType
- Namespace
- DatabentoDotNet.Reference
- Assembly
- DatabentoDotNet.Reference.dll
The type of a security.
[JsonConverter(typeof(ReferenceCodeJsonConverter<SecurityType>))]
public readonly record struct SecurityType : IReferenceCode<SecurityType>, IEquatable<SecurityType>
- Implements
- Inherited Members
Remarks
An open set: a code this library does not know is carried, not lost. Upstream ends
this enum in an Unknown(String) variant (enums.rs:3281) so a code Databento adds
next month round-trips untouched, and a C# enum cannot hold a payload. See
IReferenceCode<TSelf> for the shape this takes instead and why.
The members come from the SECTYPE group of the vendored corporate_actions.list_enums response, which is the oracle rather than a count typed into an issue.
Upstream models 30 of these and the live dictionary reports 64, which is why this is an open carrier rather than a closed enum. The consequence is not cosmetic: upstream types AdjustmentFactor::security_type as a bare SecurityType rather than an Option (adjustment.rs:109), so one of the 34 codes it does not model fails the whole row rather than one field.
Constructors
SecurityType(string)
Wraps a wire code, known or not. Prefer a named member such as Bbr where one exists, and From(string?) where the value came from the server.
public SecurityType(string code)
Parameters
codestringThe wire code.
Exceptions
- ArgumentException
codeis null or empty. A blank code is the absence of a value, which is default.
Properties
Bbr
Barbados Depository Receipts (BBR).
public static SecurityType Bbr { get; }
Property Value
Bnd
Bond (BND).
public static SecurityType Bnd { get; }
Property Value
Bsw
Basket Warrant (BSW).
public static SecurityType Bsw { get; }
Property Value
Cd
Convertible Debenture (CD).
public static SecurityType Cd { get; }
Property Value
Cda
Share Depository Certificate (CDA).
public static SecurityType Cda { get; }
Property Value
Cdi
Chess Depository Interest (CDI).
public static SecurityType Cdi { get; }
Property Value
Cdr
CEDEAR (CDR).
public static SecurityType Cdr { get; }
Property Value
Cn
Convertible Notes (CN).
public static SecurityType Cn { get; }
Property Value
Cns
Conversion (CNS).
public static SecurityType Cns { get; }
Property Value
Code
The wire code, or null when this names no value.
public string? Code { get; }
Property Value
Com
Commodity (COM).
public static SecurityType Com { get; }
Property Value
Ctf
Certificate (CTF).
public static SecurityType Ctf { get; }
Property Value
Cul
Convertible Unsecured Loan Stock (CUL).
public static SecurityType Cul { get; }
Property Value
Cur
Currency (CUR).
public static SecurityType Cur { get; }
Property Value
Cvr
Contingent Value Rights (CVR).
public static SecurityType Cvr { get; }
Property Value
Cw
Covered Warrant (CW).
public static SecurityType Cw { get; }
Property Value
Deb
Debenture (DEB).
public static SecurityType Deb { get; }
Property Value
Der
Derivatives (DER).
public static SecurityType Der { get; }
Property Value
Dr
Depository Receipts (DR).
public static SecurityType Dr { get; }
Property Value
Drt
Distribution Rights (DRT).
public static SecurityType Drt { get; }
Property Value
Dst
Deferred Settlement Trading (DST).
public static SecurityType Dst { get; }
Property Value
Eqs
Equity Shares (EQS).
public static SecurityType Eqs { get; }
Property Value
Etc
Exchange Traded Commodities (ETC).
public static SecurityType Etc { get; }
Property Value
Etf
Exchange Traded Fund (ETF).
public static SecurityType Etf { get; }
Property Value
Etn
Exchange Traded Notes (ETN).
public static SecurityType Etn { get; }
Property Value
Fnd
Fund (FND).
public static SecurityType Fnd { get; }
Property Value
Gdn
Global Depository Notes (GDN).
public static SecurityType Gdn { get; }
Property Value
HasValue
true when this names a code — known or not.
public bool HasValue { get; }
Property Value
Icl
Irredeemable Convertible Loan Stock (ICL).
public static SecurityType Icl { get; }
Property Value
Idx
Index (IDX).
public static SecurityType Idx { get; }
Property Value
If
Interval Fund (IF).
public static SecurityType If { get; }
Property Value
Ifl
Inflation (IFL).
public static SecurityType Ifl { get; }
Property Value
Ior
Interbank Offered Rate (IOR).
public static SecurityType Ior { get; }
Property Value
IsKnown
true when Code is one of KnownCodes.
public bool IsKnown { get; }
Property Value
Remarks
false is not an error. It means the server sent something newer than the table this library shipped with, and the code is still in Code to be read, logged, or sent back in a filter.
KnownCodes
Every code the reference API reported for this type when the fixture was captured — 64 of them.
public static IReadOnlySet<string> KnownCodes { get; }
Property Value
Loa
Letter of Allotment (LOA).
public static SecurityType Loa { get; }
Property Value
Mf
Mutual Fund (MF).
public static SecurityType Mf { get; }
Property Value
Ncd
Non Convertible Debenture (NCD).
public static SecurityType Ncd { get; }
Property Value
Ncp
Non-Redeemable Convertible Cumulative Preference S (NCP).
public static SecurityType Ncp { get; }
Property Value
Nts
Notes (NTS).
public static SecurityType Nts { get; }
Property Value
Pcd
Partly Convertible Debenture (PCD).
public static SecurityType Pcd { get; }
Property Value
Per
Perpetual Exchangeable Repurchaseable Listed Share (PER).
public static SecurityType Per { get; }
Property Value
Pfs
Preferred Security (PFS).
public static SecurityType Pfs { get; }
Property Value
Ppr
Poison Pill Rights (PPR).
public static SecurityType Ppr { get; }
Property Value
Prf
Preference Share (PRF).
public static SecurityType Prf { get; }
Property Value
Prl
Parallel Line (PRL).
public static SecurityType Prl { get; }
Property Value
Rcl
Redeemable Convertible Secured Loan Stocks (RCL).
public static SecurityType Rcl { get; }
Property Value
Rcn
Redeemable Convertible Secured Notes (RCN).
public static SecurityType Rcn { get; }
Property Value
Rcp
Receipt (RCP).
public static SecurityType Rcp { get; }
Property Value
Rdr
Redemption Rights (RDR).
public static SecurityType Rdr { get; }
Property Value
Rds
Redeemable Shares (RDS).
public static SecurityType Rds { get; }
Property Value
Rfr
Risk Free Rates (RFR).
public static SecurityType Rfr { get; }
Property Value
Roc
Redeemable Optional Convertible Preference Shares (ROC).
public static SecurityType Roc { get; }
Property Value
Rts
rights (RTS).
public static SecurityType Rts { get; }
Property Value
Run
Redeemable Unconvertible Notes (RUN).
public static SecurityType Run { get; }
Property Value
Sp
Structured Product (SP).
public static SecurityType Sp { get; }
Property Value
Srt
Subscription Receipts (SRT).
public static SecurityType Srt { get; }
Property Value
Stl
Second Trading Line (STL).
public static SecurityType Stl { get; }
Property Value
Stp
Stapled Security (STP).
public static SecurityType Stp { get; }
Property Value
Swp
Swap Rate (SWP).
public static SecurityType Swp { get; }
Property Value
Tr
Treasury Rate (TR).
public static SecurityType Tr { get; }
Property Value
Trt
Tradeable Rights (TRT).
public static SecurityType Trt { get; }
Property Value
Tss
Tendered Shares Security (TSS).
public static SecurityType Tss { get; }
Property Value
Uit
Unit Investment Trust (UIT).
public static SecurityType Uit { get; }
Property Value
Unt
Units (UNT).
public static SecurityType Unt { get; }
Property Value
War
Warrants (WAR).
public static SecurityType War { get; }
Property Value
Wd
When Distributed (WD).
public static SecurityType Wd { get; }
Property Value
Wis
When Issued (WIS).
public static SecurityType Wis { get; }
Property Value
Methods
From(string?)
public static SecurityType From(string? code)
Parameters
Returns
- SecurityType
The value.
ToString()
The wire code, or the empty string when this names no value.
public override string ToString()
Returns
- string
The wire code.