Failure to fetch margin details using the Fyers API

The API request is throwing the following 400 error when trying to fetch details for expiry above 15 days from day of order placement. I want to buy and sell options with expiry more than 20 days using API but it is failing

Response{protocol=h2, code=400, message=, url=https://api-t1.fyers.in/api/v3/multiorder/margin}

Pleasee look into it and check what is the issue with the request if any.

Hi @ryan_dias,

Sorry for the inconvenience.
Could you please share the request payload so we can understand what went wrong?

Hi Im am sharing the payload for today which is also returning error 400 today i.e 22-12-2025 with expiry in 15 days from today. Please have a ook

[{“symbol”:“NSE:NIFTY2610626400CE”,“qty”:75,“side”:1,“type”:2,“productType”:“MARGIN”,“limitPrice”:0,“stopLoss”:0,“stopPrice”:0,“takeProfit”:0},{“symbol”:“NSE:NIFTY2610625900PE”,“qty”:75,“side”:1,“type”:2,“productType”:“MARGIN”,“limitPrice”:0,“stopLoss”:0,“stopPrice”:0,“takeProfit”:0},{“symbol”:“NSE:NIFTY2610626450CE”,“qty”:150,“side”:-1,“type”:2,“productType”:“MARGIN”,“limitPrice”:0,“stopLoss”:0,“stopPrice”:0,“takeProfit”:0},{“symbol”:“NSE:NIFTY2610625850PE”,“qty”:150,“side”:-1,“type”:2,“productType”:“MARGIN”,“limitPrice”:0,“stopLoss”:0,“stopPrice”:0,“takeProfit”:0}]

Hi @ryan_dias,

There’s been a recent change in the lot size. Please check Notice Board - FYERS. The error is coming up because the lot size used is incorrect — please use the updated lot size 65.

Hi Naresh, thank you for your help, I should be able to fetch margin details with larger expiry days. I will test the code and get back to you if any issue persists.