Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. Cyriac
    C
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Cyriac

    @Cyriac

    17
    Reputation
    31
    Posts
    11
    Profile views
    0
    Followers
    1
    Following
    Joined Last Online

    Cyriac Follow

    Best posts made by Cyriac

    • Need More Admin Responses

      Dear Traders,

      If you feel that the Admins should respond more to our outstanding queries, please upvote and comment on this post.

      Really, Angel has the potential to become the best broker in India for Algo traders, but there is no follow up and adequate quality control for the API.

      Hoping that Angel will devote more resources to the API Team.

      Regards
      Cyriac

      posted in General Discussion
      C
      Cyriac
    • RE: LTP quote not current`

      @pari @admin @admin123 @administrators

      The data coming from the API is incorrect.

      LTP data is wrong. Instead the closeprice is being returned for ltp.

      What a nightmare! Something like this can wipe out an Algo trader. Within minutes!

      posted in Bugs
      C
      Cyriac
    • RE: LTP quote not current`

      @admin

      Serious Issue

      LTP is coming as Close Price !!!

      print(obj.position()['data'])

      [{'symboltoken': '1594', 'symbolname': 'INFY', 'instrumenttype': '', 'priceden': '1.00', 'pricenum': '1.00', 'genden': '1.00', 'gennum': '1.00', 'precision': '2', 'multiplier': '-1', 'boardlotsize': '1', 'exchange': 'NSE', 'producttype': 'INTRADAY', 'tradingsymbol': 'INFY-EQ', 'symbolgroup': 'EQ', 'strikeprice': '-1.0', 'optiontype': '', 'expirydate': '', 'lotsize': '1', 'cfbuyqty': '0', 'cfsellqty': '0', 'cfbuyamount': '0.00', 'cfsellamount': '0.00', 'buyavgprice': '1395.80', 'sellavgprice': '0.00', 'avgnetprice': '1395.80', 'netvalue': '-1395.80', 'netqty': '1', 'totalbuyvalue': '1395.80', 'totalsellvalue': '0.00', 'cfbuyavgprice': '0.00', 'cfsellavgprice': '0.00', 'totalbuyavgprice': '1395.80', 'totalsellavgprice': '0.00', 'netprice': '1395.80', 'buyqty': '1', 'sellqty': '0', 'buyamount': '1395.80', 'sellamount': '0.00', 'pnl': '-7.00', 'realised': '-0.00', 'unrealised': '-7.00', 'ltp': '1388.8', 'close': '1411.55'}, {'symboltoken': '2885', 'symbolname': 'RELIANCE', 'instrumenttype': '', 'priceden': '1.00', 'pricenum': '1.00', 'genden': '1.00', 'gennum': '1.00', 'precision': '2', 'multiplier': '-1', 'boardlotsize': '1', 'exchange': 'NSE', 'producttype': 'INTRADAY', 'tradingsymbol': 'RELIANCE-EQ', 'symbolgroup': 'EQ', 'strikeprice': '-1.0', 'optiontype': '', 'expirydate': '', 'lotsize': '1', 'cfbuyqty': '0', 'cfsellqty': '0', 'cfbuyamount': '0.00', 'cfsellamount': '0.00', 'buyavgprice': '2542.48', 'sellavgprice': '2544.95', 'avgnetprice': '2517.75', 'netvalue': '-2517.75', 'netqty': '1', 'totalbuyvalue': '27967.25', 'totalsellvalue': '25449.50', 'cfbuyavgprice': '0.00', 'cfsellavgprice': '0.00', 'totalbuyavgprice': '2542.48', 'totalsellavgprice': '2544.95', 'netprice': '2517.75', 'buyqty': '11', 'sellqty': '10', 'buyamount': '27967.25', 'sellamount': '25449.50', 'pnl': '39.02', 'realised': '24.70', 'unrealised': '14.32', 'ltp': '2556.8', 'close': '2538.0'}]

      posted in Bugs
      C
      Cyriac
    • RE: Calculate Margin Requirements with SmartAPI's New Margin Calculator API

      Hi @admin and @Moderator_1 , @Moderator_2

      Just a quick question here. I am looking to be able to calculate the margin for Options via API. The above end point should work fine, but I am wondering how to implement it for Option sell position when an buy position is already open.

      As you are aware, there is a difference in margin calculations for naked sell and covered sell. So please can you give some information regarding this.

      Many Thanks

      Cyriac

      posted in General Discussion
      C
      Cyriac
    • RE: Data Feed for Best Bid Ask Prices

      Hi @admin

      Small Question. How can I read in the API Websocket Data for just the parameters I would like. I am trying to get the LTP, LTQ, Bid & Ask with time stamp into json / csv format file?

      Much Appreciated the Help.

      Cyriac

      posted in Python SDK
      C
      Cyriac

    Latest posts made by Cyriac

    • RE: Issue with Market Quote!

      Hi @admin @Moderator_1 @Moderator_2 ,

      Can you please reconfirm the rate limits for Market Quote?

      I still don't think it is correct.

      Here is the output from my code. It ran from 11:45 to about 12:11 then returned error. As you can see, I am only making a single call to the end point every 2 to 3 seconds. Which is about 20 per minute and 1200 every hour. This is well within the limit of 10 per second, 500 a minute and 5000 per hour.

      Also, if there are 40 tokens are called for just LTP is it considered as one call or 40 calls? (According to the documentation it should be considered as just 1 call... Still this wont explain the issue).

      Regards

      Cyriac

      12 Mar - 11:44:46: Bank Nifty Index Open_Price: 47351.35
      12 Mar - 11:44:50: Tokens: ['99926009', '41845', '41856', '41858', '41867', '41875', '41880', '41889', '41892', '41894', '41899', '41908', '41912', '41914', '41916', '41918', '41921', '41927', '41937', '41939', '41946', '41950', '41855', '41857', '41866', '41873', '41879', '41882', '41890', '41893', '41897', '41901', '41911', '41913', '41915', '41917', '41920', '41925', '41935', '41938', '41944', '41949', '41951']
      12 Mar - 11:45:55: Table created successfully.
      12 Mar - 12:11:55: An error occurred: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/market/v1/quote/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000000129154F0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))
      12 Mar - 12:13:54: Failed to fetch data: Access denied because of exceeding access rate
      12 Mar - 12:13:56: Failed to fetch data: Access denied because of exceeding access rate
      12 Mar - 12:13:59: Failed to fetch data: Access denied because of exceeding access rate
      12 Mar - 12:14:08: Failed to fetch data: Access denied because of exceeding access rate
      12 Mar - 12:14:11: Failed to fetch data: Access denied because of exceeding access rate
      12 Mar - 12:14:17: Failed to fetch data: Access denied because of exceeding access rate
      12 Mar - 12:14:19: Failed to fetch data: Access denied because of exceeding access rate
      12 Mar - 12:14:22: Failed to fetch data: Access denied because of exceeding access rate

      posted in Python SDK
      C
      Cyriac
    • Issue with Market Quote!

      Hi @admin @Moderator_1 @Moderator_2 ,

      Facing the below issue with Market Quote End Point after just about 10 to 15 minutes. As you can see it is within the limit of 1 per second.

      My Question: Is there is there some extra limit like maximum 500 calls per day?

      11 Mar - 11:06:31: Failed to fetch data: Access denied because of exceeding access rate
      11 Mar - 11:06:33: Failed to fetch data: Access denied because of exceeding access rate
      11 Mar - 11:06:36: Failed to fetch data: Access denied because of exceeding access rate
      11 Mar - 11:06:39: Failed to fetch data: Access denied because of exceeding access rate
      11 Mar - 11:06:41: Failed to fetch data: Access denied because of exceeding access rate
      11 Mar - 11:06:44: Failed to fetch data: Access denied because of exceeding access rate
      11 Mar - 11:06:47: Failed to fetch data: Access denied because of exceeding access rate
      11 Mar - 11:06:50: Failed to fetch data: Access denied because of exceeding access rate
      11 Mar - 11:06:52: Failed to fetch data: Access denied because of exceeding access rate

      posted in Python SDK
      C
      Cyriac
    • RE: WebSocket V2

      Sorry - I mean to say that LTP data is coming, but gets cut in a few seconds....

      posted in Python SDK
      C
      Cyriac
    • WebSocket V2

      Hi @admin @Moderator_1 @Moderator_2 ,

      I am facing this issue while trying to subscribe to just 5 tokens for just LTP. But note that the LTP data is not coming.

      I am not sure if the issue is related to some previous connection that may be open since I have been playing around with the websocket-V2 code since morning.

      If so how exactly to close/remove the previous websocket connections?

      Or is it some other issue?

      Thanks in advance

      Cyriac

      PyDev console: starting.
      Python 3.8.9 (tags/v3.8.9:a743f81, Apr 6 2021, 14:02:34) [MSC v.1928 64 bit (AMD64)] on win32

      on open
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39320', 'sequence_number': 42423890, 'exchange_timestamp': 1709542347000, 'last_traded_price': 44485, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39321', 'sequence_number': 42423740, 'exchange_timestamp': 1709542347000, 'last_traded_price': 20735, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39326', 'sequence_number': 42424284, 'exchange_timestamp': 1709542347000, 'last_traded_price': 24520, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39325', 'sequence_number': 42423847, 'exchange_timestamp': 1709542347000, 'last_traded_price': 38295, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39328', 'sequence_number': 42423889, 'exchange_timestamp': 1709542347000, 'last_traded_price': 32565, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39338', 'sequence_number': 42423739, 'exchange_timestamp': 1709542347000, 'last_traded_price': 28815, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39325', 'sequence_number': 42425407, 'exchange_timestamp': 1709542347000, 'last_traded_price': 38080, 'subscription_mode_val': 'LTP'}
      [W 240304 14:22:26 smartWebSocketV2:319] Attempting to resubscribe/reconnect (Attempt 1)...
      on open
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39320', 'sequence_number': 42451808, 'exchange_timestamp': 1709542359000, 'last_traded_price': 43785, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39321', 'sequence_number': 42452193, 'exchange_timestamp': 1709542359000, 'last_traded_price': 21060, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39326', 'sequence_number': 42450167, 'exchange_timestamp': 1709542358000, 'last_traded_price': 24865, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39325', 'sequence_number': 42451888, 'exchange_timestamp': 1709542359000, 'last_traded_price': 37645, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39328', 'sequence_number': 42451807, 'exchange_timestamp': 1709542359000, 'last_traded_price': 32045, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39338', 'sequence_number': 42452187, 'exchange_timestamp': 1709542359000, 'last_traded_price': 29185, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39326', 'sequence_number': 42452287, 'exchange_timestamp': 1709542359000, 'last_traded_price': 24860, 'subscription_mode_val': 'LTP'}
      Ticks: {'subscription_mode': 1, 'exchange_type': 2, 'token': '39326', 'sequence_number': 42452693, 'exchange_timestamp': 1709542359000, 'last_traded_price': 24865, 'subscription_mode_val': 'LTP'}
      [W 240304 14:22:38 smartWebSocketV2:343] Connection closed due to max retry attempts reached.
      [W 240304 14:22:38 smartWebSocketV2:343] Connection closed due to max retry attempts reached.
      [W 240304 14:22:38 smartWebSocketV2:343] Connection closed due to max retry attempts reached.
      Connection closed
      Connection closed
      Connection closed

      posted in Python SDK
      C
      Cyriac
    • RE: Calculate Margin Requirements with SmartAPI's New Margin Calculator API

      Hi @admin and @Moderator_1 , @Moderator_2

      Just a quick question here. I am looking to be able to calculate the margin for Options via API. The above end point should work fine, but I am wondering how to implement it for Option sell position when an buy position is already open.

      As you are aware, there is a difference in margin calculations for naked sell and covered sell. So please can you give some information regarding this.

      Many Thanks

      Cyriac

      posted in General Discussion
      C
      Cyriac
    • RE: Need More Admin Responses

      @Moderator_2 @Moderator_1

      Great to see this!

      posted in General Discussion
      C
      Cyriac
    • Need More Admin Responses

      Dear Traders,

      If you feel that the Admins should respond more to our outstanding queries, please upvote and comment on this post.

      Really, Angel has the potential to become the best broker in India for Algo traders, but there is no follow up and adequate quality control for the API.

      Hoping that Angel will devote more resources to the API Team.

      Regards
      Cyriac

      posted in General Discussion
      C
      Cyriac
    • RE: Couldn't parse the JSON response received from the server: b'Access denied because of exceeding access rate

      @Vignesha Adding a small delay usually reduces the number of errors usually.

      @admin The reason there are so many errors is that often many traders are using get_position constantly. This is because the web socket 2.0 is often failing. Sometimes, if the get_holdings returns stale LTP, often I have to write a custom function that will get_holdings and loop for all stocks to get LTP. So if I have 5 stocks in my holdings, instead of one call to the API, I have to make 6 calls. The Angel API is being overworked. Please try to fix these....

      posted in Python SDK
      C
      Cyriac
    • RE: What is the access_token expiry time?

      @xzion

      This is the greatest unresolved mystery in the universe currently....

      ;-(

      posted in General Discussion
      C
      Cyriac
    • RE: Couldn't parse the JSON response received from the server: b'Access denied because of exceeding access rate

      @psm007 @admin

      I face this issue frequently while using get_position endpoint. Although it is well within the limits specified in the documentation....

      https://smartapi.angelbroking.com/docs/RateLimit

      @psm007 The limits are per second in theory, but not too sure about practice unfortunately....

      posted in Python SDK
      C
      Cyriac