BitShares Forum

Main => Technical Support => Topic started by: abit on December 04, 2015, 03:32:25 pm

Title: Issue with price feed script
Post by: abit on December 04, 2015, 03:32:25 pm
@xeroc I'm using your latest script with this config:
Code: [Select]
...
                   "CNY" : {
                       "metric" : "weighted",
                       "sources" : ["btc38",
                                    "yunbi",
                                    "huobi",
                                    "btcchina",
                                    "okcoin",
                                   ]
                   }
...
feedSources["yunbi"]    = feedsources.Yunbi(allowFailure=True,scaleVolumeBy=0.3)
feedSources["btc38"]    = feedsources.Btc38(allowFailure=True)
feedSources["btcchina"] = feedsources.BtcChina(allowFailure=True,scaleVolumeBy=0.2)
feedSources["okcoin"]   = feedsources.Okcoin(allowFailure=True,scaleVolumeBy=0.2)
feedSources["huobi"]    = feedsources.Huobi(allowFailure=True,scaleVolumeBy=0.2)
But the price of BTS/CNY is usually 5% higher than normal (e.g. result=0.023, should be 0.022)
After I disabled bts/btc pairs of btc38 and yunbi, then the result looks fine.

Since volumes of bts/btc on btc38 and yunbi are far less than those of bts/cny (about 1:1000), I don't know why the weighted result is so far from the bts/cny price only (even though price of bts/btc is somehow higher).
Title: Re: Issue with price feed script
Post by: cube on December 05, 2015, 02:30:04 am
But the price of BTS/CNY is usually 5% higher than normal (e.g. result=0.023, should be 0.022)
After I disabled bts/btc pairs of btc38 and yunbi, then the result looks fine.

We have tested the script with btc in both btc38 and yunbi using weighted and it was alright.  The weighted mode should adjust according to the volume with net result being the same. This was what we have seen.
Title: Re: Issue with price feed script
Post by: abit on December 07, 2015, 07:12:07 pm
But the price of BTS/CNY is usually 5% higher than normal (e.g. result=0.023, should be 0.022)
After I disabled bts/btc pairs of btc38 and yunbi, then the result looks fine.

We have tested the script with btc in both btc38 and yunbi using weighted and it was alright.  The weighted mode should adjust according to the volume with net result being the same. This was what we have seen.
Maybe it's caused by the "scaleVolumeBy" parameter? The example doesn't use this parameter.