Pix APIs - Realtime and Historical Data in REST

Pix APIs - Realtime and Historical Data in REST

ACCELPIX REST API

REST API for historical and tick data download

EOD Data:

  1. GET http://{server}/api/fda/rest/{ticker}/{yyyyMMdd:start}/{yyyyMMdd:end}?api_token={your api key}

  2. Example:
  3. http://apidata5.accelpix.in/api/fda/rest/NIFTY 50/20220701/20220715?api_token=cvFRDRmyKXp2%2BY9KKgPBfC0%3Dm
  4. http://apidata.accelpix.in/api/fda/rest/NIFTY 50/20220701/20220715?api_token=cvFRDRmyKXp2%2BY9KKgPBfC0%3Dm
  5. Response:
  6. [
  7.     {
  8.         "tkr": ""NIFTY 50"",
  9.         "td": "2022-01-03 00:00:00",
  10.         "op": 17387.1500,
  11.         "hp": 17646.6500,
  12.         "lp": 17383.3000,
  13.         "cp": 17625.7000,
  14.         "vol": 0,
  15.         "oi": 0,
  16.         "eod": true
  17.     },
  18.     {
  19.         "tkr": ""NIFTY 50"",
  20.         "td": "2022-01-04 00:00:00",
  21.         "op": 17681.4000,
  22.         "hp": 17827.6000,
  23.         "lp": 17593.5500,
  24.         "cp": 17805.2500,
  25.         "vol": 0,
  26.         "oi": 0,
  27.         "eod": true
  28.     }
  29. ]

Intra-EOD Data:

  1. Intra-Eod for completed session

  2. GET http://{server}/api/fda/rest/{ticker}/{yyyyMMdd:start}/{yyyyMMdd:end}/{resolution:minutes}?api_token={your api key}

  3. Example:
  4. http://apidata5.accelpix.in/api/fda/rest/NIFTY 50/20220321/20220321/5?api_token=cvFRDRmyKXp2%2BY9KKgPBfC0%3Dm

  5. Response:
  6. [
  7.     {
  8.         "tkr": "NIFTY 50",
  9.         "td": "2022-03-21 09:07:00",
  10.         "op": 17329.5000,
  11.         "hp": 17329.5000,
  12.         "lp": 17329.5000,
  13.         "cp": 17329.5000,
  14.         "vol": 0,
  15.         "oi": 0,
  16.         "eod": false
  17.     },
  18.     {
  19.         "tkr": "NIFTY 50",
  20.         "td": "2022-03-21 09:15:00",
  21.         "op": 17330.6000,
  22.         "hp": 17353.3500,
  23.         "lp": 17266.8500,
  24.         "cp": 17279.8500,
  25.         "vol": 24978283,
  26.         "oi": 0,
  27.         "eod": false
  28.     },
  29.     {
  30.         "tkr": "NIFTY 50",
  31.         "td": "2022-03-21 09:20:00",
  32.         "op": 17277.6000,
  33.         "hp": 17337.8000,
  34.         "lp": 17255.7000,
  35.         "cp": 17333.6500,
  36.         "vol": 20795075,
  37.         "oi": 0,
  38.         "eod": false
  39.     }
  40. ]

Live Intra OHLC

  1. GET http://{server}/api/fda/rest/{ticker}/{yyyyMMdd HH:mm:ss-start time}/{yyyyMMdd  HH:mm:ss-end time}/{resolution:minutes}?api_token={your api key}

  2. Example:
  3. http://apidata5.accelpix.in/api/fda/rest/NIFTY 50/20220707 15:00:00/20220707 15:15:00/5?api_token=cvFRDRmyKXp2%2BY9KKgPBfC0%3Dm

  4. Response:
  5. [
  6.     {
  7.         "tkr": "NIFTY 50",
  8.         "td": "2022-07-07 15:00:00",
  9.         "op": 16127.8000,
  10.         "hp": 16141.0000,
  11.         "lp": 16112.3500,
  12.         "cp": 16135.1500,
  13.         "vol": 7400612,
  14.         "oi": 0,
  15.         "eod": false
  16.     },
  17.     {
  18.         "tkr": "NIFTY 50",
  19.         "td": "2022-07-07 15:05:00",
  20.         "op": 16135.9500,
  21.         "hp": 16150.5000,
  22.         "lp": 16130.7500,
  23.         "cp": 16144.3000,
  24.         "vol": 6414606,
  25.         "oi": 0,
  26.         "eod": false
  27.     },
  28.     {
  29.         "tkr": "NIFTY 50",
  30.         "td": "2022-07-07 15:10:00",
  31.         "op": 16144.3500,
  32.         "hp": 16147.3000,
  33.         "lp": 16127.4000,
  34.         "cp": 16127.4000,
  35.         "vol": 7033143,
  36.         "oi": 0,
  37.         "eod": false
  38.     }
  39. ]
