BitShares Forum

Main => General Discussion => Topic started by: eagleeye on May 29, 2015, 08:13:25 am

Title: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: eagleeye on May 29, 2015, 08:13:25 am
I need to know where I go to get the price feed scripts, I want to get this up.

I want a price feed for the index whereby every 15 minutes we grab the feed from https://www.google.com/finance?q=SHA%3A000001&ei=0R5oVYHfCoKRiQK5lYHADg

I also want to get a price feed up for Hong Kong Stock Index (Hang Seng Stock Exchange Index) https://www.google.com/finance?q=INDEXHANGSENG%3AHSI&ei=0R5oVYHfCoKRiQK5lYHADg

Can someone guide me?
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: xeroc on May 29, 2015, 08:18:52 am
with the current BitShares implementation you need to ask delegates to do this .. and implement pulling those indices ..

however, I don't think pulling from finance.google.com complies with their terms ..
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: eagleeye on May 29, 2015, 08:24:04 am
with the current BitShares implementation you need to ask delegates to do this .. and implement pulling those indices ..

however, I don't think pulling from finance.google.com complies with their terms ..

Where do I go in the code to get the implementation of the price feeds.

If we make the feeds rip once every 15 minutes or 5 minutes its probably not that big of a nusance for them.  There are other places to get the feed like http://www.bloomberg.com/quote/SHCOMP:IND they probably dont mind.
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: monsterer on May 29, 2015, 08:24:45 am
however, I don't think pulling from finance.google.com complies with their terms ..

This. Google will ban the IP address of the delegate if you try to scrape their feeds.
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: eagleeye on May 29, 2015, 08:27:57 am
however, I don't think pulling from finance.google.com complies with their terms ..

This. Google will ban the IP address of the delegate if you try to scrape their feeds.

We are getting bitGOLD somehow.  I dont see how come we cant overcome this, we need to get to yes instead of no's.  How about this site http://english.sse.com.cn/ directly from the Shanghai Stock Exchange?
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: xeroc on May 29, 2015, 08:50:45 am
This is the script I use for the bitassets price feeds:

https://github.com/xeroc/bitshares-pytools/blob/master/delegate-feed/main.py
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: eagleeye on May 29, 2015, 08:53:29 am
This is the script I use for the bitassets price feeds:

https://github.com/xeroc/bitshares-pytools/blob/master/delegate-feed/main.py

The price feeds were are getting for bitGOLD must be scraped together.  We should be able to do this for Shanghai Stock Exchange Index.
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: monsterer on May 29, 2015, 08:53:58 am
We are getting bitGOLD somehow.  I dont see how come we cant overcome this, we need to get to yes instead of no's.  How about this site http://english.sse.com.cn/ directly from the Shanghai Stock Exchange?

Gold come from yahoo's feed. If you can find a ticker from an API for the indexes you want to run, that would be the best way - even if they are 15 min delayed...
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: eagleeye on May 29, 2015, 09:04:27 am
We are getting bitGOLD somehow.  I dont see how come we cant overcome this, we need to get to yes instead of no's.  How about this site http://english.sse.com.cn/ directly from the Shanghai Stock Exchange?

Gold come from yahoo's feed. If you can find a ticker from an API for the indexes you want to run, that would be the best way - even if they are 15 min delayed...

Here it is https://ca.finance.yahoo.com/q?s=000001.SS , from your logic, we can do this.  Lets get this up and running and watch the market cap approach $20 billion USD in 3 - 6 months.
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: eagleeye on May 29, 2015, 09:05:23 am
Im going to need to get the delegates on board, how do I do this?

If we do this, it will be huge.
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: xeroc on May 29, 2015, 09:12:38 am
Im going to need to get the delegates on board, how do I do this?

If we do this, it will be huge.
Easierst would be to present a patch to the existing price feed scripts and "campaign" for delegate support in a separated forum thread ..
only need 51 delegates publishing the price at least once every 24h
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: monsterer on May 29, 2015, 09:16:59 am
First of all, you'll want to create an MPA for SHANGHAI, before some dumb name camper creates a UIA for it. If you're going to campaign the delegates, best to get feeds for as many indicies as you can, I have already created some MPAs for this purpose:

http://www.bitsharesblocks.com/asset/orderbook?asset=HANGSENG
http://www.bitsharesblocks.com/asset/orderbook?asset=NASDAQC
http://www.bitsharesblocks.com/asset/orderbook?asset=NIKKEI

That way you only have to campaign once for them to update their feeds, rather than every single time you add an index.



Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: ebit on May 29, 2015, 09:35:32 am
 +5%
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: mint chocolate chip on May 29, 2015, 10:18:56 am
First of all, you'll want to create an MPA for SHANGHAI, before some dumb name camper creates a UIA for it. If you're going to campaign the delegates, best to get feeds for as many indicies as you can, I have already created some MPAs for this purpose:

http://www.bitsharesblocks.com/asset/orderbook?asset=HANGSENG
http://www.bitsharesblocks.com/asset/orderbook?asset=NASDAQC
http://www.bitsharesblocks.com/asset/orderbook?asset=NIKKEI

That way you only have to campaign once for them to update their feeds, rather than every single time you add an index.
How much is it again to create an MPA, I think it is rather expensive.
Title: Re: Im looking to accomplish a price feed for - Shanghai Stock Exchange Index
Post by: monsterer on May 29, 2015, 10:23:15 am
How much is it again to create an MPA, I think it is rather expensive.

Same price as a UIA.