> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usexfg.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Daemon RPC: Submit and Query Transactions

> Use /gettransactions and /sendrawtransaction to query transaction data by hash and broadcast signed raw transactions to the network.

The Fuego daemon provides HTTP endpoints for querying raw transaction data and broadcasting signed transactions to the network. These endpoints complement the wallet service: you might construct and sign a transaction externally (using the cryptographic primitives directly), then use `/sendrawtransaction` to propagate it. `/gettransactions` lets you fetch confirmed transaction blobs by hash for verification or decoding. For mempool inspection, the JSON-RPC method `f_on_transactions_pool_json` is also available.

***

## POST /gettransactions

Fetches one or more raw transactions by their hash. The daemon returns each found transaction as a hex-encoded blob. Hashes that cannot be found (not confirmed, not in pool) are returned in `missed_tx`.

**URL:** `http://127.0.0.1:18180/gettransactions`

### Request

<ParamField body="txs_hashes" type="array of strings" required>
  List of transaction hashes to look up. Each hash should be a 64-character hex string.
</ParamField>

<CodeGroup>
  ```bash curl theme={null}
  curl -s http://127.0.0.1:18180/gettransactions \
    -H 'Content-Type: application/json' \
    -d '{
      "txs_hashes": [
        "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"
      ]
    }'
  ```

  ```json Request theme={null}
  {
    "txs_hashes": [
      "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"
    ]
  }
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "txs_as_hex": [
    "0100...hexencodedtransactionblob"
  ],
  "missed_tx": [],
  "status": "OK"
}
```

<ResponseField name="txs_as_hex" type="array of strings" required>
  Hex-encoded transaction blobs for each found transaction, in the same order as the input hashes that were found.
</ResponseField>

<ResponseField name="missed_tx" type="array of strings" required>
  Hashes from the request that were not found in the confirmed chain or mempool.
</ResponseField>

<ResponseField name="status" type="string" required>
  `"OK"` on success.
</ResponseField>

***

## POST /sendrawtransaction

Broadcasts a signed, serialized transaction to the Fuego network. You must provide the fully constructed transaction as a hex string. The daemon validates the transaction before propagating it.

**URL:** `http://127.0.0.1:18180/sendrawtransaction`

### Request

<ParamField body="tx_as_hex" type="string" required>
  Hex-encoded serialized transaction blob. The transaction must be fully signed and valid.
</ParamField>

<CodeGroup>
  ```bash curl theme={null}
  curl -s http://127.0.0.1:18180/sendrawtransaction \
    -H 'Content-Type: application/json' \
    -d '{
      "tx_as_hex": "0100...yoursignedtxhex"
    }'
  ```

  ```json Request theme={null}
  {
    "tx_as_hex": "0100...yoursignedtxhex"
  }
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "status": "OK"
}
```

<ResponseField name="status" type="string" required>
  `"OK"` if the transaction passed validation and was accepted into the mempool for propagation. Returns an error if the transaction is malformed, double-spends an input, or fails fee checks.
</ResponseField>

***

## GET /getfeeaddress

Returns the fee address configured by the node operator. Nodes can optionally require a fee payment to their address when relaying transactions. Check this before constructing transactions if you are routing through a third-party node.

**URL:** `http://127.0.0.1:18180/getfeeaddress`

```bash theme={null}
curl http://127.0.0.1:18180/getfeeaddress
```

### Response

```json theme={null}
{
  "fee_address": "fireXfGNodeOperatorAddressHere...",
  "status": "OK"
}
```

<ResponseField name="fee_address" type="string" required>
  The Fuego address the node operator has set to receive fees. Empty string if no fee address is configured.
</ResponseField>

<ResponseField name="status" type="string" required>
  `"OK"` on success.
</ResponseField>

***

## JSON-RPC: f\_on\_transactions\_pool\_json

Returns the current contents of the transaction memory pool. Use this to inspect pending transactions before they are confirmed.

**Method:** call via `POST http://127.0.0.1:18180/json_rpc`

### Request

<CodeGroup>
  ```bash curl theme={null}
  curl -s http://127.0.0.1:18180/json_rpc \
    -H 'Content-Type: application/json' \
    -d '{
      "jsonrpc": "2.0",
      "method": "f_on_transactions_pool_json",
      "params": {},
      "id": "1"
    }'
  ```

  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "f_on_transactions_pool_json",
    "params": {},
    "id": "1"
  }
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "transactions": [
      {
        "hash": "a1b2c3d4...",
        "fee": 80000,
        "amount_out": 1000000000,
        "size": 1024
      }
    ],
    "status": "OK"
  }
}
```

<ResponseField name="transactions" type="array of objects" required>
  List of transactions currently in the mempool.

  <Expandable title="Transaction fields">
    <ResponseField name="hash" type="string" required>
      Hex-encoded transaction hash.
    </ResponseField>

    <ResponseField name="fee" type="integer" required>
      Transaction fee in atomic units.
    </ResponseField>

    <ResponseField name="amount_out" type="integer" required>
      Total output amount of the transaction in atomic units.
    </ResponseField>

    <ResponseField name="size" type="integer" required>
      Transaction size in bytes.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="status" type="string" required>
  `"OK"` on success.
</ResponseField>
