Order Margin giving 0 values

maxhiten
Got this response by using GetOrderMargins API {"Type":"equity","Exchange":"NSE","Tradingsymbol":"RAMASTEEL","OptionPremium":0,"SPAN":0,"Exposure":0,"Additional":0,"BO":0,"Cash":0,"VAR":0,"PNL":{"Realised":0,"Unrealised":0},"Charges":{"TransactionTax":0,"TransactionTaxType":"stt","ExchangeTurnoverCharge":0,"SEBITurnoverCharge":0,"Brokerage":0,"StampDuty":0,"Total":0,"GST":{"IGST":0,"CGST":0,"SGST":0,"Total":0}},"Leverage":1,"Total":0}
-------------------------------------------------

And got this response using GetBarsketMargins api

{"Type":"","Exchange":"","Tradingsymbol":"","OptionPremium":0,"SPAN":0,"Exposure":0,"Additional":0,"BO":0,"Cash":0,"VAR":0,"PNL":{"Realised":0,"Unrealised":0},"Charges":{"TransactionTax":0,"TransactionTaxType":"","ExchangeTurnoverCharge":0,"SEBITurnoverCharge":0,"Brokerage":0,"StampDuty":0,"Total":0,"GST":{"IGST":0,"CGST":0,"SGST":0,"Total":0}},"Leverage":0,"Total":0}
{"Type":"","Exchange":"","Tradingsymbol":"","OptionPremium":0,"SPAN":0,"Exposure":0,"Additional":0,"BO":0,"Cash":0,"VAR":0,"PNL":{"Realised":0,"Unrealised":0},"Charges":{"TransactionTax":0,"TransactionTaxType":"","ExchangeTurnoverCharge":0,"SEBITurnoverCharge":0,"Brokerage":0,"StampDuty":0,"Total":0,"GST":{"IGST":0,"CGST":0,"SGST":0,"Total":0}},"Leverage":0,"Total":0}
[{"Type":"equity","Exchange":"NSE","Tradingsymbol":"RAMASTEEL","OptionPremium":0,"SPAN":0,"Exposure":0,"Additional":0,"BO":0,"Cash":0,"VAR":0,"PNL":{"Realised":0,"Unrealised":0},"Charges":{"TransactionTax":0,"TransactionTaxType":"stt","ExchangeTurnoverCharge":0,"SEBITurnoverCharge":0,"Brokerage":0,"StampDuty":0,"Total":0,"GST":{"IGST":0,"CGST":0,"SGST":0,"Total":0}},"Leverage":1,"Total":0}]

--------------------------------------------------------------------------

Below is the code:
OrderMarginParams omp = new OrderMarginParams();
omp.Exchange = "NSE";
omp.TradingSymbol = "RAMASTEEL";
omp.TransactionType = "BUY";
omp.Variety = "regular";
omp.Product = "CNC";
omp.OrderType = "Market";
omp.Quantity = 1000;
omp.Price = 0;
omp.TriggerPrice = 0;

List mp = new List();
mp.Add(omp);
List mrg = kite.GetOrderMargins(mp);
Console.WriteLine(Utils.JsonSerialize(mrg[0]));

Let me know what am I doing wrong as all values are coming 0 only. Tried with diff stocks, diff products diff prices but same result
Tagged:
  • sujith
    sujith edited October 1
    It seems fine.
    {
    "status": "success",
    "data": [
    {
    "type": "equity",
    "tradingsymbol": "RAMASTEEL",
    "exchange": "NSE",
    "span": 0,
    "exposure": 0,
    "option_premium": 0,
    "additional": 0,
    "bo": 0,
    "cash": 0,
    "var": 14.7,
    "pnl": {
    "realised": 0,
    "unrealised": 0
    },
    "leverage": 1,
    "charges": {
    "transaction_tax": 0.0147,
    "transaction_tax_type": "stt",
    "exchange_turnover_charge": 0.00045128999999999997,
    "sebi_turnover_charge": 0.000014699999999999998,
    "brokerage": 0,
    "stamp_duty": 0,
    "gst": {
    "igst": 0.00008387819999999999,
    "cgst": 0,
    "sgst": 0,
    "total": 0.00008387819999999999
    },
    "total": 0.015249868199999999
    },
    "total": 14.7
    }
    ]
    }
  • maxhiten
    Really sorry to say but this is not acceptable. One day your APIs start working and another day it is not. I am building a script here for real time trades and errors like these are not acceptable in any case. I have shown you the response I had received with same OrderMarginParameters which was giving 0 values for all.
Sign In or Register to comment.