JorgeBeserra / IqOptionApiDotNet

MIT License
23 stars 24 forks source link

Update Active Pair to work with the new update of IQ #175

Open jpr14 opened 5 days ago

jpr14 commented 5 days ago

public enum ActivePair : int { ALL = 0, [EnumMember(Value = "XRPUSD")] XRPUSD = 817, [EnumMember(Value = "GBPJPY_op")] GBPJPY_op = 1866, [EnumMember(Value = "GER30_OTC")] GER30_OTC = 2046, [EnumMember(Value = "UK100_OTC")] UK100_OTC = 2047, [EnumMember(Value = "US30JP225_OTC")] US30JP225_OTC = 2079, [EnumMember(Value = "NEARUSD_OTC")] NEARUSD_OTC = 2168, [EnumMember(Value = "DOTUSD_OTC")] DOTUSD_OTC = 2149, [EnumMember(Value = "CHFJPY")] CHFJPY = 106, [EnumMember(Value = "CADJPY")] CADJPY = 945, [EnumMember(Value = "EURGBP_OTC")] EURGBP_OTC = 77, [EnumMember(Value = "NOKJPY_OTC")] NOKJPY_OTC = 2201, [EnumMember(Value = "TRUMPvsHARRIS_OTC")] TRUMPvsHARRIS_OTC = 2185, [EnumMember(Value = "SATSUSD_OTC")] SATSUSD_OTC = 2159, [EnumMember(Value = "TIAUSD_OTC")] TIAUSD_OTC = 2162, [EnumMember(Value = "NVDAAMD_OTC")] NVDAAMD_OTC = 2084, [EnumMember(Value = "TESLA_OTC")] TESLA_OTC = 1936, [EnumMember(Value = "GOOGLEMSFT_OTC")] GOOGLEMSFT_OTC = 2085, [EnumMember(Value = "GRTUSD_OTC")] GRTUSD_OTC = 2165, [EnumMember(Value = "GBPNZD_OTC")] GBPNZD_OTC = 2132, [EnumMember(Value = "CHFNOK_OTC")] CHFNOK_OTC = 2200, [EnumMember(Value = "ETHUSD")] ETHUSD = 818, [EnumMember(Value = "EURGBP")] EURGBP = 2, [EnumMember(Value = "GBPUSD")] GBPUSD = 5, [EnumMember(Value = "JP225_OTC")] JP225_OTC = 2051, [EnumMember(Value = "APPLE_OTC")] APPLE_OTC = 1938, [EnumMember(Value = "INJUSD_OTC")] INJUSD_OTC = 2151, [EnumMember(Value = "EURCHF")] EURCHF = 946, [EnumMember(Value = "ORDIUSD_OTC")] ORDIUSD_OTC = 2158, [EnumMember(Value = "EURGBP_GS")] EURGBP_GS = 2133, [EnumMember(Value = "USDCAD")] USDCAD = 100, [EnumMember(Value = "CITI_OTC")] CITI_OTC = 2100, [EnumMember(Value = "EURTHB_OTC")] EURTHB_OTC = 2181, [EnumMember(Value = "AUDJPY")] AUDJPY = 101, [EnumMember(Value = "DASHUSD_OTC")] DASHUSD_OTC = 2155, [EnumMember(Value = "EURCAD")] EURCAD = 105, [EnumMember(Value = "ALIBABA_OTC")] ALIBABA_OTC = 2106, [EnumMember(Value = "USDSEK_OTC")] USDSEK_OTC = 2123, [EnumMember(Value = "IMXUSD_OTC")] IMXUSD_OTC = 2140, [EnumMember(Value = "XAUUSD")] XAUUSD = 74, [EnumMember(Value = "USDMXN_OTC_L")] USDMXN_OTC_L = 1548, [EnumMember(Value = "GBPAUD_OTC")] GBPAUD_OTC = 2116, [EnumMember(Value = "NZDJPY_OTC")] NZDJPY_OTC = 2138, [EnumMember(Value = "METAGOOGLE_OTC")] METAGOOGLE_OTC = 2094, [EnumMember(Value = "AIG_OTC")] AIG_OTC = 2109, [EnumMember(Value = "TESLAFORD_OTC")] TESLAFORD_OTC = 2087, [EnumMember(Value = "MANAUSD_OTC")] MANAUSD_OTC = 2163, [EnumMember(Value = "GBPCAD")] GBPCAD = 102, [EnumMember(Value = "Yen_Index")] Yen_Index = 2063, [EnumMember(Value = "USDPLN_OTC")] USDPLN_OTC = 2128, [EnumMember(Value = "BIDU_OTC")] BIDU_OTC = 2097, [EnumMember(Value = "FLOKIUSD_OTC")] FLOKIUSD_OTC = 2146, [EnumMember(Value = "COKE_OTC")] COKE_OTC = 2101, [EnumMember(Value = "USDHKD_OTC")] USDHKD_OTC = 1382, [EnumMember(Value = "INTELIBM_OTC")] INTELIBM_OTC = 2089, [EnumMember(Value = "JPYTHB_OTC")] JPYTHB_OTC = 2183, [EnumMember(Value = "EURUSD_OTC")] EURUSD_OTC = 76, [EnumMember(Value = "USDCHF_OTC")] USDCHF_OTC = 78, [EnumMember(Value = "GBPCHF")] GBPCHF = 103, [EnumMember(Value = "BTCUSD")] BTCUSD = 816, [EnumMember(Value = "AMZNALIBABA_OTC")] AMZNALIBABA_OTC = 2082, [EnumMember(Value = "XAUXAG_OTC")] XAUXAG_OTC = 2086, [EnumMember(Value = "ATOMUSD_OTC")] ATOMUSD_OTC = 2150, [EnumMember(Value = "AUDJPY_op")] AUDJPY_op = 1869, [EnumMember(Value = "GOOGLE_OTC")] GOOGLE_OTC = 1933, [EnumMember(Value = "EURNZD")] EURNZD = 212, [EnumMember(Value = "SANDUSD_OTC")] SANDUSD_OTC = 2164, [EnumMember(Value = "TONUSD_OTC")] TONUSD_OTC = 2091, [EnumMember(Value = "NOTCOIN_OTC")] NOTCOIN_OTC = 2096, [EnumMember(Value = "GBPNZD")] GBPNZD = 947, [EnumMember(Value = "EURJPY_OTC")] EURJPY_OTC = 79, [EnumMember(Value = "LTCUSD_OTC")] LTCUSD_OTC = 2126, [EnumMember(Value = "RONINUSD_OTC")] RONINUSD_OTC = 2161, [EnumMember(Value = "GS_OTC")] GS_OTC = 2110, [EnumMember(Value = "EURUSD")] EURUSD = 1, [EnumMember(Value = "GBPAUD")] GBPAUD = 104, [EnumMember(Value = "USDTHB_OTC")] USDTHB_OTC = 2182, [EnumMember(Value = "AMAZON_OTC")] AMAZON_OTC = 1935, [EnumMember(Value = "NZDUSD_op")] NZDUSD_op = 1896, [EnumMember(Value = "JPM_OTC")] JPM_OTC = 2102, [EnumMember(Value = "GBPJPY")] GBPJPY = 3, [EnumMember(Value = "USDCHF")] USDCHF = 72, [EnumMember(Value = "CADCHF")] CADCHF = 107, [EnumMember(Value = "NIKE_OTC")] NIKE_OTC = 2105, [EnumMember(Value = "MATICUSD_OTC")] MATICUSD_OTC = 2167, [EnumMember(Value = "EURGBP_op")] EURGBP_op = 1862, [EnumMember(Value = "AUDUSD_OTC")] AUDUSD_OTC = 2111, [EnumMember(Value = "BEAMUSD_OTC")] BEAMUSD_OTC = 2154, [EnumMember(Value = "EURNZD_OTC")] EURNZD_OTC = 2122, [EnumMember(Value = "USDTRY_OTC")] USDTRY_OTC = 2124, [EnumMember(Value = "HK33_OTC")] HK33_OTC = 2049, [EnumMember(Value = "CADJPY_OTC")] CADJPY_OTC = 2136, [EnumMember(Value = "EURAUD_OTC")] EURAUD_OTC = 2120, [EnumMember(Value = "SNAP_OTC")] SNAP_OTC = 2125, [EnumMember(Value = "US2000_OTC")] US2000_OTC = 2108, [EnumMember(Value = "US100JP225_OTC")] US100JP225_OTC = 2080, [EnumMember(Value = "NFLXAMZN_OTC")] NFLXAMZN_OTC = 2090, [EnumMember(Value = "BONKUSD_OTC")] BONKUSD_OTC = 2142, [EnumMember(Value = "GALAUSD_OTC")] GALAUSD_OTC = 2147, [EnumMember(Value = "GBPCHF_OTC")] GBPCHF_OTC = 2115, [EnumMember(Value = "USDCAD_OTC")] USDCAD_OTC = 2112, [EnumMember(Value = "ICPUSD_OTC")] ICPUSD_OTC = 2139, [EnumMember(Value = "Dollar_Index")] Dollar_Index = 2062, [EnumMember(Value = "PYTHUSD_OTC")] PYTHUSD_OTC = 2160, [EnumMember(Value = "AUDUSD_op")] AUDUSD_op = 1870, [EnumMember(Value = "AUDNZD_OTC")] AUDNZD_OTC = 2130, [EnumMember(Value = "JUPUSD_OTC")] JUPUSD_OTC = 2141, [EnumMember(Value = "MCDON_OTC")] MCDON_OTC = 2103, [EnumMember(Value = "EURUSD_op")] EURUSD_op = 1861, [EnumMember(Value = "XRPUSD_OTC")] XRPUSD_OTC = 2107, [EnumMember(Value = "USDZAR_OTC")] USDZAR_OTC = 1380, [EnumMember(Value = "AUDCAD_op")] AUDCAD_op = 1868, [EnumMember(Value = "US500JP225_OTC")] US500JP225_OTC = 2081, [EnumMember(Value = "USDNOK_OTC")] USDNOK_OTC = 2121, [EnumMember(Value = "NZDCAD_OTC")] NZDCAD_OTC = 2137, [EnumMember(Value = "LINKUSD_OTC")] LINKUSD_OTC = 2143, [EnumMember(Value = "LTCUSD")] LTCUSD = 819, [EnumMember(Value = "NZDUSD")] NZDUSD = 8, [EnumMember(Value = "IOTAUSD_OTC")] IOTAUSD_OTC = 2153, [EnumMember(Value = "WLDUSD_OTC")] WLDUSD_OTC = 2157, [EnumMember(Value = "EURJPY")] EURJPY = 4, [EnumMember(Value = "AUDCAD")] AUDCAD = 7, [EnumMember(Value = "USDJPY")] USDJPY = 6, [EnumMember(Value = "EOSUSD_OTC")] EOSUSD_OTC = 2127, [EnumMember(Value = "STXUSD_OTC")] STXUSD_OTC = 2166, [EnumMember(Value = "USNDAQ100_OTC")] USNDAQ100_OTC = 1972, [EnumMember(Value = "GBPCAD_OTC")] GBPCAD_OTC = 2114, [EnumMember(Value = "MSFTAAPL_OTC")] MSFTAAPL_OTC = 2088, [EnumMember(Value = "SEIUSD_OTC")] SEIUSD_OTC = 2152, [EnumMember(Value = "AUS200_OTC")] AUS200_OTC = 2048, [EnumMember(Value = "NZDCHF_OTC")] NZDCHF_OTC = 2202, [EnumMember(Value = "FB_OTC")] FB_OTC = 1937, [EnumMember(Value = "AMZNEBAY_OTC")] AMZNEBAY_OTC = 2083, [EnumMember(Value = "WIFUSD_OTC")] WIFUSD_OTC = 2144, [EnumMember(Value = "EURAUD")] EURAUD = 108, [EnumMember(Value = "USDSGD_OTC")] USDSGD_OTC = 1381, [EnumMember(Value = "EOSUSD")] EOSUSD = 864, [EnumMember(Value = "CHFJPY_OTC")] CHFJPY_OTC = 2118, [EnumMember(Value = "PEPEUSD_OTC")] PEPEUSD_OTC = 2145, [EnumMember(Value = "USDJPY_op")] USDJPY_op = 1865, [EnumMember(Value = "HMSTR_OTC")] HMSTR_OTC = 2192, [EnumMember(Value = "USOUSD")] USOUSD = 971, [EnumMember(Value = "BCHUSD_OTC")] BCHUSD_OTC = 2148, [EnumMember(Value = "NZDUSD_OTC")] NZDUSD_OTC = 80, [EnumMember(Value = "GER30UK100_OTC")] GER30UK100_OTC = 2093, [EnumMember(Value = "GBPUSD_op")] GBPUSD_op = 1867, [EnumMember(Value = "CADCHF_OTC")] CADCHF_OTC = 2119, [EnumMember(Value = "EU50_OTC")] EU50_OTC = 2050, [EnumMember(Value = "AUDCHF_OTC")] AUDCHF_OTC = 2129, [EnumMember(Value = "EURJPY_op")] EURJPY_op = 1864, [EnumMember(Value = "MSFT_OTC")] MSFT_OTC = 2099, [EnumMember(Value = "ARBUSD_OTC")] ARBUSD_OTC = 2156, [EnumMember(Value = "GBPUSD_OTC")] GBPUSD_OTC = 81, [EnumMember(Value = "EURCHF_OTC")] EURCHF_OTC = 2131, [EnumMember(Value = "AUDJPY_OTC")] AUDJPY_OTC = 2113, [EnumMember(Value = "SP35_OTC")] SP35_OTC = 2044, [EnumMember(Value = "AUDUSD")] AUDUSD = 99, [EnumMember(Value = "FR40_OTC")] FR40_OTC = 2045, [EnumMember(Value = "SP500_OTC")] SP500_OTC = 1971, [EnumMember(Value = "AUDCAD_OTC")] AUDCAD_OTC = 86, [EnumMember(Value = "EURCAD_OTC")] EURCAD_OTC = 2117, [EnumMember(Value = "MORSTAN_OTC")] MORSTAN_OTC = 2104, [EnumMember(Value = "INTEL_OTC")] INTEL_OTC = 2098, [EnumMember(Value = "US30_OTC")] US30_OTC = 1973,

}

