Author Topic: I need some help getting started with pybitshares  (Read 9805 times)

0 Members and 1 Guest are viewing this topic.

Offline litepresence

experienced python algo trader... very good w/ quant, databases, plotting, backtesting, etc...
but least favorite task is connectivity; moving from one api to another.


just getting started w/ pybitshares:

not fully understanding what I need to do; so please ELI5

thanks,

litepresence

I just need basic trading functions:

buy/sell/cancel
list open orders
ticker
balances
orderbook



first try first fail:



Code: [Select]
from bitshares.account import Account
account = Account("xeroc")
print(account)
print(account.balances)




Code: [Select]
xyz@xyz ~/Python/EV $ python3 bitsharestest.py

Traceback (most recent call last):
  File "bitsharestest.py", line 14, in <module>
    account = Account("xeroc")
  File "/home/xyz/.local/lib/python3.4/site-packages/bitshares/account.py", line 50, in __init__
    bitshares_instance=None
  File "/home/xyz/.local/lib/python3.4/site-packages/bitshares/blockchainobject.py", line 69, in __init__
    self.bitshares = bitshares_instance or shared_bitshares_instance()
  File "/home/xyz/.local/lib/python3.4/site-packages/bitshares/instance.py", line 15, in shared_bitshares_instance
    SharedInstance.instance = bts.BitShares()
  File "/home/xyz/.local/lib/python3.4/site-packages/bitshares/bitshares.py", line 151, in __init__
    **kwargs)
  File "/home/xyz/.local/lib/python3.4/site-packages/bitshares/bitshares.py", line 180, in connect
    self.rpc = BitSharesNodeRPC(node, rpcuser, rpcpassword, **kwargs)
  File "/home/xyz/.local/lib/python3.4/site-packages/bitsharesapi/bitsharesnoderpc.py", line 23, in __init__
    super(BitSharesNodeRPC, self).__init__(*args, **kwargs)
  File "/home/xyz/.local/lib/python3.4/site-packages/grapheneapi/graphenewsrpc.py", line 64, in __init__
    self.wsconnect()
  File "/home/xyz/.local/lib/python3.4/site-packages/grapheneapi/graphenewsrpc.py", line 79, in wsconnect
    self.ws = websocket.WebSocket(sslopt=sslopt_ca_certs)
TypeError: __init__() got an unexpected keyword argument 'sslopt'



seems like no matter what I do I get this TypeError

why?  what is sslopt?  what do I have to do to fix the problem?

???
« Last Edit: January 30, 2018, 01:23:09 pm by litepresence »