# GetMempoolTxs - Get a Pre-Consensus Client Block

Retrieve one pre-consensus client block by receive time. This method is V3-only and returns the same `Record` shape as [StreamMempoolTxs](https://www.dwellir.com/docs/hyperliquid/stream_mempool_txs).

Clone our [gRPC Code Examples Repository](https://github.com/dwellir-public/gRPC-code-examples) for complete, runnable V3 client setup in Go, Python, and Node.js.

A request in a mempool record is not guaranteed to land in a block. It can still fail, be replaced, be reordered, or never be included.

We guarantee mempool data availability only in our Tokyo region.

## When to Use This Method

`GetMempoolTxs` is useful for:

- **Point lookups** - Fetch the client block received at or after a given time
- **Stepping through records** - Walk records one at a time with `timestamp_ns`
- **Spot checks** - Inspect pre-consensus traffic without holding a stream open

## Method signature

```protobuf
rpc GetMempoolTxs(GetRequest) returns (Record) {}
```

Set `position.timestamp` (Unix milliseconds) or `position.timestamp_ns` (Unix nanoseconds); both are inclusive and select the first record at or after that time. `position.block_number`, any `filter` constraint, and an explicit zero cursor return `INVALID_ARGUMENT`.

An empty `GetRequest` waits for the next client block the node receives, which can take minutes while upstream peers are quiet. Always set a deadline on an unpositioned call.

A record can exceed the default 4 MiB gRPC receive limit. Raise the client inbound message limit well above the default before calling.

## Request Parameters

- `position.timestamp` (`int64, optional`): Inclusive Unix-millisecond receive-time cursor. Several records can share one millisecond. Omit the position to wait for the next client block the node receives.
- `position.timestamp_ns` (`int64, optional`): Inclusive Unix-nanosecond receive-time cursor; the exact resume cursor for this feed. Explicit zero is invalid.

## Request Example

```bash
grpcurl \
  -import-path content/docs/hyperliquid/grpc \
  -proto v3.proto \
  -max-msg-sz 67108864 \
  -H "x-api-key: ${DWELLIR_API_KEY}" \
  -d '{"position":{"timestamp_ns":"1790611197799360275"}}' \
  "${HYPERLIQUID_GRPC_ENDPOINT}" \
  hyperliquid_l1_gateway.v3.HyperliquidL1Gateway/GetMempoolTxs
```

## Response Fields

- `block_number` (`optional int64, optional`): Always unset. Mempool records are pre-consensus and belong to no block.
- `timestamp` (`optional int64, optional`): Time the node received the client block, in Unix milliseconds.
- `data` (`bytes, required`): The source line as bytes: a JSON array of the receive time and the client block, with its tx_hash and signed_actions.
- `timestamp_ns` (`optional int64, optional`): The receive time in Unix nanoseconds. Resume from it with position.timestamp_ns.

## Successful Response

```protobuf
timestamp: 1790611197799
data: "[\"2026-09-28T15:59:57.799360275\",{\"tx_hash\":\"0x70f7f7919fbb85174223f6c5b957964813a9673f2ccb1d2f85d5a91e8a939c17\",\"signed_actions\":[{\"signature\":{\"r\":\"0x92c15a2df3a6cbe1464903a31abbdcca1ec54edcb6aee1ee0f8805beda05f289\",\"s\":\"0x792fc9397bd81cb8b80f481d8649c4cc1ae683b3113c586e9e8ac98d1fe58280\",\"v\":28},\"action\":{\"type\":\"noop\"},\"nonce\":1790611116331,\"expiresAfter\":1790611227625}]}]"
timestamp_ns: 1790611197799360275
```

## Error Responses

### Invalid argument

- Code: `INVALID_ARGUMENT`
- Description: A cursor is zero or malformed, or the request sets position.block_number or any filter.

### Not found

- Code: `NOT_FOUND`
- Description: The cursor is before the earliest retained record, or the selected endpoint does not serve the mempool feed.

### Message too large

- Code: `RESOURCE_EXHAUSTED`
- Description: The record exceeded the client receive limit. Raise the client inbound message limit.

### Deadline exceeded

- Code: `DEADLINE_EXCEEDED`
- Description: An unpositioned call waited longer than the client deadline for the next client block.

### Unauthenticated

- Code: `UNAUTHENTICATED`
- Description: The request did not include usable authentication metadata.

### Permission denied

- Code: `PERMISSION_DENIED`
- Description: The supplied credential is not permitted to call this service.

## Addressing records

Several client blocks often share one millisecond, so `position.timestamp` returns the first record of that millisecond. `position.timestamp_ns` addresses each record exactly. To step to the next record, call again with the last `Record.timestamp_ns` plus 1.

A timestamp before the earliest retained record returns `NOT_FOUND`. `NOT_FOUND` also means the selected endpoint does not serve the mempool feed; check `ListFeeds` for `mempool-txs`.

`GetMempoolTxs` returns the same format as `StreamMempoolTxs`. See the [StreamMempoolTxs documentation](https://www.dwellir.com/docs/hyperliquid/stream_mempool_txs#record-format) for the decoded `Record.data` fields.

## Current Limitations

- **Pre-consensus only**: Records carry requests without responses, and inclusion is not guaranteed
- **Time addressing only**: `position.block_number` and filters are rejected
- **Replay History**: Available replay history varies by endpoint. A cursor outside retained history returns `NOT_FOUND`

## Resources

- **[StreamMempoolTxs](https://www.dwellir.com/docs/hyperliquid/stream_mempool_txs)** - Record format, ordering, and streaming recovery
- **[ListFeeds](https://www.dwellir.com/docs/hyperliquid/list_feeds)** - Feed inventory and accepted cursor kinds

*Need help? Contact our [support team](mailto:support@dwellir.com) or check the [Hyperliquid gRPC documentation](https://www.dwellir.com/docs/hyperliquid/grpc).*
