Author Topic: Running pricefeed scprits on Windows  (Read 1112 times)

0 Members and 1 Guest are viewing this topic.

Offline checkrasier

  • Jr. Member
  • **
  • Posts: 33
    • View Profile
Running pricefeed scprits on Windows
« on: October 23, 2015, 06:43:32 am »
If your setting up a witness node on Windows here are the steps I used to get xeroc pricefeed scripts publishing on Windows   

1. Download and Install Python 3.5.0 (32-bit) for Windows:

Do a Full install so pip gets included in the installation
Check - Add Python 3.5 to PATH

Optional: Change Pyhton's install directory to C:\Python 3.5

2. Install required python libs

Open Command Prompt and run:
pip install requests
pip install prettytable
pip install autobahn

NumPy is required but it has to be complied with Visual Stuido or mingw32.
If you have a complier configured with python:
pip install numpy

You can also download a precompiled verion here:
Download - numpy‑1.10.1+mkl‑cp35‑none‑win32.whl
Move to this file to C:\

pip install c:\numpy-1.10.1+mkl-cp35-none-win32.whl

3. Download and install python-graphenelib from xeroc GitHub.
Select download ZIP
Extract zip file to C:\

Open command prompt:
cd C:\python-graphenelib-master
python install --user

4. Configure Pricefeeds:
In the C:\python-graphenelib-master\scripts\pricefeeds folder
Rename to

Edit with IDLE and change:
host = ""
port = 8092
delegate_name = "your_witness"
enable_yunbi = False
maximum_short_squeeze_ratio  = 1100

5. Run CLI wallet 
Open Command Prompt or create .bat file

cd C:\Program Files\BitShares 2\bin\
cli_wallet --rpc-http-endpoint="" -s ws://

unlock your wallet.  Wallet must be unlocked to publish price feeds.

6. Run the pricefeeds scripts
Open Command Prompt
python "C:\python-graphenelib-master\scripts\pricefeeds\"

If everything worked correctly you should get a Y/N confirmation to publish feeds

7. Using Windows Scheduler to run the pricefeed scripts every 60 mins
If you don't what to have repeat step 6 every 60 mins create a task in Windows Scheduler.

Create a pricefeeds.bat file containing:
echo Y|C:\Python3.5\python.exe "C:\python-graphenelib-master\scripts\pricefeeds\ "

(The echo Y| confirms the price feed update.)

Open Task Scheduler:
Control Panel - System and Security - Administrative Tools - Task Scheduler

Select Create Task...

On the General Tab
Name: pricefeeds
Select "Run whether user is logged on or not"

On the Triggers Tab
Select New
Begin the task On a schedule - One Time - Set Start Date at Time for your pricefeed update
Check the Repeat task every: 1 hour for a duration of Indefinitely
Check Enabled

On the Actions Tab
Select New
Action: Start a program
Browse to the pricefeed.bat file you created

Your witness should now be publishing updated pricefeeds every 60 minutes. 

Thank you to all everyone that help get this working!

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12915
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Running pricefeed scprits on Windows
« Reply #1 on: October 23, 2015, 09:23:30 am »
very cool ..
you mind if I copy&paste this instructions into the docs of the python libs?
Give BitShares a try! Use the provided by powered by ChainSquad GmbH

Offline checkrasier

  • Jr. Member
  • **
  • Posts: 33
    • View Profile
Re: Running pricefeed scprits on Windows
« Reply #2 on: October 23, 2015, 07:42:50 pm »
Not at all