The Uniswap API is a set of authenticated endpoints used by market aggregators (e.g. coinmarketcap.com) to surface Uniswap liquidity and volume information. All information is fetched from the underlying subgraphs.
The API is designed around the CoinMarketCap requirements document.
Prefer the Uniswap subgraph for any Uniswap queries whenever possible. The respective subgraphs will always have more recent data.
V2 Subgraph: https://github.com/Uniswap/uniswap-v2-subgraph
V1 Subgraph: https://github.com/graphprotocol/uniswap-subgraph
Please fill out this form if you would like to get an API key.
You can use an API key by setting it in the x-api-key
header, like so:
curl -v --compressed https://api.uniswap.info/v2/tickers -H 'x-api-key: abcd1234'
Note the data returned by the V1 and V2 endpoints is segregated, i.e. there are no endpoints for combined data from both Uniswap V1 and V2.
The documentation of the /v1/
endpoints is here.
The documentation of the /v2/
endpoints is here.
The API uses the serverless framework and can easily be deployed to any AWS account,
via the yarn sls deploy
command.
In order to configure your AWS account as a target, see the serverless docs.