Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Fetch stock exchange data from Alpha vantage API using Spark Streaming

avatar
New Member

Hi,

I want to fetch stock exchange data from Alpha vantage API using Spark Streaming.

I used below API which return data in JSON format :

https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=TCS&interval=1min&apikey=apik...

How to fetch continuous streaming of stock exchange data using Spark Streaming Java API.

1 ACCEPTED SOLUTION

avatar

@priyal patel You may want to look at creating a custom receiver for that rest endpoint:

http://spark.apache.org/docs/latest/streaming-custom-receivers.html

Another less direct option would be to use Apache Nifi (HDF) to pull the stock exchange into Kafka. Then use Spark Kafka Streaming.

HTH

*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.

View solution in original post

2 REPLIES 2

avatar

@priyal patel You may want to look at creating a custom receiver for that rest endpoint:

http://spark.apache.org/docs/latest/streaming-custom-receivers.html

Another less direct option would be to use Apache Nifi (HDF) to pull the stock exchange into Kafka. Then use Spark Kafka Streaming.

HTH

*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.

avatar
New Member

Hi, @Felix Albani

Thanks.