ibind icon indicating copy to clipboard operation
ibind copied to clipboard

500 :: Internal Server Error

Open oleg-d opened this issue 8 months ago • 4 comments

I keep getting "500 :: Internal Server Error"

I am testing with a simple SPX 0DTE option. I have been away from this code for a while so last time it worked was around a month ago. So now I dont know if its my code or something server side.

Found strike 5175C, delta 0.495, maturity 20250404
ERROR:root:Error processing order: IbkrClient: response error Result(data=None, request={'url': 'https://api.ibkr.com/v1/api/iserver/secdef/info', 'params': {'conid': '773846944', 'sectype': 'OPT', 'month': '20250404', 'exchange': 'SMART', 'strike': '5170.0', 'right': 'C'}}) :: 500 :: Internal Server Error :: {"error":"No Contracts retrieved "}

oleg-d avatar Apr 04 '25 14:04 oleg-d

Hi @oleg-d - the 5xx errors are server errors, which usually means they lay on IBKR side. I'd encourage you to talk to their support about this

Voyz avatar Apr 06 '25 08:04 Voyz

ERROR:root:Error processing order: IbkrClient: response error Result(data=None, request={'url': 'https://api.ibkr.com/v1/api/iserver/secdef/info', 'params': {'conid': '773846944', 'sectype': 'OPT', 'month': '20250404', 'exchange': 'SMART', 'strike': '5170.0', 'right': 'C'}}) :: 500 :: Internal Server Error :: {"error":"No Contracts retrieved "}

Hi, not sure about this but worth a try: Shouldn't month have this form, e.g. "APR25"? That's what I use. It does not state this explicitly in this endpoint's docs, but it is mentioned elsewhere: https://www.interactivebrokers.com/campus/ibkr-api-page/webapi-ref/#tag/Trading-Contracts/paths/~1iserver~1secdef~1strikes/get

Also the conid should be that of an underlying, possibly 416904 for SPX in your case?

salsasepp avatar Apr 08 '25 07:04 salsasepp

@oleg-d were you able to resolve this?

weklund avatar Apr 28 '25 14:04 weklund

@oleg-d were you able to resolve this?

No I havent been back to the options code. The futures trading work in my app so its something wrong in my options code.

oleg-d avatar Apr 28 '25 20:04 oleg-d

i have been back to my options code and indeed the issue was with the code.

oleg-d avatar Jun 06 '25 16:06 oleg-d