@JorgeBeserra @ljchuello @gitter-badger @leobasilio @Sabidos

JorgeBeserra commented 3 days ago

Hello!

@jpr14

I made the corrections to the program, and now it is ready for testing. Please run the necessary tests and let me know if everything is working as expected. If any questions arise or something needs adjusting, I will be available to help.

I await your return! 😊

jpr14 commented 3 days ago

Check the list I sent you carefully, the forex pairs changed ID and 'op' was added at the end:

[EnumMember(Value = "GBPJPY_op")] GBPJPY_op = 1866, [EnumMember(Value = "AUDJPY_op")] AUDJPY_op = 1869, [EnumMember(Value = "NZDUSD_op")] NZDUSD_op = 1896, [EnumMember(Value = "EURGBP_op")] EURGBP_op = 1862, [EnumMember(Value = "AUDUSD_op")] AUDUSD_op = 1870, [EnumMember(Value = "EURUSD_op")] EURUSD_op = 1861, [EnumMember(Value = "AUDCAD_op")] AUDCAD_op = 1868, [EnumMember(Value = "USDJPY_op")] USDJPY_op = 1865, [EnumMember(Value = "GBPUSD_op")] GBPUSD_op = 1867, [EnumMember(Value = "EURJPY_op")] EURJPY_op = 1864,

