# getBitcoinTransaction

**Identifier:** `xverse_getBitcoinTransaction`

**Provider:** [Xverse](https://kirha.com/providers/xverse.md)

Get Bitcoin transaction details including inputs, outputs, confirmation status, and block height

## Run it with the CLI

```bash
kirha tools run xverse_getBitcoinTransaction \
  --input '{
    "txid": "<txid>"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "xverse_getBitcoinTransaction",
  "input": {
    "txid": "<txid>"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "txid": {
      "description": "64-character hex transaction ID",
      "type": "string"
    }
  },
  "required": [
    "txid"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "blockHeight": {
      "type": "number"
    },
    "confirmations": {
      "type": "number"
    },
    "context": {
      "type": "string"
    },
    "inputs": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "address": {
            "type": "string"
          },
          "isCoinbase": {
            "type": "boolean"
          },
          "prevTxid": {
            "type": "string"
          },
          "prevVout": {
            "type": "number"
          },
          "value": {
            "type": "number"
          },
          "vin": {
            "type": "number"
          }
        },
        "required": [
          "vin",
          "value",
          "address"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "outputs": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "address": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "vout": {
            "type": "number"
          }
        },
        "required": [
          "vout",
          "value",
          "address"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "confirmations",
    "inputs",
    "outputs"
  ],
  "type": "object"
}
```

-----

[All Xverse tools](https://kirha.com/providers/xverse.md) · [< Back to tools list](https://kirha.com/tools.md)