☰
Login
Signup
Home
›
General
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
14.8K
All Categories
0
Incidents
173
Node JS client
49
Go client
828
.Net API client
394
Kite Publisher
553
.Net / VBA / Excel (3rd party)
487
Algorithms and Strategies
1.1K
Java client
1.2K
API clients
408
PHP client
4.3K
Python client
357
Mobile and Desktop apps
1.5K
Market data (WebSockets)
3.5K
General
In this Discussion
October 27
Kalai241
Basket margin always returns zero
Kalai241
October 27
in
General
I have tried getting margin required for option basket order, I'm getting the response with in valid formats, but all the values are zero.
I have tried both python client and direct api, results are same
margins = kite.basket_order_margins(params=[
{
"exchange": day_config["exchange_fo"],
"tradingsymbol": pe_option_symbol_hedge,
"order_type": kite.ORDER_TYPE_MARKET,
"price": 0,
"trigger_price": 0,
"quantity": lot_count * lot_size,
"transaction_type": kite.TRANSACTION_TYPE_SELL,
"variety": kite.VARIETY_REGULAR,
"product": kite.PRODUCT_NRML,
},
{
"exchange": day_config["exchange_fo"],
"tradingsymbol": pe_option_symbol,
"order_type": kite.ORDER_TYPE_MARKET,
"price": 0,
"trigger_price": 0,
"quantity": lot_count * lot_size,
"transaction_type": kite.TRANSACTION_TYPE_SELL,
"variety": kite.VARIETY_REGULAR,
"product": kite.PRODUCT_NRML,
}
])
Tagged:
Python Client
kiteapi
Kalai241
October 27
Same response
{
"charges": {
"brokerage": 0,
"exchange_turnover_charge": 0,
"gst": {
"cgst": 0,
"igst": 0,
"sgst": 0,
"total": 0
},
"sebi_turnover_charge": 0,
"stamp_duty": 0,
"total": 0,
"transaction_tax": 0,
"transaction_tax_type": ""
},
"final": {
"additional": 0,
"bo": 0,
"cash": 0,
"charges": {
"brokerage": 0,
"exchange_turnover_charge": 0,
"gst": {
"cgst": 0,
"igst": 0,
"sgst": 0,
"total": 0
},
"sebi_turnover_charge": 0,
"stamp_duty": 0,
"total": 0,
"transaction_tax": 0,
"transaction_tax_type": ""
},
"exchange": "",
"exposure": 0,
"leverage": 0,
"option_premium": 0,
"pnl": {
"realised": 0,
"unrealised": 0
},
"span": 0,
"total": 0,
"tradingsymbol": "",
"type": "",
"var": 0
},
"initial": {
"additional": 0,
"bo": 0,
"cash": 0,
"charges": {
"brokerage": 0,
"exchange_turnover_charge": 0,
"gst": {
"cgst": 0,
"igst": 0,
"sgst": 0,
"total": 0
},
"sebi_turnover_charge": 0,
"stamp_duty": 0,
"total": 0,
"transaction_tax": 0,
"transaction_tax_type": ""
},
"exchange": "",
"exposure": 0,
"leverage": 0,
"option_premium": 0,
"pnl": {
"realised": 0,
"unrealised": 0
},
"span": 0,
"total": 0,
"tradingsymbol": "",
"type": "",
"var": 0
},
"orders": [
{
"additional": 0,
"bo": 0,
"cash": 0,
"charges": {
"brokerage": 0,
"exchange_turnover_charge": 0,
"gst": {
"cgst": 0,
"igst": 0,
"sgst": 0,
"total": 0
},
"sebi_turnover_charge": 0,
"stamp_duty": 0,
"total": 0,
"transaction_tax": 0,
"transaction_tax_type": ""
},
"exchange": "",
"exposure": 0,
"leverage": 0,
"option_premium": 0,
"pnl": {
"realised": 0,
"unrealised": 0
},
"span": 0,
"total": 0,
"tradingsymbol": "",
"type": "",
"var": 0
},
{
"additional": 0,
"bo": 0,
"cash": 0,
"charges": {
"brokerage": 0,
"exchange_turnover_charge": 0,
"gst": {
"cgst": 0,
"igst": 0,
"sgst": 0,
"total": 0
},
"sebi_turnover_charge": 0,
"stamp_duty": 0,
"total": 0,
"transaction_tax": 0,
"transaction_tax_type": ""
},
"exchange": "",
"exposure": 0,
"leverage": 0,
"option_premium": 0,
"pnl": {
"realised": 0,
"unrealised": 0
},
"span": 0,
"total": 0,
"tradingsymbol": "",
"type": "",
"var": 0
}
]
}
Kalai241
October 27
Params:
[{'exchange': 'NFO', 'tradingsymbol': 'NIFTY28OCT2525150PE', 'order_type': 'MARKET', 'price': 0, 'trigger_price': 0, 'quantity': 750, 'transaction_type': 'SELL', 'variety': 'regular', 'product': 'NRML'}, {'exchange': 'NFO', 'tradingsymbol': 'NIFTY28OCT2526200PE', 'order_type': 'MARKET', 'price': 0, 'trigger_price': 0, 'quantity': 750, 'transaction_type': 'SELL', 'variety': 'regular', 'product': 'NRML'}]
Kalai241
October 27
Found it, symbol format is wrong, working fine after providing proper symbol
This discussion has been closed.
{
"charges": {
"brokerage": 0,
"exchange_turnover_charge": 0,
"gst": {
"cgst": 0,
"igst": 0,
"sgst": 0,
"total": 0
},
"sebi_turnover_charge": 0,
"stamp_duty": 0,
"total": 0,
"transaction_tax": 0,
"transaction_tax_type": ""
},
"final": {
"additional": 0,
"bo": 0,
"cash": 0,
"charges": {
"brokerage": 0,
"exchange_turnover_charge": 0,
"gst": {
"cgst": 0,
"igst": 0,
"sgst": 0,
"total": 0
},
"sebi_turnover_charge": 0,
"stamp_duty": 0,
"total": 0,
"transaction_tax": 0,
"transaction_tax_type": ""
},
"exchange": "",
"exposure": 0,
"leverage": 0,
"option_premium": 0,
"pnl": {
"realised": 0,
"unrealised": 0
},
"span": 0,
"total": 0,
"tradingsymbol": "",
"type": "",
"var": 0
},
"initial": {
"additional": 0,
"bo": 0,
"cash": 0,
"charges": {
"brokerage": 0,
"exchange_turnover_charge": 0,
"gst": {
"cgst": 0,
"igst": 0,
"sgst": 0,
"total": 0
},
"sebi_turnover_charge": 0,
"stamp_duty": 0,
"total": 0,
"transaction_tax": 0,
"transaction_tax_type": ""
},
"exchange": "",
"exposure": 0,
"leverage": 0,
"option_premium": 0,
"pnl": {
"realised": 0,
"unrealised": 0
},
"span": 0,
"total": 0,
"tradingsymbol": "",
"type": "",
"var": 0
},
"orders": [
{
"additional": 0,
"bo": 0,
"cash": 0,
"charges": {
"brokerage": 0,
"exchange_turnover_charge": 0,
"gst": {
"cgst": 0,
"igst": 0,
"sgst": 0,
"total": 0
},
"sebi_turnover_charge": 0,
"stamp_duty": 0,
"total": 0,
"transaction_tax": 0,
"transaction_tax_type": ""
},
"exchange": "",
"exposure": 0,
"leverage": 0,
"option_premium": 0,
"pnl": {
"realised": 0,
"unrealised": 0
},
"span": 0,
"total": 0,
"tradingsymbol": "",
"type": "",
"var": 0
},
{
"additional": 0,
"bo": 0,
"cash": 0,
"charges": {
"brokerage": 0,
"exchange_turnover_charge": 0,
"gst": {
"cgst": 0,
"igst": 0,
"sgst": 0,
"total": 0
},
"sebi_turnover_charge": 0,
"stamp_duty": 0,
"total": 0,
"transaction_tax": 0,
"transaction_tax_type": ""
},
"exchange": "",
"exposure": 0,
"leverage": 0,
"option_premium": 0,
"pnl": {
"realised": 0,
"unrealised": 0
},
"span": 0,
"total": 0,
"tradingsymbol": "",
"type": "",
"var": 0
}
]
}
[{'exchange': 'NFO', 'tradingsymbol': 'NIFTY28OCT2525150PE', 'order_type': 'MARKET', 'price': 0, 'trigger_price': 0, 'quantity': 750, 'transaction_type': 'SELL', 'variety': 'regular', 'product': 'NRML'}, {'exchange': 'NFO', 'tradingsymbol': 'NIFTY28OCT2526200PE', 'order_type': 'MARKET', 'price': 0, 'trigger_price': 0, 'quantity': 750, 'transaction_type': 'SELL', 'variety': 'regular', 'product': 'NRML'}]