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

0 Members and 1 Guest are viewing this topic.


Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
I have update for bitshares  v0.9
should support both v0.9 and v0.8 now

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi

Offline clayop

  • Hero Member
  • *****
  • Posts: 2033
    • View Profile
    • Bitshares Korea
  • BitShares: clayop
Bitshares Korea - http://www.bitshares.kr
Vote for me and see Korean Bitshares community grows
delegate-clayop

Offline nethyb

  • Full Member
  • ***
  • Posts: 197
    • View Profile
  • BitShares: nethyb
...
Quote
seems rpc call service not available,
can you check if the ip,port,user,password of rpc service is correct?

 +5% Thanks alt...

You got me looking in the right area - turned out I hadn't changed the RPC listening port for the devshares delegate running on the same server! So it was conflicting, probably polling my devshares RPC interface!

Problem resolved.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
I'm getting the following errors on one of my delegates (other is OK strangely) since I've updated the bts client to "v0.5.0" and so I'm unable to publish feeds...

Code: [Select]
Warning: unknown error, can't fetch price
'result'

some of the log results are:

Code: [Select]
2015-01-18 03:45:54,138[ERROR]: Error fetching results from btc38!
2015-01-18 03:45:54,138[ERROR]: Error get price from btc38!
2015-01-18 03:45:57,462[ERROR]: Warning: unknown error, can't fetch price
2015-01-18 03:45:57,462[ERROR]: 'result'
Traceback (most recent call last):
  File "./bts_feed_auto.py", line 197, in <module>
    fetch_price()
  File "./bts_feed_auto.py", line 100, in fetch_price
    price_depth["bts_usd"] = client.get_depth_in_range("USD","BTS", depth_change)
  File "/home/ubuntu/operation_tools/btsfeed/bts.py", line 44, in get_depth_in_range
    price = self.get_price(quote,base)
  File "/home/ubuntu/operation_tools/btsfeed/bts.py", line 234, in get_price
    order = response.json()["result"]
KeyError: 'result'
2015-01-18 04:07:20,687[ERROR]: Warning: unknown error, can't fetch price
2015-01-18 04:07:20,687[ERROR]: 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "./bts_feed_auto.py", line 197, in <module>
    fetch_price()
  File "./bts_feed_auto.py", line 100, in fetch_price
    price_depth["bts_usd"] = client.get_depth_in_range("USD","BTS", depth_change)
  File "/home/ubuntu/operation_tools/btsfeed/bts.py", line 48, in get_depth_in_range
    base_precision =  self.get_precision(base)
  File "/home/ubuntu/operation_tools/btsfeed/bts.py", line 295, in get_precision
    return float(response.json()["result"]["precision"])
TypeError: 'NoneType' object is not subscriptable
2015-01-18 04:08:31,155[ERROR]: Error fetching results from yunbi!
2015-01-18 04:08:31,157[ERROR]: Error get price from yunbi!
2015-01-18 04:08:31,165[ERROR]: Warning: unknown error, can't fetch price
2015-01-18 04:08:31,165[ERROR]: 'result'
Traceback (most recent call last):
  File "./bts_feed_auto.py", line 197, in <module>
    fetch_price()
  File "./bts_feed_auto.py", line 100, in fetch_price
    price_depth["bts_usd"] = client.get_depth_in_range("USD","BTS", depth_change)
  File "/home/ubuntu/operation_tools/btsfeed/bts.py", line 44, in get_depth_in_range
    price = self.get_price(quote,base)
  File "/home/ubuntu/operation_tools/btsfeed/bts.py", line 234, in get_price
    order = response.json()["result"]
KeyError: 'result'

Any ideas? I've completely re-cloned the operations_tools from github and copied my config.json from the working delegate and getting the same results...

seems rpc call service not available,
can you check if the ip,port,user,password of rpc service is correct?

Offline nethyb

  • Full Member
  • ***
  • Posts: 197
    • View Profile
  • BitShares: nethyb
I'm getting the following errors on one of my delegates (other is OK strangely) since I've updated the bts client to "v0.5.0" and so I'm unable to publish feeds...

Code: [Select]
Warning: unknown error, can't fetch price
'result'

some of the log results are:

Code: [Select]
2015-01-18 03:45:54,138[ERROR]: Error fetching results from btc38!
2015-01-18 03:45:54,138[ERROR]: Error get price from btc38!
2015-01-18 03:45:57,462[ERROR]: Warning: unknown error, can't fetch price
2015-01-18 03:45:57,462[ERROR]: 'result'
Traceback (most recent call last):
  File "./bts_feed_auto.py", line 197, in <module>
    fetch_price()
  File "./bts_feed_auto.py", line 100, in fetch_price
    price_depth["bts_usd"] = client.get_depth_in_range("USD","BTS", depth_change)
  File "/home/ubuntu/operation_tools/btsfeed/bts.py", line 44, in get_depth_in_range
    price = self.get_price(quote,base)
  File "/home/ubuntu/operation_tools/btsfeed/bts.py", line 234, in get_price
    order = response.json()["result"]
