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

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# GetLedgerEnd

Ledger API

›

[Protobuf](https://docs.canton.network/reference/protobuf/overview.md)

›

[com.daml.ledger.api.v2](https://docs.canton.network/reference/protobuf/packages/com-daml-ledger-api-v2.md)

›

GetLedgerEnd

com.daml.ledger.api.v2

# GetLedgerEnd

gRPC

RPC

`/com.daml.ledger.api.v2.StateService/GetLedgerEnd`

## Protocol Details

Protocol
gRPC

Service
StateService

RPC
GetLedgerEnd

Client stream
No

Server stream
No

## Inputs

### GetLedgerEndRequest

Message
com.daml.ledger.api.v2.GetLedgerEndRequest

Client stream
No

`synchronizer_id`
repeated string

## Outputs

### GetLedgerEndResponse

Message
com.daml.ledger.api.v2.GetLedgerEndResponse

Server stream
No

`offset`
int64

`synchronizer_times`
repeated SynchronizerTime

## Related Schemas

> [accordion] com.daml.ledger.api.v2.GetLedgerEndRequest
>
> `synchronizer_id`
> repeated string

> [accordion] com.daml.ledger.api.v2.GetLedgerEndResponse
>
> `offset`
> int64
>
> `synchronizer_times`
> repeated SynchronizerTime

> [accordion] com.daml.ledger.api.v2.SynchronizerTime
>
> `synchronizer_id`
> string
>
> `record_time`
> Timestamp

grpcurl

```bash grpcurl theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Add -plaintext if the server is not using TLS.
grpcurl \
  -d @ \
  <HOST:PORT> \
  com.daml.ledger.api.v2.StateService/GetLedgerEnd <<'EOF'
{
  "synchronizerId": [
    "string"
  ]
}
EOF
```

OK

application/json

```json OK theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "offset": "0",
  "synchronizerTimes": [
    {
      "synchronizerId": "string",
      "recordTime": "string"
    }
  ]
}
```
