Skip to content

dynamicstrategies/cardano-public-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cardano Public API Service

A public service that gives the public access to the Cardano Blockchain via a GraphQL API. It is not directly affiliated wih the Cardano Foundation or IOHK.

Building Blocks

The following repo was used for much of the back end:

How to Query

Using your favourite GraphQL client, or a light client that was built for this project as described below

What front end client to use?

You can choose one of the clients from this List for your favourite language. Or use the light client

Light GraphQL Client

A light client is included in the folder clientgql in this repo, and a working version of it open to the public is available at the following path.

The idea is that you should be able to try out different queries and use it to quickly prototype something useful.

https://dynamicstrategies.io/gqclient

Cardano GraphQL

This is the API endpoint that accepts GraphQL queries and will return the content from the Cardano blockchain. You need a GraphQL client to query this endpoint

https://cnode.dynamicstrategies.io:8010/v1/graphql

The following use case have been documented in the graphql_sample_queries folder, a note what each one does is in the comments in each file:

  • adaPots
  • adaPots_perEpoch
  • blockDetails
  • chainTip
  • epochParams
  • epochStats
  • latestBlock
  • metaData
  • oneBlock
  • poolHash
  • poolMetadata
  • poolUpdate_allPools
  • poolUpdate_onePool
  • poolUpdate_oneUpdate
  • stakePoolTickers
  • totalStaked
  • transactionByHash
  • UTXOAtAddress

Rate Limits - the API is currently limited to 1 request/second per IP address, with bursts up to 20 requests. This is plenty for individual users and small projects.

Useful notes

Create local api proxy to avoid issue with CORS

If you are cloning the repo and running in local environment then you are likely to get errors related to CORS. To solve it you should run a local proxy server

lcp --proxyUrl https://cnode.dynamicstrategies.io:8010/v1/graphql

And then you should point all your graphQL API queries to

http://localhost:8010/proxy

The issue with CORS is well explained here

Link

Uses Cases

The following projects have rely on this API service for accessing data on the Cardano Blockchain

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published