Author Topic: BTS api for python  (Read 10621 times)

0 Members and 1 Guest are viewing this topic.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
update: add exchange poloniex for feed price
after update new version, you need to add a line at the config file ~/.python-bts/delegate_task.json
Code: [Select]
            "market_weight": {
                "common": "weight depenth on (depth * scale)",
                "wallet_usd": 0,
                "wallet_cny": 1,
+                "poloniex_btc": 1,
                "yunbi_cny": 1,

Offline testz

I have add a new option to enable publish feed price for standby delegate

Script stop working  :'(, error:
2015-07-07 13:51:23,182[INFO]: fetch price is 0.03798 CNY/BTS, volume is 35493.036
2015-07-07 13:51:48,158[ERROR]: dictionary changed size during iteration
Traceback (most recent call last):
  File "bts_delegate_task.py", line 307, in excute
    self.task_feed_price()
  File "bts_delegate_task.py", line 257, in task_feed_price
    self.check_median_price(median_price, current_feed_price)
  File "bts_delegate_task.py", line 202, in check_median_price
    for asset in median_price.keys():
RuntimeError: dictionary changed size during iteration

Looks like this ("change_max": 50000) fix the problem: https://bitsharestalk.org/index.php/topic,16783.msg222035.html#msg222035

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
have you update to the newest version?

Offline testz

I have add a new option to enable publish feed price for standby delegate

Script stop working  :'(, error:
2015-07-07 13:51:23,182[INFO]: fetch price is 0.03798 CNY/BTS, volume is 35493.036
2015-07-07 13:51:48,158[ERROR]: dictionary changed size during iteration
Traceback (most recent call last):
  File "bts_delegate_task.py", line 307, in excute
    self.task_feed_price()
  File "bts_delegate_task.py", line 257, in task_feed_price
    self.check_median_price(median_price, current_feed_price)
  File "bts_delegate_task.py", line 202, in check_median_price
    for asset in median_price.keys():
RuntimeError: dictionary changed size during iteration


Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
I have add a new option to enable publish feed price for standby delegate
Code: [Select]
   14         "price_feed":{
   15             "common": "call every run_timer*base_timer, set it to 0,you can disable this task ",
   16             "run_timer": 6,
   17             "common": "update the feed price at least 23.5 hours a time",
   18             "max_update_hours": 23.5,
+  19             "common": "change to 1 if you want to publish even it's a stand by delegate",
+  20             "allow_stand_by": 0,
   21             "price_limit": {
   22                 "common": "only update price feed when the change rate is between 0.5% ~ 50%",
   23                 "change_ignore": 0.2,
With your last script all delegates even the standby delegates have published feeds.
Right now my standby delegate "martin-38ptswarrior-raum" are not publishing feeds anymore even I have him on the "delegate.list"
"delegate_list": ["delegate.liondani","jcalfee1-developer-team.helper.liondani","martin-38ptswarrior-raum"],

only my two active delegates are publishing feeds.... 
any suggestion?
Are you using my scripts? are alt's? or emski's or wackous?

Is the standby delegate funded because you still need to pay the tx fee
I am experimenting with all feeds but right now the question goes to alt :) The standby delegate is funded and  scan progress at 100%....

Sent from my ALCATEL ONE TOUCH 997D
yes, save money for you, will not publish for standby delegate

来自我的 HUAWEI P7-L00 上的 Tapatalk

Actually I want to continue to publish feeds for Martin because  marketing wise it is very good for him.   Hmmmm....  ::)
I wanted to boost his delegate proposal promoting on his thread that he supports the new Indexes right now.
Please make it like it was before.If somebody don't want to publish feeds for a standby delegate he can just remove him from the "delegate list" temporary  ;)
I think it is a good behavior for delegates to publish feeds before they get elected... They are screaming: "I AM READY!"  :)

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
what is pusher.json for?
this is the account for pusher.btsbots.com.
bts_publish_market.py use this to publish market data to the push server.

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
what is pusher.json for?
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline liondani

  • Hero Member
  • *****
  • Posts: 3737
  • Inch by inch, play by play
    • View Profile
    • My detailed info
  • BitShares: liondani
  • GitHub: liondani
With your last script all delegates even the standby delegates have published feeds.
Right now my standby delegate "martin-38ptswarrior-raum" are not publishing feeds anymore even I have him on the "delegate.list"
"delegate_list": ["delegate.liondani","jcalfee1-developer-team.helper.liondani","martin-38ptswarrior-raum"],

only my two active delegates are publishing feeds.... 
any suggestion?
Are you using my scripts? are alt's? or emski's or wackous?

Is the standby delegate funded because you still need to pay the tx fee
I am experimenting with all feeds but right now the question goes to alt :) The standby delegate is funded and  scan progress at 100%....

