Author Topic: publish feed price automatic(From BitSuperLab)  (Read 40674 times)

0 Members and 1 Guest are viewing this topic.

Offline CalabiYau

ok, support param ALL now,   not support these 4 assets for now: PTS, PPC, LTC, WTI

Works o.k. for me, thank you alt

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Also I modified the code to average also over poloniex and bitrex .. and doe some other stuff differently. ..

Offline bitder

  • Full Member
  • ***
  • Posts: 65
    • View Profile
If all the delegates are using alt's code doesn't that sort of defeat the purpose? I guess we could modify his source to use different sources...but there aren't a lot to choose from I guess.

The delegates are sampling and updating at different times so the overall median price feed should track the sampled data source (with a lag that's dependent on how frequently the delegates as a group updates the feed).
Obviously, the more delegates sampling the data source and publishing feeds the closer it will track the sampled source.
http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem

wallet_account_set_approval delegate.bitder 1

Offline Riverhead

ok, support param ALL now, 

Thanks for the script, alt.
I'm using ./btsx_feed_auto.py ALL now


If all the delegates are using alt's code doesn't that sort of defeat the purpose? I guess we could modify his source to use different sources...but there aren't a lot to choose from I guess.

Offline bitder

  • Full Member
  • ***
  • Posts: 65
    • View Profile
ok, support param ALL now, 

Thanks for the script, alt.
I'm using ./btsx_feed_auto.py ALL now
wallet_account_set_approval delegate.bitder 1

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
we are still missing ~20 feeds for GLD to open up!

Offline svk

Great stuff alt, I can confirm it works with ALL :)

This should greatly increase the number of feeds available!
Worker: dev.bitsharesblocks

Offline maqifrnswa

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
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 Riverhead


Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
ok, support param ALL now,   not support these 4 assets for now: PTS, PPC, LTC, WTI
Code: [Select]
alt@alt-ThinkPad-T430s ~/workspace/bitsuperlab/btsxfeed $ ./btsx_feed_auto.py ALL                                                                                       
Fetch: rate  PTS 0.0
Fetch: rate  PPC 0.0
Fetch: rate  LTC 0.0
Fetch: rate  BTC 2917.2368
Fetch: rate  WTI 0.0
Fetch: rate  SLV 114.3235
Fetch: rate  GLD 7620.2324
Fetch: rate  TRY 2.7861
Fetch: rate  SGD 4.8803
Fetch: rate  HKD 0.7949
Fetch: rate  RUB 0.1606
Fetch: rate  SEK 0.8669
Fetch: rate  NZD 5.0439
Fetch: rate  CNY 1.0
Fetch: rate  MXN 0.466
Fetch: rate  CAD 5.5776
Fetch: rate  CHF 6.5943
Fetch: rate  AUD 5.5718
Fetch: rate  GBP 10.0058
Fetch: rate  JPY 0.0576
Fetch: rate  EUR 7.9777
Fetch: rate  USD 6.161

================= 20140916T104454 ==================

Warning: can't get price of PTS
Warning: can't get price of PPC
Warning: can't get price of LTC
Fetch: BTC [6.87e-05, 6.975779271672426e-05, 6.945e-05, 7.088900016618466e-05] ,median: 6.97577927167e-05 ,change: 0.0 %
Warning: can't get price of WTI
Fetch: SLV [0.0017800364754403076, 0.0018089019317987993] ,median: 0.0018089019318 ,change: 0.0 %
Fetch: GLD [2.6705222271173776e-05, 2.7138279929625246e-05] ,median: 2.71382799296e-05 ,change: 0.0 %
Fetch: TRY [0.07304116865869854, 0.07422562004235311] ,median: 0.0742256200424 ,change: 0.0 %
Fetch: SGD [0.041698256254738435, 0.04237444419400447] ,median: 0.042374444194 ,change: 0.0 %
Fetch: HKD [0.25600704491130954, 0.260158510504466] ,median: 0.260158510504 ,change: 0.0 %
Fetch: RUB [1.2671232876712328, 1.2876712328767124] ,median: 1.28767123288 ,change: 0.0 %
Fetch: SEK [0.2347444918675741, 0.2385511593032645] ,median: 0.238551159303 ,change: 0.0 %
Fetch: NZD [0.040345764190408216, 0.04100001982592835] ,median: 0.0410000198259 ,change: 0.0 %
Fetch: CNY [0.2035, 0.2035, 0.2068, 0.2068] ,median: 0.2068 ,change: 0.0 %
Fetch: MXN [0.436695278969957, 0.44377682403433477] ,median: 0.443776824034 ,change: 0.0 %
Fetch: CAD [0.036485226620768786, 0.03707687894434882] ,median: 0.0370768789443 ,change: 0.0 %
Fetch: CHF [0.030859985138680376, 0.03136041733011844] ,median: 0.0313604173301 ,change: 0.0 %
Fetch: AUD [0.03652320614523134, 0.037115474352991853] ,median: 0.037115474353 ,change: 0.0 %
Fetch: GBP [0.02033820384177177, 0.020668012552719422] ,median: 0.0206680125527 ,change: 0.0 %
Fetch: JPY [3.532986111111111, 3.590277777777778] ,median: 3.59027777778 ,change: 0.0 %
Fetch: EUR [0.02550860523709841, 0.025922258294997308] ,median: 0.025922258295 ,change: 0.0 %
Fetch: USD [0.033030352215549424, 0.033565979548774556] ,median: 0.0335659795488 ,change: 0.0 %
Update: delegate.baozi [['BTC', 6.975779271672426e-05], ['SLV', 0.0018089019317987993], ['GLD', 2.7138279929625246e-05], ['TRY', 0.07422562004235311], ['SGD', 0.04237444419400447], ['HKD', 0.260158510504466], ['RUB', 1.2876712328767124], ['SEK', 0.2385511593032645], ['NZD', 0.04100001982592835], ['CNY', 0.2068], ['MXN', 0.44377682403433477], ['CAD', 0.03707687894434882], ['CHF', 0.03136041733011844], ['AUD', 0.037115474352991853], ['GBP', 0.020668012552719422], ['JPY', 3.590277777777778], ['EUR', 0.025922258294997308], ['USD', 0.033565979548774556]]

Offline Riverhead


could it accept the command line arg "ALL""
Code: [Select]
./btsx_feed_auto.py ALL
where all would do all available feeds? Now that we have the green light to fire up more markets and there is no cost to do additional feeds, we don't need to be picky any more.
+5% +5% +5%

Offline maqifrnswa

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
I'm using it, it works!

could it accept the command line arg "ALL""
Code: [Select]
./btsx_feed_auto.py ALL
where all would do all available feeds? Now that we have the green light to fire up more markets and there is no cost to do additional feeds, we don't need to be picky any more.
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 Riverhead

thanks, I have update the script to use wallet_publish_feeds

Awesome!

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
thanks, I have update the script to use wallet_publish_feeds

Xeldal

  • Guest
From another thread. If you havn't already seen it.

@xeroc:
It took me some trial and error before I could work out the proper syntax.  Here is my latest update:
Code: [Select]
wallet_publish_feeds fox [["USD",0.0341],["CNY",0.2040]]