Price feeds for Gold, Siver, Euro, Pound, Oil, Litecoin, Peso, Franc, etc.

Started by Markus, September 11, 2014, 10:21:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xeroc

Quote from: davidpbrown on September 29, 2014, 11:38:50 AM
So, is client running as server, providing the same services as a delegate; or can delegates only be run from the GUI?
the delegates should NEVER be run though the GUI ..

the core (bitshares_cli) has the exact same features .. except the fancy gui :)

davidpbrown

So, is client running as server, providing the same services as a delegate; or can delegates only be run from the GUI?
฿://1CBxm54Ah5hiYxiUtD7JGYRXykT5Z6ZuMc

Riverhead

Quote from: davidpbrown on September 28, 2014, 08:16:15 PM
Quote from: xeroc on September 28, 2014, 07:44:43 PM
you cannot connect to the RPC .. maybe I can add a failsafe ...

Yes.. all this needs to be foolproof or we'll only have the core devs trying. I made a noob error not running the client properly. It seems that the GUI and client cannot run on the same machine, I don't understand why that is.. client does reindex where GUI had done that etc. I'm wondering then if I am just publishing feeds and not currently acting as delegate now, without the GUI running in the way that suggests that is delegate or if the client does the same delegate function by default.
They can run on the same machine but not share a data directory.

davidpbrown

Quote from: xeroc on September 28, 2014, 07:44:43 PM
you cannot connect to the RPC .. maybe I can add a failsafe ...

Yes.. all this needs to be foolproof or we'll only have the core devs trying. I made a noob error not running the client properly. It seems that the GUI and client cannot run on the same machine, I don't understand why that is.. client does reindex where GUI had done that etc. I'm wondering then if I am just publishing feeds and not currently acting as delegate now, without the GUI running in the way that suggests that is delegate or if the client does the same delegate function by default.
฿://1CBxm54Ah5hiYxiUtD7JGYRXykT5Z6ZuMc

xeroc

you cannot connect to the RPC .. maybe I can add a failsafe ...

btw.. this script was mainly intended for me and I wanted to share ..  :) give me some to to fix this

davidpbrown

Thanks.. Just to note for Linux Mint, changing default python is a bad idea, as it could break the system.
So, easy fix is alter script to start with #!/usr/bin/env python3
Unfortunately, only that change doesn't see the script work for me.. it barfs:

================================================================================
Loading old feeds
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 542, in urlopen
    body=body, headers=headers)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 367, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.4/http/client.py", line 1065, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.4/http/client.py", line 1103, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.4/http/client.py", line 1061, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.4/http/client.py", line 906, in _send_output
    self.send(msg)
  File "/usr/lib/python3.4/http/client.py", line 841, in send
    self.connect()
  File "/usr/lib/python3.4/http/client.py", line 819, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python3.4/socket.py", line 509, in create_connection
    raise err
  File "/usr/lib/python3.4/socket.py", line 500, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 330, in send
    timeout=timeout
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 592, in urlopen
    raise MaxRetryError(self, url, e)
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=9989): Max retries exceeded with url: /rpc (Caused by <class 'ConnectionRefusedError'>: [Errno 111] Connection refused)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./xeroc_btsx_feed.py", line 382, in <module>
    fetch_from_wallet()
  File "./xeroc_btsx_feed.py", line 242, in fetch_from_wallet
    response = requests.post(url, data=json.dumps(request), headers=headers, auth=auth)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 88, in post
    return request('post', url, data=data, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 486, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 378, in send
    raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=9989): Max retries exceeded with url: /rpc (Caused by <class 'ConnectionRefusedError'>: [Errno 111] Connection refused)


User Error: Replace User :/
฿://1CBxm54Ah5hiYxiUtD7JGYRXykT5Z6ZuMc

xeroc


davidpbrown

So, the only way I could see to get this running alongside the GUI was to host a config for the feed.py script separate from the config that the GUI looks to. I'm running https://github.com/Bitsuperlab/operation_tools/tree/master/btsxfeed ok and hoping that is visible and then useful.

I'd like to run xeroc's script to see that but what Linux package provides for Python's 'import statistics'?
฿://1CBxm54Ah5hiYxiUtD7JGYRXykT5Z6ZuMc

xeroc

Just pimped the script .. bittrex is available now two .. however only btc to ltc and btsx are available from there

xeroc

Quote from: Riverhead on September 25, 2014, 05:42:58 PM
Cool, I'll give it a try. Why did you comment out Biitrex?
there rpc api is shit and I could finish that part yet ... dont' uncomment it .. it wont work ..

Maybe I can work on it later

xeroc

Quote from: cube on September 25, 2014, 05:41:11 PM
I would love to run your feed script and help to provide a level of feed diversity.  Does my delegate need to make it to the top 101 to be able to provide feeds?
yes you need to haven active delegate

Riverhead

Quote from: xeroc on September 25, 2014, 02:16:33 PM
By the way, in order to increase diversity of updates you may want to check out my feed script:
It was based on alt's script but I essentially modified everything :)

https://github.com/xeroc/pytshares/blob/master/btsx_feed.py

Cool, I'll give it a try. Why did you comment out Biitrex?

cube

Quote from: xeroc on September 25, 2014, 02:16:33 PM
By the way, in order to increase diversity of updates you may want to check out my feed script:
It was based on alt's script but I essentially modified everything :)

https://github.com/xeroc/pytshares/blob/master/btsx_feed.py

I would love to run your feed script and help to provide a level of feed diversity.  Does my delegate need to make it to the top 101 to be able to provide feeds?
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

cube

Quote from: matt608 on September 25, 2014, 02:14:56 PM

Agree, a solid bitUSD with millions or billions in market cap is more useful than a bunch of smaller assets.

+5%
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

xeroc

By the way, in order to increase diversity of updates you may want to check out my feed script:
It was based on alt's script but I essentially modified everything :)

https://github.com/xeroc/pytshares/blob/master/btsx_feed.py