{ "name": "hilltop-api", "base_url": "https://hilltop-api.mainnet.dandelion.link", "enums": { "country": { "values": [ { "name": "IE" }, { "name": "UK" } ] } }, "models": { "epoch": { "fields": [ { "name": "out_sum", "type": "long" }, { "name": "fees", "type": "long" }, { "name": "tx_count", "type": "integer" }, { "name": "blk_count", "type": "integer" }, { "name": "number", "type": "integer" }, { "name": "start_time", "type": "date-time-iso8601" }, { "name": "end_time", "type": "date-time-iso8601" } ] }, "active_stake_amount": { "fields": [ { "name": "amount_in_lovelaces", "type": "long" } ] }, "address_stake_amount": { "fields": [ { "name": "stake_address", "type": "string", "description": "stake1..." }, { "name": "amount_in_lovelaces", "type": "long" } ] }, "delegators_count": { "fields": [ { "name": "delegators_count_total", "type": "integer" } ] }, "sigma": { "fields": [ { "name": "sigma", "type": "double" }, { "name": "epoch", "type": "integer" }, { "name": "total_staked", "type": "long" }, { "name": "active_stake", "type": "long" }, { "name": "nonce", "type": "string" }, { "name": "d", "type": "double" } ] }, "native_asset_id": { "fields": [ { "name": "policy_id", "type": "string" }, { "name": "asset_name", "type": "string" }, { "name": "block_number", "type": "long" }, { "name": "block_time", "type": "date-time-iso8601" }, { "name": "fingerprint", "type": "string" } ] }, "native_asset": { "fields": [ { "name": "transaction_id", "type": "string" }, { "name": "policy_id", "type": "string" }, { "name": "token_name", "type": "string" }, { "name": "metadata", "type": "json" }, { "name": "block_number", "type": "long" }, { "name": "epoch_slot_number", "type": "long" }, { "name": "epoch_number", "type": "long" }, { "name": "invalid_before", "type": "long", "required": false }, { "name": "invalid_hereafter", "type": "long", "required": false }, { "name": "quantity", "type": "long" } ] }, "native_asset_details_request": { "fields": [ { "name": "policy_id", "type": "string" }, { "name": "asset_names", "type": "[string]", "required": "false" } ] }, "native_asset_details": { "fields": [ { "name": "policy_id", "type": "string" }, { "name": "asset_name", "type": "string" }, { "name": "metadata", "type": "json" }, { "name": "minted_at", "type": "date-time-iso8601" }, { "name": "last_minted_at", "type": "date-time-iso8601" }, { "name": "first_minting_tx_block", "type": "long" }, { "name": "last_minting_tx_block", "type": "long" }, { "name": "minting_tx_hash", "type": "string" }, { "name": "circulating_supply", "type": "long" }, { "name": "fingerprint", "type": "string" } ] }, "nft_details": { "fields": [ { "name": "policy_id", "type": "string" }, { "name": "asset_name_raw", "type": "string" }, { "name": "asset_name", "type": "string", "required": "false" }, { "name": "metadata", "type": "json" }, { "name": "minted_at", "type": "date-time-iso8601" }, { "name": "minted_at_block", "type": "long" }, { "name": "minting_tx_hash", "type": "string" }, { "name": "amount", "type": "long" }, { "name": "fingerprint", "type": "string" } ] }, "stakepool_metadata": { "description": "Stake Pool Offline Metadata", "fields": [ { "name": "name", "type": "string" }, { "name": "ticker", "type": "string" }, { "name": "homepage", "type": "string" }, { "name": "description", "type": "string" }, { "name": "extended", "type": "string", "required": "false" } ] }, "stakepool": { "fields": [ { "name": "id", "type": "string", "description": "the id of the pool", "example": "pool1yr0cv3dtmhcfgqa6yetvmf769ngk89e6tepecmjrmjl2jzcw2lm" }, { "name": "pool_id_bech32", "description": "the id in bech32 format of the pool", "type": "string", "example": "20df8645abddf09403ba2656cda7da2cd163973a5e439c6e43dcbea9" }, { "name": "metadata", "type": "stakepool_metadata", "required": "false" }, { "name": "cost", "description": "operational costs per epoch in lovelaces", "type": "long" }, { "name": "margin", "description": "operator margin, percentage (from 0 to 1)", "type": "double" }, { "name": "pledge", "description": "pledge amount, in lovelaces", "type": "long" }, { "name": "active_stake", "description": "active stake for current epoch in lovelaces", "type": "long" }, { "name": "saturation", "description": "pool saturation as percentage (0 to 1)", "type": "double" }, { "name": "retiring_at_epoch", "description": "if defined, is the epoch at which the pool will retire", "type": "long", "required": "false" } ] }, "pool_update": { "fields": [ { "name": "epoch_number", "type": "integer" }, { "name": "block_number", "type": "long" }, { "name": "tx_hash", "type": "string" }, { "name": "pool_ticker_name", "type": "string", "required": "false" }, { "name": "pool_bech32_id", "type": "string" }, { "name": "certificate_index", "type": "integer" }, { "name": "vrf_key_hash", "type": "string" }, { "name": "pledge", "type": "long" }, { "name": "reward_address", "type": "string" }, { "name": "active_epoch_number", "type": "long" }, { "name": "margin", "type": "double" }, { "name": "fixed_cost", "type": "long" } ] }, "pool_retiring": { "fields": [ { "name": "ticker_name", "type": "string", "required": "false" }, { "name": "pool_id", "type": "string" }, { "name": "certificate_index", "type": "integer" }, { "name": "epoch_number", "type": "long" }, { "name": "block_number", "type": "long" }, { "name": "retiring_at_epoch", "type": "long" }, { "name": "tx_hash", "type": "string" } ] }, "cnft_metadata_v001_asset": { "fields": [ { "name": "assetName", "type": "string", "required": false }, { "name": "attributes", "type": "json", "required": false }, { "name": "ipfs", "type": "string" }, { "name": "mimeType", "type": "string", "required": "false" } ] }, "cnft_metadata_v001": { "fields": [ { "name": "policyId", "type": "string" }, { "name": "tokens", "type": "map[string]" }, { "name": "asset", "type": "cnft_metadata_v001_asset" } ] }, "nft_metadata": { "fields": [ { "name": "name", "type": "string", "required": "false" }, { "name": "image", "type": "string", "required": "false" }, { "name": "mediaType", "type": "string", "required": "false" }, { "name": "files", "type": "[nft_metadata_file]", "required": "false" } ] }, "nft_metadata_files_as_object": { "fields": [ { "name": "name", "type": "string", "required": "false" }, { "name": "image", "type": "string", "required": "false" }, { "name": "mediaType", "type": "string", "required": "false" }, { "name": "files", "type": "nft_metadata_file", "required": "false" } ] }, "nft_metadata_no_files": { "fields": [ { "name": "name", "type": "string", "required": "false" }, { "name": "image", "type": "string", "required": "false" }, { "name": "mediaType", "type": "string", "required": "false" } ] }, "nft_metadata_file": { "fields": [ { "name": "name", "type": "string", "required": "false" }, { "name": "src", "type": "string", "required": "false" }, { "name": "mediaType", "type": "string", "required": "false" } ] }, "nft_metadata_img_array": { "fields": [ { "name": "name", "type": "string", "required": "false" }, { "name": "image", "type": "[string]", "required": "false" }, { "name": "mediaType", "type": "string", "required": "false" }, { "name": "files", "type": "[nft_metadata_file]", "required": "false" } ] }, "transaction": { "fields": [ { "name": "hash", "type": "string" }, { "name": "block", "type": "long" }, { "name": "timestamp", "type": "date-time-iso8601" } ] }, "transaction_history_request": { "fields": [ { "name": "addresses", "type": "[string]" } ] }, "block": { "fields": [ { "name": "number", "type": "long" }, { "name": "epoch_number", "type": "long" }, { "name": "slot_number", "type": "long" }, { "name": "epoch_slot_number", "type": "long" }, { "name": "size", "type": "long" }, { "name": "transaction_count", "type": "long" }, { "name": "time", "type": "date-time-iso8601" } ] }, "day_block": { "fields": [ { "name": "first", "type": "block" }, { "name": "last", "type": "block" } ] }, "generic_error": { "fields": [ { "name": "description", "type": "string" } ] }, "reward": { "fields": [ { "name": "staking_address", "type": "string" }, { "name": "epoch", "type": "integer" }, { "name": "amount", "type": "long" }, { "name": "pool_id", "type": "string" } ] }, "stakepool_delegation": { "fields": [ { "name": "stakepool", "type": "stakepool" }, { "name": "epoch", "type": "integer" } ] }, "delegation": { "fields": [ { "name": "staking_address", "type": "string" }, { "name": "delegations", "type": "[stakepool_delegation]" } ] }, "wallet_balance": { "fields": [ { "name": "balance", "type": "long" } ] }, "healthcheck": { "description": "Response for the healthcheck's endpoint of the service", "fields": [ { "name": "status", "type": "string" } ] } }, "resources": { "healthcheck": { "description": "healthcheck endpoint", "operations": [ { "method": "GET", "responses": { "200": { "type": "healthcheck" } } } ] }, "epoch": { "description": "epoch resource", "operations": [ { "path": "/current", "method": "GET", "responses": { "200": { "type": "epoch" } } }, { "path": "/:epoch_number", "parameters": [ { "name": "epoch_number", "type": "integer", "location": "path" } ], "method": "GET", "responses": { "200": { "type": "epoch" } } } ] }, "active_stake_amount": { "description": "active_stake_amount resource", "operations": [ { "method": "GET", "parameters": [ { "name": "epoch_number", "type": "integer", "location": "query", "required": "false" } ], "responses": { "200": { "type": "active_stake_amount" } } }, { "path": "/:pool_bech32_id", "method": "GET", "parameters": [ { "name": "epoch_number", "type": "integer", "location": "query", "required": "false" }, { "name": "pool_bech32_id", "type": "string", "location": "path" } ], "responses": { "200": { "type": "active_stake_amount" } } }, { "path": "/:pool_bech32_id/addresses", "method": "GET", "parameters": [ { "name": "epoch_number", "type": "integer", "location": "query" }, { "name": "pool_bech32_id", "type": "string", "location": "path" } ], "responses": { "200": { "type": "[address_stake_amount]" } } } ] }, "delegators_count": { "description": "active_stake_amount resource", "operations": [ { "path": "/:pool_bech32_id", "method": "GET", "parameters": [ { "name": "pool_bech32_id", "type": "string", "location": "path" } ], "responses": { "200": { "type": "delegators_count" } } } ] }, "sigma": { "description": "calculates sigma", "operations": [ { "path": "/:pool_id", "description": "can be either the pool_id (e.g. pool1wcwe923r...) or the pool_hash", "method": "GET", "parameters": [ { "name": "pool_id", "type": "string", "location": "path" }, { "name": "epoch_number", "type": "integer", "location": "query" } ], "responses": { "200": { "type": "sigma" } } } ] }, "native_asset": { "description": "find native assets", "operations": [ { "path": "/ids", "method": "GET", "parameters": [ { "name": "block_number_from", "type": "long", "description": "the block number from when fetching updates, it's the pagination index", "location": "query", "required": "false" }, { "name": "limit", "type": "long", "description": "the number of updates to fetch", "location": "query", "required": "false" } ], "responses": { "200": { "type": "[native_asset_id]" } } }, { "path": "/:policy_id/asset_names", "method": "GET", "parameters": [ { "name": "policy_id", "type": "string", "description": "the policy id to get the asset name", "location": "path", "required": "true" } ], "responses": { "200": { "type": "[string]" } } }, { "path": "/nfts", "method": "GET", "parameters": [ { "name": "block_number_from", "type": "long", "location": "query", "required": "true" }, { "name": "block_number_to", "type": "long", "location": "query", "required": "true" } ], "responses": { "200": { "type": "[nft_details]" }, "404": { "type": "generic_error" } } }, { "path": "/native_assets_details", "method": "POST", "body": { "type": "native_asset_details_request" }, "responses": { "200": { "type": "[native_asset_details]" } } }, { "path": "/:stake_address", "method": "GET", "parameters": [ { "name": "stake_address", "type": "string", "location": "path" } ], "responses": { "200": { "type": "[native_asset]" } } } ] }, "stakepool": { "description": "retrieve stake pool information", "operations": [ { "path": "/vrf_vkey/:vrf_vkey_hash", "description": "find pool details by vrf_vkey", "method": "GET", "parameters": [ { "name": "vrf_vkey_hash", "type": "string", "description": "the hash of the vrf_vkey", "location": "path" } ], "responses": { "200": { "type": "stakepool" }, "404": { "type": "generic_error" } } }, { "path": "/:pool_id/established_epoch", "description": "Epoch at which stake pool was originally registered", "method": "GET", "parameters": [ { "name": "pool_id", "type": "string", "description": "id of the pool to query. Both id and bech32 formats are supported", "location": "path" } ], "responses": { "200": { "type": "integer" }, "404": { "type": "generic_error" } } }, { "path": "/:pool_id/live_stake", "description": "live stake in lovelaces", "method": "GET", "parameters": [ { "name": "pool_id", "type": "string", "description": "id of the pool to query. Both id and bech32 formats are supported", "location": "path" } ], "responses": { "200": { "type": "long" }, "404": { "type": "generic_error" } } }, { "path": "/:pool_id/blocks", "description": "number minted blocks in epoch", "method": "GET", "parameters": [ { "name": "pool_id", "type": "string", "description": "id of the pool to query. Both id and bech32 formats are supported", "location": "path" }, { "name": "epoch", "type": "integer", "description": "epoch in which to query number of produced blocks or current epoch if not specified", "location": "query", "required": "false" } ], "responses": { "200": { "type": "integer" }, "404": { "type": "generic_error" } } }, { "method": "GET", "responses": { "200": { "type": "[stakepool]" } } } ] }, "stakepool_metadata": { "description": "retrieve stake pool information", "operations": [ { "method": "GET", "path": "/:pool_id_bech32", "responses": { "200": { "type": "stakepool_metadata" }, "404": { "type": "generic_error" } } } ] }, "pool_update": { "operations": [ { "method": "GET", "path": "/retiring", "parameters": [ { "name": "block_number_from", "type": "long", "description": "the block number from when fetching updates, it's the pagination index", "location": "query", "required": "false" }, { "name": "limit", "type": "long", "description": "the number of updates to fetch", "location": "query", "required": "false" } ], "responses": { "200": { "type": "[pool_retiring]" }, "404": { "type": "generic_error" } } }, { "method": "GET", "path": "/:pool_id", "parameters": [ { "name": "pool_id", "type": "string", "location": "path" }, { "name": "block_number_from", "type": "long", "description": "the block number from when fetching updates, it's the pagination index", "location": "query", "required": "false" }, { "name": "limit", "type": "long", "description": "the number of updates to fetch", "location": "query", "required": "false" } ], "responses": { "200": { "type": "[pool_update]" }, "404": { "type": "generic_error" } } }, { "method": "GET", "parameters": [ { "name": "block_number_from", "type": "long", "description": "the block number from when fetching updates, it's the pagination index", "location": "query", "required": "false" }, { "name": "limit", "type": "long", "description": "the number of updates to fetch", "location": "query", "required": "false" } ], "responses": { "200": { "type": "[pool_update]" }, "404": { "type": "generic_error" } } } ] }, "block": { "operations": [ { "method": "GET", "path": "/blocks_in_day", "parameters": [ { "name": "date", "type": "date-iso8601", "location": "query" } ], "responses": { "200": { "type": "day_block" }, "404": { "type": "generic_error" } } }, { "method": "GET", "path": "/:block_number", "parameters": [ { "name": "block_number", "type": "long", "description": "the block number", "location": "path" } ], "responses": { "200": { "type": "block" }, "404": { "type": "generic_error" } } } ] }, "transaction": { "operations": [ { "method": "POST", "path": "/history", "body": { "type": "transaction_history_request" }, "responses": { "200": { "type": "[transaction]" } } } ] }, "delegation": { "operations": [ { "method": "GET", "path": "/:staking_address/safe_payment", "parameters": [ { "name": "staking_address", "type": "string", "location": "path", "required": "true" } ], "responses": { "200": { "type": "string" }, "404": { "type": "generic_error" } } }, { "method": "GET", "path": "/:staking_address/stakepool", "parameters": [ { "name": "staking_address", "type": "string", "location": "path", "required": "true" } ], "responses": { "200": { "type": "delegation" }, "404": { "type": "generic_error" } } } ] }, "reward": { "operations": [ { "method": "GET", "path": "/:staking_address", "parameters": [ { "name": "staking_address", "type": "string", "location": "path", "required": "true" }, { "name": "epoch_from", "type": "integer", "location": "query", "required": "false" }, { "name": "epoch_to", "type": "integer", "location": "query", "required": "false" } ], "responses": { "200": { "type": "[reward]" } } } ] }, "wallet_balance": { "operations": [ { "method": "GET", "path": "/:staking_address", "parameters": [ { "name": "staking_address", "type": "string", "location": "path", "required": "true" } ], "responses": { "200": { "type": "wallet_balance" } } } ] } } }