KeyError: 'result'
2015-01-18 04:07:20,687[ERROR]: Warning: unknown error, can't fetch price
2015-01-18 04:07:20,687[ERROR]: 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "./bts_feed_auto.py", line 197, in <module>
    fetch_price()
  File "./bts_feed_auto.py", line 100, in fetch_price
    price_depth["bts_usd"] = client.get_depth_in_range("USD","BTS", depth_change)
  File "/home/ubuntu/operation_tools/btsfeed/bts.py", line 48, in get_depth_in_range
    base_precision =  self.get_precision(base)
  File "/home/ubuntu/operation_tools/btsfeed/bts.py", line 295, in get_precision
    return float(response.json()["result"]["precision"])
TypeError: 'NoneType' object is not subscriptable
2015-01-18 04:08:31,155[ERROR]: Error fetching results from yunbi!
2015-01-18 04:08:31,157[ERROR]: Error get price from yunbi!
2015-01-18 04:08:31,165[ERROR]: Warning: unknown error, can't fetch price
2015-01-18 04:08:31,165[ERROR]: 'result'
Traceback (most recent call last):
  File "./bts_feed_auto.py", line 197, in <module>
    fetch_price()
  File "./bts_feed_auto.py", line 100, in fetch_price
    price_depth["bts_usd"] = client.get_depth_in_range("USD","BTS", depth_change)
  File "/home/ubuntu/operation_tools/btsfeed/bts.py", line 44, in get_depth_in_range
    price = self.get_price(quote,base)
  File "/home/ubuntu/operation_tools/btsfeed/bts.py", line 234, in get_price
    order = response.json()["result"]
KeyError: 'result'

Any ideas? I've completely re-cloned the operations_tools from github and copied my config.json from the working delegate and getting the same results...

Offline coolspeed

  • Hero Member
  • *****
  • Posts: 536
    • View Profile
    • My Blog

According to http://www.bitsharesblocks.com/delegates
I found my delegates have very little amount of active feeds. (But my total feeds are much enough).
Does anyone know why? Thanks.
you just publish price  for USD,CNY,BTS,GOLD,  you can run the command with parameter "ALL"  to publish for all support asset.

Thank you, alt ;)
Please vote for  delegate.coolspeed    dac.coolspeed
BTS account: coolspeed
Sina Weibo:@coolspeed

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
According to http://www.bitsharesblocks.com/delegates
I found my delegates have very little amount of active feeds. (But my total feeds are much enough).
Does anyone know why? Thanks.
you just publish price  for USD,CNY,BTS,GOLD,  you can run the command with parameter "ALL"  to publish for all support asset.

Offline coolspeed

  • Hero Member
  • *****
  • Posts: 536
    • View Profile
    • My Blog
According to http://www.bitsharesblocks.com/delegates
I found my delegates have very little amount of active feeds. (But my total feeds are much enough).
Does anyone know why? Thanks.
Please vote for  delegate.coolspeed    dac.coolspeed
BTS account: coolspeed
Sina Weibo:@coolspeed

Offline lafona

  • Sr. Member
  • ****
  • Posts: 231
    • View Profile
  • BitShares: lafona
Is there are way to check if we are publishing feeds if we are not in 101. The script seems to be working fine, but nothing shows up in bitsharesblocks.

blockchain_get_feeds_from_delegate <delegatename>

Thanks!
BTS Witnesses: delegate-1.lafona     Witness Thread: https://bitsharestalk.org/index.php/topic,21569.msg280911/topicseen.html#msg280911
MUSE Witness: lafona

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Is there are way to check if we are publishing feeds if we are not in 101. The script seems to be working fine, but nothing shows up in bitsharesblocks.

blockchain_get_feeds_from_delegate <delegatename>

Offline lafona

  • Sr. Member
  • ****
  • Posts: 231
    • View Profile
  • BitShares: lafona
Works for my delegate even if it's not in the top 101

https://github.com/BitShares/bitshares/releases/tag/v0.4.25-RC1

-Inactive delegates can now publish price feeds

Is there are way to check if we are publishing feeds if we are not in 101. The script seems to be working fine, but nothing shows up in bitsharesblocks.
BTS Witnesses: delegate-1.lafona     Witness Thread: https://bitsharestalk.org/index.php/topic,21569.msg280911/topicseen.html#msg280911
MUSE Witness: lafona

Offline liondani

  • Hero Member
  • *****
  • Posts: 3737
  • Inch by inch, play by play
    • View Profile
    • My detailed info
  • BitShares: liondani
  • GitHub: liondani

Offline clayop

  • Hero Member
  • *****
  • Posts: 2033
    • View Profile
    • Bitshares Korea
  • BitShares: clayop
Oh I found the problem. I had local account with the same name of my delegate. Sorry about confusion, alt. Your script is working perfectly now.
Bitshares Korea - http://www.bitshares.kr
Vote for me and see Korean Bitshares community grows
delegate-clayop