getting this error while running getHistoricalAPI for historical data
Posts made by kn
-
'NoneType' object has no attribute 'getCandleData'
-
No module named 'logzero'
Getting this error while running smartapi
import SmartApi
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import SmartApi
File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\SmartApi_init_.py", line 3, in <module>
from SmartApi.smartConnect import SmartConnect
File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\SmartApi\smartConnect.py", line 10, in <module>
import logzero
ModuleNotFoundError: No module named 'logzero' -
got error AB1004
obj.generateSession(credentials.USER_NAME,credentials.USER_PIN,pyotp.TOTP(strtoken).now())
in this line get error
{'message': 'Something Went Wrong, Please Try After Sometime',
'errorcode': 'AB1004',
'status': False,
'data': None}what should i do now
-
generatesession got error
using smartapi with python...after a gap started using api.but in generatesession got error as fallow...obj.generateSession(credentials.USER_NAME,credentials.USER_PIN,pyotp.TOTP(strtoken).now()) in this line get error {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}..please suggest
-
To admin, Can you please provide sample code to place MARKET DELIVERY order...thanks in advance
i got error while placing delivery market NFO order.while intraday order placed successfully.
sample code
pdtype="DELIVERY"
token='54465'
symbol='NIFTY19MAY2216200CE'
qty='50.0'
buy_sell='BUY'
ordertype='MARKET'
price='0'
exch_seg='NFO'
variety='NORMAL'
triggerprice=0
#try:
orderparams = {
"variety": variety,
"tradingsymbol": symbol,
"symboltoken": token,
"transactiontype": buy_sell,
"exchange": exch_seg,
"ordertype": ordertype,
"producttype": pdtype,
"duration": "DAY",
"price": price,
"squareoff": "0",
"stoploss": "0",
"quantity": qty,
"triggerprice":triggerprice
}
orderId=credentials.SMART_API_OBJ.placeOrder(orderparams)
error:
orderResponse= self._postRequest("api.order.place", params)['data']['orderid']TypeError: 'NoneType' object is not subscriptable
-
RE: 'User Is Blocked', 'errorcode': 'AB1007',
To admin,
Can you please provide sample code to place MARKET DELIVERY order...thanks in advance