diff --git a/book/src/jsonrpc-api.md b/book/src/jsonrpc-api.md index 2bd681a48..e55228677 100644 --- a/book/src/jsonrpc-api.md +++ b/book/src/jsonrpc-api.md @@ -30,6 +30,7 @@ Methods * [getProgramAccounts](#getprogramaccounts) * [getRecentBlockhash](#getrecentblockhash) * [getSignatureStatus](#getsignaturestatus) +* [getSlot](#getslot) * [getSlotLeader](#getslotleader) * [getSlotsPerSegment](#getslotspersegment) * [getStorageTurn](#getstorageturn) @@ -293,6 +294,25 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, " ----- +### getSlot +Returns the current slot the node is processing + +##### Parameters: +None + +##### Results: +* `u64` - Current slot + +##### Example: +```bash +// Request +curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getSlot"}' http://localhost:8899 + +// Result +{"jsonrpc":"2.0","result":"1234","id":1} +``` +----- + ### getSlotLeader Returns the current slot leader