BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
jitb
Obsidian | Level 7

Hi,

 

Has anyone used proc http to extract data from the Cryptoquant site using their JSON API? I am completely new to this procedure and would like to know of some use cases, if possible. Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
jitb
Obsidian | Level 7

I was able to form the correct code to access the cryptoquant data. Here is a sample of the code to get a list of all their API Endpoints. A token ID is required to access the data.

 

filename out temp ;
%let access_token = <Enter token id here> ;

************* DISCOVERY: Endpoints ****************************;

proc http OAUTH_BEARER="&access_token"
url="https://api.cryptoquant.com/v1/discovery/endpoints"
method="get"
out=out;

run;

 

libname crypto json fileref=out;

proc datasets lib=crypto; quit;
proc contents data=crypto.alldata; run;

 

**********************************************************;

View solution in original post

5 REPLIES 5
sbxkoenk
SAS Super FREQ

Hello,

 

I haven't done that, but it should be easy.

 

Start from here :

Reading data with the SAS JSON libname engine
By Chris Hemedinger on The SAS Dummy December 2, 2016
https://blogs.sas.com/content/sasdummy/2016/12/02/json-libname-engine-sas

 

with Simple JSON example: Who is in space right now?

 

Koen

jitb
Obsidian | Level 7
Thank you, Koen. I will review this article.
Thanks again for giving me a start. I will post once I make some headway.

Jit
jitb
Obsidian | Level 7

I was able to form the correct code to access the cryptoquant data. Here is a sample of the code to get a list of all their API Endpoints. A token ID is required to access the data.

 

filename out temp ;
%let access_token = <Enter token id here> ;

************* DISCOVERY: Endpoints ****************************;

proc http OAUTH_BEARER="&access_token"
url="https://api.cryptoquant.com/v1/discovery/endpoints"
method="get"
out=out;

run;

 

libname crypto json fileref=out;

proc datasets lib=crypto; quit;
proc contents data=crypto.alldata; run;

 

**********************************************************;

ademkalyir
Calcite | Level 5

If you're looking into extracting Cryptoquant data via JSON API, I highly recommend checking out stakingy platform. It's a fantastic resource for tracking the best apy stablecoins and optimizing your crypto investments. With the volatile nature of the market, finding stable assets with high yields is crucial for maximizing returns. Stakingy provides comprehensive data on various stablecoins, allowing you to make informed decisions and leverage opportunities for passive income. Don't miss out on exploring this valuable tool to enhance your crypto portfolio.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 577 views
  • 4 likes
  • 3 in conversation