Sent from my ALCATEL ONE TOUCH 997D
yes, save money for you, will not publish for standby delegate

来自我的 HUAWEI P7-L00 上的 Tapatalk

Actually I want to continue to publish feeds for Martin because  marketing wise it is very good for him.   Hmmmm....  ::)
I wanted to boost his delegate proposal promoting on his thread that he supports the new Indexes right now.
Please make it like it was before.If somebody don't want to publish feeds for a standby delegate he can just remove him from the "delegate list" temporary  ;)
I think it is a good behavior for delegates to publish feeds before they get elected... They are screaming: "I AM READY!"  :)
« Last Edit: June 05, 2015, 11:25:14 am by liondani »

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
With your last script all delegates even the standby delegates have published feeds.
Right now my standby delegate "martin-38ptswarrior-raum" are not publishing feeds anymore even I have him on the "delegate.list"
"delegate_list": ["delegate.liondani","jcalfee1-developer-team.helper.liondani","martin-38ptswarrior-raum"],

only my two active delegates are publishing feeds.... 
any suggestion?
Are you using my scripts? are alt's? or emski's or wackous?

Is the standby delegate funded because you still need to pay the tx fee
I am experimenting with all feeds but right now the question goes to alt :) The standby delegate is funded and  scan progress at 100%....

Sent from my ALCATEL ONE TOUCH 997D
yes, save money for you, will not publish for standby delegate

来自我的 HUAWEI P7-L00 上的 Tapatalk


Offline liondani

  • Hero Member
  • *****
  • Posts: 3737
  • Inch by inch, play by play
    • View Profile
    • My detailed info
  • BitShares: liondani
  • GitHub: liondani
With your last script all delegates even the standby delegates have published feeds.
Right now my standby delegate "martin-38ptswarrior-raum" are not publishing feeds anymore even I have him on the "delegate.list"
"delegate_list": ["delegate.liondani","jcalfee1-developer-team.helper.liondani","martin-38ptswarrior-raum"],

only my two active delegates are publishing feeds.... 
any suggestion?
Are you using my scripts? are alt's? or emski's or wackous?

Is the standby delegate funded because you still need to pay the tx fee
I am experimenting with all feeds but right now the question goes to alt :) The standby delegate is funded and  scan progress at 100%....

Sent from my ALCATEL ONE TOUCH 997D


Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
yes, only publish feed for top 101 delegate. when your vote up, it will publish automatic

With your last script all delegates even the standby delegates have published feeds.
Right now my standby delegate "martin-38ptswarrior-raum" are not publishing feeds anymore even I have him on the "delegate.list"
"delegate_list": ["delegate.liondani","jcalfee1-developer-team.helper.liondani","martin-38ptswarrior-raum"],

only my two active delegates are publishing feeds.... 
any suggestion?

来自我的 HUAWEI P7-L00 上的 Tapatalk


Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
With your last script all delegates even the standby delegates have published feeds.
Right now my standby delegate "martin-38ptswarrior-raum" are not publishing feeds anymore even I have him on the "delegate.list"
"delegate_list": ["delegate.liondani","jcalfee1-developer-team.helper.liondani","martin-38ptswarrior-raum"],

only my two active delegates are publishing feeds.... 
any suggestion?
Are you using my scripts? are alt's? or emski's or wackous?

Is the standby delegate funded because you still need to pay the tx fee

Offline liondani

  • Hero Member
  • *****
  • Posts: 3737
  • Inch by inch, play by play
    • View Profile
    • My detailed info
  • BitShares: liondani
  • GitHub: liondani
With your last script all delegates even the standby delegates have published feeds.
Right now my standby delegate "martin-38ptswarrior-raum" are not publishing feeds anymore even I have him on the "delegate.list"
"delegate_list": ["delegate.liondani","jcalfee1-developer-team.helper.liondani","martin-38ptswarrior-raum"],

only my two active delegates are publishing feeds.... 
any suggestion?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
btw ... wouldn't it make sense for the delegates to publish their mail address ON-CHAIN?
http://wiki.bitshares.org/index.php/Delegate/PublicData

see it like an "abuse" mail in IP networks and domains .. or like a tech mail ...
That would

a) greatly improve hardfork coordination
b) make implementing a watching thread a no-brainer

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
Thanks alt.  I figured it out with your help.  I had
Code: [Select]
            "mail_list": {
                "dele-puppy": ["thisismyemail@puppies.com"]
but since I am withdrawing to account puppies I had to change it to
Code: [Select]
            "mail_list": {
                "dele-puppy": ["thisismyemail@puppies.com"],
                "puppies": ["thisismyemail@puppies.com"]
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads