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.

kokojie

I'm using alt's script with default settings, why do I see other people have 50+ price update per day, and mine is only like 3-4 times  day?

xeroc


kokojie

Quote from: xeroc on October 01, 2014, 10:36:40 PM
guess
apt-get install python3-requests

I may need to write a installation guide :) ...

gonna go to bed now .. once python module are all installed (most are part of python core) the rest should run with ease

Now it's telling me "ImportError: No module named 'numpy'", but I already done "apt-get install python-numpy python-scipy"

GaltReport

Quote from: kokojie on October 01, 2014, 10:35:40 PM
Quote from: xeroc on October 01, 2014, 10:33:10 PM
its python3 .. you need python3-requests

omg ur so fast, so how do I install these? I already have "apt-get install python"

I ended up using pyenv to install python3 and to switch python environments then created a shell script to call the price feed script from cronjob so the environment was setup right for finding the right python.

https://github.com/yyuu/pyenv


xeroc

guess
apt-get install python3-requests

I may need to write a installation guide :) ...

gonna go to bed now .. once python module are all installed (most are part of python core) the rest should run with ease

kokojie

Quote from: xeroc on October 01, 2014, 10:33:10 PM
its python3 .. you need python3-requests

omg ur so fast, so how do I install these? I already have "apt-get install python"

xeroc



emski

Perhaps the idea of continuously running script is a good choice as it can monitor the price movements more closely and publish only when required.
For example:

Fetching data from exchanges and central bank(for USD<->EUR<->CNY ) doing all the conversions and calculations and publish if one of the following conditions is met:
1 Price of any asset falls by X
2 X minutes passed since the last update
3 Price of any asset increases by Y

And as I mentioned in other threads:
Exchange volume should be accounted for in calculations.
Configurable delegate preferences that increase/decrease the weight of any exchange in the calculations.

[url="https://bitsharestalk.org/index.php/topic,9857.0.html"]https://bitsharestalk.org/index.php/topic,9857.0.html[/url]

xeroc

I thought about just having a single cronjob be run every 15 minutes or so and just update on "demand" ..

alt

Quote from: xeroc on September 24, 2014, 07:15:12 AM
I change your script a little to have a "different" implementation:
https://github.com/xeroc/pytshares/blob/master/btsx_feed.py

things that are different:
- no autoreload/just straight single run (cronjob) - maybe I change this in future
- loads prices from yahoo/btc38/bter/poloniex for all NATIVE currencies of the platform (price_in_cny, price_in_btc,...)
- convert each available price pair into prices denoted in btsx (convert_all())
- also get the price for USD/EUR/CNY from bitcoinaverage
- can set the payee for the feeds if you want someone else to pay the tx fee
I want to change this  to  single run too :)

alt

Quote from: bytemaster on September 25, 2014, 09:40:08 PM
Actually I think it may be beneficial to discount all feeds by 0.995 to give the market makers some breathing room and provide a buffer against down trends.
delegates, please update the script with new rules bytemaster recommended

xeroc

I change your script a little to have a "different" implementation:
https://github.com/xeroc/pytshares/blob/master/btsx_feed.py

things that are different:
- no autoreload/just straight single run (cronjob) - maybe I change this in future
- loads prices from yahoo/btc38/bter/poloniex for all NATIVE currencies of the platform (price_in_cny, price_in_btc,...)
- convert each available price pair into prices denoted in btsx (convert_all())
- also get the price for USD/EUR/CNY from bitcoinaverage
- can set the payee for the feeds if you want someone else to pay the tx fee

xeroc


alt