Quick reference
gRPC Ledger API
Use gRPC when you need:- The full surface of streaming services (
UpdateService,CommandCompletionService,StateService). - Type-safe code generation via
protocfor Java, Scala, or other gRPC-supported languages. - Lowest latency for high-frequency command submission and event subscriptions.
JSON Ledger API
Use JSON when you need:- HTTP/REST access from a browser or Node.js application without a gRPC client.
- Convenient request/response shapes for ad-hoc tooling and scripting.
- Streaming via WebSocket (the JSON API exposes equivalents of the gRPC streaming services).
Key services
The same logical service surface is available on both bindings:- CommandService — Submit commands and wait for completion (synchronous).
- CommandSubmissionService + CommandCompletionService — Submit commands asynchronously and consume completion events.
- UpdateService — Stream ledger updates (transactions, reassignments).
- StateService — Query the active contract set (ACS).
- InteractiveSubmissionService — Prepare transactions for external signing.
- PartyManagementService — Allocate and list parties (under the Admin API in 3.x; not exposed on the Ledger API).
- PackageService — Upload and query DAR packages.
Code generation
Code generation tools live with the language bindings, not the API:- Java codegen — see Java Codegen.
- JavaScript / TypeScript codegen — see JavaScript Codegen.
- Java client libraries (high-level wrappers over the gRPC bindings) — see Java LAPI Bindings.
Related pages
- API Reference — central hub for all generated API documentation, including the gRPC Ledger API, JSON Ledger API, AsyncAPI, Protobuf history, and Splice APIs.
- Admin API — node administration (separate from the Ledger API).
- Splice APIs — REST APIs for Scan, Validator, and SV applications.