---
title: "Get Metadata for Transaction Construction"
method: POST
path: "/construction/metadata"
tags: ["Construction"]
---

# Get Metadata for Transaction Construction

`POST /construction/metadata`

Get any information required to construct a transaction for a specific
network. Metadata returned here could be a recent hash to use, an
account sequence number, or even arbitrary chain state. The request
used when calling this endpoint is created by calling `/construction/preprocess`
in an offline environment.

You should NEVER assume that the request sent to this endpoint will be
created by the caller or populated with any custom parameters. This must
occur in `/construction/preprocess`.

It is important to clarify that this endpoint should not pre-construct
any transactions for the client (this should happen in `/construction/payloads`).
This endpoint is left purposely unstructured because of the wide scope
of metadata that could be required.

## Request body

- ConstructionMetadataRequest — A ConstructionMetadataRequest is utilized to get information required to construct a transaction. The Options object used to specify which metadata to return is left purposely unstructured to allow flexibility for implementers. Options is not required in the case that there is network-wide metadata of interest. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse.
  - `network_identifier` NetworkIdentifier, required — unresolved $ref
  - `options` object — Some blockchains require different metadata for different types of transaction construction (ex: delegation versus a transfer). Instead of requiring a blockchain node to return all possible types of metadata for construction (which may require multiple node fetches), the client can populate an options object to limit the metadata returned to only the subset required.
  - `public_keys` PublicKey[] — unresolved $ref

## Response `200`

Expected response to a valid request

- ConstructionMetadataResponse — The ConstructionMetadataResponse returns network-specific metadata used for transaction construction. Optionally, the implementer can return the suggested fee associated with the transaction being constructed. The caller may use this info to adjust the intent of the transaction or to create a transaction with a different account that can pay the suggested fee. Suggested fee is an array in case fee payment must occur in multiple currencies.
  - `metadata` object, required
  - `suggested_fee` Amount[] — unresolved $ref

## Other responses

- `500` — unexpected error

## Changes

> 50 revisions in range; 1 could not be searched.

- **2022-09-19** `e7dc135e3c20` — 1 info
  - added the new optional request property `public_keys`
- **2022-08-28** `04be5c6ee14c` — 1 warning
  - removed the request property `public_keys`
- **2022-08-28** `6dc46714dd72` — 1 info
  - added the new optional request property `public_keys`
- **2022-07-14** `439b5bc33fb8` — 1 warning
  - removed the request property `public_keys`
- **2020-10-01** `65117bc6c601` — 1 info
  - the request property `options` became optional

[Full history](https://skmtc.dev/coinbase/apis/rosetta/changes/construction/metadata/post.md)

---

[API](https://skmtc.dev/coinbase/apis/rosetta.md) · [All operations](https://skmtc.dev/coinbase/apis/rosetta/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/coinbase/rosetta/revisions/758497aacc08/schema)
