ig_client/presentation/
instrument.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Copy, Clone, Deserialize, Serialize, PartialEq)]
4#[serde(rename_all = "UPPERCASE")]
5/// Types of financial instruments available in the IG Markets API
6pub enum InstrumentType {
7    /// Binary options
8    Binary,
9    /// Bungee capped instruments
10    #[serde(rename = "BUNGEE_CAPPED")]
11    BungeeCapped,
12    /// Bungee commodities instruments
13    #[serde(rename = "BUNGEE_COMMODITIES")]
14    BungeeCommodities,
15    /// Bungee currencies instruments
16    #[serde(rename = "BUNGEE_CURRENCIES")]
17    BungeeCurrencies,
18    /// Bungee indices instruments
19    #[serde(rename = "BUNGEE_INDICES")]
20    BungeeIndices,
21    /// Commodities instruments
22    Commodities,
23    /// Currency pairs
24    Currencies,
25    /// Market indices
26    Indices,
27    /// Knockouts commodities instruments
28    #[serde(rename = "KNOCKOUTS_COMMODITIES")]
29    KnockoutsCommodities,
30    /// Knockouts currencies instruments
31    #[serde(rename = "KNOCKOUTS_CURRENCIES")]
32    KnockoutsCurrencies,
33    /// Knockouts indices instruments
34    #[serde(rename = "KNOCKOUTS_INDICES")]
35    KnockoutsIndices,
36    /// Knockouts shares instruments
37    #[serde(rename = "KNOCKOUTS_SHARES")]
38    KnockoutsShares,
39    /// Options on commodities
40    #[serde(rename = "OPT_COMMODITIES")]
41    OptCommodities,
42    /// Options on currencies
43    #[serde(rename = "OPT_CURRENCIES")]
44    OptCurrencies,
45    /// Options on indices
46    #[serde(rename = "OPT_INDICES")]
47    OptIndices,
48    /// Options on rates
49    #[serde(rename = "OPT_RATES")]
50    OptRates,
51    /// Options on shares
52    #[serde(rename = "OPT_SHARES")]
53    OptShares,
54    /// Interest rates
55    Rates,
56    /// Market sectors
57    Sectors,
58    /// Stocks and shares
59    Shares,
60    /// Sprint market instruments
61    #[serde(rename = "SPRINT_MARKET")]
62    SprintMarket,
63    /// Test market instruments
64    #[serde(rename = "TEST_MARKET")]
65    TestMarket,
66    /// Unknown instrument type
67    Unknown,
68    /// Options
69    Options,
70}