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

# Transactions

> Send, query, sign, and inspect transactions and the pending pool

## qc\_getTransactionCount

Returns the number of transactions sent from an address (nonce).

| Parameter     | Type     | Description               |
| ------------- | -------- | ------------------------- |
| `address`     | `string` | 20-byte address (hex)     |
| `blockNumber` | `string` | Block number (hex) or tag |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_getTransactionCount","params":["0xff81e5c74e14db5b4ee407d66b1b063c8f305c51","latest"],"id":1}'
```

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x5"
}
```

***

## qc\_sendTransaction

Signs and sends a transaction from an unlocked account on the node.

| Parameter  | Type     | Description              |
| ---------- | -------- | ------------------------ |
| `from`     | `string` | Sender address           |
| `to`       | `string` | Recipient address        |
| `value`    | `string` | Value in wei (hex)       |
| `gas`      | `string` | Gas limit (hex)          |
| `gasPrice` | `string` | Gas price in wei (hex)   |
| `data`     | `string` | Contract call data (hex) |
| `nonce`    | `string` | Transaction nonce (hex)  |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "qc_sendTransaction",
    "params": [{
      "from": "0xff81e5c74e14db5b4ee407d66b1b063c8f305c51",
      "to": "0x1234567890abcdef1234567890abcdef12345678",
      "value": "0xde0b6b3a7640000",
      "gas": "0x5208"
    }],
    "id": 1
  }'
```

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xabc123...def456"
}
```

<Warning>
  This method requires the sender account to be unlocked on the node. For production signing, use the Custody API or `qc_sendRawTransaction` with an externally signed payload.
</Warning>

***

## qc\_sendRawTransaction

Submits a pre-signed raw transaction. This is the standard method for submitting transactions signed by external key management systems.

| Parameter      | Type     | Description                          |
| -------------- | -------- | ------------------------------------ |
| `signedTxData` | `string` | RLP-encoded signed transaction (hex) |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_sendRawTransaction","params":["0xf86c..."],"id":1}'
```

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xabc123...def456"
}
```

***

## qc\_getTransactionByHash

Returns transaction details by transaction hash.

| Parameter | Type     | Description                    |
| --------- | -------- | ------------------------------ |
| `txHash`  | `string` | 32-byte transaction hash (hex) |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_getTransactionByHash","params":["0xabc123...def456"],"id":1}'
```

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "hash": "0xabc123...def456",
    "nonce": "0x5",
    "blockHash": "0xdef...789",
    "blockNumber": "0x1a4",
    "transactionIndex": "0x0",
    "from": "0xff81...c51",
    "to": "0x1234...5678",
    "value": "0xde0b6b3a7640000",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "input": "0x"
  }
}
```

***

## qc\_getTransactionReceipt

Returns the receipt of a mined transaction.

| Parameter | Type     | Description                    |
| --------- | -------- | ------------------------------ |
| `txHash`  | `string` | 32-byte transaction hash (hex) |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_getTransactionReceipt","params":["0xabc123...def456"],"id":1}'
```

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "transactionHash": "0xabc123...def456",
    "transactionIndex": "0x0",
    "blockHash": "0xdef...789",
    "blockNumber": "0x1a4",
    "from": "0xff81...c51",
    "to": "0x1234...5678",
    "gasUsed": "0x5208",
    "cumulativeGasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1",
    "effectiveGasPrice": "0x3b9aca00"
  }
}
```

***

## qc\_getRawTransactionByHash

Returns the RLP-encoded raw transaction by hash.

| Parameter | Type     | Description                    |
| --------- | -------- | ------------------------------ |
| `txHash`  | `string` | 32-byte transaction hash (hex) |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_getRawTransactionByHash","params":["0xabc123...def456"],"id":1}'
```

***

## qc\_getTransactionByBlockNumberAndIndex

Returns a transaction by block number and transaction index.

| Parameter     | Type     | Description               |
| ------------- | -------- | ------------------------- |
| `blockNumber` | `string` | Block number (hex) or tag |
| `txIndex`     | `string` | Transaction index (hex)   |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_getTransactionByBlockNumberAndIndex","params":["latest","0x0"],"id":1}'
```

***

## qc\_getTransactionByBlockHashAndIndex

Returns a transaction by block hash and transaction index.

