Kupo
By CardanoSolutions
Kupo is fast, lightweight and configurable chain-index for the Cardano blockchain. It synchronizes data from the blockchain according to patterns matching addresses present in transaction outputs and builds a lookup table from matches to their associated output references, values, datums and scripts.
Demeter is serverless, you don't need to provision any infrastructure.
It provides highly-available, multi-tenant instances of Cardano Kupo. Requests to these instances are load balanced. Projects can make requests to Kupo from an HTTP client. Demeter eliminates the need for manual infrastructure management by handling monitoring, security, and version upgrades.
Demeter price scales to zero, you only pay for what you use.
Usage is measured by number of requests, and price defined for every 100,000 requests. If no requests are made, you incur no charges, except for minimum fees in Tiers with reserved throughput. Demeter offers different Tiers for Kupo Ports, allowing you to reserve throughput and scale your usage to meet the specific demands of your project. Service is limited by number of requests per second. Leverage Demeter Free Tier to get started.
Tier | Free | Flex | Pro I | Pro II |
---|---|---|---|---|
Minimum fee | $0 | $0 | $50 | $150 |
Price per 100k requests | $0 | $0.09 | $0.08 | $0.07 |
Max requests per second | 5 | 20 | 100 | 300 |
Aprox daily requests limit | 430,000 | 1,700,000 | 8,600,000 | 26,000,000 |
Once created, your Cardano Kupo Port resource will present you with the required information to request the Kupo instance:
NETWORK.kupo-v1.demeter.run
)KEY.NETWORK.kupo-v1.demeter.run
)dmtr-api-key
: dmtr_kupo63j21khsjx
)The above value will change for each project depending on your configuration.
You can use a library like requests
to make request to a Kupo instance in Python. Here's a basic example:
If the authenticated URL is used, the header(dmtr-api-key
) is not necessary to set.
import requests
try:
host = "https://mainnet.kupo-v1.demeter.run/matches/addrXXXX"
headers = {
'dmtr-api-key': 'dmtr_kupoXXXX',
}
# Make a GET request to the API with custom headers
response = requests.get(host, headers=headers)
# Check if the request was successful (status code 200)
if response.status_code == 200:
# Parse the JSON response
values = response.json()
# Print the transactions ID as an example
for value in values:
print(f"Transaction Id #{value['transaction_id']}")
else:
# Print an error message if the request was not successful
print(f"Error: {response.status_code}")
except Exception as e:
# Handle exceptions, if any
print(f"An error occurred: {e}")
In this code, replace host
, and dmtr-api-key
if is necessary
This will request to get resources from an address