Author Topic: Issue with price feed script  (Read 1322 times)

0 Members and 1 Guest are viewing this topic.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
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.
BitShares committee member: abit
BitShares witness: in.abit

Offline cube

  • Hero Member
  • *****
  • Posts: 1404
  • Bit by bit, we will get there!
    • View Profile
  • BitShares: bitcube
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.
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
@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).
BitShares committee member: abit
BitShares witness: in.abit