Skip to main content

Stock Data APIs

Domains: Use domain as per your env

Prod Domain

https://fundsapi.wealthy.in

Dev Domain

https://fundsapi.wealthydev.in

Note: Don’t compare the values of example data with actual data Error Response structure for all the APIs { "message": "Invalid request", "error_code": "VAL001", "error_type": "CODE" }

Introduction of id_type and stock_id in the urls.

Possible values for id_type: \ a. isin: stock_id for isin: valid value of isin\ b. wpc: stock_id for wpc: valid value of wpc (wealthy product code)\ c. exchange-token: valid stock_id for this is combination of exchange and token. Ex: bse-521234 or nse-11460 (CASE INSENSITIVE) \ d. exchange-symbol: valid stock_id for this is combination of exchange and symbol. Ex: bse-reliance or nse-reliance (CASE INSENSITIVE) \

Stock Historical Prices

Request

1. https://fundsapi.wealthydev.in/market/v0/stocks/{id_type}/{stock_id}/historical/  (**GET**)
**Query parameters with valid values:**
1. **start_time**: '2022-09-12' or unix timestamp, ex: '1670866802'
2. **end_time**: '2022-09-12' or unix timestamp, ex: '1670866802'
3. **periodicity**: 'd', 'w' or 'm'
4. **exchange**: 'nse' or 'bse'
5. **fields**: 'o', 'c', 'l', 'h', 'vol' or 'val'. Provide required values in comma separated format. Ex: o,c,h,l


**URL Example:**
https://fundsapi.wealthydev.in/market/v0/stocks/isin/INE455F01025/historical/?start_time=2022-1-1&end_time=2022-12-31&periodicity=m&exchange=nse&fields=o,c,l,h

Response

    {
"data":[
[
"2022-01-31",
"139.400000",
"134.650000",
"133.250000",
"143.800000"
],
[
"2022-02-28",
"122.050000",
"124.400000",
"121.600000",
"124.950000"
]
]
}

