Getting Cryptocurrency Prices from Coinbase in Python
In this tutorial, I show you guys how to write some basic Python code that retrieves cryptocurrency prices from Coinbase’s API. Note that no API key is necessary here since price data comes from an unauthenticated, read-only endpoint.
Link to the code from this video:
Check this link for more information:
How to support the channel:
Get a shirt or sweatshirt with free shipping (Use code “SHIP” at checkout):
Become a member:
Support us on Patreon:
Donate to our PayPal:
Sponsor us on Github:
Social media links:
Discord:
Twitter:
Instagram:
Facebook:
Source link
wow this worked. my first working program ever. thank you!
Perfect video for what I wanted to know! Thanks a lot
Straightforward working demonstration. Python beginners should note: the requests Library is not installed by default. For help: https://stackoverflow.com/questions/17309288/importerror-no-module-named-requests
Is it possible to get the ATH or Marketcap likes this without coinbase.pro?
thank you very much sir. I tried the URL used in the video and they are still working as of 2020-09-30.
Great ! Can u help me to plot the ask and bid price. I mean how to plot both Buy and Sell price together.
Thanks for the great video. This was exactly what I was looking for.
Is this data delayed by Coinbase?
Why is the screen black and white?
can you get price from coinbase pro?
can you get prices from pro.coinbase.com ?
cool video, it really helps. thanks a lot! hope you are making a lot money in crypto!
Hi i have a problem, when i try to replied I had in the line 8 error, like " string indices must be integers" My python is version 3.6 and i use the same code. Could you help me with this. I've tried something like that :
import requests
import json
import time
while True :
response = requests.get("https://api.coinbase.com/v2/prices/BTC-USD/spot"😉
data = json.dumps(response.json())
data = float(data)
currency = data["data"]["base"]
price = data["data"]["amount"]
print ( f"Currency : (currency) Price: (price)")
time.sleep(5)
but it didn't work .
Thanks