Using API to get stock prices

  • 1
  • 1
  • Question
  • Updated 2 years ago
  • Answered

I have 5 tickers: MSFT, ORCL, AMZN, GOOGL and AAPL. I want the latest stock price to be queried from any finance site and filled into my Quickbase column. How do I do it. (Ok with using API)


Photo of worldnet51

worldnet51

  • 0 Points

Posted 3 years ago

  • 1
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb
Would this technique be easy to implement with Exchange Rates?
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb
Yes. Visit this link to reach the YQL (Yahoo Query Language) service:

select * from yahoo.finance.xchange where pair in ("EURUSD","GBPUSD")
https://goo.gl/n5MBqg

Perform these three steps:

Select JSON
Uncheck Diagnostics
Click Test

The formatted JSON response will come back like this:

http://pastebin.com/GUZbKr77

You can read this response crossdomain, parse out the conversion rates you need and stuff them into the QuickBase fields on your form. It is much easier than you might think. The code would be under a dozen lines I estimate. I probably have even posted a similar answer in the past (search for YQL).