Please let me know why I am getting margin as 0 after calling Python margin api. ALso what does enabled key mean(which is false) - I have cash margin in my account. Below is a print of the margin dictionary :
I am not passing any segment1 - as my expectation is to get margin for both segments - API reference says - def margins( self, segment=None) Get account balance and cash margin details for a particular segment.
segment is the trading segment (eg: equity or commodity)
If you are not passing segment then it is fetching margins for both the segments. You need to iterate to the respective segment and then check the data.
You may also refer to this thread to know more about the field explanation.
Can have look at this article.
def margins( self, segment=None)
Get account balance and cash margin details for a particular segment.
segment is the trading segment (eg: equity or commodity)
hence - I am using -
print(kite.margins(kite))
You may also refer to this thread to know more about the field explanation.