Loading...

Free Python

How to Authenticate with the CryptoDataDownload API Token

How to Authenticate with the CryptoDataDownload API Token


CryptoDataDownload API Authentication / Data Access
We've developed our API to be super flexible in terms of use and accessibility! We are going to walk thru several examples for how to authenticate with the API token and begin accessing data right away! Once you upgrade your account to a CDD API subscription, your access token will appear on your profile page like in the below image. Not only do we provide access to our database backend via the API, but we offer bespoke endpoints that you won't find at other providers. We also make it possible to choose how you would like the data returned between 3 different formats: JSON, CSV, or XLSX (Excel!).

--> Don't have a token? Get One here! <--


API Token Location



Accessing Via Our Documentation Page
One of the easiest ways to access data right away is on our documentation page. On the top right hand side, you will see a button that says "Authorize". Once you click it, a text field will appear --> Enter the word "TOKEN", then a space, then your API key and click Authorize. Expanding any of the endpoint links on the page will then let you pass parameters directly and pull data !

Documentation Authentication



Accessing Via Your Browser
Pulling data via your browser is even simpler. You will pass all of the arguments for the endpoint in the browser URL, including your API key in the parameter "auth_token". Here is an example of how you would pull public blockchain data for BTC using the blocks endpoint

Browser Authentication



Accessing Via cURL
One common way of accessing APIs has been thru the use of cURL, which we also support. Here is an example for accessing thru cURL:
curl -X GET "https://api.cryptodatadownload.com/v1/data/summary/blockchain/blocks/?symbol=btc&limit=25&return=JSON" -H "accept: application/json" -H "Authorization: TOKEN b456bc2badf969275"


Accessing Via Python
You can also easily access the API via your favorite programming language (ours is Python). We've laid out two examples in the code below. One method uses the requests library to pull as if you were passing a URL string to the browser. And the other method passes the Authentication header in the headers of the request. Both methods work.

Live codebase Python