Company API

API change history

A collection of RESTful methods that returns various financial data for a requested company including balance sheets, stock quotes , company look-up utilities and more.

Historical Stock Prices

Returns up to 10 years of historical price quotes in a monthly interval for a given company.

Try it

Request

Request URL

Request parameters

  • string

    Publicly traded company's stock symbol

Request headers

  • string
    Subscription key which provides access to this API. Found in your Profile.

Request body

Responses

200 OK

A name-value collection of up to 10 years of historical pricing data by month

Representations

{
  "meta": {
    "copyright": "Copyright 2020 Last10K.com All Rights Reserverd",
    "terms": "https://dev.last10k.com/terms"
  },
  "data": {
    "attributes": {
      "status": 0,
      "company": {
        "ticker": "msft"
      },
      "count": 240,
      "result": {
        "2020-01-27T00:00:00": 162.28,
        "2019-12-31T00:00:00": 157.7,
        "2019-11-29T00:00:00": 151.38,
        "2019-10-31T00:00:00": 142.883,
        "2019-09-30T00:00:00": 138.5577,
        "2019-08-30T00:00:00": 137.3917,
        "2019-07-31T00:00:00": 135.3424,
        "2019-06-28T00:00:00": 133.0481,
        "2019-05-31T00:00:00": 122.8381,
        "2019-04-30T00:00:00": 129.2393,
        "2019-03-29T00:00:00": 116.7112,
        "2019-02-28T00:00:00": 110.8627,
        "2019-01-31T00:00:00": 102.9002,
        "2018-12-31T00:00:00": 100.0821,
        "2018-11-30T00:00:00": 109.2655,
        "2018-10-31T00:00:00": 104.7861,
        "2018-09-28T00:00:00": 112.2029,
        "2018-08-31T00:00:00": 110.2015,
        "2018-07-31T00:00:00": 103.6655,
        "2018-06-29T00:00:00": 96.3655,
        "2018-05-31T00:00:00": 96.5903,
        "2018-04-30T00:00:00": 90.998,
        "2018-03-29T00:00:00": 88.8087,
        "2018-02-28T00:00:00": 91.2413,
        "2018-01-31T00:00:00": 92.0222,
        "2017-12-29T00:00:00": 82.85,
        "2017-11-30T00:00:00": 81.5231,
        "2017-10-31T00:00:00": 80.1585,
        "2017-09-29T00:00:00": 71.7842,
        "2017-08-31T00:00:00": 72.054,
        "2017-07-31T00:00:00": 69.688,
        "2017-06-30T00:00:00": 66.0742,
        "2017-05-31T00:00:00": 66.9465,
        "2017-04-28T00:00:00": 65.257,
        "2017-03-31T00:00:00": 62.7786,
        "2017-02-28T00:00:00": 60.9866,
        "2017-01-31T00:00:00": 61.2553,
        "2016-12-30T00:00:00": 58.8771,
        "2016-11-30T00:00:00": 57.0958,
        "2016-10-31T00:00:00": 56.4,
        "2016-09-30T00:00:00": 54.2163,
        "2016-08-31T00:00:00": 54.0845,
        "2016-07-29T00:00:00": 53.0181,
        "2016-06-30T00:00:00": 47.864,
        "2016-05-31T00:00:00": 49.5758,
        "2016-04-29T00:00:00": 46.3179,
        "2016-03-31T00:00:00": 51.2961,
        "2016-02-29T00:00:00": 47.256,
        "2016-01-29T00:00:00": 50.8081,
        "2015-12-31T00:00:00": 51.1678,
        "2015-11-30T00:00:00": 50.1256,
        "2015-10-30T00:00:00": 48.2208,
        "2015-09-30T00:00:00": 40.5443,
        "2015-08-31T00:00:00": 39.8664,
        "2015-07-31T00:00:00": 42.5007,
        "2015-06-30T00:00:00": 40.18,
        "2015-05-29T00:00:00": 42.6464,
        "2015-04-30T00:00:00": 43.9798,
        "2015-03-31T00:00:00": 36.7598,
        "2015-02-27T00:00:00": 39.6487,
        "2015-01-30T00:00:00": 36.2712,
        "2014-12-31T00:00:00": 41.7029,
        "2014-11-28T00:00:00": 42.924,
        "2014-10-31T00:00:00": 41.8854,
        "2014-09-30T00:00:00": 41.3591,
        "2014-08-29T00:00:00": 40.5294,
        "2014-07-31T00:00:00": 38.2679,
        "2014-06-30T00:00:00": 36.9734,
        "2014-05-30T00:00:00": 36.2995,
        "2014-04-30T00:00:00": 35.5743,
        "2014-03-31T00:00:00": 36.0938,
        "2014-02-28T00:00:00": 33.7339,
        "2014-01-31T00:00:00": 33.0726,
        "2013-12-31T00:00:00": 32.6968,
        "2013-11-29T00:00:00": 33.3261,
        "2013-10-31T00:00:00": 30.7104,
        "2013-09-30T00:00:00": 28.8671,
        "2013-08-30T00:00:00": 28.9712,
        "2013-07-31T00:00:00": 27.4224,
        "2013-06-28T00:00:00": 29.7521,
        "2013-05-31T00:00:00": 30.0578,
        "2013-04-30T00:00:00": 28.3133,
        "2013-03-28T00:00:00": 24.4684,
        "2013-02-28T00:00:00": 23.7798,
        "2013-01-31T00:00:00": 23.2894,
        "2012-12-31T00:00:00": 22.6613,
        "2012-11-30T00:00:00": 22.581,
        "2012-10-31T00:00:00": 24.0103,
        "2012-09-28T00:00:00": 25.0367,
        "2012-08-31T00:00:00": 25.9285,
        "2012-07-31T00:00:00": 24.6292,
        "2012-06-29T00:00:00": 25.5653,
        "2012-05-31T00:00:00": 24.3952,
        "2012-04-30T00:00:00": 26.5802,
        "2012-03-30T00:00:00": 26.7795,
        "2012-02-29T00:00:00": 26.3519,
        "2012-01-31T00:00:00": 24.356,
        "2011-12-30T00:00:00": 21.4115,
        "2011-11-30T00:00:00": 21.0981,
        "2011-10-31T00:00:00": 21.8011,
        "2011-09-30T00:00:00": 20.3766,
        "2011-08-31T00:00:00": 21.7765,
        "2011-07-29T00:00:00": 22.2908,
        "2011-06-30T00:00:00": 21.1518,
        "2011-05-31T00:00:00": 20.3464,
        "2011-04-29T00:00:00": 20.95,
        "2011-03-31T00:00:00": 20.5217,
        "2011-02-28T00:00:00": 21.4835,
        "2011-01-31T00:00:00": 22.2767,
        "2010-12-31T00:00:00": 22.4254,
        "2010-11-30T00:00:00": 20.2941,
        "2010-10-29T00:00:00": 21.293,
        "2010-09-30T00:00:00": 19.5562,
        "2010-08-31T00:00:00": 18.7377,
        "2010-07-30T00:00:00": 20.5024,
        "2010-06-30T00:00:00": 18.2782,
        "2010-05-28T00:00:00": 20.4945,
        "2010-04-30T00:00:00": 24.146,
        "2010-03-31T00:00:00": 23.1595,
        "2010-02-26T00:00:00": 22.6712,
        "2010-01-29T00:00:00": 22.182,
        "2009-12-31T00:00:00": 23.9925,
        "2009-11-30T00:00:00": 23.1502,
        "2009-10-30T00:00:00": 21.7336,
        "2009-09-30T00:00:00": 20.1583,
        "2009-08-31T00:00:00": 19.3197,
        "2009-07-31T00:00:00": 18.3329,
        "2009-06-30T00:00:00": 18.5278,
        "2009-05-29T00:00:00": 16.283,
        "2009-04-30T00:00:00": 15.6915,
        "2009-03-31T00:00:00": 14.2276,
        "2009-02-27T00:00:00": 12.5082,
        "2009-01-30T00:00:00": 13.1495,
        "2008-12-31T00:00:00": 14.9489,
        "2008-11-28T00:00:00": 15.5487,
        "2008-10-31T00:00:00": 17.0583,
        "2008-09-30T00:00:00": 20.3889,
        "2008-08-29T00:00:00": 20.8473,
        "2008-07-31T00:00:00": 19.5692,
        "2008-06-30T00:00:00": 20.9311,
        "2008-05-30T00:00:00": 21.5474,
        "2008-04-30T00:00:00": 21.6197,
        "2008-03-31T00:00:00": 21.5136,
        "2008-02-29T00:00:00": 20.619,
        "2008-01-31T00:00:00": 24.6164,
        "2007-12-31T00:00:00": 26.8817,
        "2007-11-30T00:00:00": 25.3715,
        "2007-10-31T00:00:00": 27.707,
        "2007-09-28T00:00:00": 22.1746,
        "2007-08-31T00:00:00": 21.6251,
        "2007-07-31T00:00:00": 21.7439,
        "2007-06-29T00:00:00": 22.1039,
        "2007-05-31T00:00:00": 23.0191,
        "2007-04-30T00:00:00": 22.384,
        "2007-03-30T00:00:00": 20.8364,
        "2007-02-28T00:00:00": 21.0607,
        "2007-01-31T00:00:00": 22.9926,
        "2006-12-29T00:00:00": 22.2475,
        "2006-11-30T00:00:00": 21.875,
        "2006-10-31T00:00:00": 21.3178,
        "2006-09-29T00:00:00": 20.3079,
        "2006-08-31T00:00:00": 19.0828,
        "2006-07-31T00:00:00": 17.8,
        "2006-06-30T00:00:00": 17.2377,
        "2006-05-31T00:00:00": 16.7568,
        "2006-04-28T00:00:00": 17.7974,
        "2006-03-31T00:00:00": 20.0524,
        "2006-02-28T00:00:00": 19.8019,
        "2006-01-31T00:00:00": 20.6759,
        "2005-12-30T00:00:00": 19.207,
        "2005-11-30T00:00:00": 20.3307,
        "2005-10-31T00:00:00": 18.8217,
        "2005-09-30T00:00:00": 18.8437,
        "2005-08-31T00:00:00": 20.0521,
        "2005-07-29T00:00:00": 18.7006,
        "2005-06-30T00:00:00": 18.1384,
        "2005-05-31T00:00:00": 18.8394,
        "2005-04-29T00:00:00": 18.4165,
        "2005-03-31T00:00:00": 17.5939,
        "2005-02-28T00:00:00": 18.3146,
        "2005-01-31T00:00:00": 19.071,
        "2004-12-31T00:00:00": 19.3903,
        "2004-11-30T00:00:00": 19.4556,
        "2004-10-29T00:00:00": 18.2457,
        "2004-09-30T00:00:00": 18.0369,
        "2004-08-31T00:00:00": 17.8086,
        "2004-07-30T00:00:00": 18.5305,
        "2004-06-30T00:00:00": 18.576,
        "2004-05-28T00:00:00": 17.0605,
        "2004-04-30T00:00:00": 16.9955,
        "2004-03-31T00:00:00": 16.215,
        "2004-02-27T00:00:00": 17.2556,
        "2004-01-30T00:00:00": 17.9841,
        "2003-12-31T00:00:00": 17.802,
        "2003-11-28T00:00:00": 16.7223,
        "2003-10-31T00:00:00": 17.002,
        "2003-09-30T00:00:00": 17.9827,
        "2003-08-29T00:00:00": 17.1547,
        "2003-07-31T00:00:00": 17.0836,
        "2003-06-30T00:00:00": 16.5855,
        "2003-05-30T00:00:00": 15.9192,
        "2003-04-30T00:00:00": 16.5402,
        "2003-03-31T00:00:00": 15.6605,
        "2003-02-28T00:00:00": 15.3306,
        "2003-01-31T00:00:00": 15.3001,
        "2002-12-31T00:00:00": 16.667,
        "2002-11-29T00:00:00": 18.5948,
        "2002-10-31T00:00:00": 17.2376,
        "2002-09-30T00:00:00": 14.1008,
        "2002-08-30T00:00:00": 15.8223,
        "2002-07-31T00:00:00": 15.4677,
        "2002-06-28T00:00:00": 17.6341,
        "2002-05-31T00:00:00": 16.4123,
        "2002-04-30T00:00:00": 16.8475,
        "2002-03-28T00:00:00": 19.4427,
        "2002-02-28T00:00:00": 18.8076,
        "2002-01-31T00:00:00": 20.5387,
        "2001-12-31T00:00:00": 21.3576,
        "2001-11-30T00:00:00": 20.6999,
        "2001-10-31T00:00:00": 18.7463,
        "2001-09-28T00:00:00": 16.4961,
        "2001-08-31T00:00:00": 18.3917,
        "2001-07-31T00:00:00": 21.3382,
        "2001-06-29T00:00:00": 23.5336,
        "2001-05-31T00:00:00": 22.3021,
        "2001-04-30T00:00:00": 21.8411,
        "2001-03-30T00:00:00": 17.6309,
        "2001-02-28T00:00:00": 19.0203,
        "2001-01-31T00:00:00": 19.6844,
        "2000-12-29T00:00:00": 13.9848,
        "2000-11-30T00:00:00": 18.4981,
        "2000-10-31T00:00:00": 22.2022,
        "2000-09-29T00:00:00": 19.4427,
        "2000-08-31T00:00:00": 22.5052,
        "2000-07-31T00:00:00": 22.5052,
        "2000-06-30T00:00:00": 25.7903,
        "2000-05-31T00:00:00": 20.168,
        "2000-04-28T00:00:00": 22.4859,
        "2000-03-31T00:00:00": 34.2527,
        "2000-02-29T00:00:00": 28.811
      }
    },
    "type": "prices",
    "id": "9181fd3a-0042-4c04-b6e4-99f783959887"
  }
}

404 Not Found

Company not found

Code samples

@ECHO OFF

curl -v -X GET "https://services.last10k.com/v1/company/{ticker}/prices"
-H "Ocp-Apim-Subscription-Key: {subscription key}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");

            var uri = "https://services.last10k.com/v1/company/{ticker}/prices?" + queryString;

            var response = await client.GetAsync(uri);
        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://services.last10k.com/v1/company/{ticker}/prices");


            URI uri = builder.build();
            HttpGet request = new HttpGet(uri);
            request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
        };
      
        $.ajax({
            url: "https://services.last10k.com/v1/company/{ticker}/prices?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
            },
            type: "GET",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://services.last10k.com/v1/company/{ticker}/prices";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"GET"];
    // Request headers
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://services.last10k.com/v1/company/{ticker}/prices');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_GET);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.urlencode({
})

try:
    conn = httplib.HTTPSConnection('services.last10k.com')
    conn.request("GET", "/v1/company/{ticker}/prices?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.parse.urlencode({
})

try:
    conn = http.client.HTTPSConnection('services.last10k.com')
    conn.request("GET", "/v1/company/{ticker}/prices?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://services.last10k.com/v1/company/{ticker}/prices')

request = Net::HTTP::Get.new(uri.request_uri)
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body