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

Cannot get list of futures bid/ask prices #102

Closed
coinbaseadvanceduser opened this issue Feb 18, 2025 · 1 comment
Closed

Cannot get list of futures bid/ask prices #102

coinbaseadvanceduser opened this issue Feb 18, 2025 · 1 comment

Comments

@coinbaseadvanceduser
Copy link

Bug report:
In python you can use the best_bid_ask api to get spot prices and futures prices, but if you try to get a list of futures prices it does not work. You can get a list of spot price, if you add futures prices to a list of spot prices, it will just ignore the futures price. Can somebody please look into this?
Reproduction below:

print(api_call(f"/api/v3/brokerage/best_bid_ask", "GET", payload={'product_ids' : ["BTC-USD"]}))
{'pricebooks': [{'product_id': 'BTC-USD', 'bids': [{'price': '95404', 'size': '0.05456974'}], 'asks': [{'price': '95407.96', 'size': '0.00019092'}], 'time': '2025-02-18T15:31:49.208992Z'}]}

print(api_call(f"/api/v3/brokerage/best_bid_ask", "GET", payload={'product_ids' : ["BIT-28FEB25-CDE"]}))
{'pricebooks': [{'product_id': 'BIT-28FEB25-CDE', 'bids': [{'price': '95715', 'size': '25'}], 'asks': [{'price': '95725', 'size': '7'}], 'time': '2025-02-18T15:31:49.360360Z'}]}

print(api_call(f"/api/v3/brokerage/best_bid_ask", "GET", payload={'product_ids' : ["DOG-28FEB25-CDE"]}))
{'pricebooks': [{'product_id': 'DOG-28FEB25-CDE', 'bids': [{'price': '0.2492', 'size': '10'}], 'asks': [{'price': '0.25014', 'size': '15'}], 'time': '2025-02-18T15:31:49.728037Z'}]}

print(api_call(f"/api/v3/brokerage/best_bid_ask", "GET", payload={'product_ids' : ["BIT-28FEB25-CDE", "BTC-USD"]}))
{'pricebooks': [{'product_id': 'BTC-USD', 'bids': [{'price': '95409.79', 'size': '0.00262349'}], 'asks': [{'price': '95414.78', 'size': '0.10375559'}], 'time': '2025-02-18T15:31:49.962820Z'}]}

print(api_call(f"/api/v3/brokerage/best_bid_ask", "GET", payload={'product_ids' : ["BIT-28FEB25-CDE", "DOG-28FEB25-CDE"]}))
{'pricebooks': []}

Copy link

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 Discord instead (use this invite link if it's your first time accessing the Discord).

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

1 participant