/construction/metadata REST API Endpoint
Body Parameters
network_identifier
object
REQUIRED
Loading...
blockchain
string
REQUIRED
Loading...
network
string
REQUIRED
Loading...
sub_network_identifier
object
Loading...
network
string
REQUIRED
Loading...
metadata
object
Loading...
options
object
Loading...
public_keys
array
Loading...
hex_bytes
string
REQUIRED
Loading...
curve_type
string
REQUIRED
Loading...
Returns
object
object
Loading...
metadata
object
Loading...
account_sequence
integer
Loading...
recent_block_hash
string
Loading...
suggested_fee
array
Loading...
value
string
Loading...
currency
object
Loading...
symbol
string
Loading...
decimals
integer
Loading...
metadata
object
Loading...
metadata
object
Loading...
Request
1curl --location 'https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/metadata' \2--header 'Content-Type: application/json' \3--data '{4"network_identifier": {5"blockchain": "stacks",6"network": "mainnet"7},8"options": {9"<OPTION_KEY>": "<OPTION_VALUE>"10},11"public_keys": [12{13"hex_bytes": "<PUBLIC_KEY_HEX>",14"curve_type": "secp256k1"15}16]17}'
1curl --location 'https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/metadata' \2--header 'Content-Type: application/json' \3--data '{4"network_identifier": {5"blockchain": "stacks",6"network": "mainnet"7},8"options": {9"<OPTION_KEY>": "<OPTION_VALUE>"10},11"public_keys": [12{13"hex_bytes": "<PUBLIC_KEY_HEX>",14"curve_type": "secp256k1"15}16]17}'
1const myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34const raw = JSON.stringify({5"network_identifier": {6"blockchain": "stacks",7"network": "mainnet"8},9"options": {10"<OPTION_KEY>": "<OPTION_VALUE>"11},12"public_keys": [13{14"hex_bytes": "<PUBLIC_KEY_HEX>",15"curve_type": "secp256k1"16}17]18});1920const requestOptions = {21method: "POST",22headers: myHeaders,23body: raw,24redirect: "follow"25};2627fetch("https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/metadata", requestOptions)28.then((response) => response.text())29.then((result) => console.log(result))30.catch((error) => console.error(error));
1const myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34const raw = JSON.stringify({5"network_identifier": {6"blockchain": "stacks",7"network": "mainnet"8},9"options": {10"<OPTION_KEY>": "<OPTION_VALUE>"11},12"public_keys": [13{14"hex_bytes": "<PUBLIC_KEY_HEX>",15"curve_type": "secp256k1"16}17]18});1920const requestOptions = {21method: "POST",22headers: myHeaders,23body: raw,24redirect: "follow"25};2627fetch("https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/metadata", requestOptions)28.then((response) => response.text())29.then((result) => console.log(result))30.catch((error) => console.error(error));
1import requests2import json34url = "https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/metadata"56payload = json.dumps({7"network_identifier": {8"blockchain": "stacks",9"network": "mainnet"10},11"options": {12"<OPTION_KEY>": "<OPTION_VALUE>"13},14"public_keys": [15{16"hex_bytes": "<PUBLIC_KEY_HEX>",17"curve_type": "secp256k1"18}19]20})21headers = {22'Content-Type': 'application/json'23}2425response = requests.request("POST", url, headers=headers, data=payload)2627print(response.text)
1import requests2import json34url = "https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/metadata"56payload = json.dumps({7"network_identifier": {8"blockchain": "stacks",9"network": "mainnet"10},11"options": {12"<OPTION_KEY>": "<OPTION_VALUE>"13},14"public_keys": [15{16"hex_bytes": "<PUBLIC_KEY_HEX>",17"curve_type": "secp256k1"18}19]20})21headers = {22'Content-Type': 'application/json'23}2425response = requests.request("POST", url, headers=headers, data=payload)2627print(response.text)
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/metadata")67http = Net::HTTP.new(url.host, url.port)8http.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = JSON.dump({13"network_identifier": {14"blockchain": "stacks",15"network": "mainnet"16},17"options": {18"<OPTION_KEY>": "<OPTION_VALUE>"19},20"public_keys": [21{22"hex_bytes": "<PUBLIC_KEY_HEX>",23"curve_type": "secp256k1"24}25]26})2728response = http.request(request)29puts response.read_body
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/metadata")67http = Net::HTTP.new(url.host, url.port)8http.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = JSON.dump({13"network_identifier": {14"blockchain": "stacks",15"network": "mainnet"16},17"options": {18"<OPTION_KEY>": "<OPTION_VALUE>"19},20"public_keys": [21{22"hex_bytes": "<PUBLIC_KEY_HEX>",23"curve_type": "secp256k1"24}25]26})2728response = http.request(request)29puts response.read_body
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free