quantconnect-stubs 17357__py3-none-any.whl → 17410__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. Common/Util/__init__.py +32 -0
  2. Common/Util/__init__.pyi +152 -0
  3. QuantConnect/Algorithm/Framework/Alphas/__init__.pyi +4 -14
  4. QuantConnect/Algorithm/Framework/Execution/__init__.pyi +4 -1
  5. QuantConnect/Algorithm/Framework/Selection/__init__.pyi +8 -2
  6. QuantConnect/Algorithm/__init__.pyi +70 -74
  7. QuantConnect/AlgorithmFactory/Python/Wrappers/__init__.pyi +24 -3
  8. QuantConnect/Api/__init__.pyi +36 -3
  9. QuantConnect/Brokerages/__init__.pyi +71 -0
  10. QuantConnect/Data/Market/__init__.pyi +23 -187
  11. QuantConnect/Data/__init__.pyi +6 -1
  12. QuantConnect/Indicators/__init__.pyi +144 -93
  13. QuantConnect/Interfaces/__init__.pyi +36 -5
  14. QuantConnect/Lean/Engine/DataFeeds/Enumerators/Factories/__init__.pyi +1 -2
  15. QuantConnect/Lean/Engine/DataFeeds/__init__.pyi +23 -2
  16. QuantConnect/Lean/Engine/Results/__init__.pyi +0 -38
  17. QuantConnect/Orders/Fees/__init__.pyi +35 -0
  18. QuantConnect/Orders/__init__.pyi +49 -0
  19. QuantConnect/Packets/__init__.pyi +52 -0
  20. QuantConnect/Python/__init__.pyi +16 -1
  21. QuantConnect/Securities/Interfaces/__init__.pyi +2 -0
  22. QuantConnect/Securities/__init__.pyi +30 -133
  23. QuantConnect/Util/__init__.pyi +15 -0
  24. QuantConnect/__init__.pyi +93 -0
  25. System/Buffers/Binary/__init__.pyi +33 -0
  26. System/Diagnostics/Tracing/__init__.pyi +8 -0
  27. System/IO/__init__.pyi +12 -0
  28. System/Runtime/CompilerServices/__init__.pyi +16 -0
  29. System/Runtime/Intrinsics/Arm/__init__.pyi +22 -14
  30. System/Threading/__init__.pyi +47 -47
  31. System/__init__.pyi +36 -0
  32. {quantconnect_stubs-17357.dist-info → quantconnect_stubs-17410.dist-info}/METADATA +1 -1
  33. {quantconnect_stubs-17357.dist-info → quantconnect_stubs-17410.dist-info}/RECORD +35 -33
  34. {quantconnect_stubs-17357.dist-info → quantconnect_stubs-17410.dist-info}/WHEEL +0 -0
  35. {quantconnect_stubs-17357.dist-info → quantconnect_stubs-17410.dist-info}/top_level.txt +0 -0
@@ -3,6 +3,7 @@ from enum import IntEnum
3
3
  import datetime
4
4
  import typing
5
5
 
6
+ import Common.Util
6
7
  import QuantConnect
7
8
  import QuantConnect.Algorithm
8
9
  import QuantConnect.Algorithm.Framework.Alphas