| Parameter   | Type     | Description              |
| ----------- | -------- | ------------------------ |
| `blockHash` | `string` | 32-byte block hash (hex) |
| `txIndex`   | `string` | Transaction index (hex)  |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_getTransactionByBlockHashAndIndex","params":["0xdef...789","0x0"],"id":1}'
```

***

## qc\_getRawTransactionByBlockNumberAndIndex

Returns the RLP-encoded raw transaction by block number and index.

| Parameter     | Type     | Description               |
| ------------- | -------- | ------------------------- |
| `blockNumber` | `string` | Block number (hex) or tag |
| `txIndex`     | `string` | Transaction index (hex)   |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_getRawTransactionByBlockNumberAndIndex","params":["latest","0x0"],"id":1}'
```

***

## qc\_getRawTransactionByBlockHashAndIndex

Returns the RLP-encoded raw transaction by block hash and index.

| Parameter   | Type     | Description              |
| ----------- | -------- | ------------------------ |
| `blockHash` | `string` | 32-byte block hash (hex) |
| `txIndex`   | `string` | Transaction index (hex)  |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_getRawTransactionByBlockHashAndIndex","params":["0xdef...789","0x0"],"id":1}'
```

***

## qc\_getBlockTransactionCountByNumber

Returns the number of transactions in a block by block number.

| Parameter     | Type     | Description               |
| ------------- | -------- | ------------------------- |
| `blockNumber` | `string` | Block number (hex) or tag |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_getBlockTransactionCountByNumber","params":["latest"],"id":1}'
```

***

## qc\_getBlockTransactionCountByHash

Returns the number of transactions in a block by block hash.

| Parameter   | Type     | Description              |
| ----------- | -------- | ------------------------ |
| `blockHash` | `string` | 32-byte block hash (hex) |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_getBlockTransactionCountByHash","params":["0xdef...789"],"id":1}'
```

***

## qc\_sign

Signs data with an unlocked account. Returns the signature.

| Parameter | Type     | Description        |
| --------- | -------- | ------------------ |
| `address` | `string` | Signer address     |
| `data`    | `string` | Data to sign (hex) |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_sign","params":["0xff81e5c74e14db5b4ee407d66b1b063c8f305c51","0xdeadbeef"],"id":1}'
```

<Warning>
  Requires the account to be unlocked on the node.
</Warning>

***

## qc\_signTransaction

Signs a transaction without broadcasting it. Returns the RLP-encoded signed transaction.

| Parameter  | Type     | Description                                              |
| ---------- | -------- | -------------------------------------------------------- |
| `txObject` | `object` | Transaction object (same fields as `qc_sendTransaction`) |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "qc_signTransaction",
    "params": [{
      "from": "0xff81e5c74e14db5b4ee407d66b1b063c8f305c51",
      "to": "0x1234567890abcdef1234567890abcdef12345678",
      "value": "0xde0b6b3a7640000",
      "gas": "0x5208"
    }],
    "id": 1
  }'
```

***

## qc\_pendingTransactions

Returns all pending transactions in the node's transaction pool.

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qc_pendingTransactions","params":[],"id":1}'
```

***

## qc\_fillTransaction

Fills in default values (nonce, gas, gas price) for a transaction object without signing or submitting it.

| Parameter  | Type     | Description                |
| ---------- | -------- | -------------------------- |
| `txObject` | `object` | Partial transaction object |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "qc_fillTransaction",
    "params": [{
      "from": "0xff81e5c74e14db5b4ee407d66b1b063c8f305c51",
      "to": "0x1234567890abcdef1234567890abcdef12345678",
      "value": "0xde0b6b3a7640000"
    }],
    "id": 1
  }'
```

***

## qc\_resend

Replaces a pending transaction with new gas parameters. The original transaction is matched by `from`, `nonce`, and other fields.

| Parameter  | Type     | Description                          |
| ---------- | -------- | ------------------------------------ |
| `txObject` | `object` | Original transaction object to match |
| `gasPrice` | `string` | New gas price (hex)                  |
| `gasLimit` | `string` | New gas limit (hex)                  |

```bash theme={null}
curl -X POST https://api.quantumapi.io/v1/rpc \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "qc_resend",
    "params": [{
      "from": "0xff81e5c74e14db5b4ee407d66b1b063c8f305c51",
      "to": "0x1234567890abcdef1234567890abcdef12345678",
      "value": "0xde0b6b3a7640000",
      "nonce": "0x5",
      "gasPrice": "0x3b9aca00",
      "gas": "0x5208"
    }, "0x77359400", "0x5208"],
    "id": 1
  }'
```
