publish feed price automatic(From BitSuperLab)

Started by alt, August 28, 2014, 02:18:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


alt

I have update for bitshares  v0.9
should support both v0.9 and v0.8 now

alt


clayop

Bitshares Korea - [url="http://www.bitshares.kr"]http://www.bitshares.kr[/url]
Vote for me and see Korean Bitshares community grows
delegate-clayop

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.

alt

Quote from: nethyb on January 18, 2015, 04:24:02 AM
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...

Warning: unknown error, can't fetch price
'result'


some of the log results are:

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?

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...

Warning: unknown error, can't fetch price
'result'


some of the log results are:

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...

coolspeed


Quote from: alt on December 22, 2014, 02:49:55 PM
Quote from: coolspeed on December 22, 2014, 12:37:43 PM
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

alt

Quote from: coolspeed on December 22, 2014, 12:37:43 PM
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.

coolspeed

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

lafona

Quote from: xeroc on December 10, 2014, 03:17:51 PM
Quote from: lafona on December 10, 2014, 01:50:20 PM
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: [url="https://bitsharestalk.org/index.php/topic,21569.msg280911/topicseen.html#msg280911"]https://bitsharestalk.org/index.php/topic,21569.msg280911/topicseen.html#msg280911[/url]
MUSE Witness: lafona

xeroc

Quote from: lafona on December 10, 2014, 01:50:20 PM
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>

lafona

Quote from: liondani on December 09, 2014, 09:56:50 PM
Quote from: chsln on December 09, 2014, 04:51:52 PM
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: [url="https://bitsharestalk.org/index.php/topic,21569.msg280911/topicseen.html#msg280911"]https://bitsharestalk.org/index.php/topic,21569.msg280911/topicseen.html#msg280911[/url]
MUSE Witness: lafona

liondani

[url="https://www.steempeak.com/@liondani"]https://www.steempeak.com/@liondani[/url]

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 - [url="http://www.bitshares.kr"]http://www.bitshares.kr[/url]
Vote for me and see Korean Bitshares community grows
delegate-clayop