@@ -470,16 +471,36 @@ class AlgorithmPythonWrapper(QuantConnect.Python.BasePythonWrapper[QuantConnect.
470
471
  """
471
472
  ...
472
473
 
473
- def get_last_known_price(self, security: QuantConnect.Securities.Security) -> QuantConnect.Data.BaseData:
474
+ def get_last_known_price(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect.Data.BaseData:
474
475
  """
475
476
  Get the last known price using the history provider.
476
477
  Useful for seeding securities with the correct price
477
478
 
478
- :param security: Security object for which to retrieve historical data
479
+ :param symbol: Symbol for which to retrieve historical data
479
480
  :returns: A single BaseData object with the last known price.
480
481
  """
481
482
  ...
482
483
 
484
+ @overload
485
+ def get_last_known_prices(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> typing.Iterable[QuantConnect.Data.BaseData]:
486
+ """
487
+ Yields data to warmup a security for all it's subscribed data types
488
+
489
+ :param symbol: Symbol for which to retrieve historical data
490
+ :returns: Securities historical data.
491
+ """
492
+ ...
493
+
494
+ @overload
495
+ def get_last_known_prices(self, symbols: typing.List[QuantConnect.Symbol]) -> QuantConnect.Data.Market.DataDictionary[typing.Iterable[QuantConnect.Data.BaseData]]:
496
+ """
497
+ Yields data to warm up multiple securities for all their subscribed data types
498
+
499
+ :param symbols: The symbols we want to get seed data for
500
+ :returns: Securities historical data.
501
+ """
502
+ ...
503
+
483
504
  def get_locked(self) -> bool:
484
505
  """Gets whether or not this algorithm has been locked and fully initialized"""
485
506
  ...
@@ -520,7 +541,7 @@ class AlgorithmPythonWrapper(QuantConnect.Python.BasePythonWrapper[QuantConnect.
520
541
  """
521
542
  ...
522
543
 
523
- def get_parameters(self) -> System.Collections.Generic.IReadOnlyDictionary[str, str]:
544
+ def get_parameters(self) -> Common.Util.ReadOnlyExtendedDictionary[str, str]:
524
545
  """Gets a read-only dictionary with all current parameters"""
525
546
  ...
526
547
 
@@ -2,6 +2,7 @@ from typing import overload
2
2
  from enum import IntEnum
3
3
  import datetime
4
4
  import typing
5
+ import warnings
5
6
 
6
7
  import QuantConnect
7
8
  import QuantConnect.Algorithm.Framework.Alphas
@@ -28,18 +29,24 @@ class ApiConnection(System.Object):
28
29
 
29
30
  @property
30
31
  def client(self) -> typing.Any:
31
- """Authorized client to use for requests."""
32
- ...
32
+ """
33
+ Authorized client to use for requests.
34
+
35
+
36
+ RestSharp is deprecated and will be removed in a future release. Please use the SetClient method or the request methods that take an HttpRequestMessage
37
+ """
38
+ warnings.warn("RestSharp is deprecated and will be removed in a future release. Please use the SetClient method or the request methods that take an HttpRequestMessage", DeprecationWarning)
33
39
 
34
40
  @client.setter
35
41
  def client(self, value: typing.Any) -> None:
36
- ...
42
+ warnings.warn("RestSharp is deprecated and will be removed in a future release. Please use the SetClient method or the request methods that take an HttpRequestMessage", DeprecationWarning)
37
43
 
38
44
  @property
39
45
  def connected(self) -> bool:
40
46
  """Return true if connected successfully."""
41
47
  ...
42
48
 
49
+ @overload
43
50
  def __init__(self, user_id: int, token: str) -> None:
44
51
  """
45
52
  Create a new Api Connection Class.
@@ -49,6 +56,29 @@ class ApiConnection(System.Object):
49
56
  """
50
57
  ...
51
58
 
59
+ @overload
60
+ def __init__(self, user_id: int, token: str, base_url: str = None, default_headers: System.Collections.Generic.Dictionary[str, str] = None, timeout: int = 0) -> None:
61
+ """
62
+ Create a new Api Connection Class.
63
+
64
+ :param user_id: User Id number from QuantConnect.com account. Found at www.quantconnect.com/account
65
+ :param token: Access token for the QuantConnect account. Found at www.quantconnect.com/account
66
+ :param base_url: The client's base address
67
+ :param default_headers: Default headers for the client
68
+ :param timeout: The client timeout in seconds
69
+ """
70
+ ...
71
+
72
+ def set_client(self, base_url: str, default_headers: System.Collections.Generic.Dictionary[str, str] = None, timeout: int = 0) -> None:
73
+ """
74
+ Overrides the current client
75
+
76
+ :param base_url: The client's base address
77
+ :param default_headers: Default headers for the client
78
+ :param timeout: The client timeout in seconds
79
+ """
80
+ ...
81
+
52
82
 
53
83
  class StringRepresentation(System.Object):
54
84
  """Class to return the string representation of an API response class"""
@@ -3723,10 +3753,13 @@ class NodeType(IntEnum):
3723
3753
  """
3724
3754
 
3725
3755
  BACKTEST = 0
3756
+ """A node for running backtests (0)"""
3726
3757
 
3727
3758
  RESEARCH = 1
3759
+ """A node for running research (1)"""
3728
3760
 
3729
3761
  LIVE = 2
3762
+ """A node for live trading (2)"""
3730
3763
 
3731
3764
 
3732
3765
  class SKU(System.Object):
@@ -2290,6 +2290,74 @@ class DefaultBrokerageModel(System.Object, QuantConnect.Brokerages.IBrokerageMod
2290
2290
  ...
2291
2291
 
2292
2292
 
2293
+ class dYdXBrokerageModel(QuantConnect.Brokerages.DefaultBrokerageModel):
2294
+ """This class has no documentation."""
2295
+
2296
+ @property
2297
+ def default_markets(self) -> System.Collections.Generic.IReadOnlyDictionary[QuantConnect.SecurityType, str]:
2298
+ """Gets a map of the default markets to be used for each security type"""
2299
+ ...
2300
+
2301
+ def __init__(self, account_type: QuantConnect.AccountType = ...) -> None:
2302
+ """
2303
+ Initializes a new instance of the dYdXBrokerageModel class
2304
+
2305
+ :param account_type: The type of account to be modeled, defaults to AccountType.MARGIN
2306
+ """
2307
+ ...
2308
+
2309
+ def can_submit_order(self, security: QuantConnect.Securities.Security, order: QuantConnect.Orders.Order, message: typing.Optional[QuantConnect.Brokerages.BrokerageMessageEvent]) -> typing.Tuple[bool, QuantConnect.Brokerages.BrokerageMessageEvent]:
2310
+ """
2311
+ Returns true if the brokerage could accept this order. This takes into account
2312
+ order type, security type, and order size limits.
2313
+
2314
+ :param security: The security of the order
2315
+ :param order: The order to be processed
2316
+ :param message: If this function returns false, a brokerage message detailing why the order may not be submitted
2317
+ :returns: True if the brokerage could process the order, false otherwise.
2318
+ """
2319
+ ...
2320
+
2321
+ def can_update_order(self, security: QuantConnect.Securities.Security, order: QuantConnect.Orders.Order, request: QuantConnect.Orders.UpdateOrderRequest, message: typing.Optional[QuantConnect.Brokerages.BrokerageMessageEvent]) -> typing.Tuple[bool, QuantConnect.Brokerages.BrokerageMessageEvent]:
2322
+ """
2323
+ Returns true if the brokerage could accept this order update. This takes into account
2324
+ order type, security type, and order size limits. dYdX can only update inverse, linear, and option orders
2325
+
2326
+ :param security: The security of the order
2327
+ :param order: The order to be updated
2328
+ :param request: The requested update to be made to the order
2329
+ :param message: If this function returns false, a brokerage message detailing why the order may not be updated
2330
+ :returns: True if the brokerage could update the order, false otherwise.
2331
+ """
2332
+ ...
2333
+
2334
+ def get_benchmark(self, securities: QuantConnect.Securities.SecurityManager) -> QuantConnect.Benchmarks.IBenchmark:
2335
+ """
2336
+ Get the benchmark for this model
2337
+
2338
+ :param securities: SecurityService to create the security with if needed
2339
+ :returns: The benchmark for this brokerage.
2340
+ """
2341
+ ...
2342
+
2343
+ def get_fee_model(self, security: QuantConnect.Securities.Security) -> QuantConnect.Orders.Fees.IFeeModel:
2344
+ """
2345
+ Provides dYdX fee model
2346
+
2347
+ :param security:
2348
+ """
2349
+ ...
2350
+
2351
+ def get_margin_interest_rate_model(self, security: QuantConnect.Securities.Security) -> QuantConnect.Securities.IMarginInterestRateModel:
2352
+ """
2353
+ Gets a new margin interest rate model for the security
2354
+
2355
+ :param security: The security to get a margin interest rate model for
2356
+ :returns: The margin interest rate model for this brokerage.
2357
+ """
2358
+ ...
2359
+
2360
+
2293
2361
  class BinanceBrokerageModel(QuantConnect.Brokerages.DefaultBrokerageModel):
2294
2362
  """Provides Binance specific properties"""
2295
2363
 
@@ -2624,6 +2692,9 @@ class BrokerageName(IntEnum):
2624
2692
  INTERACTIVE_BROKERS_FIX = 33
2625
2693
  """Transaction and submit/execution rules will use interactive brokers Fix models"""
2626
2694
 
2695
+ D_YD_X = 34
2696
+ """Transaction and submit/execution rules will use dYdX models"""
2697
+
2627
2698
 
2628
2699
  class BrokerageModel(System.Object):
2629
2700
  """Provides factory method for creating an IBrokerageModel from the BrokerageName enum"""
@@ -5,6 +5,7 @@ import datetime
5
5
  import typing
6
6
  import warnings
7
7
 
8
+ import Common.Util
8
9
  import QuantConnect
9
10
  import QuantConnect.Data
10
11
  import QuantConnect.Data.Market
@@ -2672,7 +2673,7 @@ class SessionBar(QuantConnect.Data.Market.TradeBar):
2672
2673
  ...
2673
2674
 
2674
2675
 
2675
- class DataDictionary(typing.Generic[QuantConnect_Data_Market_DataDictionary_T], QuantConnect.ExtendedDictionary[QuantConnect.Symbol, QuantConnect_Data_Market_DataDictionary_T], System.Collections.Generic.IDictionary[QuantConnect.Symbol, QuantConnect_Data_Market_DataDictionary_T], typing.Iterable[System.Collections.Generic.KeyValuePair[QuantConnect.Symbol, QuantConnect_Data_Market_DataDictionary_T]]):
2676
+ class DataDictionary(typing.Generic[QuantConnect_Data_Market_DataDictionary_T], Common.Util.BaseExtendedDictionary[QuantConnect.Symbol, QuantConnect_Data_Market_DataDictionary_T], typing.Iterable[System.Collections.Generic.KeyValuePair[QuantConnect.Symbol, QuantConnect_Data_Market_DataDictionary_T]]):
2676
2677
  """Provides a base class for types holding base data instances keyed by symbol"""
2677
2678
 
2678
2679
  @property
@@ -2684,20 +2685,10 @@ class DataDictionary(typing.Generic[QuantConnect_Data_Market_DataDictionary_T],
2684
2685
  def time(self, value: datetime.datetime) -> None:
2685
2686
  ...
2686
2687
 
2687
- @property
2688
- def count(self) -> int:
2689
- """Gets the number of elements contained in the System.Collections.Generic.ICollection`1."""
2690
- ...
2691
-
2692
- @property
2693
- def is_read_only(self) -> bool:
2694
- """Gets a value indicating whether the System.Collections.Generic.ICollection`1 is read-only."""
2695
- ...
2696
-
2697
2688
  @property
2698
2689
  def get_keys(self) -> typing.Iterable[QuantConnect.Symbol]:
2699
2690
  """
2700
- Gets an System.Collections.Generic.ICollection`1 containing the Symbol objects of the System.Collections.Generic.IDictionary`2.
2691
+ Gets a collection containing the keys in the dictionary
2701
2692
 
2702
2693
 
2703
2694
  This codeEntityType is protected.
@@ -2707,40 +2698,15 @@ class DataDictionary(typing.Generic[QuantConnect_Data_Market_DataDictionary_T],
2707
2698
  @property
2708
2699
  def get_values(self) -> typing.Iterable[QuantConnect_Data_Market_DataDictionary_T]:
2709
2700
  """
2710
- Gets an System.Collections.Generic.ICollection`1 containing the values in the System.Collections.Generic.IDictionary`2.
2701
+ Gets a collection containing the values in the dictionary
2711
2702
 
2712
2703
 
2713
2704
  This codeEntityType is protected.
2714
2705
  """
2715
2706
  ...
2716
2707
 
2717
- def __contains__(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> bool:
2718
- """
2719
- Determines whether the System.Collections.Generic.IDictionary{TKey, TValue} contains an element with the specified key.
2720
-
2721
- :param key: The key to locate in the System.Collections.Generic.IDictionary{TKey, TValue}.
2722
- :returns: true if the System.Collections.Generic.IDictionary{TKey, TValue} contains an element with the key; otherwise, false.
2723
- """
2724
- ...
2725
-
2726
- @overload
2727
2708
  def __getitem__(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect_Data_Market_DataDictionary_T:
2728
- """
2729
- Gets or sets the element with the specified key.
2730
-
2731
- :param symbol: The key of the element to get or set.
2732
- :returns: The element with the specified key.
2733
- """
2734
- ...
2735
-
2736
- @overload
2737
- def __getitem__(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect_Data_Market_DataDictionary_T:
2738
- """
2739
- Indexer method for the base dictioanry to access the objects by their symbol.
2740
-
2741
- :param key: Key object indexer
2742
- :returns: Object of t_value.
2743
- """
2709
+ """Gets or sets the element with the specified key."""
2744
2710
  ...
2745
2711
 
2746
2712
  @overload
@@ -2771,107 +2737,38 @@ class DataDictionary(typing.Generic[QuantConnect_Data_Market_DataDictionary_T],
2771
2737
  def __iter__(self) -> typing.Iterator[System.Collections.Generic.KeyValuePair[QuantConnect.Symbol, QuantConnect_Data_Market_DataDictionary_T]]:
2772
2738
  ...
2773
2739
 
2774
- def __len__(self) -> int:
2775
- ...
2776
-
2777
- @overload
2778
2740
  def __setitem__(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], value: QuantConnect_Data_Market_DataDictionary_T) -> None:
2779
- """
2780
- Gets or sets the element with the specified key.
2781
-
2782
- :param symbol: The key of the element to get or set.
2783
- :returns: The element with the specified key.
2784
- """
2741
+ """Gets or sets the element with the specified key."""
2785
2742
  ...
2786
2743
 
2787
2744
  @overload
2788
- def __setitem__(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], value: QuantConnect_Data_Market_DataDictionary_T) -> None:
2745
+ def add(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], value: QuantConnect_Data_Market_DataDictionary_T) -> None:
2789
2746
  """
2790
- Indexer method for the base dictioanry to access the objects by their symbol.
2747
+ Adds an element with the provided key and value to the dictionary
2791
2748
 
2792
- :param key: Key object indexer
2793
- :returns: Object of t_value.
2749
+ :param key: The key of the element to add
2750
+ :param value: The value of the element to add
2794
2751
  """
2795
2752
  ...
2796
2753
 
2797
2754
  @overload
2798
2755
  def add(self, item: System.Collections.Generic.KeyValuePair[QuantConnect.Symbol, QuantConnect_Data_Market_DataDictionary_T]) -> None:
2799
2756
  """
2800
- Adds an item to the System.Collections.Generic.ICollection`1.
2757
+ Adds an element with the provided key-value pair to the dictionary
2801
2758
 
2802
- :param item: The object to add to the System.Collections.Generic.ICollection`1.
2803
- """
2804
- ...
2805
-
2806
- @overload
2807
- def add(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], value: QuantConnect_Data_Market_DataDictionary_T) -> None:
2808
- """
2809
- Adds an element with the provided key and value to the System.Collections.Generic.IDictionary{TKey, TValue}.
2810
-
2811
- :param key: The object to use as the key of the element to add.
2812
- :param value: The object to use as the value of the element to add.
2759
+ :param item: The key-value pair to add
2813
2760
  """
2814
2761
  ...
2815
2762
 
2816
2763
  def clear(self) -> None:
2817
- """Removes all items from the System.Collections.Generic.ICollection`1."""
2818
- ...
2819
-
2820
- def contains(self, item: System.Collections.Generic.KeyValuePair[QuantConnect.Symbol, QuantConnect_Data_Market_DataDictionary_T]) -> bool:
2821
- """
2822
- Determines whether the System.Collections.Generic.ICollection`1 contains a specific value.
2823
-
2824
- :param item: The object to locate in the System.Collections.Generic.ICollection`1.
2825
- :returns: true if item is found in the System.Collections.Generic.ICollection`1; otherwise, false.
2826
- """
2827
- ...
2828
-
2829
- def contains_key(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> bool:
2830
- """
2831
- Determines whether the System.Collections.Generic.IDictionary{TKey, TValue} contains an element with the specified key.
2832
-
2833
- :param key: The key to locate in the System.Collections.Generic.IDictionary{TKey, TValue}.
2834
- :returns: true if the System.Collections.Generic.IDictionary{TKey, TValue} contains an element with the key; otherwise, false.
2835
- """
2836
- ...
2837
-
2838
- def copy_to(self, array: typing.List[System.Collections.Generic.KeyValuePair[QuantConnect.Symbol, QuantConnect_Data_Market_DataDictionary_T]], array_index: int) -> None:
2839
- """
2840
- Copies the elements of the System.Collections.Generic.ICollection`1 to an System.Array, starting at a particular System.Array index.
2841
-
2842
- :param array: The one-dimensional System.Array that is the destination of the elements copied from System.Collections.Generic.ICollection`1. The System.Array must have zero-based indexing.
2843
- :param array_index: The zero-based index in array at which copying begins.
2844
- """
2845
- ...
2846
-
2847
- @overload
2848
- def get(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect_Data_Market_DataDictionary_T:
2849
- """
2850
- Returns the value for the specified key if key is in dictionary.
2851
-
2852
- :param key: key to be searched in the dictionary
2853
- :returns: The value for the specified key if key is in dictionary.
2854
- None if the key is not found and value is not specified.
2855
- """
2856
- ...
2857
-
2858
- @overload
2859
- def get(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], value: QuantConnect_Data_Market_DataDictionary_T) -> QuantConnect_Data_Market_DataDictionary_T:
2860
- """
2861
- Returns the value for the specified key if key is in dictionary.
2862
-
2863
- :param key: key to be searched in the dictionary
2864
- :param value: Value to be returned if the key is not found. The default value is null.
2865
- :returns: The value for the specified key if key is in dictionary.
2866
- value if the key is not found and value is specified.
2867
- """
2764
+ """Removes all items from the dictionary"""
2868
2765
  ...
2869
2766
 
2870
2767
  def get_enumerator(self) -> System.Collections.Generic.IEnumerator[System.Collections.Generic.KeyValuePair[QuantConnect.Symbol, QuantConnect_Data_Market_DataDictionary_T]]:
2871
2768
  """
2872
- Returns an enumerator that iterates through the collection.
2769
+ Returns an enumerator that iterates through the dictionary
2873
2770
 
2874
- :returns: A System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.
2771
+ :returns: An enumerator for the dictionary.
2875
2772
  """
2876
2773
  ...
2877
2774
 
@@ -2884,87 +2781,26 @@ class DataDictionary(typing.Generic[QuantConnect_Data_Market_DataDictionary_T],
2884
2781
  ...
2885
2782
 
2886
2783
  def get_value(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect_Data_Market_DataDictionary_T:
2887
- """
2888
- Gets the value associated with the specified key.
2889
-
2890
- :param key: The key whose value to get.
2891
- :returns: The value associated with the specified key, if the key is found; otherwise, the default value for the type of the t parameter.
2892
- """
2893
- ...
2894
-
2895
- @overload
2896
- def pop(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect_Data_Market_DataDictionary_T:
2897
- """
2898
- Removes and returns an element from a dictionary having the given key.
2899
-
2900
- :param key: Key which is to be searched for removal
2901
- :returns: If key is found - removed/popped element from the dictionary
2902
- If key is not found - KeyError exception is raised.
2903
- """
2904
- ...
2905
-
2906
- @overload
2907
- def pop(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], default_value: QuantConnect_Data_Market_DataDictionary_T) -> QuantConnect_Data_Market_DataDictionary_T:
2908
- """
2909
- Removes and returns an element from a dictionary having the given key.
2910
-
2911
- :param key: Key which is to be searched for removal
2912
- :param default_value: Value which is to be returned when the key is not in the dictionary
2913
- :returns: If key is found - removed/popped element from the dictionary
2914
- If key is not found - value specified as the second argument(default).
2915
- """
2916
- ...
2917
-
2918
- @overload
2919
- def remove(self, item: System.Collections.Generic.KeyValuePair[QuantConnect.Symbol, QuantConnect_Data_Market_DataDictionary_T]) -> bool:
2920
- """
2921
- Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection`1.
2922
-
2923
- :param item: The object to remove from the System.Collections.Generic.ICollection`1.
2924
- :returns: true if item was successfully removed from the System.Collections.Generic.ICollection`1; otherwise, false. This method also returns false if item is not found in the original System.Collections.Generic.ICollection`1.
2925
- """
2784
+ """Gets the value associated with the specified key."""
2926
2785
  ...
2927
2786
 
2928
2787
  @overload
2929
2788
  def remove(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> bool:
2930
2789
  """
2931
- Removes the element with the specified key from the System.Collections.Generic.IDictionary{TKey, TValue}.
2790
+ Removes the value with the specified key
2932
2791
 
2933
- :param key: The key of the element to remove.
2934
- :returns: true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original System.Collections.Generic.IDictionary{TKey, TValue}.
2792
+ :param key: The key of the element to remove
2793
+ :returns: true if the element was successfully found and removed; otherwise, false.
2935
2794
  """
2936
2795
  ...
2937
2796
 
2938
2797
  @overload
2939
- def setdefault(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect_Data_Market_DataDictionary_T:
2940
- """
2941
- Returns the value of a key (if the key is in dictionary). If not, it inserts key with a value to the dictionary.
2942
-
2943
- :param key: Key with null/None value is inserted to the dictionary if key is not in the dictionary.
2944
- :returns: The value of the key if it is in the dictionary
2945
- None if key is not in the dictionary.
2946
- """
2947
- ...
2948
-
2949
- @overload
2950
- def setdefault(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], default_value: QuantConnect_Data_Market_DataDictionary_T) -> QuantConnect_Data_Market_DataDictionary_T:
2951
- """
2952
- Returns the value of a key (if the key is in dictionary). If not, it inserts key with a value to the dictionary.
2953
-
2954
- :param key: Key with a value default_value is inserted to the dictionary if key is not in the dictionary.
2955
- :param default_value: Default value
2956
- :returns: The value of the key if it is in the dictionary
2957
- default_value if key is not in the dictionary and default_value is specified.
2958
- """
2959
- ...
2960
-
2961
- def try_get_value(self, key: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], value: typing.Optional[QuantConnect_Data_Market_DataDictionary_T]) -> typing.Tuple[bool, QuantConnect_Data_Market_DataDictionary_T]:
2798
+ def remove(self, item: System.Collections.Generic.KeyValuePair[QuantConnect.Symbol, QuantConnect_Data_Market_DataDictionary_T]) -> bool:
2962
2799
  """
2963
- Gets the value associated with the specified key.
2800
+ Removes the first occurrence of a specific object from the dictionary
2964
2801
 
2965
- :param key: The key whose value to get.
2966
- :param value: When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
2967
- :returns: true if the object that implements System.Collections.Generic.IDictionary{TKey, TValue} contains an element with the specified key; otherwise, false.
2802
+ :param item: The key-value pair to remove
2803
+ :returns: true if the key-value pair was successfully removed; otherwise, false.
2968
2804
  """
2969
2805
  ...
2970
2806
 
@@ -940,7 +940,7 @@ class Slice(QuantConnect.ExtendedDictionary[QuantConnect.Symbol, typing.Any], ty
940
940
  """Provides a data structure for all of an algorithm's data at a single time step"""
941
941
 
942
942
  @property
943
- def all_data(self) -> typing.List[QuantConnect.Data.BaseData]:
943
+ def all_data(self) -> typing.Iterable[QuantConnect.Data.BaseData]:
944
944
  """All the data hold in this slice"""
945
945
  ...
946
946
 
@@ -2779,6 +2779,11 @@ class SubscriptionDataConfigExtensions(System.Object):
2779
2779
  for a given set of SubscriptionDataConfig
2780
2780
  """
2781
2781
 
2782
+ @staticmethod
2783
+ def can_be_delisted(config: QuantConnect.Data.SubscriptionDataConfig) -> bool:
2784
+ """True if this configuration is associated with an asset which can have delisting events"""
2785
+ ...
2786
+
2782
2787
  @staticmethod
2783
2788
  def data_normalization_mode(subscription_data_configs: typing.List[QuantConnect.Data.SubscriptionDataConfig]) -> QuantConnect.DataNormalizationMode:
2784
2789
  """