MATLAB Stock API Example

It’s easy to use our API with MatLab, below you can find a very simple example with explanations for MatLab users.

url = ‘’;

[s,status] = urlread(url,’Timeout’,60);

C = textscan(s, ‘%s%f%f%f%f%f%f’, ‘HeaderLines’, 1, ‘delimiter’, ‘,’, ‘CollectOutput’, 0);


For testing purposes you can use this API Key: api_token=OeAFFmMliFG5orCUuwAKQ8l4WWFQ67YX. Works with AAPL.US only.

As you see, it’s easy to use. Usually, if you used before Yahoo Finance, then URL variable should look like this: ‘…..‘ and basically, all you need is to change the beginning of the URL to ‘‘ and then add your API Key as an additional parameter.

Please note, that it’s better to use HTTP instead of HTTPS for MatLab projects.

Subscribe to API