@nehasrivastava strange it works for me as per expectation
Posts made by prateekjjw001
-
RE: Option sell with stop loss price API
-
RE: Not able to convert position
@admin hi any help here please? Pls ignore a typo in above code, I tried below:
pos=obj.position()['data'] silver=[p for p in pos if p['symbolname']=='SILVERMIC'][0] params={ "exchange": "MCX", "symboltoken": silver['symboltoken'], "producttype": "CARRYFORWARD", "newproducttype": "INTRADAY", "tradingsymbol": silver['tradingsymbol'], "symbolname": silver['symbolname'], "instrumenttype": silver['instrumenttype'], "priceden": "1", "pricenum": "1", "genden": "1", "gennum": "1", "precision": "2", "multiplier": "-1", "boardlotsize": "1", "type": "DAY", "cfbuyqty": silver['cfbuyqty'], "cfsellqty": silver['cfsellqty'], "netqty": silver['netqty'] } x=obj.convertPosition(params) print(x)
but it gives same error
-
RE: Option sell with stop loss price API
@nehasrivastava you can see here
https://smartapi.angelbroking.com/docs/Orders
triggerprice The price at which an order should be triggered (SL, SL-M) -
RE: Option sell with stop loss price API
@nehasrivastava you need to give params like below:
order_type='STOPLOSS_LIMIT'
variety='STOPLOSS'
triggerprice=sl trigger price
price=limit price (or 0.0 for SL-M order)I did not give anything for "stoploss" and "squareoff" parameter
-
Not able to convert position
I am trying to convert "SILVERMIC" futures from carry forward to Intraday but it is not working.
pos=obj.position()['data'] silver=[p for p in pos if p['symbolname']=='SILVERMIC'][0] params={ "exchange": "MCX", "symboltoken": silver['symboltoken'], "producttype": "CARRYFORWARD", "newproducttype": "INTRADAY", "tradingsymbol": silver['symbolname'], "symbolname": silver['symbolname'], "instrumenttype": silver['instrumenttype'], "priceden": "1", "pricenum": "1", "genden": "1", "gennum": "1", "precision": "2", "multiplier": "-1", "boardlotsize": "1", "type": "DAY", "cfbuyqty": silver['cfbuyqty'], "cfsellqty": silver['cfsellqty'], "netqty": silver['netqty'] } x=obj.convertPosition(params) print(x)
I get below error:
{'message': 'Internal Error', 'errorcode': 'AB2001', 'status': False, 'data': None}What am I missing here?
-
Basket order feature?
Can you please add a simple basket order feature so that for placing multiple orders at once (like a straddle) we can do it easily? Currently an API call for placing order takes 1s which is too high.
-
RE: Time delay in placing orders
@daytrader I have also tested it, making an API call for place order or modify order takes almost 1s which is too much. And they do not even have the basket order feature, so for multiple orders, either we have to do serially or use multi threading. It would be good if this much latency could be reduced.
-
RE: SSLError : certificate verify failed: unable to get local issuer certificate (
@daytrader - how to update the cache of certificates locally?
@admin - can you resolve this issue today itself? I am sure lot of users will be unhappy if they face it on Monday. -
Validity of token generated
For how long is the token valid? If I generate it at 9am, then will it be valid till 3.30pm? Or do I need to generate intraday again? Also - the token won't get invalidated if I login on app/website?
-
RE: not able to place stop loss order
@admin - as discussed on call, there seems to be some issue with python sdk for SL orders. Please get this rectified.
-
RE: not able to place stop loss order
@admin - thanks, I still get an issue though:
order=create_order('NIFTY31DEC2014800CE','41772','BUY','75',order_type='STOPLOSS_LIMIT',trigger_price='2.0',limit_price='2.1',variety='STOPLOSS') order_id=obj.placeOrder(ce_sl_order)
I check order status and it has below error message in 'text' field of order:
16408 : Trigger price entered has invalid characters -
RE: not able to place stop loss order
@admin - hi can anyone help with an example please? what params I need to send for SL-Limit order? Thanks.
-
RE: Unnecessary print statement while making any API call
@rjbanna I can but I would host my application on cloud, so would like to get this in python package itself (which it should be - no point of printing something, if you want to give information, return it as a variable).
-
not able to place stop loss order
Can you please check if I am giving correct parameters? I want to place SL buy order with trigger price 119 and limit price 120 (for example).
sl_order= { "variety": 'NORMAL', "tradingsymbol": 'NIFTY31DEC2013750CE', "symboltoken": '39992', "transactiontype": 'BUY', "exchange": "NFO", "ordertype": 'SL', "producttype": "INTRADAY", "duration": "DAY", "quantity": '75', "price": '120.0', "trigger_price": '119.0', "squareoff": "0", "stoploss": "1", } obj.placeOrder(sl_order)
I get this response:
-
RE: Authentication: AB1007 and Mac Format
@A224819 the issue with pycharm could be python path which it is using. Maybe try using different environment altogether like Spyder or jupyter? who knows it may work there. By the way, if you just follow startup guide on git page, that should get you going (instead of getting headers/mac address etc.)
-
Unnecessary print statement while making any API call
I raised the issue on github repo here
Basically in _request function in SmartConnect.py file there are two print statements, can you remove those please? -
RE: Allow multiple session login
this is the only reason I am not changing my broker, else Angel would be perfect, it ticks all the boxes for my requirements, it does not ban individual stocks like other discount brokers, has common ledger, less fno margin requirements etc. But this bug is blocker.
-
Allow multiple session login
Hi - currently we cannot login via API and via app/website simultaneously since the token gets expired. When can this issue be corrected? I don't think any trader would go live with such an issue where he cant see his positions on UI.
-
RE: Smart API Access token is getting expired when logged into angelbroking.com
@admin hi - do you have any ETA when this feature will be enabled? It is kind of a blocker. I assume lot of users would like to monitor their positions time to time even if using API for placing trades.