matbarofex / pyRofex

Python library to connect with Matba Rofex's Rest and Websocket APIs. Market Data and Order Routing are supported.
MIT License
78 stars 54 forks source link

No bid ask for options on agro futures from pyrofex despite bid ask being shown on realtime screen #35

Open manuhanu opened 1 month ago

manuhanu commented 1 month ago

Hi team, When I try to get bids and offers for Options grains futures, pyrofex returns an empty bid and offer when using both rest and websocket despite there being a bid and offer on the realtime screen.

for example: I want to pull bid ask on "SOJ.ROS/JUL24 320 C" matba rofex realtime shows 2.5@3.3

image

when I use pyrofex to pull,

# 2-Set the instrument to use
instrument = "SOJ.ROS/JUL24 320 C"

# 3-Get the two Best Bids and Best Offers for the instrument (using depth parameter)

entries = [pyRofex.MarketDataEntry.BIDS, pyRofex.MarketDataEntry.OFFERS, pyRofex.MarketDataEntry.LAST,pyRofex.MarketDataEntry.OPEN_INTEREST]
market_data = pyRofex.get_market_data(instrument, entries,depth = 1,market=pyRofex.Market.ROFEX,environment=pyRofex.Environment.REMARKET)

print("Market Data Response for {0}: {1}".format(instrument, market_data))

and it returns Market Data Response for SOJ.ROS/JUL24 320 C: {'status': 'OK', 'marketData': {'LA': None, 'BI': None, 'OF': None, 'OI': None}, 'depth': 1, 'aggregated': True}

Clearly, its recognizing the instrument, its just incorrectly telling me theres no bid ask.

I would note that the above works if I try to get bid ask for agro futures.

Please advise.

Thanks, Manuel

fzanuso commented 1 month ago

Hey Manuel, just to confirm, what environment are you connecting to? Remarket or Live?

fzanuso commented 1 month ago

Hey Manuel, just to confirm, what environment are you connecting to? Remarket or Live?

I just saw it in the code. You're getting the data from Remarket. Is the screenshot you shared from the same environment? I'd guess it's live data from https://matbarofex.primary.ventures/opciones/agropecuarias,

If that's the case I know MatbaRofex runs a bot that tries to inject prices into Remarket based on the Live marketdata, and probably it's missing this option for some reason. Maybe someone from Primary can confirm this. @franluiscarrillo

manuhanu commented 1 month ago

Thank you for the reply! Yes, Im using Remarket. I've tried for several different options and none of them seem to be getting bid ask despite there being bid ask on the realtime screen.