Stock Fundamentals

  1. Fundamental Snapshot
    a. Single stock: \ https://fundsapi.wealthy.in/market/v0/stocks/{id_type}/{stock_id} /fundamentals/ (GET) \ URL Example: https://fundsapi.wealthy.in/market/v0/stocks/exchange-token/bse-500325/fundamentals/ \ Response:

       {
    "data": [
    {
    "third_party_id": "476",
    "name": "Reliance Industries Ltd",
    "isin": "INE002A01018",
    "pe": "45.590",
    "book_value": "697.010",
    "dividend_yield": "0.300",
    "roce": "8.120",
    "roe": "8.260",
    "market_cap": "16018829127845.701",
    "no_of_shares": "6765994014.0",
    "sector": "REFINERIES",
    "returns_one_year": "8.960",
    "token": "500325",
    "symbol": "RELIANCE",
    "lcp": 2385.05,
    "lcp_date": "2023-03-03",
    "wpc": "ST00000402",
    "fifty_two_week_high": 0.0,
    "fifty_two_week_low": 0.0,
    "diff": 0.0,
    "percentage_change": 0.0,
    "exchange": "bse"
    }
    ]
    }

    b. Multiple stocks \ https://fundsapi.wealthy.in/market/v0/stocks/fundamentals/ (POST) \ Note: The request payload must follow the same structure as presented below. Two Key value pairs are mandatory in the payload. First is ‘exchange’ and the other Key value pair is combination of ‘id_type‘ and it’s ‘value’ as mentioned in the Note which is at the top of this Doc.

    Request Payload:

      {
    "stocks": [
    {
    "exchange": "bse",
    "exchange-symbol": "bse-RELIANCE"
    },
    {
    "exchange": "nse",
    "exchange-symbol": "nse-RELIANCE"
    }
    ]
    }

    Response:

       {
    "data": [
    {
    "third_party_id": "476",
    "name": "Reliance Industries Ltd",
    "isin": "INE002A01018",
    "pe": "45.590",
    "book_value": "697.010",
    "dividend_yield": "0.300",
    "roce": "8.120",
    "roe": "8.260",
    "market_cap": "16018829127845.701",
    "no_of_shares": "6765994014.0",
    "sector": "REFINERIES",
    "returns_one_year": "8.960",
    "token": "500325",
    "symbol": "RELIANCE",
    "lcp": 2385.05,
    "lcp_date": "2023-03-03",
    "wpc": "ST00000402",
    "fifty_two_week_high": 0.0,
    "fifty_two_week_low": 0.0,
    "diff": 0.0,
    "percentage_change": 0.0,
    "exchange": "bse"
    },
    {
    "third_party_id": "476",
    "name": "Reliance Industries Ltd",
    "isin": "INE002A01018",
    "pe": "45.590",
    "book_value": "697.010",
    "dividend_yield": "0.300",
    "roce": "8.120",
    "roe": "8.260",
    "market_cap": "16018829127845.701",
    "no_of_shares": "6765994014.0",
    "sector": "REFINERIES",
    "returns_one_year": "8.960",
    "token": "2885",
    "symbol": "RELIANCE",
    "lcp": 0.0,
    "lcp_date": **null**,
    "wpc": "ST00000402",
    "fifty_two_week_high": 0.0,
    "fifty_two_week_low": 0.0,
    "diff": 0.0,
    "percentage_change": 0.0,
    "exchange": "nse"
    }
    ]
    }
  2. Share Holdings Pattern \ https://fundsapi.wealthy.in/market/v0/stocks/{id_type}/{stock_id}/share-holdings-pattern/ (GET) \

    URL Example: https://fundsapi.wealthy.in/market/v0/stocks/exchange-token/bse-505358/share-holdings-pattern/?entity=overview

    Response:

       {
    "data":
    [
    {
    "display_name": "DII",
    "value": 14.0
    },
    {
    "display_name": "FII",
    "value": 22.0
    },
    {
    "display_name": "Promoters",
    "value": 49.0
    },
    {
    "display_name": "Others",
    "value": 15.0
    }
    ]
    }
  3. Stock Financials Overview https://fundsapi.wealthy.in/market/v0/stocks/{id_type}/{stock_id}/financials-overview/ (GET) \ Query parameters with valid values: \ All parameters are mandatory

    1. fdata: “revenue", “profit" and “ebitda"
    2. period: "q", "hy","nm" and "y" (mandatory parameter) (q: Quarter, hy: Half Yearly, nm: Nine month, y: Yearly)
    3. rtype: "s" and "c" (default parameter is s) (s: standalone, c: consolidated)

    URL Example: https://fundsapi.wealthy.in/market/v0/stocks/exchange-token/bse-500325/financials-overview/?fdata=ebitda&period=y&rtype=s

    Note: Detail of the data in the response. 1. Year, 2. Month, 3. Data point requested in the fdata query parameter.

    Response:

       {
    "data": [
    [
    2022,
    3,
    66185.0
    ],
    [
    2021,
    3,
    52622.0
    ],
    [
    2020,
    3,
    62149.0
    ]
    ]
    }
  1. Stock Financials CAGR \ https://fundsapi.wealthydev.in/market/v0/stocks/{id_type}/{stock_id}/cagr/ (GET) Query parameters with valid values: All parameters are mandatory

    1. **fdata:** “revenue", “profit" and “ebitda"
    2. **rtype:** "s" and "c" (default parameter is **s**) (s: standalone, c: consolidated)
    3. **n****:** int with comma separated values (period in years for which you want CAGR)

    **URL Example:**
    https://fundsapi.wealthydev.in/market/v0/stocks/exchange-token/bse-500325/cagr/?fdata=revenue&rtype=s&n=2,3,4

    **Response:**

    {
    "data": {
    "2": 0.2345,
    "3":0.4567,
    "4": 0.1234
    }
    }
  1. Stock Financials Detailed \ https://fundsapi.wealthy.in/market/v0/stocks/{id_type}/{stock_id}/financials/ (GET) Query parameters with valid values: All parameters are mandatory

    1. **period:** "q", "hy","nm" and "y" (mandatory parameter) (q: Quarter, hy: Half Yearly, nm: Nine month, y: Yearly)
    2. **rtype:** "s" and "c" (default parameter is **s**) (s: standalone, c: consolidated)

    **URL Example:**
    https://fundsapi.wealthy.in/market/v0/stocks/exchange-token/bse-500325/financials/?period=y&rtype=s

    **Response:**

    {
    "data": {
    "2022-3": {
    "year": 2022,
    "month": 3,
    "net_sales": 423703.0,
    "other_operating_income": 0.0,
    "other_income": 13872.0,
    "total_income": 437575.0,
    "total_expenditure": 371390.0,
    "ebitda": 66185.0,
    "ebit": 55909.0,
    "ebt": 0.0,
    "interest": 9123.0,
    "depreciation": 0.0,
    "tax": 787.0,
    "net_profit": 39084.0,
    "extra_ordinary_items": 0.0,
    "adj_profit_after_extra_ordinary_items": 0.0,
    "eps": 59.24,
    "eps_adj": 59.24,
    "diluted_eps": 58.49,
    "dividend_per_share": 8.0,
    "book_value": 0.0
    },
    "2021-3": {
    "year": 2021,
    "month": 3,
    "net_sales": 245667.0,
    "other_operating_income": 0.0,
    "other_income": 19122.0,
    "total_income": 264789.0,
    "total_expenditure": 212167.0,
    "ebitda": 52622.0,
    "ebit": 43423.0,
    "ebt": 0.0,
    "interest": 16211.0,
    "depreciation": 0.0,
    "tax": 0.0,
    "net_profit": 31944.0,
    "extra_ordinary_items": 0.0,
    "adj_profit_after_extra_ordinary_items": 0.0,
    "eps": 49.66,
    "eps_adj": 49.66,
    "diluted_eps": 48.9,
    "dividend_per_share": 7.0,
    "book_value": 0.0
    }
    }
    }
  2. Portfolio Sectors \ https://fundsapi.wealthydev.in/market/v0/stocks/portfolio-summary/ (GET)

    **Request:**
    {
    "wstockcodes": [
    "INF204KB19I1", "INF769K01HS7", "INF247L01AP3", "INE726G01019", "INE244O01017", "INE155C01010", "INE202D01018"
    ]
    }

    **Response:**

    {
    "data": {
    "Auto Ancillaries": 14,
    "Pharmaceuticals": 29,
    "Insurance": 14,
    "ETF": 43
    }
    }

