Implementing a websocket for python coinbase pro api
$10-30 CAD
Completed
Posted about 4 years ago
$10-30 CAD
Paid on delivery
Create a websocket script in python which will print the current price of BTC-USD.
"""
import cbpro, time
class myWebsocketClient([login to view URL]):
def on_open(self):
[login to view URL] = "wss://[login to view URL]"
[login to view URL] = ["LTC-USD"]
self.message_count = 0
print("Lets count the messages!")
def on_message(self, msg):
self.message_count += 1
if 'price' in msg and 'type' in msg:
print ("Message type:", msg["type"],
"\t@ {:.3f}".format(float(msg["price"])))
def on_close(self):
print("-- Goodbye! --")
wsClient = myWebsocketClient()
[login to view URL]()
print([login to view URL], [login to view URL])
while (wsClient.message_count < 500):
print ("\nmessage_count =", "{} \n".format(wsClient.message_count))
[login to view URL](1)
[login to view URL]()
"""
I want to implement the coinbase pro python api from this github link:
[login to view URL]
Based on this API:
[login to view URL]
Hi
I have extensive experience working with Python and will be more than happy to work on this project. The work is fairly straightforward, I believe that you would be needing to run this script in a loop (say every minute or so) to print the value? (and possibly to log to a file?)
Looking forward to hear from you.
$30 CAD in 2 days
0.0 (0 reviews)
0.0
0.0
3 freelancers are bidding on average $28 CAD for this job
Hello,
my name is Kamil, I‘m a software developer with experience in Java and Python. My passion is to solve other people’s problems with my knowledge and to help them out. I would really like to do the job for you and would deliver it until tomorrow, possibly even today. If you should have any questions or additional wishes for features you can simply send me a message.