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://apidata.accelpix.in/api/fda/rest/NIFTY 50/20240101/20240115?api_token=cvFRDRmyKXp2%2BY9KKgPBfC0%3Dm
  4. Response:
  5. [
  6.     {
  7.         "tkr": ""NIFTY 50"",
  8.         "td": "2024-01-01 00:00:00",
  9.         "op": 21727.8000,
  10.         "hp": 21834.3000,
  11.         "lp": 21680.8000,
  12.         "cp": 21741.9000,
  13.         "vol": 0,
  14.         "oi": 0,
  15.         "eod": true
  16.     },
  17.     {
  18.         "tkr": ""NIFTY 50"",
  19.         "td": "2024-01-02 00:00:00",
  20.         "op": 21751.3000,
  21.         "hp": 21755.6000,
  22.         "lp": 21555.7000,
  23.         "cp": 21665.8000,
  24.         "vol": 0,
  25.         "oi": 0,
  26.         "eod": true
  27.     }
  28. ]

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://apidata.accelpix.in/api/fda/rest/NIFTY 50/20240111/20240112/5?api_token=cvFRDRmyKXp2%2BY9KKgPBfC0%3Dm

  5. Response:
  6. [
  7.     {
  8.         "tkr": "NIFTY 50",
  9.         "td": "2024-01-11 09:15:00",
  10.         "op": 21688.8000,
  11.         "hp": 21725.4000,
  12.         "lp": 21683.4000,
  13.         "cp": 21720.4000,
  14.         "vol": 8554608,
  15.         "oi": 0,
  16.         "eod": false
  17.     },
  18.     {
  19.         "tkr": "NIFTY 50",
  20.         "td": "2024-01-11 09:20:00",
  21.         "op": 21721.1000,
  22.         "hp": 21726.5000,
  23.         "lp": 21693.1000,
  24.         "cp": 21693.1000,
  25.         "vol": 4901900,
  26.         "oi": 0,
  27.         "eod": false
  28.     },
  29.     {
  30.         "tkr": "NIFTY 50",
  31.         "td": "2024-01-11 09:25:00",
  32.         "op": 21692.6000,
  33.         "hp": 21720.1000,
  34.         "lp": 21690.4000,
  35.         "cp": 21703.9000,
  36.         "vol": 5450636,
  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://apidata.accelpix.in/api/fda/rest/NIFTY 50/20240112 15:00:00/20240112 15:15:00/5?api_token=cvFRDRmyKXp2%2BY9KKgPBfC0%3Dm

  4. Response:
  5. [
  6.     {
  7.         "tkr": "NIFTY 50",
  8.         "td": "2024-01-12 15:00:00",
  9.         "op": 21903.8000,
  10.         "hp": 21922.0000,
  11.         "lp": 21892.6000,
  12.         "cp": 21893.3000,
  13.         "vol": 6963597,
  14.         "oi": 0,
  15.         "eod": false
  16.     },
  17.     {
  18.         "tkr": "NIFTY 50",
  19.         "td": "2024-01-12 15:05:00",
  20.         "op": 21888.8000,
  21.         "hp": 21899.8000,
  22.         "lp": 21857.0000,
  23.         "cp": 21858.3000,
  24.         "vol": 8481726,
  25.         "oi": 0,
  26.         "eod": false
  27.     },
  28.     {
  29.         "tkr": "NIFTY 50",
  30.         "td": "2024-01-12 15:10:00",
  31.         "op": 21858.8000,
  32.         "hp": 21884.9000,
  33.         "lp": 21852.6000,
  34.         "cp": 21876.0000,
  35.         "vol": 7293602,
  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://apidata.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://apidata.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": "2024-01-16 00:00:00",
  37.         "utkr": "BANKNIFTY",
  38.         "inst": "FUTIDX",
  39.         "a3tkr": "BANKNIFTY-I",
  40.         "sp": 0.00,
  41.         "tk": 53734,
  42.         "lot": 15
  43.     }

  44. ]

Samples Code 

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

  4. ulr_base = "http://apidata.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/20240116/20240118?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://apidata.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/20240110/20240118?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 ...