@pashriva
I am not sure pashriva, I use only python sdk.
But things should be similar in java also. Check the smartapi code.
Posts made by mitzi35436228
-
RE: unable to login - SSLErrorposted in Python SDK
-
RE: unable to login - SSLErrorposted in Python SDK
@sidsam12
This is not a solution, this is workaround.
Even i thought it would break some of the requests but I am running by disabling certificate validation and so far things are working fine. -
RE: unable to login - SSLErrorposted in Python SDK
@Manoj123
Just do thisself.angel_obj = SmartConnect(api_key=self.config["API_KEY"],disable_ssl=True)Just add this parameter disable_ssl=True while calling SmartConnect class.
This will skip the ssl_certificate validation.
-
RE: Not able to place orderposted in General Discussion
@admin market time also getting over. Pls update the status.
-
RE: Not able to place orderposted in General Discussion
@admin Pls fix asap. Because not able to do anything. How long it may take?
-
RE: Not able to place orderposted in General Discussion
@admin P342922
It was working fine on friday also. Not able to use app or webpage also. Nothing is working.
Fix this ASAP admin. -
Not able to place orderposted in General Discussion
@admin getting NULL response back and no orders are triggering.
-
Can we modify partially filled order?posted in General Discussion
@admin My query is if I had placed an LIMIT sell order for 20 Lots of BNF and after 5secs if only 10 Lots is filled then can I modify order to MARKET now in order to fill the remaining 10 lots?
or do I have to cancel that existing limit order and place new market order? -
RE: Error while connecting to smartAPIposted in Python SDK
@leena-1234 @admin Everyone is facing same issue... session is getting expired in few seconds... And all requests are failing..
-
RE: AB1010: Invalid Session or Session is Expired Please Re-loginposted in General Discussion
2021-09-01 10:01:15 : INFO : [Angel:285] : Fetching order details for 210901000182820 from broker 2021-09-01 10:01:15 : WARNING : [Angel:302] : Failed to get orderbook details for orderid 210901000182820! 0th attempt 2021-09-01 10:01:15 : WARNING : [Angel:307] : orders response data: None 2021-09-01 10:01:15 : ERROR : [Angel:308] : Traceback (most recent call last): File "/home/algo/AlgoTrading_new/Straddle/Angel.py", line 289, in get_order_details for order in orders_data: TypeError: 'NoneType' object is not iterable 2021-09-01 10:01:45 : INFO : [Angel:285] : Fetching order details for 210901000182820 from broker 2021-09-01 10:01:45 : WARNING : [Angel:302] : Failed to get orderbook details for orderid 210901000182820! 1th attempt 2021-09-01 10:01:45 : WARNING : [Angel:307] : orders response data: None 2021-09-01 10:01:45 : ERROR : [Angel:308] : Traceback (most recent call last): File "/home/algo/AlgoTrading_new/Straddle/Angel.py", line 289, in get_order_details for order in orders_data: TypeError: 'NoneType' object is not iterableEvery minute this error is coming!
-
RE: AB1010: Invalid Session or Session is Expired Please Re-loginposted in General Discussion
@admin So ,many errors are occurring.. kindly fix ASAP
-
RE: Internal server errorposted in Python SDK
@admin Yes admin not exactly same issue but yeah couldnot fetch any details or place orders,
https://smartapi.angelbroking.com/topic/1222/internal-server-error
pls refer above thread. -
RE: Internal server errorposted in Python SDK
Hi @leena-1234 , these errors are very frequent and you need to make your script robust. Previously these errors used to come once every week. But this time from past 3 days daily these are coming and no one knows what are the reasons.
Improve your code and make it robust to such errors. -
RE: API returning NULL but order is placed and executed successfullyposted in General Discussion
@admin OK Thanks. But this is another kind of error. Kindly check this also.
-
RE: API returning NULL but order is placed and executed successfullyposted in General Discussion
@admin , Again same kind of error but this is time out.
My script Logs:
2021-08-04 09:16:00 : INFO : [Angel:232] : Fetched ltp vaue for NIFTY05AUG2116400CE = 15.05
2021-08-04 09:16:00 : INFO : [Straddle:254] : CE SL hit
2021-08-04 09:16:00 : INFO : [Straddle:308] : Exiting all open positions
2021-08-04 09:16:00 : INFO : [Angel:384] : Taking position for {'instrument_name': 'NIFTY05AUG2116400CE', 'transactiontype': 'BUY', 'ordertype': 'MARKET', 'producttype': 'CARRYFORWARD'}
2021-08-04 09:16:07 : CRITICAL : [Angel:425] : Failed to take position for {'instrument_name': 'NIFTY05AUG2116400CE', 'transactiontype': 'BUY', 'ordertype': 'MARKET', 'producttype': 'CARRYFORWARD'}
2021-08-04 09:16:07 : ERROR : [Angel:427] : Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib64/python3.6/http/client.py", line 1361, in getresponse
response.begin()
File "/usr/lib64/python3.6/http/client.py", line 311, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python3.6/http/client.py", line 272, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib64/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/lib64/python3.6/ssl.py", line 971, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib64/python3.6/ssl.py", line 833, in read
return self._sslobj.read(len, buffer)
File "/usr/lib64/python3.6/ssl.py", line 590, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed outDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 756, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.6/site-packages/urllib3/packages/six.py", line 770, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 447, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 337, in _raise_timeout
self, url, "Read timed out. (read timeout=%s)" % timeout_value
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Read timed out. (read timeout=7)OrderBook:


Kindly check and update.
-
RE: API returning NULL but order is placed and executed successfullyposted in General Discussion
@admin Thank you. Please update soon.
-
API returning NULL but order is placed and executed successfullyposted in General Discussion
Hi @admin ,
Today I placed an order in nifty and got a None response back. But order is placed and executed successfully.
My Script Logs:
2021-08-02 15:21:00 : INFO : [Angel:384] : Taking position for {'instrument_name': 'NIFTY05AUG2116150CE', 'transactiontype': 'SELL', 'ordertype': 'MARKET', 'producttype': 'CARRYFORWARD'}
2021-08-02 15:21:05 : CRITICAL : [Angel:425] : Failed to take position for {'instrument_name': 'NIFTY05AUG2116150CE', 'transactiontype': 'SELL', 'ordertype': 'MARKET', 'producttype': 'CARRYFORWARD'}
2021-08-02 15:21:05 : ERROR : [Angel:427] : Traceback (most recent call last):
File "/root/AlgoTrading/BTST/Angel.py", line 420, in take_position
orderId = self.angel_obj.placeOrder(orderparams)
File "/usr/local/lib/python3.6/site-packages/smartapi/smartConnect.py", line 290, in placeOrder
orderResponse= self._postRequest("api.order.place", params)['data']['orderid']
TypeError: 'NoneType' object is not subscriptable.
OrderBook:

Since, its a NULL response.. my script thought it is some failed order and kept on placing orders(3 orders placed instead of 1).
This is far more dangerous than order placing fail.@admin , Kindly look into this issue. Provide some insights!
-
Request to increase Rate Limit for Orders and Positionsposted in General Discussion
Hi @admin ,
Rate limit for orders and positions 1req/sec is too low. When running multiple algos this rate is very low and i am frequently getting rate limit exceeded error so i request to increase this rate if possible.