Author Topic: who can tell me what's the GOLD price?  (Read 8784 times)

0 Members and 1 Guest are viewing this topic.

Offline rnglab

  • Full Member
  • ***
  • Posts: 171
    • View Profile
  • BitShares: rnglab
Re: who can tell me what's the GOLD price?
« Reply #30 on: December 28, 2016, 03:02:57 pm »
It may be fair to note that most witnesses have been working practically ad honorem for between one and three years with such a responsability, the most with almost 24/7 avaibility to take care of the network.

Fetching a price sometimes fails due to source API problems. Sometimes it requires small modifications in the script to keep working. Some times the whole logic of the script had to be renewed.

But this is no excuse, we have to fix this asap.

I agree with abit on that stoping a low volume market is better than risking its users and the whole network with wrong feeds.
His decision looks to me as a call for attention.


It looks like only four witnesses are fetching gold and silver prices from sources other than yahoo.

For a fast short term correction, have you tried adding a quandl API key to its URL?





Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4511
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
Re: who can tell me what's the GOLD price?
« Reply #31 on: December 28, 2016, 05:24:14 pm »
Due to unable to provide a forever accurate price feed, or no time to track whether they're correct, I'll stop producing price feeds for assets other than CNY/BTC/USD/EUR and their copies e.g. TUSD. IIRC actually I've never supported the assets with next to zero activity. It's my fault to provide price feeds for them.
maybe we can't stop publish price for GOLD/SILVER unless all short positions quit.
Just let them trigger a black swain event or something similar. We lack of resources, we need to focus on the popular products.
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline kani

  • Full Member
  • ***
  • Posts: 56
    • View Profile
Re: who can tell me what's the GOLD price?
« Reply #32 on: December 28, 2016, 05:38:55 pm »
Just let them trigger a black swain event or something similar. We lack of resources, we need to focus on the popular products.

You want it to black swan just because you don't like it?!?!?!?!

This attitude is NOT okay!!!
My opinions are my own

Turn up the H.E.A.T.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4511
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
Re: who can tell me what's the GOLD price?
« Reply #33 on: December 28, 2016, 05:41:30 pm »
Just FYI Gold price can be get from this link from Yahoo:
http://download.finance.yahoo.com/d/quotes.csv?s=GC=F&f=l1&e=.csv
which stands for COMEX Gold Futures (next month).
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline yvv

  • Hero Member
  • *****
  • Posts: 1186
    • View Profile
Re: who can tell me what's the GOLD price?
« Reply #34 on: December 28, 2016, 05:42:41 pm »
Due to unable to provide a forever accurate price feed, or no time to track whether they're correct, I'll stop producing price feeds for assets other than CNY/BTC/USD/EUR and their copies e.g. TUSD. IIRC actually I've never supported the assets with next to zero activity. It's my fault to provide price feeds for them.
maybe we can't stop publish price for GOLD/SILVER unless all short positions quit.
Just let them trigger a black swain event or something similar. We lack of resources, we need to focus on the popular products.

bitGOLD/bitSILVER are among few actually traded bitassets, and it would be sad if they go down.

Offline Fox

Re: who can tell me what's the GOLD price?
« Reply #35 on: December 28, 2016, 09:02:19 pm »
I have adapted the [member=120]xeroc[/member] developed pricefeed script included within the python-graphenelib repository:
Code: [Select]
https://github.com/xeroc/python-graphenelib
If you are using this script, you may use the steps below as a guide to provide valid feeds for gold and silver.

1.   Edit config.py to remove Yahoo as a feed provider for GOLD and SILVER (Yahoo is not providing a valid USD price at this time)
1.1         Locate the feedsources.Yahoo function
1.2         Comment out the XAU and XAG entries using the hash symbol
Code: [Select]
#"XAU"       : "GOLD",
#"XAG"       : "SILVER",

2.   Ensure Quandl is enable as a feed provider for GOLD and SILVER
Code: [Select]
feedSources["quandl"]    = feedsources.Quandl(datasets={  # You provide a valid API Key or this will fail!
                                                  "GOLD:USD": [
                                                      "WGC/GOLD_DAILY_USD",
                                                      "LBMA/GOLD",
                                                      "PERTH/GOLD_USD_D"
                                                      ],
                                                  "SILVER:USD": [
                                                      "LBMA/SILVER",
                                                      "PERTH/SLVR_USD_D"
                                                      ]
                                                  }
                                              )

3.   Acquire a Quandl API Key
3.1         http://help.quandl.com/article/118-how-do-i-pass-along-my-user-id-or-api-key
3.2         It’s free, but requires a valid email account, GitHub account or other authentication provider

