It should be an array:
query=["xdate-eq:20201231","strikeprice-eq:180"]
The is the code sample:
available_options = a.search_options(
symbol='SPY',
query='xdate-eq:20201231', # Mature on 2020-12-31
fields=['bid','ask'] # 'bid,ask' also works. Function properly formats a list or a string
)
The query value is incorrect in the code sample (https://github.com/alienbrett/PyAlly/wiki/Option-Contracts)
Incorrect: query='xdate-eq:20201231',
It should be an array: query=["xdate-eq:20201231","strikeprice-eq:180"]
The is the code sample: available_options = a.search_options( symbol='SPY', query='xdate-eq:20201231', # Mature on 2020-12-31 fields=['bid','ask'] # 'bid,ask' also works. Function properly formats a list or a string )