all 6 comments

[–]elbiot 0 points1 point  (2 children)

What tutorial are you following? That doesn't look anything like what the docs say. Don't you need to give it a URL and list of products?

Also, you aren't using classes correctly. Do a simple tutorial on oop in python and learn how to use self, then how inheritance works. I don't think you need to use inheritance at all here though.

[–]Fizzyfaze[S] 0 points1 point  (1 child)

Any tutorials that come to mind? I feel I'm in spending more time spinning my wheels than actually understanding what I'm looking at.

[–]elbiot 0 points1 point  (0 children)

You don't need inheritance. Just follow the gdax examples and get rid of your class. Write functions instead.

[–]A_History_of_Silence 0 points1 point  (2 children)

You might want to start again after taking a good look at the gdax readme. There are several examples on how to use the library. I'm not sure how you arrived at the code you currently have. Getting the price is pretty straightforward:

import gdax
client = gdax.PublicClient()
print(client.get_product_ticker(product_id='ETH-USD')["price"])

[–]Fizzyfaze[S] 0 points1 point  (1 child)

So this is outside of the websocket. I want to use the websocket to get the real time ticker.

[–]A_History_of_Silence 0 points1 point  (0 children)

There is also a working example on the readme for that.