Get started
API Endpoint
http://node_ip:5000/
The Fragminter Local Node API provides programmatic methods to query and interact with the cardano blockchain.
get sync percentage
# Here is a curl example
curl \
-X GET http://node_ip:5000/get_sync_percent
To get a float that represents sync percentage to the cardano blockchain you need to make a GET call to the following url :
http://node_ip:5000/get_sync_percent
Result example :
{
"syncProgress": 100.00
}
get tip
# Here is a curl example
curl \
-X GET http://node_ip:5000/get_tip
To get a json of the newest data of the cardano blockchain you need to make a GET call to the following url :
http://node_ip:5000/get_tip
Result example :
{
"block":6737152,
"epoch":313,
"era":"Alonzo",
"hash":"c081a1d68ea8453bafccc465c6f0c048c5bf4c31cbbf9adba634f2719616693d",
"slot":50210771,
"syncProgress":"100.00"
}
get node utxo
# Here is a curl example
curl \
-X GET http://node_ip:5000/get_node_utxo
To get a list of utxos and its corresponding amounts of lovelace and/or assets you need to make a GET call to the following url :
http://node_ip:5000/get_node_utxo
Result example :
[{
"tx_hash": "3350d477a8408a3aceea8f70eb9068f9519c74478db3798c3febcde1e60a2882",
"tx_in": "0",
"amount": [{
"unit": "lovelace",
"quantity": "1380813"
}]
}, {
"tx_hash": "41f773a417f886c07291e7cfb0d0dda3f48193869d596d402ec3f50a2400db02",
"tx_in": "0",
"amount": [{
"unit": "lovelace",
"quantity": "1380813"
}]
}, {
"tx_hash": "4bfa4fcdb0298a77bd9156c22476900bb3efebec621c7d862244cbee8f8ad577",
"tx_in": "0",
"amount": [{
"unit": "lovelace",
"quantity": "1380813"
}]
}, {
"tx_hash": "4e4a562868959d6c803f95ba386f391d55af848981304fe13de596abec75da5d",
"tx_in": "0",
"amount": [{
"unit": "lovelace",
"quantity": "1447881"
}, {
"unit": "9ad3e2891f1a0b19d0f552728ccc804a6df7c85d666c3aef5f21b581.616672616d6570726f746f74797065",
"quantity": "5"
}]
}, {
"tx_hash": "63756554000a10ddf86b57531c9c61ba8aec7c56b9771c12e821cf1d77d766c6",
"tx_in": "0",
"amount": [{
"unit": "lovelace",
"quantity": "1555554"
}, {
"unit": "9ad3e2891f1a0b19d0f552728ccc804a6df7c85d666c3aef5f21b581.576f726c647357697468696e31",
"quantity": "1"
}]
}, {
"tx_hash": "77d43bf5839d04f2aded8d206d7a84bbacabf75fb97b65f3c60af4d67b35e576",
"tx_in": "0",
"amount": [{
"unit": "lovelace",
"quantity": "1555554"
}, {
"unit": "9ad3e2891f1a0b19d0f552728ccc804a6df7c85d666c3aef5f21b581.576f726c647357697468696e",
"quantity": "1"
}]
}, {
"tx_hash": "a1c4366531bebef576cb1c13b799bed7fd84a6a4bcb27fd61f9977bf3402590b",
"tx_in": "0",
"amount": [{
"unit": "lovelace",
"quantity": "1555554"
}, {
"unit": "9ad3e2891f1a0b19d0f552728ccc804a6df7c85d666c3aef5f21b581.576f726c647357697468696e3430313231",
"quantity": "1"
}]
}, {
"tx_hash": "b6a6d9b357a12803dc23c786496494e78bd73cb8bf21a22fd81458b178452bfd",
"tx_in": "0",
"amount": [{
"unit": "lovelace",
"quantity": "1555554"
}, {
"unit": "9ad3e2891f1a0b19d0f552728ccc804a6df7c85d666c3aef5f21b581.576f726c647357697468696e3132393534",
"quantity": "1"
}]
}, {
"tx_hash": "dc556d1bfe84ba653a320547c099e77ea0b9f34855df75913c48a99669aa71f1",
"tx_in": "0",
"amount": [{
"unit": "lovelace",
"quantity": "1555554"
}, {
"unit": "9ad3e2891f1a0b19d0f552728ccc804a6df7c85d666c3aef5f21b581.576f726c647357697468696e",
"quantity": "1"
}]
}, {
"tx_hash": "e040d3ef3c918de04ccc15a2a56e19d97eac8d87e924a579fbbdb0a159199e4c",
"tx_in": "0",
"amount": [{
"unit": "lovelace",
"quantity": "1555554"
}, {
"unit": "9ad3e2891f1a0b19d0f552728ccc804a6df7c85d666c3aef5f21b581.576f726c647357697468696e3133353431",
"quantity": "1"
}]
}, {
"tx_hash": "eae6cd586a74eacdceb63e71424c300a99bf88e92274dd6dead82459f4d4d6e3",
"tx_in": "0",
"amount": [{
"unit": "lovelace",
"quantity": "1555554"
}, {
"unit": "9ad3e2891f1a0b19d0f552728ccc804a6df7c85d666c3aef5f21b581.576f726c647357697468696e",
"quantity": "1"
}]
}]
get external sync
# Here is a curl example
curl \
-X GET http://node_ip:5000/get_external_sync
To get a boolean of synchronization by querying a stable address you need to make a GET call to the following url :
http://node_ip:5000/get_external_sync
Result example :
{
"isSynced": "True"
}
get node info
# Here is a curl example
curl \
-X GET http://node_ip:5000/get_node_info
To get a json of the current node address information you need to make a GET call to the following url :
http://node_ip:5000/get_node_info
Result example :
{
"address": "addr1qy3wh4nrhet4hxh3cztrdu0x9286shx4xfmn4pj2f0pufygmr9zjlwlp4mj6qnnelgdanl03emul3nrm4tfflut9p9fs5wpsnw",
"era": "shelley",
"encoding": "bech32",
"type": "payment",
"base16": "0122ebd663be575b9af1c09636f1e62a8fa85cd532773a864a4bc3c4911b19452fbbe1aee5a04e79fa1bd9fdf1cef9f8cc7baad29ff1650953"
}
get address info
# Here is a curl example
curl \
-X GET http://node_ip:5000/get_new_protocol
To create and return a new protocol json for the cardano blockchain you need to make a GET call to the following url :
http://node_ip:5000/get_new_protocol
Result example :
{
"txFeePerByte": 44,
"minUTxOValue": null,
"decentralization": 0,
"utxoCostPerWord": 34482,
"stakePoolDeposit": 500000000,
"poolRetireMaxEpoch": 18,
"extraPraosEntropy": null,
"collateralPercentage": 150,
"stakePoolTargetNum": 500,
"maxBlockBodySize": 73728,
"minPoolCost": 340000000,
"maxTxSize": 16384,
"treasuryCut": 0.2,
"maxBlockExecutionUnits": {
"memory": 50000000,
"steps": 40000000000
},
"maxCollateralInputs": 3,
"maxValueSize": 5000,
"maxBlockHeaderSize": 1100,
"maxTxExecutionUnits": {
"memory": 11250000,
"steps": 10000000000
},
"costModels": {
"PlutusScriptV1": {
"cekConstCost-exBudgetMemory": 100,
"unBData-cpu-arguments": 150000,
"divideInteger-memory-arguments-minimum": 1,
"nullList-cpu-arguments": 150000,
"cekDelayCost-exBudgetMemory": 100,
"appendByteString-cpu-arguments-slope": 621,
"sha2_256-memory-arguments": 4,
"multiplyInteger-cpu-arguments-intercept": 61516,
"iData-cpu-arguments": 150000,
"equalsString-cpu-arguments-intercept": 150000,
"trace-cpu-arguments": 150000,
"lessThanEqualsByteString-cpu-arguments-intercept": 103599,
"encodeUtf8-cpu-arguments-slope": 1000,
"equalsString-cpu-arguments-constant": 1000,
"blake2b-cpu-arguments-slope": 29175,
"consByteString-memory-arguments-intercept": 0,
"headList-cpu-arguments": 150000,
"listData-cpu-arguments": 150000,
"divideInteger-cpu-arguments-model-arguments-slope": 118,
"divideInteger-memory-arguments-slope": 1,
"bData-cpu-arguments": 150000,
"chooseData-memory-arguments": 32,
"cekBuiltinCost-exBudgetCPU": 29773,
"mkNilData-memory-arguments": 32,
"equalsInteger-cpu-arguments-intercept": 136542,
"lengthOfByteString-cpu-arguments": 150000,
"subtractInteger-cpu-arguments-slope": 0,
"unIData-cpu-arguments": 150000,
"sliceByteString-cpu-arguments-slope": 5000,
"unMapData-cpu-arguments": 150000,
"modInteger-cpu-arguments-model-arguments-slope": 118,
"lessThanInteger-cpu-arguments-intercept": 179690,
"appendString-memory-arguments-intercept": 0,
"mkCons-cpu-arguments": 150000,
"sha3_256-cpu-arguments-slope": 82363,
"ifThenElse-cpu-arguments": 1,
"mkNilPairData-cpu-arguments": 150000,
"constrData-memory-arguments": 32,
"lessThanEqualsInteger-cpu-arguments-intercept": 145276,
"addInteger-memory-arguments-slope": 1,
"chooseList-memory-arguments": 32,
"equalsData-memory-arguments": 1,
"decodeUtf8-cpu-arguments-intercept": 150000,
"bData-memory-arguments": 32,
"lessThanByteString-cpu-arguments-slope": 248,
"listData-memory-arguments": 32,
"consByteString-cpu-arguments-intercept": 150000,
"headList-memory-arguments": 32,
"subtractInteger-memory-arguments-slope": 1,
"appendByteString-memory-arguments-intercept": 0,
"unIData-memory-arguments": 32,
"remainderInteger-memory-arguments-minimum": 1,
"lengthOfByteString-memory-arguments": 4,
"encodeUtf8-memory-arguments-intercept": 0,
"cekStartupCost-exBudgetCPU": 100,
"remainderInteger-memory-arguments-slope": 1,
"multiplyInteger-memory-arguments-intercept": 0,
"cekForceCost-exBudgetCPU": 29773,
"unListData-memory-arguments": 32,
"sha2_256-cpu-arguments-slope": 29175,
"indexByteString-memory-arguments": 1,
"equalsInteger-memory-arguments": 1,
"remainderInteger-cpu-arguments-model-arguments-slope": 118,
"cekVarCost-exBudgetCPU": 29773,
"lessThanEqualsInteger-cpu-arguments-slope": 1366,
"addInteger-memory-arguments-intercept": 1,
"sndPair-cpu-arguments": 150000,
"lessThanInteger-memory-arguments": 1,
"cekLamCost-exBudgetCPU": 29773,
"chooseUnit-cpu-arguments": 150000,
"decodeUtf8-cpu-arguments-slope": 1000,
"fstPair-cpu-arguments": 150000,
"quotientInteger-memory-arguments-minimum": 1,
"lessThanEqualsInteger-memory-arguments": 1,
"chooseUnit-memory-arguments": 32,
"fstPair-memory-arguments": 32,
"quotientInteger-cpu-arguments-constant": 148000,
"mapData-cpu-arguments": 150000,
"unConstrData-cpu-arguments": 150000,
"mkPairData-cpu-arguments": 150000,
"sndPair-memory-arguments": 32,
"decodeUtf8-memory-arguments-slope": 8,
"equalsData-cpu-arguments-intercept": 150000,
"addInteger-cpu-arguments-intercept": 197209,
"modInteger-memory-arguments-intercept": 0,
"cekStartupCost-exBudgetMemory": 100,
"divideInteger-cpu-arguments-model-arguments-intercept": 425507,
"divideInteger-memory-arguments-intercept": 0,
"cekVarCost-exBudgetMemory": 100,
"consByteString-memory-arguments-slope": 1,
"cekForceCost-exBudgetMemory": 100,
"unListData-cpu-arguments": 150000,
"subtractInteger-cpu-arguments-intercept": 197209,
"indexByteString-cpu-arguments": 150000,
"equalsInteger-cpu-arguments-slope": 1326,
"lessThanByteString-memory-arguments": 1,
"blake2b-cpu-arguments-intercept": 2477736,
"encodeUtf8-cpu-arguments-intercept": 150000,
"multiplyInteger-cpu-arguments-slope": 11218,
"tailList-cpu-arguments": 150000,
"appendByteString-cpu-arguments-intercept": 396231,
"equalsString-cpu-arguments-slope": 1000,
"lessThanEqualsByteString-cpu-arguments-slope": 248,
"remainderInteger-cpu-arguments-constant": 148000,
"chooseList-cpu-arguments": 150000,
"equalsByteString-memory-arguments": 1,
"constrData-cpu-arguments": 150000,
"cekApplyCost-exBudgetCPU": 29773,
"equalsData-cpu-arguments-slope": 10000,
"decodeUtf8-memory-arguments-intercept": 0,
"modInteger-memory-arguments-slope": 1,
"addInteger-cpu-arguments-slope": 0,
"appendString-cpu-arguments-intercept": 150000,
"quotientInteger-cpu-arguments-model-arguments-slope": 118,
"unMapData-memory-arguments": 32,
"cekApplyCost-exBudgetMemory": 100,
"quotientInteger-memory-arguments-slope": 1,
"mkNilPairData-memory-arguments": 32,
"ifThenElse-memory-arguments": 1,
"equalsByteString-cpu-arguments-slope": 247,
"sliceByteString-memory-arguments-slope": 1,
"sha3_256-memory-arguments": 4,
"mkCons-memory-arguments": 32,
"verifySignature-cpu-arguments-intercept": 3345831,
"cekBuiltinCost-exBudgetMemory": 100,
"remainderInteger-memory-arguments-intercept": 0,
"lessThanEqualsByteString-memory-arguments": 1,
"mkNilData-cpu-arguments": 150000,
"equalsString-memory-arguments": 1,
"chooseData-cpu-arguments": 150000,
"remainderInteger-cpu-arguments-model-arguments-intercept": 425507,
"tailList-memory-arguments": 32,
"sha2_256-cpu-arguments-intercept": 2477736,
"multiplyInteger-memory-arguments-slope": 1,
"iData-memory-arguments": 32,
"divideInteger-cpu-arguments-constant": 148000,
"cekDelayCost-exBudgetCPU": 29773,
"encodeUtf8-memory-arguments-slope": 8,
"subtractInteger-memory-arguments-intercept": 1,
"nullList-memory-arguments": 32,
"lessThanByteString-cpu-arguments-intercept": 103599,
"appendByteString-memory-arguments-slope": 1,
"blake2b-memory-arguments": 4,
"unBData-memory-arguments": 32,
"cekConstCost-exBudgetCPU": 29773,
"consByteString-cpu-arguments-slope": 1000,
"trace-memory-arguments": 32,
"quotientInteger-memory-arguments-intercept": 0,
"mapData-memory-arguments": 32,
"verifySignature-cpu-arguments-slope": 1,
"quotientInteger-cpu-arguments-model-arguments-intercept": 425507,
"modInteger-cpu-arguments-constant": 148000,
"appendString-cpu-arguments-slope": 1000,
"unConstrData-memory-arguments": 32,
"mkPairData-memory-arguments": 32,
"equalsByteString-cpu-arguments-constant": 150000,
"equalsByteString-cpu-arguments-intercept": 112536,
"sliceByteString-memory-arguments-intercept": 0,
"lessThanInteger-cpu-arguments-slope": 497,
"verifySignature-memory-arguments": 1,
"cekLamCost-exBudgetMemory": 100,
"sliceByteString-cpu-arguments-intercept": 150000,
"modInteger-cpu-arguments-model-arguments-intercept": 425507,
"modInteger-memory-arguments-minimum": 1,
"appendString-memory-arguments-slope": 1,
"sha3_256-cpu-arguments-intercept": 0
}
},
"protocolVersion": {
"minor": 0,
"major": 6
},
"txFeeFixed": 155381,
"stakeAddressDeposit": 2000000,
"monetaryExpansion": 3.0e-3,
"poolPledgeInfluence": 0.3,
"executionUnitPrices": {
"priceSteps": 7.21e-5,
"priceMemory": 5.77e-2
}
}
get address info
# Here is a curl example
curl \
-X POST http://node_ip:5000/get_address_info \
-H 'Content-Type: application/json' \
-d '{"address":"addr1qy9ryfzjdmnmfcahwuwy5mrav5t8d5vs5cugepnytrt7yqngz2ux66zp9s5pf2e9ax7jrtvk0jv3gh7ud04fwsv02stqwt9fr7"}'
To get a json of the given address information you need to make a POST call to the following url :
http://node_ip:5000/get_address_info
Result example :
{
"address": "addr1qy9ryfzjdmnmfcahwuwy5mrav5t8d5vs5cugepnytrt7yqngz2ux66zp9s5pf2e9ax7jrtvk0jv3gh7ud04fwsv02stqwt9fr7",
"era": "shelley",
"encoding": "bech32",
"type": "payment",
"base16": "010a3224526ee7b4e3b7771c4a6c7d651676d190a6388c866458d7e2026812b86d68412c2814ab25e9bd21ad967c99145fdc6bea97418f5416"
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| Address | String | The address you want to search. |
get address UTXOs
# Here is a curl example
curl \
-X POST http://node_ip:5000/get_address_utxos \
-H 'Content-Type: application/json' \
-d '{"address":"addr1qy9ryfzjdmnmfcahwuwy5mrav5t8d5vs5cugepnytrt7yqngz2ux66zp9s5pf2e9ax7jrtvk0jv3gh7ud04fwsv02stqwt9fr7"}'
To get a json of the given address UTXOs you need to make a POST call to the following url :
http://node_ip:5000/get_address_utxos
Result example :
[{
"tx_hash": "03aa29d981f8918f3bcebc06e459ed167377ebf4977f0b639e14cb41c44aefbc",
"tx_in": "1",
"amount": [{
"unit": "lovelace",
"quantity": "1555554"
}, {
"unit": "a516ec48b782640e00aea2fc35197264458b5ed60126236bb0b5daba.746573745f746f6b656e5f33",
"quantity": "3"
}]
}, {
"tx_hash": "0936ab786fbde6dacb8fe17116f593c5638c45ce1124fdd7ad68b29e0ce052db",
"tx_in": "12",
"amount": [{
"unit": "lovelace",
"quantity": "13218019"
}, {
"unit": "a7bee18759945933ea991bbcebb8d0f62db190f54eb5a1cb104a4747.7672626174746c6573",
"quantity": "10"
}]
}]
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| Address | String | The address you want to search. |
generate new address
# Here is a curl example
curl \
-X POST http://node_ip:5000/generate_address \
-H 'Content-Type: application/json' \
-d '{"name":"new_name"}'
To create a new payment address you need to make a POST call to the following url :
http://node_ip:5000/generate_address
Result example :
{
"address": "addr1v8uue6m8k4ze5kwfrc27tuzcsham9xr5ktlzqx3lyjgpmdsc7xm8m"
//DO NOT SEND ANYTHING TO THIS ADDRESS
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| Name | String | The name of the new address you want to create |
generate new *unlocking* policy
# Here is a curl example
curl \
-X POST http://node_ip:5000/generate_policy \
-H 'Content-Type: application/json' \
-d '{"name":"new_name"}'
To create a new *unlocking* policy you need to make a POST call to the following url :
http://node_ip:5000/generate_policy
Result example :
{
"policyID": "e7dd418f74827d97432db991b648568550708740fc099b7d51fb9f3f"
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| Name | String | The name of the new policy you want to create |
generate new locking policy
# Here is a curl example
curl \
-X POST http://127.0.0.1:5000/generate_locking_policy \
-H 'Content-Type: application/json' \
-d '{"name":"test", "seconds":"14515200"}'
To create a new *locking* policy you need to make a POST call to the following url :
http://node_ip:5000/generate_locking_policy
Result example :
{
"policyID": "5b9c235dcd4da5769cae135a06100a7eaa588f844e77dc37fe0f9fb2"
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| Name | String | The name of the new locking policy you want to create |
| Seconds | String | Number of seconds the policy will remain open starting moment of creation |
mint request
# Here is a curl example
curl \
-X POST http://127.0.0.1:5000/mint \
-H 'Content-Type: application/json' \
-d '{"metadata":"\"name\":\"test token 3\"", "policyname":"test", "tokenamount": 3, "tokenname":"test_token_3"}'
To create a mint request you need to make a POST call to the following url :
http://node_ip:5000/mint
Result example :
{
"Message": "Send 3.29429 ADA to addr1vxad729tvvky3n6f2ka597jjkclfz5mcx8f8qr5dk79aczqt76gdq"
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| Metadata | String | The data to be wrapped with proper 721 meta data format |
| Policy Name | String | Name of a previously created policy |
| Token Amount | Int | Number of tokens to be minted |
| Token Name | String | Name of token |
Errors
The Local Node API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 415 | Invalid request format, request must be JSON. |
| 416 | Payment Address keys do not exist. |
| 417 | Failed to reserve mint request. |
| 418 | Policy keys do not exist. |