☰
Login
Signup
Home
›
Python client
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.1K
All Categories
0
Incidents
158
Node JS client
43
Go client
801
.Net API client
386
Kite Publisher
538
.Net / VBA / Excel (3rd party)
465
Algorithms and Strategies
1K
Java client
1.1K
API clients
408
PHP client
4.1K
Python client
349
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.4K
General
In this Discussion
September 2023
sujith
python code to calculate margin for a specific list of positions (naked, hedged, straddles, etc...)
balajibetadur
September 2023
in
Python client
Can some one please share a python function to calculate margin consumption for set of positions in python? assuming each position looks like this
{'tradingSymbol': 'NIFTY23SEP19500PE',
'quantity': -1800,
'entryPrice': 23.6,
'entryTime': datetime.datetime(2023, 9, 14, 15, 13, 5),
'how': 'SELL',
'symbol': 'NIFTY',
'exchange': 'NFO',
'product': 'NORMAL',
'cash': 'NSE:NIFTY 50',
'cmp': 20163.2,
'ltp': 13.25}
not restricting to the parameters above, is there any formula or python function to calculate margin?
Tagged:
python
Margin
margin calculation
sujith
September 2023
You can use the
margin calculation
API for this, don't need to calculate at your end.
Sign In
or
Register
to comment.