NEWS

  1. Major news \ https://fundsapi.wealthydev.in/market/v0/news/ (GET)\ Query parameters with valid values: \

    1. **type:** 'sn' and 'mn' (sn: stock news, mn: market news) \
    **URL Example:**
    https://fundsapi.wealthydev.in/market/v0/news/?type=mn

    Response
    ```

    {
    "data": [
    {
    "news_id": "1388100",
    "section_name": "Market Commentary - End-Session",
    "date": "2022-12-21",
    "time": "17:18",
    "heading": "Market tumbles on Covid fears; Nifty ends below 18,200; VIX zooms over 15 mark",
    "caption": "",
    "datetime": "2022-12-21 17:18"
    },
    {
    "news_id": "1388084",
    "section_name": "Market Commentary - End-Session",
    "date": "2022-12-21",
    "time": "16:00",
    "heading": "Quick Wrap: Nifty Media Index declines 3.03%, NIFTY Tumbles 1.01%",
    "caption": "",
    "datetime": "2022-12-21 16:00"
    }
    ]
    }

    ```
  1. News Details API to get Details of a secific news item

    Request

    curl --location --request GET https://fundsapi.wealthydev.in/market/v0/news/{news_id}/ 

    Response

    {
    "data": [
    {
    "news_id": "1391624",
    "section_name": "Hot Pursuit",
    "date": "1/16/2023 12:00:00 AM",
    "time": "14:45",
    "heading": "Music Broadcast Ltd leads losers in 'B' group",
    "caption": "Gian Lifecare Ltd, BLB Ltd, Manaksia Steels Ltd and Onelife Capital Advisors Ltd are among the other losers in the BSE's 'B' group today, 16 January 2023.",
    "art_text": "<p>Gian Lifecare Ltd, BLB Ltd, Manaksia Steels Ltd and Onelife Capital Advisors Ltd are among the other losers in the BSE's 'B' group today, 16 January 2023.</p><p>Music Broadcast Ltd crashed 18.63% to Rs 17.25 at 14:33 IST.The stock was the biggest loser in the BSE's 'B' group.On the BSE, 9.04 lakh shares were traded on the counter so far as against the average daily volumes of 74591 shares in the past one month."
    }
    ]
    }