4.   Edit config.py to add your Quandl API Key
Code: [Select]
quandlApiKey = "dsahFHUiewjjd" # This is an invalid API Key. Replace with yours!
5.   Edit feedsources.py to include your Quandl API Key
5.1         Locate the Quandl URL string:
Code: [Select]
url = "https://www.quandl.com/api/v3/datasets/{dataset}.json?start_date={date}.format(5.2         Modify the query string portion of the URL to include your API Key from the config.py file
Code: [Select]
url = "https://www.quandl.com/api/v3/datasets/{dataset}.json?start_date={date}&api_key=" + config.quandlApiKey.format(
These modifications should allow your witness to provide a valid feed for both gold and silver.

I know others are using the scripts from the [member=6601]wackou[/member] provided bts_tools repository:
Code: [Select]
https://github.com/wackou/bts_tools
I quickly glanced at this codebase, but did not locate Quandl as a feed provider.    I will endeavor to scratch together some code for bts_tools as well.

Cheers!
Fox

Witness: fox

Offline 天籁

  • Hero Member
  • *****
  • Posts: 716
    • View Profile
Re: who can tell me what's the GOLD price?
« Reply #36 on: December 29, 2016, 02:09:44 am »
I have adapted the [member=120]xeroc[/member] developed pricefeed script included within the python-graphenelib repository:
Code: [Select]
https://github.com/xeroc/python-graphenelib
If you are using this script, you may use the steps below as a guide to provide valid feeds for gold and silver.

1.   Edit config.py to remove Yahoo as a feed provider for GOLD and SILVER (Yahoo is not providing a valid USD price at this time)
1.1         Locate the feedsources.Yahoo function
1.2         Comment out the XAU and XAG entries using the hash symbol
Code: [Select]
#"XAU"       : "GOLD",
#"XAG"       : "SILVER",

2.   Ensure Quandl is enable as a feed provider for GOLD and SILVER
Code: [Select]
feedSources["quandl"]    = feedsources.Quandl(datasets={  # You provide a valid API Key or this will fail!
                                                  "GOLD:USD": [
                                                      "WGC/GOLD_DAILY_USD",
                                                      "LBMA/GOLD",
                                                      "PERTH/GOLD_USD_D"
                                                      ],
                                                  "SILVER:USD": [
                                                      "LBMA/SILVER",
                                                      "PERTH/SLVR_USD_D"
                                                      ]
                                                  }
                                              )

3.   Acquire a Quandl API Key
3.1         http://help.quandl.com/article/118-how-do-i-pass-along-my-user-id-or-api-key
3.2         It’s free, but requires a valid email account, GitHub account or other authentication provider

4.   Edit config.py to add your Quandl API Key
Code: [Select]
quandlApiKey = "dsahFHUiewjjd" # This is an invalid API Key. Replace with yours!
5.   Edit feedsources.py to include your Quandl API Key
5.1         Locate the Quandl URL string:
Code: [Select]
url = "https://www.quandl.com/api/v3/datasets/{dataset}.json?start_date={date}.format(5.2         Modify the query string portion of the URL to include your API Key from the config.py file
Code: [Select]
url = "https://www.quandl.com/api/v3/datasets/{dataset}.json?start_date={date}&api_key=" + config.quandlApiKey.format(
These modifications should allow your witness to provide a valid feed for both gold and silver.

I know others are using the scripts from the [member=6601]wackou[/member] provided bts_tools repository:
Code: [Select]
https://github.com/wackou/bts_tools
I quickly glanced at this codebase, but did not locate Quandl as a feed provider.    I will endeavor to scratch together some code for bts_tools as well.

Cheers!
Fox
+100%

Offline kani

  • Full Member
  • ***
  • Posts: 56
    • View Profile
Re: who can tell me what's the GOLD price?
« Reply #37 on: December 30, 2016, 03:32:40 pm »
I have adapted the [member=120]xeroc[/member] developed pricefeed script included within the python-graphenelib repository:

<snip>

Cheers!
Fox

Beautiful!  Thank you Fox!

GOLD can be an important asset and is worth supporting.  There are many who choose to hold savings in (real) gold, so having a stable and worthwhile SmartCoin which tracks the value faithfully is important.  Personally, I'd love to see GOLD supported as a method of payment (hello BLOCKPAY), or available on those crypto-credit-cards.
My opinions are my own

Turn up the H.E.A.T.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Re: who can tell me what's the GOLD price?
« Reply #38 on: December 31, 2016, 04:24:23 am »
10 days have passed,
I will remove my vote for the witness who can't give a reasonable price before 2017.1.1 UTC 00:00:00

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Re: who can tell me what's the GOLD price?
« Reply #39 on: January 01, 2017, 10:34:28 am »
10 days have passed,
I will remove my vote for the witness who can't give a reasonable price before 2017.1.1 UTC 00:00:00
removed my vote to these witness: in.abit verbaltech2 wackou abc123 xman harvey-xts

Offline wackou

Re: who can tell me what's the GOLD price?
« Reply #40 on: January 05, 2017, 09:53:09 am »
I have now updated the feed price for gold from yahoo to use the correct value from here:
http://download.finance.yahoo.com/d/quotes.csv?s=GC=F&f=l1&e=.csv
as suggested by abit. This is implemented in the recently published version 0.4.5 of the bts_tools, which my witness now uses to publish adjusted feeds.

I plan a deeper refactoring of the feed script that will make it more efficient, more stable and more decentralized (esp. the reliance on yahoo), but that'll take a couple of weeks. Stay tuned!

Please vote for witness wackou! More info at http://digitalgaia.io

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Re: who can tell me what's the GOLD price?
« Reply #41 on: January 05, 2017, 12:40:21 pm »
16 days have passed, the price still wrong.
and there are 374 SILVER margin call just a moment ago
here is the feed price:

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4511
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
Re: who can tell me what's the GOLD price?
« Reply #42 on: January 06, 2017, 10:15:41 pm »
For those who may have interest, a relatively "more correct" silver price can be get from Yahoo via this link:
http://download.finance.yahoo.com/d/quotes.csv?s=SI=F&f=l1&e=.csv
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4511
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
Re: who can tell me what's the GOLD price?
« Reply #43 on: January 07, 2017, 12:33:42 am »
I'm now publishing price feeds for GOLD/SILVER again. [member=4465]alt[/member] please check.
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Re: who can tell me what's the GOLD price?
« Reply #44 on: January 07, 2017, 12:46:47 am »
thanks, you have my vote
I'm now publishing price feeds for GOLD/SILVER again. [member=4465]alt[/member] please check.