contractinator
contractinator
Functions
Name | Description |
---|---|
contractinator | Add a Contractinator to your app |
contractinator
contractinator.contractinator(=(),
initial_panels=None,
contractinator_file=None,
contracts )
Add a Contractinator to your app
The Contractinator is a useful tool for working with IBKR contract definitions.
Parameters
Name | Type | Description | Default |
---|---|---|---|
initial_panels | list | dict | Allows you to initialize the contractinator with specified panel names, with optional initial guesses for search strings to be passed to fetch_matching_symbols . Use this if you know what variable names you want to assign to your contracts, but you’re not sure how to create viable Contract objects for them. If initial_panels is a dict; e.g., {'asset1': 'AAPL'}, then each keywill be assigned to one panel in the contractinator, and each valuewill appear as the initial value in the search string field for that panel. If initial_panelsis a list, then empty contractinator panels will be created for each element and the initial value of the search string field will be left blank. | ()| | contractinator_file | [str]( str) | Path, as a string, that indicates the location of a saved contractinator file that will be used to populate the contractinator when it is created. | None| | contracts | [dict]( dict) | A Python dictionary in which each keycontains the name of a contractinator panel and each valuecontains a contract definition. Used to populate the contractinator when it is created. | None` |
Examples
import shinybroker as sb
sec_def_opt_params = sb.fetch_sec_def_opt_params(
underlyingConId=265598,
underlyingSymbol="AAPL",
underlyingSecType="STK"
)
print(sec_def_opt_params)