HERTZ - Oscillating Formula Based Asset

Started by R, May 17, 2017, 07:27:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

R

During the bitUSD GS, don't forget to check out Hertz as an alternative to short 👍


R

Quote from: clockwork on April 13, 2018, 08:49:11 AM
that commit mainly changes the warning/skip levels ets...

seems to be a bigger issue in play here..

Does it work for you?

I've not had any feedback from witnesses regarding hertz integration into xeroc's price feed script, it looks like the pull request has been merged by @xeroc, perhaps blockchaind (rudex) are using this repo and can provide input on this matter? I use the stand alone price feed script for hertz.

xeroc

Quote from: Customminer on April 12, 2018, 07:09:33 PM
I'm not sure why it's not been merged into the master branch yet..

Too busy ... sorry .. will take a look asap

clockwork

that commit mainly changes the warning/skip levels ets...

seems to be a bigger issue in play here..

Does it work for you?

R

Quote from: clockwork on April 12, 2018, 07:50:38 AM
Hey Customminer,

Trying to use: https://github.com/xeroc/bitshares-pricefeed/blob/master/bitshares_pricefeed/examples/hertz.yaml until I sort out my own pricefeed solution and I get the following error:

AssertionError: You cannot provide a 'price' this way

Are there any adjustments needed to the pricefeed code?
Have you implemented this pull request? https://github.com/xeroc/bitshares-pricefeed/pull/32

I'm not sure why it's not been merged into the master branch yet..

clockwork

Hey Customminer,

Trying to use: https://github.com/xeroc/bitshares-pricefeed/blob/master/bitshares_pricefeed/examples/hertz.yaml until I sort out my own pricefeed solution and I get the following error:

AssertionError: You cannot provide a 'price' this way

Are there any adjustments needed to the pricefeed code?


R

Quote from: zapata42 on April 08, 2018, 09:07:28 PM
Quote from: Customminer on April 08, 2018, 01:18:41 AM
@zapata42 just to confirm, your BTS account is 'zapata42', yeah?

Yes, it's my account.

Do you have any news from the witness?

None yet, sent you 2/3 of the bounty & will send the last 1/3 once it's proven working in production.

zapata42

Quote from: Customminer on April 08, 2018, 01:18:41 AM
@zapata42 just to confirm, your BTS account is 'zapata42', yeah?

Yes, it's my account.

Do you have any news from the witness?


R

@zapata42 just to confirm, your BTS account is 'zapata42', yeah?

R

Quote from: zapata42 on March 26, 2018, 09:23:09 PM
I'll contact you or any witnesses in private so we can proceed with more testing.

Witnesses I've contacted requesting btsprice hertz testing:
magicwallet.witness https://bitsharestalk.org/index.php?topic=26069.msg317391#msg317391
witness.hiblockchain https://bitsharestalk.org/index.php?topic=25888.msg317390#msg317390
winex.witness https://bitsharestalk.org/index.php?topic=25831.msg317389#msg317389

Hopefully this works & these 3 witnesses begin publishing Hertz price feeds :)

zapata42

Quote from: Customminer on March 27, 2018, 12:37:32 AM

rate_cny["HERTZ"] = compute_hertz() * rate_cny["USD"]

In the above snippet of code, does rate_cny["USD"] result in the bitCNY:bitUSD rate, or the BTS:bitUSD rate?

If it's not BTS:bitUSD then it will not line up with the other hertz price feeds.

It is: CNY/USD rate (FIAT not bit).

The rates are taken from hq.sina.cn (see btsprice/sina.py).  Yahoo Finance API could be as source also, but the service has been closed by Yahoo. It might worth updating the scripts to get another source of rates like Alpha Vantage API (https://www.alphavantage.co/).. but this is another topic.

The formula does not end here, you have at btsprice/feedprice.py:161
self.price_queue[asset].append(bts_price_in_cny / self.bts_price.rate_cny[asset])

The main work (and difference) of alt's script is to compute 'bts_price_in_cny' from a variety of exchange's _order books_ (not tickers), then compute all other prices using the rate CNY / XXX.
I didn't change this principle, as I think it's the behavior expected by the witnesses are using this script maybe because they trust the BTS/CNY rate more than the others.

This mean the complete formula is:
BTS/CNY / (compute_HERTZ() * CNY/USD)

I hope this is fine.

Do not hesitate to do a review of the pull request. It will be easier to discuss around the code.

Quote from: Customminer on March 27, 2018, 12:37:32 AM

Quote from: zapata42 on March 26, 2018, 09:23:09 PM
I'm not a witness so I can't test the publication. I'll try to setup it on testnet when I will have some time (probably next week).
Let me know if a witness using alt's script is avialable for testing.

I've got the hertz name reserved on testnet, I can provide you price feed publish rights on testnet if you're interested.

In the mean time, there were multiple witnesses on bitsharestalk who stated that they would consider supporting hertz once integrated into btsprice - I'll reach out to them in the next couple days.

I'll contact you or any witnesses in private so we can proceed with more testing.

R

Quote from: zapata42 on March 26, 2018, 09:23:09 PM
An attempt to help you: https://github.com/pch957/btsprice/pull/6

Many thanks, I replied to the pull request before spotting your post here. Once it's been tested as functional I'll release the 750 bitUSD bounty.

Quote from: zapata42 on March 26, 2018, 09:23:09 PM
alt's btsprice use CNY/BTS rate as a base for all the prices, so I'm using it for Hertz/Hero.

rate_cny["HERTZ"] = compute_hertz() * rate_cny["USD"]

In the above snippet of code, does rate_cny["USD"] result in the bitCNY:bitUSD rate, or the BTS:bitUSD rate?

If it's not BTS:bitUSD then it will not line up with the other hertz price feeds.

Quote from: zapata42 on March 26, 2018, 09:23:09 PM
I'm not a witness so I can't test the publication. I'll try to setup it on testnet when I will have some time (probably next week).
Let me know if a witness using alt's script is avialable for testing.

I've got the hertz name reserved on testnet, I can provide you price feed publish rights on testnet if you're interested.

In the mean time, there were multiple witnesses on bitsharestalk who stated that they would consider supporting hertz once integrated into btsprice - I'll reach out to them in the next couple days.

Quote from: zapata42 on March 26, 2018, 09:23:09 PM
I have also started to gather all changes from the community on my repo: https://github.com/Zapata/btsprice/commits/master (WIP)

Thanks, this is well needed!

zapata42

An attempt to help you: https://github.com/pch957/btsprice/pull/6

alt's btsprice use CNY/BTS rate as a base for all the prices, so I'm using it for Hertz/Hero.

I'm not a witness so I can't test the publication. I'll try to setup it on testnet when I will have some time (probably next week).
Let me know if a witness using alt's script is avialable for testing.

I have also started to gather all changes from the community on my repo: https://github.com/Zapata/btsprice/commits/master (WIP)

R

Quote from: Customminer on January 30, 2018, 02:36:53 AM
Really need to create Hertz price feeds for btsprice https://github.com/pch957/btsprice/issues/4

Would anyone be interested in working on this in return for some bitUSD? :D

$750 for Hertz implementation sound tempting? It needs to be pegged to BTS:USD settlement rate (not BTS:CNY).

Use the time() reference instead of pendulum & try to get the BTS:USD rate from existing btsprice functionality (or implement following the existing coding style).

Hertz references:
https://github.com/BTS-CM/scripts/blob/master/hertz-feed.py
https://github.com/grctest/bts_tools/blob/master/bts_tools/feeds.py#L275
https://github.com/grctest/bts_tools/blob/master/bts_tools/feeds.py#L439

Anyone interested in this bounty?