Skip to main content

Get Metadata for Transaction Construction

To Do

Request Body REQUIRED
network_identifier object REQUIRED

The network_identifier specifies which network a particular object is associated with.

blockchain string REQUIRED

Blockchain name

network string REQUIRED

If a blockchain has a specific chain-id or network identifier, it should go in this field. It is up to the client to determine which network-specific identifier is mainnet or testnet.

sub_network_identifier object

In blockchains with sharded state, the SubNetworkIdentifier is required to query some object on a specific shard. This identifier is optional for all non-sharded blockchains.

network string REQUIRED

Network name

metadata object

Meta data from subnetwork identifier

producer string REQUIRED

producer

options object REQUIRED

The options that will be sent directly to /construction/metadata by the caller.

sender_address string

sender's address

type string

Type of operation e.g transfer

status string

This value indicates the state of the operations

token_transfer_recipient_address string

Recipient's address

amount string

Amount to be transfered.

symbol string

Currency symbol e.g STX

decimals integer

Number of decimal places

gas_limit number

Maximum price a user is willing to pay.

gas_price number

Cost necessary to perform a transaction on the network

suggested_fee_multiplier number

A suggested fee multiplier to indicate that the suggested fee should be scaled. This may be used to set higher fees for urgent transactions or to pay lower fees when there is less urgency.

max_fee string

Maximum fee user is willing to pay

fee string

Fee for this transaction

size integer

Transaction approximative size (used to calculate total fee).

memo string

STX token transfer memo.

number_of_cycles integer

Number of cycles when stacking.

contract_address string

Address of the contract to call.

contract_name string

Name of the contract to call.

burn_block_height integer

Set the burnchain (BTC) block for stacking lock to start.

delegate_to string

Delegator address for when calling delegate-stacking.

pox_addr string

The reward address for stacking transaction. It should be a valid Bitcoin address

public_keys object[]
hex_bytes string REQUIRED

Hex-encoded public key bytes in the format specified by the CurveType.

curve_type string REQUIRED

Possible values: [secp256k1, edwards25519]

CurveType is the type of cryptographic curve associated with a PublicKey.

Responses
200

Success

Schema OPTIONAL
metadata object
account_sequence integer OPTIONAL
recent_block_hash string OPTIONAL
suggested_fee object[] OPTIONAL
value string

Value of the transaction in atomic units represented as an arbitrary-sized signed integer. For example, 1 BTC would be represented by a value of 100000000.

currency object

Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins).

symbol string

Canonical symbol associated with a currency.

decimals integer

Number of decimal places in the standard unit representation of the amount. For example, BTC has 8 decimals. Note that it is not possible to represent the value of some currency in atomic units that is not base 10.

metadata object OPTIONAL

Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token.

metadata object OPTIONAL
400

Error

Schema OPTIONAL
code integer

Code is a network-specific error code. If desired, this code can be equivalent to an HTTP status code.

message string

Message is a network-specific error message. The message MUST NOT change for a given code. In particular, this means that any contextual information should be included in the details field.

retriable boolean

An error is retriable if the same request may succeed if submitted again.

details object OPTIONAL

Often times it is useful to return context specific to the request that caused the error (i.e. a sample of the stack trace or impacted account) in addition to the standard error message.

address string OPTIONAL
error string OPTIONAL