@JorgeBeserra

jpr14 commented 3 days ago

Also ClosedOptionObservable().Subscribe doesnt work

while (true) { VariablesGlobales.client.WsClient.ClosedOptionObservable().Subscribe(async result => { await CheckClosedAsync(result, buyResult); }); VariablesGlobales.client.WsClient.ClosedOptionObservable().Subscribe().Dispose();

break;

}

@JorgeBeserra

JorgeBeserra commented 3 days ago

[EnumMember(Value = "GBPJPY_op")] GBPJPY_op = 1866, [EnumMember(Value = "AUDJPY_op")] AUDJPY_op = 1869, [EnumMember(Value = "NZDUSD_op")] NZDUSD_op = 1896, [EnumMember(Value = "EURGBP_op")] EURGBP_op = 1862, [EnumMember(Value = "AUDUSD_op")] AUDUSD_op = 1870, [EnumMember(Value = "EURUSD_op")] EURUSD_op = 1861, [EnumMember(Value = "AUDCAD_op")] AUDCAD_op = 1868, [EnumMember(Value = "USDJPY_op")] USDJPY_op = 1865, [EnumMember(Value = "GBPUSD_op")] GBPUSD_op = 1867, [EnumMember(Value = "EURJPY_op")] EURJPY_op = 1864,

@jpr14

Added new _op items to the activepair file.

jpr14 commented 3 days ago

Only the ClosedOptionObservable.Subscribe remains, and I'll be happy.

@JorgeBeserra