Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: USD, BTC, GLD price feeds....  (Read 1496 times)

Offline bytemaster

USD, BTC, GLD price feeds....
« on: July 27, 2014, 08:51:33 PM »

Can someone put together a python script that will fetch the BTC, USD, and GLD price of BTSX and then generate an RPC call to publish that feed. 

Ideally the data would be from as many different sources as possible.

The RPC call that you will want to call is:

wallet_publish_price_feed ${DELEGATE} ${PRICE} USD
wallet_publish_price_feed ${DELEGATE} ${PRICE} GLD
wallet_publish_price_feed ${DELEGATE} ${PRICE} BTC

Where ${PRICE} is USD PER BTSX


For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bitmeat

  • Hero Member
  • *****
  • Posts: 1116
    • View Profile
Re: USD, BTC, GLD price feeds....
« Reply #1 on: July 28, 2014, 04:37:10 AM »
As it turns out I have already written some code very close to your ask. Only have BTC/USD (sourced from coinbase/bitstamp API) and BTC/BTSX from BTER for the moment.

If you point me to free public feeds with GLD I can incorporate that as well.

Also, already have done integration to the wallet with the RPCJSON (I posted it in another thread)

---

Any terms on the bounty itself?


Offline bitmeat

  • Hero Member
  • *****
  • Posts: 1116
    • View Profile
Re: USD, BTC, GLD price feeds....
« Reply #2 on: July 28, 2014, 05:02:03 AM »
This claims to have free anonymous calls up to 50 times/day.

Not sure it's worth the effort but for documenting purposes:

http://www.quandl.com/help/api


UPDATE: more specifically Historical Bundesbank here:

http://www.quandl.com/api/v1/datasets/BUNDESBANK/BBK01_WT5511.json?trim_start=1968-04-01&trim_end=2014-07-25

« Last Edit: July 28, 2014, 05:05:42 AM by happypatty »

Offline bytemaster

Re: USD, BTC, GLD price feeds....
« Reply #3 on: July 28, 2014, 12:12:48 PM »
As it turns out I have already written some code very close to your ask. Only have BTC/USD (sourced from coinbase/bitstamp API) and BTC/BTSX from BTER for the moment.

If you point me to free public feeds with GLD I can incorporate that as well.

Also, already have done integration to the wallet with the RPCJSON (I posted it in another thread)

---

Any terms on the bounty itself?

I am accepting proposals on what people think is fair.  Just need something opensource and easy to use.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bitmeat

  • Hero Member
  • *****
  • Posts: 1116
    • View Profile
Re: USD, BTC, GLD price feeds....
« Reply #4 on: July 28, 2014, 02:22:36 PM »
I'm offering to fully develop and maintain this important component until launch for 500K BTSX total (~7BTC).
Naturally others will offer to do it for way less, but I offer top quality and maintenance. It is also not worth my time for less than that I wish it was.

I would also recommend that various other pieces are included such as liquidity and spread at volume X.

e.g. if buying 50K BTSX for 0.7BTC is possible as per the order book, buying 1M BTSX for 14BTC may not be, this may actually cost 20BTC.
Also the median price for the order book at that volume may be different than the center of the spread.

UPDATE: e.g. look at bitcoinwisdom orderbook chart:



Notice how the median price is going up if you take into account the volume in the order book.
« Last Edit: July 28, 2014, 02:27:51 PM by happypatty »

Offline luckybit

Re: USD, BTC, GLD price feeds....
« Reply #5 on: July 28, 2014, 07:45:06 PM »
I'm offering to fully develop and maintain this important component until launch for 500K BTSX total (~7BTC).
Naturally others will offer to do it for way less, but I offer top quality and maintenance. It is also not worth my time for less than that I wish it was.

I would also recommend that various other pieces are included such as liquidity and spread at volume X.

e.g. if buying 50K BTSX for 0.7BTC is possible as per the order book, buying 1M BTSX for 14BTC may not be, this may actually cost 20BTC.
Also the median price for the order book at that volume may be different than the center of the spread.

UPDATE: e.g. look at bitcoinwisdom orderbook chart:



Notice how the median price is going up if you take into account the volume in the order book.

Can you post some of your code somewhere so we can have a look at it? I've been thinking along the same direction recently.
« Last Edit: July 28, 2014, 07:47:14 PM by luckybit »
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline AEcharts

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: USD, BTC, GLD price feeds....
« Reply #6 on: August 12, 2014, 10:47:07 PM »
Hello, I am new here. I have just discovered BitShares a few hours ago, read a few of the wiki pages and BitShares seems to have some interesting ideas. Because I am soo new I may not be understanding the request completely, but have described what I could provide below.

What I could provide is a data visualization of the correlation and/or cointegration between two different time series over an n period moving window. The data visualization could be in either PNG, SVG or PDF format. Just the data could also be provided in JSON or CSV format to be used for constructing trade logic. This could be done using a simple HTTP/HTTPS RPC or API call. The caller would supply the trade pair, n period moving window and what time resolution to use (eg. 5 minute, 1 hour, etc). The service would respond with either an image format or data depending on the suffix of the requested file (eg. .png, .svg, .json, etc).

I would like to implement this service as a way to get involved in the BitShares platform.

I just need to know how we could get started with this?

Offline maqifrnswa

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
Re: USD, BTC, GLD price feeds....
« Reply #7 on: August 12, 2014, 11:54:01 PM »
Hello, I am new here. I have just discovered BitShares a few hours ago, read a few of the wiki pages and BitShares seems to have some interesting ideas. Because I am soo new I may not be understanding the request completely, but have described what I could provide below.

