☰
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
13.7K
All Categories
0
Incidents
150
Node JS client
39
Go client
790
.Net API client
376
Kite Publisher
537
.Net / VBA / Excel (3rd party)
456
Algorithms and Strategies
991
Java client
1.1K
API clients
402
PHP client
3.9K
Python client
345
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
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.