Quotes Data:

  1. POST http://{server}/api/fda/rest/quote?api_token={your api key}

  2. Example:
  3. http://apidata5.accelpix.in/api/fda/rest/quote?api_token=cvFRDRmyKXp2%2BY9KKgPBfC0%3Dm

  4. Request Body:
  5. ["TCS","NIFTY-1"]

  6. Response:
  7. [
  8.     {
  9.         "tkr": "TCS",
  10.         "sid": 1,
  11.         "tkn": 0,
  12.         "tm": 1332344400,
  13.         "pr": 3626.7,
  14.         "qty": 0,
  15.         "vol": 2413206,
  16.         "bp": 0.0,
  17.         "bq": 0,
  18.         "ap": 3626.7,
  19.         "aq": 1163,
  20.         "op": 3696.0,
  21.         "cp": 3626.7,
  22.         "hp": 3713.95,
  23.         "lp": 3615.0,
  24.         "avg": 3650.29,
  25.         "oi": 0,
  26.         "val": 0.0,
  27.         "band": 10,
  28.         "upc": 3989.35,
  29.         "lrc": 3264.05,
  30.         "poi": 0,
  31.         "chg": 0.0,
  32.         "chgpc": 0.0
  33.     },
  34.     {
  35.         "tkr": "NIFTY-1",
  36.         "sid": 2,
  37.         "tkn": 0,
  38.         "tm": 1332343800,
  39.         "pr": 17167.85,
  40.         "qty": 200,
  41.         "vol": 9308800,
  42.         "bp": 17163.1,
  43.         "bq": 200,
  44.         "ap": 17167.9,
  45.         "aq": 850,
  46.         "op": 17332.2,
  47.         "cp": 17322.05,
  48.         "hp": 17392.1,
  49.         "lp": 17130.65,
  50.         "avg": 17234.96,
  51.         "oi": 10866050,
  52.         "val": 0.0,
  53.         "band": 0,
  54.         "upc": 0.0,
  55.         "lrc": 0.0,
  56.         "poi": 10866050,
  57.         "chg": -154.20117,
  58.         "chgpc": -0.89
  59.     }
  60. ]
Master Data:

  1. GET http://{server}/api/fda/rest/master?api_token={your api key}

  2. Example:
  3. http://apidata5.accelpix.in/api/fda/rest/master?api_token=cvFRDRmyKXp2%2BY9KKgPBfC0%3Dm

  4. Response:
  5. [
  6.     {
  7.         "xid": 1,
  8.         "tkr": "NIFTY 50",
  9.         "atkr": "NIFTY_50",
  10.         "ctkr": null,
  11.         "exp": "1970-01-01 00:00:00",
  12.         "utkr": null,
  13.         "inst": "INDEX",
  14.         "a3tkr": null,
  15.         "sp": 0.00,
  16.         "tk": 99,
  17.         "lot": 0
  18.     },
  19.     {
  20.         "xid": 1,
  21.         "tkr": "TCS",
  22.         "atkr": null,
  23.         "ctkr": null,
  24.         "exp": "1970-01-01 00:00:00",
  25.         "utkr": null,
  26.         "inst": "EQUITY",
  27.         "a3tkr": null,
  28.         "sp": 0.00,
  29.         "tk": 11536,
  30.         "lot": 0
  31.     },
  32.         "xid": 2,
  33.         "tkr": "BANKNIFTY-1",
  34.         "atkr": "BANKNIFTY_1",
  35.         "ctkr": "BANKNIFTY22JUL",
  36.         "exp": "2022-07-28 00:00:00",
  37.         "utkr": "BANKNIFTY",
  38.         "inst": "FUTIDX",
  39.         "a3tkr": "BANKNIFTY-I",
  40.         "sp": 0.00,
  41.         "tk": 53734,
  42.         "lot": 25
  43.     }

  44. ]

Samples Code 

  1. # python
  2. import requests
  3. import urllib.parse

  4. ulr_base = "http://apidata5.accelpix.in/api/fda/rest"
  5. key = urllib.parse.quote("your api token here")

  6. # EOD request
  7. eod = requests.get(ulr_base + "/nifty-1/20220101/20220301?api_token=" + key)
  8. print(eod.content)

  9. # Quote data reuest
  10. quote = requests.post(ulr_base + "/quote?api_token=" + key, json=['NIFTY-1', 'NIFTY BANK'])
  11. print(quote.content)
  12. “`c#
  13. // .net
  14. static async Task Main(string[] args)
  15. {
  16. const string urlBase = “http://apidata5.accelpix.in/api/fda/rest“;
  17. var key = Uri.EscapeDataString(“your api token here”);

  18. var client = new HttpClient();

  19. // Eod request
  20. var d = await client.GetStringAsync(urlBase + "/nifty-1/20220101/20220301?api_token=" + key);
  21. Console.WriteLine(d);

  22. // Quote request
  23. var syms = new List<string> { "NIFTY-1", "NIFTY BANK" };
  24. var q = await client.PostAsync(urlBase + "/quote?api_token=" + key, new StringContent(JsonConvert.SerializeObject(syms), Encoding.UTF8, "application/json"));
  25. var r = await q.Content.ReadAsStringAsync();
  26. Console.WriteLine(r);

  27. Console.ReadLine();}

    • Related Articles

    • Pix APIs - Realtime and Historical Data in Node.js

      Introduction JavaScript library to connect and stream the market data. This is websocket and fallback transport based library with all the functionalities to get eod and live streaming data Simple and easy integration with your web ...
    • Pix APIs - Realtime and Historical Data in Python

      Introduction Python library to connect and stream the market data. This is websocket and fallback transport based library with all the functionalities to get EOD and live streaming data Simple and easy integration with your web application, all ...
    • How to configure Realtime NSE Data in Excel ?

      India's Fastest Realtime (Tick by Tick 1 Sec Updates) Data in MS Excel. The following are the minimum requirements: - 1. Microsoft Office Excel 2010 or above 2. Pix Connect Elite and the Above plans can be used with Excel. How to Setup Pix Connect ...
    • How to download Daily IEOD Incremental Data using Pix Connect ?

      Intraday End of Day Data ( IEOD ) is too crucial for backtesting purposes, that's why we do provide for all our subscribers at FREE OF COST with REALTIME Data Subscription. We are updating these data every day within 25 min after the market close (at ...
    • How to configure NinjaTrader 7 with Pix Connect ?

      njaTrader is the most renowned technical analysis platform and is used by over 50k + active Pro Traders all over the World.  Here, we will show you how to configure Pix Connect with NinjaTrader 7? Before starting the Setup, we would have to install ...