Hi, when I am running single line code on python commandline or Jupyter, it's working and giving debug msg with details. Earlier shown msg was when I was executing .py file
Getting below msg when running single line code -------
ok, but my concern is when I run .py file on command line i dont get any results like margin, holding.....
but when I am running individual code line from same .py file one by one on python commnad line or jupyter, its showing results like margin, holdings, etc.
api_key="my api key"
api_secret="my api secret"
import logging
from kiteconnect import KiteConnect
logging.basicConfig(level=logging.DEBUG)
kite = KiteConnect(api_key=api_key)
# kite.login_url()
print("Login URL : ", kite.login_url())
request_token = input('your_request_token: ')
data = kite.generate_session(request_token, api_secret = api_secret)
kite.set_access_token(data['access_token'])
kite.margins()
kite.holdings()
Getting below msg when running single line code -------
>>> data = kite.generate_session(request_token, api_secret = apisecret)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /session/token HTTP/11" 200 None
>>> kite.set_access_token(data["access_token"])
>>> kite.margins()
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "GET /user/margins HTTP/11" 200 None
{'equity': {'enabled': True, 'net': 28.1, 'available': {'adhoc_margin': 0, 'cash': 28.1, 'opening_balance': 28.1, 'live_balance': 28.1, 'collateral': 0, 'intraday_payin': 0}, 'utilised': {'debits': 0, 'exposure': 0, 'm2m_realised': 0, 'm2m_unrealised': 0, 'option_premium': 0, 'payout': 0, 'span': 0, 'holding_sales': 0, 'turnover': 0, 'liquid_collateral': 0, 'stock_collateral': 0, 'equity': 0, 'delivery': 0}}, 'commodity': {'enabled': False, 'net': 0, 'available':
but when I am running individual code line from same .py file one by one on python commnad line or jupyter, its showing results like margin, holdings, etc.