# trace_get - Tempo RPC Method

Returns a trace at a specific position within a transaction on Tempo.

This method requires an archive node. It is not available on full nodes.

## When to Use This Method

- **Get a specific trace by transaction hash and trace index** - Retrieve individual trace entries from a transaction on Tempo
- **Pinpoint specific internal calls** - Isolate a particular sub-call at a known position in the call tree for merchant settlement, treasury operations, payout automation, and stablecoin-native financial applications
- **Targeted debugging** - Investigate a specific call depth without retrieving the full transaction trace
- **Combine with trace\_transaction** - Discover trace indices from the full trace, then fetch details individually

## Best Practices

- Requires knowing the trace address and index in advance
- Combine with trace\_transaction to discover trace indices first
- Supports fetching multiple traces by passing an array of indices
- Requires archive node access; not available on standard full nodes

## Request Parameters

- `txHash` (`DATA, required`): 32-byte transaction hash
- `indices` (`Array<QUANTITY>, required`): Trace index positions (e.g., ["0x0"] for the first trace)

## Request Example

```json
{
  "jsonrpc": "2.0",
  "method": "trace_get",
  "params": ["0x50b1857dce8dbe401e09610534de81655bc508c6765eb30ecefe24148c515c28", ["0x0"]],
  "id": 1
}
```

## Response Fields

This method returns no documented fields.

## Successful Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {}
}
```

## Code Examples

cURL
JavaScript
Python

```bash
curl -X POST https://api-tempo-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "trace_get",
    "params": ["0x50b1857dce8dbe401e09610534de81655bc508c6765eb30ecefe24148c515c28", ["0x0"]],
    "id": 1
  }'
```

```javascript
import { JsonRpcProvider } from 'ethers';

const provider = new JsonRpcProvider('https://api-tempo-mainnet.n.dwellir.com/YOUR_API_KEY');

const trace = await provider.send('trace_get', [
  '0x50b1857dce8dbe401e09610534de81655bc508c6765eb30ecefe24148c515c28',
  ['0x0']
]);
console.log('Trace type:', trace.type);
console.log('From:', trace.action.from);
console.log('To:', trace.action.to);
console.log('Value:', trace.action.value);
```

```python
from web3 import Web3

w3 = Web3(Web3.HTTPProvider('https://api-tempo-mainnet.n.dwellir.com/YOUR_API_KEY'))

trace = w3.provider.make_request('trace_get', [
    '0x50b1857dce8dbe401e09610534de81655bc508c6765eb30ecefe24148c515c28',
    ['0x0']
])
result = trace['result']
print(f'Type: {result["type"]}')
print(f'From: {result["action"]["from"]}')
print(f'To: {result["action"]["to"]}')
```

## Related Methods

- [`trace_transaction`](https://www.dwellir.com/docs/tempo/trace_transaction) - Get all traces for a transaction
- [`trace_block`](https://www.dwellir.com/docs/tempo/trace_block) - Get all traces in a block
