Uniswap API

Uniswap exchange trade and price data.

Deprecation warning

This list of endpoints will be deprecated. Please see:

API Access

Please fill out this form and we will get back to you in a day or two.

Append your API key to the end of each request. For example:

curl https://api.blocklytics.org/uniswap/v1/exchanges?key=API_KEY

Factories

get
All Factories

https://api.blocklytics.org/uniswap/v1/factories
Returns a list of all factories.
Request
Response
Request
Query Parameters
key
required
string
API key
Response
200: OK
[
"0xc0a47dfe034b400b47bdad5fecda2621de6c4d95",
"0x2fc8507beb41a60a37e3ac65fb41a01d9a6585da",
"0xbe87b46515ab488713daa155d92abbd0e5964f6a",
"0x30a27e6f9d7ce7e39bff0068188f09f020164155"
]

Exchanges

get
All Exchanges

https://api.blocklytics.org/uniswap/v1/exchanges
Returns a list of exchanges with 24h volume, current price and liquidity details. ⚠️ Avoid double-counting trade volume by using either `ethVolume` OR `tokenVolume`.
Request
Response
Request
Query Parameters
key
required
string
API key
Response
200: OK
[{
"ethLiquidity":11885.298838344355,
"ethVolume":826.4742565939489,
"exchange":"0x2c4bd064b998838076fa341a83d007fc2fa50957",
"factory":"0xc0a47dfe034b400b47bdad5fecda2621de6c4d95",
"price":0.3310788756378723,
"timestamp":"2019-05-11T05:37:26+00:00",
"token":"0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
"tokenLiquidity":3934.971376019159,
"tokenSymbol":"MKR",
"tokenName":"Maker",
"tokenVolume":279.569025472665
}]

get
Exchanges for Address

https://api.blocklytics.org/uniswap/v1/exchanges/{address}
Returns a list of exchanges with 24h volume, current price and liquidity details given the address of an exchange, factory or token. ⚠️ Avoid double-counting trade volume by using either `ethVolume` OR `tokenVolume`.
Request
Response
Request
Path Parameters
address
required
string
Factory, token or exchange address
Query Parameters
key
required
string
API key
Response
200: OK
[{
"ethLiquidity":11885.298838344355,
"ethVolume":826.4742565939489,
"exchange":"0x2c4bd064b998838076fa341a83d007fc2fa50957",
"factory":"0xc0a47dfe034b400b47bdad5fecda2621de6c4d95",
"price":0.3310788756378723,
"timestamp":"2019-05-11T05:37:26+00:00",
"token":"0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
"tokenLiquidity":3934.971376019159,
"tokenSymbol":"MKR",
"tokenVolume":279.569025472665
}]

Trades

get
Trades for Address

https://api.blocklytics.org/uniswap/v1/trades/{address}
Returns historical trades given the address of an account or exchange.
Request
Response
Request
Path Parameters
address
required
string
Account or exchange address
Query Parameters
from
optional
string
Filter by a starting date (inclusive), using YYYY-MM-DD format
to
optional
string
Filter by an ending date (inclusive), using YYYY-MM-DD format
key
required
string
API key
Response
200: OK
[{
"action": "SELL"
"exchange": "0x2c4bd064b998838076fa341a83d007fc2fa50957"
"id": 86852490108
"origination": "Uniswap"
"price": 2.495495281773207
"price_after_trade": 2.50296384712032
"price_before_trade": 2.502990798576114
"quantity": 0.025
"slippage": 0.003005359649716859
"timestamp": "2019-10-06T00:08:43+00:00"
"token": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2"
"tokenSymbol": "MKR"
"trader": "0xa725b17b42d3b4f64fb9bd2435480384f5998663"
"transaction": "0x0b6937b51f3e30f9a66313c18532f175b1ee2736cb6bd650d0932b931396e596"
"volume": 0.062387382044330184
}]

Liquidity

get
Liquidity for Address

https://api.blocklytics.org/uniswap/v1/liquidity/{address}
Returns historical liquidity activities given the address of an account or exchange.
Request
Response
Request
Path Parameters
address
required
string
Account or exchange address
Query Parameters
from
optional
string
Filter by a starting date (inclusive), using YYYY-MM-DD format
to
optional
string
Filter by an ending date (inclusive), using YYYY-MM-DD format
key
required
string
API Key
Response
200: OK
[{
"action":"ADD",
"ethAmount":2.475,
"exchange":"0xe9cf7887b93150d4f2da7dfc6d502b216438f244",
"id":91656260146,
"liquidity_provider":"0xbbbfc46566e5f0302cef913af8c8f423070ce6a1",
"newEthLiquidity":41091.92455593447,
"newTokenLiquidity":41394.17352480909,
"origination":"DeFi Zap",
"ownershipTokenSupply":41030.63328704617,
"ownershipToken_delta":2.471308377080464,
"timestamp":"2019-12-26T11:57:39+00:00",
"token":"0x5e74c9036fb86bd7ecdcb084a0673efc32ea31cb",
"tokenAmount":2.4932047009491227,
"tokenSymbol":"sETH",
"transaction":"0xcd6afe67ace946f73f44e3814a73f2df0cb0bdf43e0dc1e0648a118fba526a8a"
},{
"action":"REMOVE",
"ethAmount":-4.289341865541345,
"exchange":"0xe9cf7887b93150d4f2da7dfc6d502b216438f244",
"id":91655050130,
"liquidity_provider":"0xa5e65bf39c35dc7bc11f049be9a62f3c96944921",
"newEthLiquidity":41086.92455593447,
"newTokenLiquidity":41394.2164177099,
"origination":"Uniswap",
"ownershipTokenSupply":41028.16197866909,
"ownershipToken_delta":-4.283207242774718,
"timestamp":"2019-12-26T11:25:09+00:00",
"token":"0x5e74c9036fb86bd7ecdcb084a0673efc32ea31cb",
"tokenAmount":-4.321422140760267,
"tokenSymbol":"sETH",
"transaction":"0xd35621571207f71943b3ca9b640ae260a1ce4cd985dd2fae43d8420ffeea49df"
}]

Returns

get
Returns for Address

https://api.blocklytics.org/uniswap/v1/returns/{address}
Request
Response
Request
Path Parameters
address
required
string
Query Parameters
key
required
string
API key
period
optional
number
One of 7, 30, 90.
daysBack
optional
number
Specify how many results to return
Response
200: OK