Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Issue #32

Closed
bamsutler opened this issue Mar 2, 2024 · 4 comments
Closed

Documentation Issue #32

bamsutler opened this issue Mar 2, 2024 · 4 comments

Comments

@bamsutler
Copy link

bamsutler commented Mar 2, 2024

It's not an issue with the repo, but I don't see another place to report it.

The official documentation has the on message function structured like this in a number of places on the linked page:

from coinbase.rest import WSClient

api_key = "organizations/{org_id}/apiKeys/{key_id}"
api_secret = "-----BEGIN EC PRIVATE KEY-----\nYOUR PRIVATE KEY\n-----END EC PRIVATE KEY-----\n"

def on_message(ws, message):
    print(message)

ws_client = WSClient(api_key=api_key, api_secret=api_secret, on_message=on_message, verbose=True)

The readme in this repo has the following correct code:

from coinbase.websocket import WSClient

api_key = "organizations/{org_id}/apiKeys/{key_id}"
api_secret = "-----BEGIN EC PRIVATE KEY-----\nYOUR PRIVATE KEY\n-----END EC PRIVATE KEY-----\n"

def on_message(msg):
    print(msg)

client = WSClient(api_key=api_key, api_secret=api_secret, on_message=on_message)
Copy link

github-actions bot commented Mar 2, 2024

Thank you for reporting! If this is an SDK specific issue, we will look into it and get back to you soon. If this is an API related request, report it in our Advanced API forum instead.

@justinsogoni-cb
Copy link

Thanks! We noted this and will make it consistent in the near future

@urischwartz-cb
Copy link
Contributor

@bamsutler this is fixed now. Thanks again for reporting!

@bamsutler
Copy link
Author

Thank you ! Appreciate the hard work on these tools 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants