Mints and Burns
What is this endpoint for?
This endpoint includes event data related to the addition (mint) and removal (burn) of tokens from a liquidity pool.
Endpoint
https://eu.market-api.kaiko.io/v2/data/liquidity.v1/events
Parameters
Fields
Request example
curl --compressed -H "Accept: application/json" -H "X-Api-Key: <client-api-key>" \
"https://eu.market-api.kaiko.io/v2/data/liquidity.v1/events"
import http.client
import json
# Enter your Kaiko API Key
api_key = "KAIKO_API_KEY"
api_host = "us.market-api.kaiko.io"
api_base_endpoint = "/v2/data/liquidity.v1/events"
# Start of parameter configuration
optional_params = {
"blockchain": "ethereum",
"start_block": "129670",
"end_block": "9999670",
}
# End of parameter configuration
conn = http.client.HTTPSConnection(api_host)
headers = {
"X-Api-Key": api_key,
"Accept": "application/json"
}
url_params = []
for param, value in optional_params.items():
url_params.append(f"{param}={value}")
url_params = '&'.join(url_params)
# Pagination for next pages
all_data = []
next_url = f"{api_base_endpoint}?{url_params}"
while next_url:
conn.request("GET", next_url, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode("utf-8"))
all_data.extend(data.get("data", []))
print(f"Fetched {len(data.get('data', []))} datapoints. Total: {len(all_data)}")
next_url = data.get("next_url", "").replace("https://us.market-api.kaiko.io", "")
if not next_url:
break
conn.close()
print(f" datapoints fetched: {(all_data)}")
Response example
{
"query": {
"blockchain": "*",
"exchange": "*",
"pool_address": "0x7bea39867e4169dbe237d55c8242a8f2fcdcc387",
"block_number": "*",
"type": "*",
"user_addresses": "*",
"tx_hash": "*",
"start_time": "2022-04-01 00:00:00 +0000 UTC",
"end_time": "2022-05-01 00:00:00 +0000 UTC",
"sort": "descending",
"pool_contains": "*",
"page_size": "1000"
},
"time": "2022-05-17T14:26:27.274Z",
"timestamp": 1652797587,
"data": [
{
"blockchain": "ethereum",
"block_number": 14682526,
"type": "mint",
"pool_name": "USDC-WETH-0.010",
"pool_address": "0x7bea39867e4169dbe237d55c8242a8f2fcdcc387",
"exchange": "usp3",
"transaction_hash": "0x02127cbf00c43fff6a1ec381703e66035b975e49f901ade55f1b12652e07b544",
"log_index": 187,
"user_address": "0x3cbd83d4a4ee504bf8b78d9c2927a9f22f27cce5",
"price": 0.0003564194488230487,
"amounts": [
{"symbol": "USDC", "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "amount": 31.063585},
{"symbol": "WETH", "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "amount": 0.5833806413127403}
],
"datetime": 1651280001,
"metadata": {"lower_ticker": 192600, "upper_ticker": 197000}
}
/* ... */
],
"continuation_token": "xxx",
"next_url": "https://eu.market-api.kaiko.io/v2/data/liquidity.v1/events?continuation_token=xxx"
}
Last updated