shopify visitor statistics

Search TagniFi Markets

Description

Searches for end-of-day market prices for specific or relative periods.

Endpoint

https://api.tagnifi.com/markets

Request Parameters

Attribute Description Type Required? Default Notes
company The company's ID or ticker symbol. String Yes
date The date to retrieve market data. Date (ISO8601) No Current Date
relative_period Returns data relative to the most recent data available. For example, 0 returns the most recent data available and -1 the previous day's data. String No 0 (most recent period) All periods returned are relative to the specified date and their associated defaults.
split This variable determines if the data returned is split-adjusted or un-adjusted. String No unadjusted Possible values: adjusted or unadjusted
offset The number of periods to skip for a series of market data. Integer No 0
limit The number of values to return in the response. Integer No 1 The maximum limit value is 25.

How do I search for a specific date?

Here is an example request for Apple's market data on December 31, 2014:

https://api.tagnifi.com/markets?company=aapl&date=2014-12-31

Here is the response:

{
    "meta": {
        "copyright": "TagniFi, LLC. 2015"
    },
    "markets": [
        {
            "company": {
                "name": "Apple Inc",
                "id": "US0000320193",
                "ticker": "AAPL"
            },
            "prices": [
                {
                    "date": "2014-12-31",
                    "close": 110.38,
                    "open": 112.82,
                    "high": 113.13,
                    "low": 110.21,
                    "volume": 41403351,
                    "adjusted": false,
                    "relative_period": -120
                }
            ]
        }
    ]
}

How do I search for a relative date?

Here is an example request for Apple's most recent market data:

https://api.tagnifi.com/markets?company=aapl&relative_period=0

Here is the response (note: this example is from June 26, 2015):

{
    "meta": {
        "copyright": "TagniFi, LLC. 2015"
    },
    "markets": [
        {
            "company": {
                "name": "Apple Inc",
                "id": "US0000320193",
                "ticker": "AAPL"
            },
            "prices": [
                {
                    "date": "2015-06-25",
                    "close": 127.5,
                    "open": 128.86,
                    "high": 129.2,
                    "low": 127.5,
                    "volume": 31938100,
                    "adjusted": false,
                    "relative_period": 0
                }
            ]
        }
    ]
}

How do I search for multiple dates?

Here is an example request for Apple's most recent 5 days of market data:

https://api.tagnifi.com/markets?company=aapl&relative_period=0&limit=5

Here is the response (note: this example is from June 26, 2015):

{
    "meta": {
        "copyright": "TagniFi, LLC. 2015"
    },
    "markets": [
        {
            "company": {
                "name": "Apple Inc",
                "id": "US0000320193",
                "ticker": "AAPL"
            },
            "prices": [
                {
                    "date": "2015-06-25",
                    "close": 127.5,
                    "open": 128.86,
                    "high": 129.2,
                    "low": 127.5,
                    "volume": 31938100,
                    "adjusted": false,
                    "relative_period": 0
                },
                {
                    "date": "2015-06-24",
                    "close": 128.11,
                    "open": 127.21,
                    "high": 129.8,
                    "low": 127.12,
                    "volume": 55280855,
                    "adjusted": false,
                    "relative_period": -1
                },
                {
                    "date": "2015-06-23",
                    "close": 127.03,
                    "open": 127.48,
                    "high": 127.61,
                    "low": 126.88,
                    "volume": 30268863,
                    "adjusted": false,
                    "relative_period": -2
                },
                {
                    "date": "2015-06-22",
                    "close": 127.61,
                    "open": 127.49,
                    "high": 128.06,
                    "low": 127.08,
                    "volume": 34039345,
                    "adjusted": false,
                    "relative_period": -3
                },
                {
                    "date": "2015-06-19",
                    "close": 126.6,
                    "open": 127.71,
                    "high": 127.82,
                    "low": 126.4,
                    "volume": 54716887,
                    "adjusted": false,
                    "relative_period": -4
                }
            ]
        }
    ]
}

Still need help? Contact Us Contact Us