apilayer / marketstack Goto Github PK
View Code? Open in Web Editor NEWFree Real-Time, Intraday & Historical Stock Market Data API
Home Page: https://marketstack.com
Free Real-Time, Intraday & Historical Stock Market Data API
Home Page: https://marketstack.com
I am trying to access IRX.INDX and the newest data is from 2021-07-23. Can we get this fixed?
Using https://marketstack.com/search
Examples: FINSX, VBTLX, VTIAX, VTSAX
The name for all of these is `Unknown'. If you search by the symbol they are found, but not by name.
It seems that for all Swedish stocks, latest data is from Oct 18th.
Marketstack do not provide pricing for all of the exchanges.
They have refunded my purchase on this basis, which is great, but they have not fixed the website.
Please remove references to stock exchanges that you don't provide pricing services for marketstack.
Thanks
Unsure if it's a typo or a usage issue, but I got an error using the following example from Historical Data Example API Request
https://api.marketstack.com/v1/eod
? access_key = YOUR_ACCESS_KEY
& symbol = AAPL
& date_from = 2019-01-01
& date_to = 2019-02-01
I had to change 'symbol' param to 'symbols' and it worked.
Did I miss something in the documentation?
If a dividend was paid on certain day, I want that information added to the EOD data.
Without this I cannot fulfill my use case.
Example: (see last line)
{
"open": 96.75,
"high": 96.95,
"low": 96.15,
"close": 96.29,
"volume": 12957900,
"adj_high": null,
"adj_low": null,
"adj_close": 96.29,
"adj_open": null,
"adj_volume": null,
"symbol": "RY.XTSE",
"exchange": "XTSE",
"date": "2020-10-23T00:00:00+0000",
"dividend_amount": 1.0800
}
http://api.marketstack.com/v1/exchanges/XNAS/eod/latest?access_key=YOUR_ACCESS_KEY
response says:
{"error":{"code":"validation_error","message":"Request failed with validation error","context":[{"key":"symbols","message":"You have to specify at least 1 symbol"}]}}
But it worked 24-48hrs ago, and the documentation doesn't require symbol(s)
I use the market stack API layer and want to receive end of day data, for example with
https://api/marketstack.com/v1/eod?symbols=BAS.XETRA&date_from=2023-01-01&access_key=xxx
but I got only data to the 03.05.2023. I try other sources and it seems only data from NASDAQ is up-to-date, not for XETRA and other exchanges.
Dear Marketstack team,
I have signed up for your free Plan to test out your service. It looks very promising. The limit of 100 calls per month is very tight, but manageable for test purposes IF it would be counted correctly. Unfortunately, the dashboard calculates more than 20 calls when I perform just 3-5. Is there a specific reason for such miscalculation? How can I use your service without being blocked after a few calls? I understand that the paid plans offer higher rates, but how can I scale my application using your service, if it charges me 5 times more than I consume?!
Hi, I used to use the worldtradedata api, and am adapting to use marketstack.
I am trying to get Australian stock exchange data, but nothing seems to work
If I ask for the tickers
http://api.marketstack.com/v1/tickers?access_key=MY-KEY&exchange=XASX
I get only 4 back
{"pagination":{"limit":100,"offset":0,"count":4,"total":4},"data":[{"name":null,"symbol":"ACB.XASX","stock_exchange":{"name":"Australia Stock Exchange","acronym":"ASX","mic":"XASX","country":"Australia","country_code":"AU","city":"New York","website":"www.asx.com.au","timezone":{"timezone":"Australia\/Sydney","abbr":"AEST","abbr_dst":"AEDT"}}},{"name":null,"symbol":"AUT.XASX","stock_exchange":{"name":"Australia Stock Exchange","acronym":"ASX","mic":"XASX","country":"Australia","country_code":"AU","city":"New York","website":"www.asx.com.au","timezone":{"timezone":"Australia\/Sydney","abbr":"AEST","abbr_dst":"AEDT"}}},{"name":null,"symbol":"BET.XASX","stock_exchange":{"name":"Australia Stock Exchange","acronym":"ASX","mic":"XASX","country":"Australia","country_code":"AU","city":"New York","website":"www.asx.com.au","timezone":{"timezone":"Australia\/Sydney","abbr":"AEST","abbr_dst":"AEDT"}}},{"name":null,"symbol":"PUA.XASX","stock_exchange":{"name":"Australia Stock Exchange","acronym":"ASX","mic":"XASX","country":"Australia","country_code":"AU","city":"New York","website":"www.asx.com.au","timezone":{"timezone":"Australia\/Sydney","abbr":"AEST","abbr_dst":"AEDT"}}}]}
If I then ask for one of these tickers, eg BET.XASX, then I get no data:
http://api.marketstack.com/v1/eod?access_key=MY-KEY&symbols=BET.ASX
{"pagination":{"limit":100,"offset":0,"count":0,"total":0},"data":[]}
Any ideas?
Hi,
Is it possible to get the index composition? It would really be useful if /tickers/[...].INDX would also return a list of ticker symbols of index components?
Best
Thomas
PHP sample code is repeated under the Python code block.
The API documentation says "the marketstack API also supports intraday data with data intervals as short as one minute. Intraday prices are available for all US stock tickers included in the IEX (Investors Exchange) stock exchange."
I am looking for intraday data for certain tickers that are on the IEX exchange, specifically "BITO", "BITQ", and "VTWO". However, the API doesn't have data for these tickers, and I get the following error: "{"error":{"code":"no_valid_symbols_provided","message":"At least one valid symbol must be provided"}}". Are ALL IEX tickers not available?
Like the previous post, I have no data available after 18th October 2023 for XLON (LSE) tickers.
Has something changed? I have searched the marketstack website and not found anything to suggest it has, but perhaps I am missing something?
What is the reason last entry for 7203.XTKS is from 21 Feb 2021?
Some Danish and Swedish company symbols contains a dash -
. For example:
If I try end-of-day for any of these three I just get an error message that there is no symbols. For example:
http://api.marketstack.com/v1/eod?access_key=myKey&symbols=alk-b.xcse
gives:
{"error":{"code":"no_valid_symbols_provided","message":"At least one valid symbol must be provided"}}
If instead one tries with a company without a dash in its symbol - eg. CHR.XCSE as in:
http://api.marketstack.com/v1/eod?access_key=myKey&symbols=CHR.XCSE
it works like a charm!
Documentation states:
interval | [Optional] Specify your preferred data interval. Available values: 1min, 5min, 10min, 15min, 30min, 1h (Default), 3h, 6h, 12h and 24h.
But 1h, 3h etc does not work. You need to supply 1hour, 3hour etc.
https://api.marketstack.com/v1/intraday?sort=DESC&limit=2&offset=0&access_key= YOUR_ACCESS_KEY&interval=24h&date_from=2020-07-22&date_to=2020-07-23&symbols=AAPL
{ "error": { "code": "validation_error", "message": "Request failed with validation error", "context": [ { "key": "interval", "message": "[Optional] Specify your preferred data interval. Available values: 1min, 5min, 10min, 15min, 30min, 1h (Default), 3h, 6h, 12h and 24h" } ] } }
There has been no data from Nasdaq Copenhagen the 18th of october 2023.
There are from USA, is this a technical issue or financial one ?
Hey! I just tried out the free API of marketstack. I got the intraday prices of AAPL, MSFT. I am interested in getting the prices of shares in National Stock Exchange of India (NSE). The symbol listed in the marketstack stock search site is SBIN.XNSE. I tried out my link like this
http://api.marketstack.com/v1/intraday?access_key=ACCESSKEY&symbols=HDFCBANK.XNSE
It is returning
{"error":{"code":"no_valid_symbols_provided","message":"At least one valid symbol must be provided"}}
Can someone help?
I'm trying to fetch an ASX symbol:
http://api.marketstack.com/v1/eod/latest?access_key=KEY&symbols=CBA.XASX
However, the date is 3 months behind:
{
"pagination": {
"limit": 100,
"offset": 0,
"count": 1,
"total": 1
},
"data": [
{
"open": 82.51,
"high": 82.55,
"low": 81.72,
"close": 82.08,
"volume": 1479288,
"adj_high": null,
"adj_low": null,
"adj_close": 82.08,
"adj_open": null,
"adj_volume": null,
"split_factor": 1,
"symbol": "CBA.XASX",
"exchange": "XASX",
"date": "2021-02-22T00:00:00+0000"
}
]
}
I've tried to fetch with specific dates:
http://api.marketstack.com/v1/tickers/CBA.XASX/eod/2021-05-22?access_key=KEY
But again, nothing?
It seems strange that it's exactly 3 months behind. My only guess is that it's because I'm on a free plan. I don't see any information stating that ASX tickers are 3 months behind.
Whenever I pull candles, it's delivered with the first candle last in the array.
I invite you to contribute my library: https://github.com/orshe4/marketstack
It supports receiving a full response from the API by sending several requests in parallel(with different offsets) and combining them
It also published as a NuGet package
The tickers from the Tokyo Stock Exchange (XTKS) are missing on 22 August. I hope this is a temporary glitch. Please confirm.
Hello,
Are there any examples on how to create a graph line as shown in the SVG taken from the home page... HTML or otherwise?
https://marketstack.com/site_images/hero_widgets.svg
Thanks
I'm using candle.adj_close
and still it seems to be broken.
Here's the last few days of data from AAPL
adj_close | close |
---|---|
132.76 | 132.76 |
127.58 | 127.58 |
504.05 | 504.05 |
508.57 | 508.57 |
504.7165 | 504.7165 |
498.79 | 498.79 |
514.79 | 514.79 |
477.05 | 477.05 |
463 | 463 |
463.933 | 463.933 |
457.41 | 457.41 |
464.25 | 464.25 |
459.315 | 459.315 |
457.72 | 457.72 |
441.99 | 441.99 |
447.875 | 447.875 |
450.4 | 450.4 |
452.82 | 452.82 |
441.62 | 441.62 |
437.51 | 437.51 |
436.53 | 436.53 |
432.8 | 432.8 |
411.535 | 411.535 |
376.75 | 376.75 |
375 | 375 |
377.47 | 377.47 |
374.84 | 374.84 |
363.95 | 363.95 |
387.99 | 387.99 |
386.77 | 386.77 |
396.69 | 396.69 |
385.67 | 385.67 |
387.95 | 387.95 |
386.25 | 386.25 |
395.96 | 395.96 |
379.36 | 379.36 |
389.06 | 389.06 |
381.34 | 381.34 |
385.05 | 385.05 |
376.72 | 376.72 |
375.41 | 375.41 |
370 | 370 |
GET https://api.marketstack.com/v1/exchanges
is giving the list but http://api.marketstack.com/v1/eod?symbols=XNAS.INDX
returns HTTP 422 with error { "error": { "code": "no_valid_symbols_provided", "message": "At least one valid symbol must be provided" } }
It looks like that only DJI.INDX
is working even though it is not listed in exchanges. What am I paying for?
Hi,
I am trying to fetch the realtime stock price but I am getting empty response below URL I have tried:
https://api.marketstack.com/v1/eod/2020-06-24T11:56:24+0000?access_key=YOUR_ACCESS_KEY&symbols=TCS.XNSE
But if I remove the current time and hit the URL then I am getting data till the yesterday only not today's data:
https://api.marketstack.com/v1/eod?access_key=YOUR_ACCESS_KEY&symbols=TCS.XNSE
In the response I am getting many attributes, May i know which attribute represents the real-time price, does adj_open stands for the real-time price?
Please help me, Does market stack returns real-time stock prices? If yes then how
Thanks
Hello, i want to test your API, but when i run specific endpoint, i have oldest data :
http://api.marketstack.com/v1/exchanges/XPAR/eod/latest?access_key=xxxxxxxx&symbols=AIR.XPAR
Give me all eod from XPAr (what i want), but eod date is at the 2020-12-04, last friday.
But if i want all eod from specific symbol, latest data is today :
http://api.marketstack.com/v1/exchanges/XPAR/eod?access_key=xxxxxxxx&symbols=AIR.XPAR
Have you an idea from this mistake ?
Thank you.
Hi there, looks like I am receiving a bad element back from a eod/latest call which normally works fine... Seems to have just started happening. Not sure if its a bad symbol or something I am doing wrong. I am receiving a empty array for one element where I am expecting a eod object. This is breaking the standard deserializer for both RestSharp and Newtonsoft. Are there any suggestions or examples on how to handle this without iterating over each element or using a custom converter. Many thanks in advance!
Example response snip..
{
"open":408.01,
"high":415.94,
"low":407.6,
"close":413.69,
"volume":3774912.0,
"adj_high":null,
"adj_low":null,
"adj_close":413.69,
"adj_open":null,
"adj_volume":null,
"split_factor":1.0,
"symbol":"GS",
"exchange":"XNYS",
"date":"2021-10-18T00:00:00+0000"
},
[
],
{
"open":18.12,
"high":20.3,
"low":17.75,
"close":18.66,
"volume":3579103.0,
"adj_high":null,
"adj_low":null,
"adj_close":18.66,
"adj_open":null,
"adj_volume":null,
"split_factor":1.0,
"symbol":"GWH",
"exchange":"XNYS",
"date":"2021-10-18T00:00:00+0000"
},
I'm making about 10 requests in parallel, but I'm getting error code 429 on some of them. I have Professional subscription. What is the official limit and can it be raised?
There is nothing in documentation about this, it would be useful to mention this as it's important factor to me
Using date_from doesn't get more historical data than excluding the date_from paramater.
Where is the indexes?
There is no endpoint to get index values like:
All the fields in the contact form are filled properly, but I keep getting this error when submitting without any explanation as to what is wrong with my input.
I'm on a free account, but even when using &limit=1000
I'm not receiving more than 250 days of data.
I've purchased one month to try MarketStack Api and I'm mostly focused on current session intraday data.
Queriying popular symbols (AAPL, MSFT), I get plenty of gaps between bars. I don't get a record for every minute, as expected with such active symbols.
I don't think I'm doing anything wrong. The call is pretty straightforward and I'm using the browser to run the query
https://api.marketstack.com/v1/tickers/aapl/intraday/2021-12-01?access_key=XXXXXXXXXXXXXXXXXXX&interval=1min
If I run the same query, starting date yesterday, there are no gaps in the returned data.
The Api is advertised as real time capable, but so far, that's not been my experience.
Today, 2021-12-02 I've run the same request on AAPL, increasing the limit, and the gaps are still there
https://api.marketstack.com/v1/tickers/aapl/intraday/2021-12-01?access_key=XXXXXXXXXXXXXXXXXXX&interval=1min&limit=1000
I also see many bars returning 'null' in their close value.
Furthermore, I've compared a specific bar with the information in Interactive Brokers and Yahoo Finance, and the results don't match. I've been careful comparing the date (UTC in MarketStack) and Eastern/US in said platforms.
I don't see how this is usable
Im testing your API, but can not receive any EndOfDay data for Russian tickers (for example "SBER.MISX", "GAZP.MISX"). No errors, just receive empty array. Same tickers on other exchanges are ok ("SBER.XLON", "GAZP.XLON").
Hi - I have been using the MarketStack eod API to get historical information about a series of tickers. The data seems to be OK for basic company tickers, but I am getting unexpected results for tickers for ETFs and other aggregates. In particular, for the following ETF tickers, when I call the MarketStack API I only get a subset of the ticker's history. See the list below for the history that should be available and what I actually get back from MarketStack. Below that list is the Python function that I use to call the MarketStack API. Please let me know if there is something wrong with the way I am calling the API to get the entire history for these ETF tickers.
SPY
ETF available since Feb/1993 (MarketStack API only returns daily data back to June 2, 2020).
https://www.google.com/finance/quote/SPY:NYSEARCA?window=MAX
IVV
ETF available since May/2000 (MarketStack API only returns daily data back to July 18, 2005).
https://www.google.com/finance/quote/IVV:NYSEARCA?window=MAX
VOO
ETF available since Sept/2010 (MarketStack API only returns daily data back to June 2, 2020).
https://www.google.com/finance/quote/VOO:NYSEARCA?window=MAX
URTH
ETF available since Jan/2012 (MarketStack API only returns daily data back to June 2, 2020).
https://www.google.com/finance/quote/URTH:NYSEARCA?window=MAX
Here is the Python function that I am using to invoke the MarketStack API to get historical information about tickers.
def get_close_data(symbol='AAPL.US', api_token='OeAFFmMliFG5orCUuwAKQ8l4WWFQ67YX', from_date = '2021-07-01', to_date = '2021-07-08'):
session = requests.Session()
print("symbol is ",symbol)
print("from_date ",from_date)
print("to_date ", to_date)
base_url = 'http://api.marketstack.com/v1/eod'
#url = 'https://eodhistoricaldata.com/api/div/%s' % symbol
params = {'access_key': api_token,'symbols':symbol,'limit':10000,'date_from':from_date,'date_to':to_date}
r = session.get(base_url, params=params)
ticker_dict = json.loads(r.text)["data"]
if r.status_code == requests.codes.ok:
#print("status OK ")
df = pd.DataFrame.from_dict(ticker_dict, orient='columns')
#df = pd.read_csv(StringIO(r.text), skipfooter=0, parse_dates=[0], index_col=0, engine='python')
return(True, df)
else:
print("status code",str(r.status_code))
print("reason code",str(r.reason))
return(False,"null")
#raise Exception(r.status_code, r.reason, url)
Hi!
I'm trying to download a dataset with intraday historical data, but I do not receive prices older than 2020. I looked directly into the exchange and it has data from 2016, I tried different exchanges with same result and many stocks like TSLA, AMZN, NIO...
(Using Python and Marketstack Basic level — supporting intraday data and up to 10 years of historical data.)
Code for TSLA:
url = 'http://api.marketstack.com/v1/intraday'
params = {
'access_key': '*******************************',
'symbols': 'TSLA',
'interval': '12hour',
'exchange': 'IEXG',
'date_from': '2015-06-10',
'date_to': '2020-06-10',
'limit': '1000'
}
api_result = requests.get(url, self.params)
json respose:
{'pagination': {'limit': 1000, 'offset': 0, 'count': 5, 'total': 5}, 'data': [{'open': 940.01, 'high': 954.4399, 'low': 923.931, 'last': 940.67, 'close': 949.92, 'volume': 11220734.0, 'date': '2020-06-10T00:00:00+0000', 'symbol': 'TSLA', 'exchange': 'IEXG'} ... ... {'open': 858.0, 'high': 899.0, 'low': 854.1, 'last': 898.1, 'close': 835.0, 'volume': 15085297.0, 'date': '2020-06-02T00:00:00+0000', 'symbol': 'TSLA', 'exchange': 'IEXG'}]}
Thanks in advance!
This weekend Oslo Børs was moved to Euronexts trading platform. As a consequence, some tickers were changed, these changes are not implemented in the market stack API. For instance using the correct ticker BOUV.XOSL for the company Bouvet ASA I do not get a result, and using the old ticker I only receive data from before the change. See examples of batch requests below, where I request one security where the ticker remains unchanged (SVEG.XOSL), and either BOUV.XOSL or BOUVET.XOSL. The list of changed tickers can be found here: https://newsweb.oslobors.no/message/519215
curl "http://api.marketstack.com/v1/eod/latest?access_key=<redacted>&symbols=BOUV.XOSL,SVEG.XOSL" > result.json
{
"pagination": {
"limit": 100,
"offset": 0,
"count": 1,
"total": 0
},
"data": [
{
"open": 68.5,
"high": 68.8,
"low": 67.4,
"close": 68.2,
"volume": 45251.0,
"adj_high": null,
"adj_low": null,
"adj_close": 68.2,
"adj_open": null,
"adj_volume": null,
"symbol": "SVEG.XOSL",
"exchange": "XOSL",
"date": "2020-11-30T00:00:00+0000"
}
]
}
curl "http://api.marketstack.com/v1/eod/latest?access_key=<redacted>&symbols=BOUVET.XOSL,SVEG.XOSL" > result_old.json
{
"pagination": {
"limit": 100,
"offset": 0,
"count": 2,
"total": 0
},
"data": [
{
"open": 620.0,
"high": 644.0,
"low": 618.0,
"close": 640.0,
"volume": 7595.0,
"adj_high": null,
"adj_low": null,
"adj_close": 640.0,
"adj_open": null,
"adj_volume": null,
"symbol": "BOUVET.XOSL",
"exchange": "XOSL",
"date": "2020-11-27T00:00:00+0000"
},
{
"open": 68.5,
"high": 68.8,
"low": 67.4,
"close": 68.2,
"volume": 45251.0,
"adj_high": null,
"adj_low": null,
"adj_close": 68.2,
"adj_open": null,
"adj_volume": null,
"symbol": "SVEG.XOSL",
"exchange": "XOSL",
"date": "2020-11-30T00:00:00+0000"
}
]
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.