Stock Market API in Excel – with MarketXLS API -(VBA & Google Sheets)

Stock Market API in Excel – with MarketXLS API -(VBA & Google Sheets)

With MarketXLS Stock Market API, you can use VBA and Javascript code to run access Stock Market API with a few lines of code. You can use any language you want like Python, c# or to create your own applications for any platform (Android, Windows, or Mac). Access all US Historical and live data with very easy to use urls. The result of the API can be obtained in JSON or CSV format. Multiple periodicity is available in case you need Intraday data. Live prices are also available with API Calls.

Below are the sample codes for VBA and google sheets to get Stock Market Data API feed urls….


Sub Test()

Dim objRequest As Object
Dim strResponse As String
Dim blnAsync As Boolean

Set objRequest = CreateObject(“WinHttp.WinHttpRequest.5.1”)
blnAsync = True

With objRequest
.Open “GET”, “”, blnAsync
.setRequestHeader “x-api-key”, “Enter your Key here
strResponse = .responseText

Debug.Print strResponse
Debug.Print .Status
End With

MsgBox strResponse

End Sub

Google Sheets

function MarketXLS(inputurl) {

var headers = {
‘x-api-key’: ‘Your Key here‘ };

var options =
“method” : “get”,
“headers”: headers

var result = JSON.parse(UrlFetchApp.fetch(inputurl, options).getContentText());

return result



API Documentation is available here. MarketXLS Stock Market Data API pricing is available here.

Stock Market Data API