BFO exchange is not added in the FirstStock python Libraries

Unable to trade BSE Sensex options because BFO exchange is not added in the FirstStock python Library .

Hi Nandan

New Version of Python Package will be deployed by 16-12-2023(Today) Evening. These issues will be resolved in the new version.

1 Like

Thanks for the support, I appreciate it.

Waiting for the updated python package having the BFO(SENSEX Options) features like exchange support, trading symbol, order management(place\modify) in place.

Regards,
Nandan

Hi
Can you please let me know once the update package with BFO fix is available.

Thanks,
Nandan

Hi Nandan,

We are releasing a new version of connect which gives faster response and also replacing token with trading symbol across all the API, so it’s easy for the users to write better code and also easily place orders just with the symbols, i have also update this with the BFO exchange.
Please find the attach link for the new docs, Firstock Connect also we have update the python package to the newer version so the BFO symbols are available, i will shortly provide you a sample code for it also,

pip install thefirstock==4.0.1

The changelog will be update by end of the day.
Please be aware this is a beta version and will shortly move into production.
Thank you

Hi ,
replacing token with trading symbol across all the API breaks the existing Algos\backward compatibility of the library is Broken. Algo needs to be changed completely

         Instead you should have used parameterized methods.

GetQuoteLTP having a parameter as token and another method having a parameter as tradingsymbol to ensure its backward compatible.
This what most of the other broker API like AliceBlue do.

In the new beta update WebSocket piece is completely changed

Also there is no reference sample code in the python GitHub on how to use the websocket.

           Backward compatibility is BROKEN because of all the changes and I cannot test BFO or even use NFO now

Thanks,
Nandan.

Also Token Lookup are Faster compared to tradingsymbols.
Providing both would be good

Hi Nandan,
I will shortly provide you with an example and also the walkthrough for the new websockets, and also update the github, we shall plan out to make sure the V4 is backward compatible, as this is a beta version, we shall be able to plan out the requirements accordingly.

Thank you

1 Like

thanks for the update. I appreciate it.
I request you to please add BFO exchange in v3 .
So that my existing Algos will work now with BFO Sensex.

Thanks,
Nandan

Hi Nandan_Pandarathil,

We have added the BFO to the latest version - v3. We will provide you with the sample code soon.

1 Like

thank you :pray:. appreciate it.
I don’t see the python GitHub updated.

  Can you please let me know when will the GitHub be updated.

thanks and regards,
Nandan

Hi Nandan_Padarathil,

The changes are being made right now but it will be updated only by EOD.
We kindly ask you to revert back if you dont see the changes.

Thank you.

1 Like

Thanks a lot for the quick fix. waiting to hear back from you.

Thank you
Nandan

Hi,
I have been given 2 dates i,e. 17th Dec/18thDec EOD for the fix to be available in the latest version - v3 - having exchange BFO support and to provide me with the sample code.

      Updated v3 package is still not released.

I want to do Sensex expiry on Friday and need to test my Algo and make changes in my Algo if needed for BFO Sensex expiry

     I request you to please provide the Updated v3 package ASAP.

Thanks & Regards,
Nandan

Hi Nandan,

Can you please send me the sample code your trying, because it’s working fine for the v3 package and n issue has been found.

Thank you

Hi
I am placing a Sensex options CE-PE orders using MultiOrder API giving BFO as exchange.
similar to NFO.
getting BFO error saying BFO exchange in not in the list.
i had posted the log snippet in my other ticket.
please feel free to connect with me at my registered nos can have live sharing if needed

Thanks ,
Nandan

Hi @Nandan_Pandarathil ,

Here is the sample code for placeOrder and modifyOrder in v3.
1.placeOrder

placeOrder = thefirstock.firstock_placeOrder(
exchange=“BFO”,
tradingSymbol=“SENSEX23D2271000PE”,
quantity=“1”,
price=“300”,
product=“I”,
transactionType=“B”,
priceType=“LMT”,
retention=“DAY”,
triggerPrice=“0”,
remarks=“Python Package Order”
)

2.modifyOrder

modifyOrder = thefirstock.firstock_ModifyOrder(
orderNumber=“23121900000049”,
quantity=“1”,
price=“301”,
triggerPrice=“301”,
exchange=“BFO”,
tradingSymbol=“SENSEX23D2271000PE”,
priceType=“LMT”
)

Please let us know if any you have any other queries.

Hi,
I am facing the same error saying while using Multi place order with error code as INVALID_EXCHANGE
I am using the right syntax.
Can you please have a look?

2023-12-19 09:19:09,195 [1596] : MPL MCOrder => {‘exchange’: ‘BFO’, ‘tradingSymbol’: ‘SENSEX23D2272900CE’, ‘quantity’: ‘0’, ‘price’: ‘41.8’, ‘product’: ‘M’, ‘transactionType’: ‘S’, ‘priceType’: ‘LMT’, ‘retention’: ‘DAY’, ‘triggerPrice’: ‘0’, ‘remarks’: ‘MPL_CE’}
2023-12-19 09:19:09,195 [1596] : MPL MPOrder => {‘exchange’: ‘BFO’, ‘tradingSymbol’: ‘SENSEX23D2269700PE’, ‘quantity’: ‘0’, ‘price’: ‘39.1’, ‘product’: ‘M’, ‘transactionType’: ‘S’, ‘priceType’: ‘LMT’, ‘retention’: ‘DAY’, ‘triggerPrice’: ‘0’, ‘remarks’: ‘MPL_PE’}
2023-12-19 09:19:09,925 [1596] : ce[‘FirstStockTradingSymbol’]==> SENSEX23D2272900CE
2023-12-19 09:19:09,925 [1596] : pe[‘FirstStockTradingSymbol’]==> SENSEX23D2269700PE
2023-12-19 09:19:09,925 [1596] : MPL => {‘status’: ‘Failed’, ‘code’: ‘400’, ‘name’: ‘INVALID_EXCHANGE’, ‘error’: {‘field’: ‘exchange’, ‘message’: ‘Only NSE / BSE / NFO is allowed’}}

error clearly says BFO exchange is not in the supported exchange list.
please feel free to connect for live sharing :pray:

Hi @Nandan_Pandarathil ,

Can you please share you’re email so we can connect with you to solve your issues in detail.