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 try to use this command, but it's failed, do you know how to use this?

delegate (unlocked) >>> wallet_publish_feeds delegate.baozi {"USD":0.033,"CNY":0.204}
7 bad_cast_exception: Bad Cast
Invalid cast from object_type to Array
    {"type":"object_type"}
    th_a  variant.cpp:463 get_array

    {"command":"wallet_publish_feeds"}
    th_a  cli.cpp:555 execute_command


Quote from: Riverhead on September 15, 2014, 11:09:14 AM
alt - There is a new command called wallet_update_feeds that publishes all feeds as one transaction. Will your code be updated to this? It would make for more accurate price feeds as when one feed needs updating they all get refreshed. With this command there's no reason every delegate won't support feeds for every pair!  :o



wallet_publish_feeds
Usage:
wallet_publish_feeds <delegate_account> <symbol_to_price_map>                                         
publishes a set of feeds for BitAssets, only active delegates may do this

Parameters:
  delegate_account (account_name, required): the delegate to publish the price under
  symbol_to_price_map (price_map, required): maps the BitAsset symbol to the price per BTSX

Returns:
  transaction_record


Thanks!!

Riverhead

Quote from: xeroc on September 15, 2014, 11:48:37 AM
Quote from: Riverhead on September 15, 2014, 11:43:58 AM
While you're in there making changes any chance bitUSD/BTSX Bid/Ask/Short tables can be updated to USD/BTSX (0.036 vs 25.0) like the other bitUSD stats? Would make it much easier to read :) .
there is a little button next to the bitUSD/BTSX on the top ... that makes the market swap/flip


That's on the client, not his website. Or is the button just not showing?

xeroc

#28
Quote from: Riverhead on September 15, 2014, 11:43:58 AM
While you're in there making changes any chance bitUSD/BTSX Bid/Ask/Short tables can be updated to USD/BTSX (0.036 vs 25.0) like the other bitUSD stats? Would make it much easier to read :).
there is a little button next to the bitUSD/BTSX on the top ... that makes the market swap/flip

should read more before posting .. sry

Riverhead

While you're in there making changes any chance bitUSD/BTSX Bid/Ask/Short tables can be updated to USD/BTSX (0.036 vs 25.0) like the other bitUSD stats? Would make it much easier to read :).

xeroc

#26
https://github.com/dacsunlimited/bitsharesx/commit/94a9c9af095d28e0795c0132e3537ccc2478a926

requires     v0.4.15-a

that's why I am not seeing it ... yet


I was wrong ... command is called "wallet_publish_feeds" and "wallet_publish_price_feed" .. little confusing .. (inconsistent)

Riverhead

#25
alt - There is a new command called wallet_update_feeds that publishes all feeds as one transaction. Will your code be updated to this? It would make for more accurate price feeds as when one feed needs updating they all get refreshed. With this command there's no reason every delegate won't support feeds for every pair!  :o



wallet_publish_feeds
Usage:
wallet_publish_feeds <delegate_account> <symbol_to_price_map>                                         
publishes a set of feeds for BitAssets, only active delegates may do this

Parameters:
  delegate_account (account_name, required): the delegate to publish the price under
  symbol_to_price_map (price_map, required): maps the BitAsset symbol to the price per BTSX

Returns:
  transaction_record


Thanks!!

alt

thanks, this looks so complex, I still have no idea about this...
Quote from: busygin on September 15, 2014, 05:49:32 AM
Please be careful with WTI. Usually websites publish the front month contract as the current oil price, and each time the front month expires, there is a roll to the next month with a different price. I already wrote about this issue here:
https://bitsharestalk.org/index.php?topic=8679.msg113184#msg113184

Quote from: alt on September 15, 2014, 04:37:29 AM
I don't know how to get WTI and SLV from yahoo.

busygin

Please be careful with WTI. Usually websites publish the front month contract as the current oil price, and each time the front month expires, there is a roll to the next month with a different price. I already wrote about this issue here:
https://bitsharestalk.org/index.php?topic=8679.msg113184#msg113184

Quote from: alt on September 15, 2014, 04:37:29 AM
I don't know how to get WTI and SLV from yahoo.

alt

#22
have update btsx_feed_auto.py, now support more asset except: "PTS", "PPC", "LTC", "WTI"
I don't know how to get WTI  from yahoo.

amencon

Quote from: cryptillionaire on September 05, 2014, 10:41:29 PM
Hey,

What are the limits of publishing price feeds to btsx as a delegate?
Can this script be scaled up to provide dozens of price feeds? Or is there a limit?
Eli5 how price feeds work? :S

Cheers :)
It's dynamic in that you can set a change_min and change_max threshold, when the script polls the prices and seeing a change that fits in the range you set it publishes the new price.  On top of that you can set a periodic time countdown where it will publish the price on a schedule.  So currently I have my script setup to publish the feeds if prices go over 1% and under 50% change and also every 4 hours regardless of price activity.

As far as how many feeds it can monitor and update, skimming the script I see nothing that would limit how many are allowed.  When a price is published it is a separate RPC call with normal fee so the script just runs through the feeds and publishes them one by one when the criteria matches.

Let us know if you need any help customizing the script, it is very simple and just some variables that need changing.

R2

Hey,

What are the limits of publishing price feeds to btsx as a delegate?
Can this script be scaled up to provide dozens of price feeds? Or is there a limit?
Eli5 how price feeds work? :S

Cheers :)

mtang

Great job. +5%
I'm using this tool and it looks like very steady.
BTSX:wallet_approve_delegate btsx.outofcontrol true
DNS :wallet_account_set_approval mtang true
感谢给我们的受托人团队"失控"btsx.outofcontro以及she.bitrose投票。请关注FUND数字资产运作计划//立足兢兢业业的standby delegate//weibo ID:汤O包

alt

updated:
1. update config file
2. use median price to replace average price, to protect system from  a suddenly drop price with a short period at the central trade site.

alt

updated:
now we can set up a price change limit with config.json
in case that exchange return a very stupid price.
the default limit is 5%~50%

alt

update to github.

update the feed price at least every 23.5 hours. because the feed price will expired after 24 hours.