pyokx.InstrumentSearcher
- class pyokx.InstrumentSearcher.InstrumentSearcher(instTypes=['FUTURES', 'SWAP'], _instrument_map=None)[source]
Bases:
object
Provides functionality to search for instruments within a provided list of instruments based on various criteria such as instrument ID, type, or underlying asset.
- Parameters:
instruments (List[Instrument]) – A list of instruments to search within.
- find_by_instId(instId: str) Instrument | None [source]
Find an instrument by its instId
- find_by_type(instType: InstType) List[Instrument] [source]
Find all instruments of a specific type
- find_by_underlying(underlying: str) List[Instrument] [source]
Find all instruments of a specific underlying