What I could provide is a data visualization of the correlation and/or cointegration between two different time series over an n period moving window. The data visualization could be in either PNG, SVG or PDF format. Just the data could also be provided in JSON or CSV format to be used for constructing trade logic. This could be done using a simple HTTP/HTTPS RPC or API call. The caller would supply the trade pair, n period moving window and what time resolution to use (eg. 5 minute, 1 hour, etc). The service would respond with either an image format or data depending on the suffix of the requested file (eg. .png, .svg, .json, etc).

I would like to implement this service as a way to get involved in the BitShares platform.

I just need to know how we could get started with this?

that sounds great but a little overkill for what bytemaster is asking. Basically the market can be bootstrapped if delegates inform the market as to what a "fair" price is. One could go to different exchanges and type the command in themselves based on what they saw on the website, or someone can use a python script to scrape the web (like you're doing) and then the script can submit the following commands to the bitshares client:

wallet_publish_price_feed ${DELEGATE} ${PRICE} USD
wallet_publish_price_feed ${DELEGATE} ${PRICE} GLD
wallet_publish_price_feed ${DELEGATE} ${PRICE} BTC

It's pretty simple, just will take some time to get it working right. You can then set up a cron job to keep it up to date.

so, he's looking for a simple python script:
1) scrape websites/grab json feeds/do whatever you need to do to get an accurate price quote at this moment (no history required)
2) send an RPC command with that information to a running bitshares client
maintains an Ubuntu PPA: https://launchpad.net/~showard314/+archive/ubuntu/bitshares [15% delegate] wallet_account_set_approval maqifrnswa true [50% delegate] wallet_account_set_approval delegate1.maqifrnswa true

Offline bytemaster

Re: USD, BTC, GLD price feeds....
« Reply #8 on: August 13, 2014, 12:25:18 AM »
Hello, I am new here. I have just discovered BitShares a few hours ago, read a few of the wiki pages and BitShares seems to have some interesting ideas. Because I am soo new I may not be understanding the request completely, but have described what I could provide below.

What I could provide is a data visualization of the correlation and/or cointegration between two different time series over an n period moving window. The data visualization could be in either PNG, SVG or PDF format. Just the data could also be provided in JSON or CSV format to be used for constructing trade logic. This could be done using a simple HTTP/HTTPS RPC or API call. The caller would supply the trade pair, n period moving window and what time resolution to use (eg. 5 minute, 1 hour, etc). The service would respond with either an image format or data depending on the suffix of the requested file (eg. .png, .svg, .json, etc).

I would like to implement this service as a way to get involved in the BitShares platform.

I just need to know how we could get started with this?

that sounds great but a little overkill for what bytemaster is asking. Basically the market can be bootstrapped if delegates inform the market as to what a "fair" price is. One could go to different exchanges and type the command in themselves based on what they saw on the website, or someone can use a python script to scrape the web (like you're doing) and then the script can submit the following commands to the bitshares client:

wallet_publish_price_feed ${DELEGATE} ${PRICE} USD
wallet_publish_price_feed ${DELEGATE} ${PRICE} GLD
wallet_publish_price_feed ${DELEGATE} ${PRICE} BTC

It's pretty simple, just will take some time to get it working right. You can then set up a cron job to keep it up to date.

so, he's looking for a simple python script:
1) scrape websites/grab json feeds/do whatever you need to do to get an accurate price quote at this moment (no history required)
2) send an RPC command with that information to a running bitshares client

Other requirements:   It should only run once per day or when the price changes by more than 10%.  It should never publish bogus data, so should probably have some redundant checks.   
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bitmeat

  • Hero Member
  • *****
  • Posts: 1116
    • View Profile
Re: USD, BTC, GLD price feeds....
« Reply #9 on: August 13, 2014, 12:37:31 AM »
Have you decided on what the reward for this bounty is?

Offline bytemaster

Re: USD, BTC, GLD price feeds....
« Reply #10 on: August 13, 2014, 01:43:01 AM »
Have you decided on what the reward for this bounty is?

I'll judge based upon the robustness of the solution as well as the variety of assets supported.   Any delegates want to pledge any support for this?    I would suggest the bounty on this should be 25% of the delegate pay earned by DACSunLimited while they use your solution.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bitmeat

  • Hero Member
  • *****
  • Posts: 1116
    • View Profile
USD, BTC, GLD price feeds....
« Reply #11 on: August 13, 2014, 01:49:10 AM »
I think having multiple independent solutions would strengthen the network.

Offline bytemaster

Re: USD, BTC, GLD price feeds....
« Reply #12 on: August 13, 2014, 01:58:28 AM »
I think having multiple independent solutions would strengthen the network.

Right...
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline fuzzy

Re: USD, BTC, GLD price feeds....
« Reply #13 on: August 13, 2014, 04:29:29 AM »
Have you decided on what the reward for this bounty is?

I'll judge based upon the robustness of the solution as well as the variety of assets supported.   Any delegates want to pledge any support for this?    I would suggest the bounty on this should be 25% of the delegate pay earned by DACSunLimited while they use your solution.

If we get delegates wanting to help pay the bounty requirements, would you be opposed to giving them time after your Dev Hangout to introduce themselves to the community and let investors know how to vote for them?
BROWNIE==DKP; BitShares is our Community! 
ShareBits Welcome to  the Sharing Economy w/ BeyondBitcoin.org Partners--ShareBits.io & OpenLedger.info
TIP FORMAT: #sharebits "ForumHandleInQuotes" Quanity Token_Name

Offline alt

Re: USD, BTC, GLD price feeds....
« Reply #14 on: August 13, 2014, 05:54:49 AM »
solution from BitSuperLab
https://github.com/Bitsuperlab/operation_tools/tree/master/btsxfeed

fetch btc/cny price from btc38 and bter,  fetch rate from yahoo finance.
for now, you must confirm before update the feed.

 

Google+