Submit a transaction for execution units evaluation (additional UTXO set)
POST /utils/txs/evaluate/utxos
Authorization
name: project_idtype: apiKeyin: headerdescription: There are multiple token types available based on network you choose when creating a Blockfrost a project, for a list of token types see available networks.
Submit a JSON payload with transaction CBOR and additional UTXO set to evaluate how much execution units it requires.
Hosted Endpoint only available for hosted variant.
Request
Header Parameters
Content-Type string required
Possible values: [application/json
]
application/json
Body
required
JSON payload
cbor string required
Transaction CBOR (encoded using base64 or base16).
additionalUtxoSet array[]
Possible values: >= 2
, <= 2
Additional UTXO as an array of tuples [TxIn, TxOut]. See https://ogmios.dev/mini-protocols/local-tx-submission/#additional-utxo-set.
Responses
- 200
- 400
- 403
- 404
- 418
- 425
- 429
- 500
Returns result of EvaluateTx function from Ogmios see EvaluateTxand API reference (EvaluateTxResponse) for related errors.
application/json
Schema
Example (from schema)
Schema
property name* any
{}
Bad request
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 400,
"error": "Bad Request",
"message": "Backend did not understand your request."
}
Authentication secret is missing or invalid
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 403,
"error": "Forbidden",
"message": "Invalid project token."
}
Component not found
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 404,
"error": "Not Found",
"message": "The requested component has not been found."
}
IP has been auto-banned for extensive sending of requests after usage limit has been reached
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 418,
"error": "Requested Banned",
"message": "IP has been auto-banned for flooding."
}
Mempool is already full, not accepting new txs straight away
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 425,
"error": "Mempool Full",
"message": "Mempool is full, please try resubmitting again later."
}
Usage limit reached
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 429,
"error": "Project Over Limit",
"message": "Usage is over limit."
}
Internal Server Error
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 500,
"error": "Internal Server Error",
"message": "An unexpected response was received from the backend."
}
POST /utils/txs/evaluate/utxos
Authorization
name: project_idtype: apiKeyin: headerdescription: There are multiple token types available based on network you choose when creating a Blockfrost a project, for a list of token types see available networks.
Request
Request
curl / cURL
curl -L -X POST 'https://cardano-mainnet.blockfrost.io/api/v0/utils/txs/evaluate/utxos' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>' \
--data-raw '{
"cbor": "string",
"additionalUtxoSet": [
[
{
"txId": "string",
"index": 0
},
{
"address": "string",
"value": {
"coins": 0,
"assets": {}
},
"datum_hash": "string",
"datum": {},
"script": {}
}
]
]
}'
python / requests
curl -L -X POST 'https://cardano-mainnet.blockfrost.io/api/v0/utils/txs/evaluate/utxos' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>' \
--data-raw '{
"cbor": "string",
"additionalUtxoSet": [
[
{
"txId": "string",
"index": 0
},
{
"address": "string",
"value": {
"coins": 0,
"assets": {}
},
"datum_hash": "string",
"datum": {},
"script": {}
}
]
]
}'
go / native
curl -L -X POST 'https://cardano-mainnet.blockfrost.io/api/v0/utils/txs/evaluate/utxos' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>' \
--data-raw '{
"cbor": "string",
"additionalUtxoSet": [
[
{
"txId": "string",
"index": 0
},
{
"address": "string",
"value": {
"coins": 0,
"assets": {}
},
"datum_hash": "string",
"datum": {},
"script": {}
}
]
]
}'
nodejs / axios
curl -L -X POST 'https://cardano-mainnet.blockfrost.io/api/v0/utils/txs/evaluate/utxos' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>' \
--data-raw '{
"cbor": "string",
"additionalUtxoSet": [
[
{
"txId": "string",
"index": 0
},
{
"address": "string",
"value": {
"coins": 0,
"assets": {}
},
"datum_hash": "string",
"datum": {},
"script": {}
}
]
]
}'
ruby / Net::HTTP
curl -L -X POST 'https://cardano-mainnet.blockfrost.io/api/v0/utils/txs/evaluate/utxos' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>' \
--data-raw '{
"cbor": "string",
"additionalUtxoSet": [
[
{
"txId": "string",
"index": 0
},
{
"address": "string",
"value": {
"coins": 0,
"assets": {}
},
"datum_hash": "string",
"datum": {},
"script": {}
}
]
]
}'
csharp / RestSharp
curl -L -X POST 'https://cardano-mainnet.blockfrost.io/api/v0/utils/txs/evaluate/utxos' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>' \
--data-raw '{
"cbor": "string",
"additionalUtxoSet": [
[
{
"txId": "string",
"index": 0
},
{
"address": "string",
"value": {
"coins": 0,
"assets": {}
},
"datum_hash": "string",
"datum": {},
"script": {}
}
]
]
}'
php / cURL
curl -L -X POST 'https://cardano-mainnet.blockfrost.io/api/v0/utils/txs/evaluate/utxos' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>' \
--data-raw '{
"cbor": "string",
"additionalUtxoSet": [
[
{
"txId": "string",
"index": 0
},
{
"address": "string",
"value": {
"coins": 0,
"assets": {}
},
"datum_hash": "string",
"datum": {},
"script": {}
}
]
]
}'
java / OkHttp
curl -L -X POST 'https://cardano-mainnet.blockfrost.io/api/v0/utils/txs/evaluate/utxos' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>' \
--data-raw '{
"cbor": "string",
"additionalUtxoSet": [
[
{
"txId": "string",
"index": 0
},
{
"address": "string",
"value": {
"coins": 0,
"assets": {}
},
"datum_hash": "string",
"datum": {},
"script": {}
}
]
]
}'
powershell / RestMethod
curl -L -X POST 'https://cardano-mainnet.blockfrost.io/api/v0/utils/txs/evaluate/utxos' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>' \
--data-raw '{
"cbor": "string",
"additionalUtxoSet": [
[
{
"txId": "string",
"index": 0
},
{
"address": "string",
"value": {
"coins": 0,
"assets": {}
},
"datum_hash": "string",
"datum": {},
"script": {}
}
]
]
}'