Get Checkpoints Backward
Parameters
before
string
Loading...
Returns
data
object
Loading...
checkpoints
object
Loading...
pageInfo
object
Loading...
hasPreviousPage
boolean
Loading...
startCursor
string
Loading...
nodes
array
Loading...
digest
string
Loading...
timestamp
string
Loading...
Request
1curl --location 'https://docs-demo.sui-mainnet.quiknode.pro/graphql' \2--header 'Accept: application/json' \3--header 'Content-Type: application/json' \4--data '{5"query": "query ($before: String) { checkpoints(last: 5, before: $before) { pageInfo { hasPreviousPage startCursor } nodes { digest timestamp } } }",6"variables": {7"before": null8}9}'10
1curl --location 'https://docs-demo.sui-mainnet.quiknode.pro/graphql' \2--header 'Accept: application/json' \3--header 'Content-Type: application/json' \4--data '{5"query": "query ($before: String) { checkpoints(last: 5, before: $before) { pageInfo { hasPreviousPage startCursor } nodes { digest timestamp } } }",6"variables": {7"before": null8}9}'10
1const myHeaders = new Headers();2myHeaders.append("Accept", "application/json");3myHeaders.append("Content-Type", "application/json");45const raw = JSON.stringify({6"query": "query ($before: String) { checkpoints(last: 5, before: $before) { pageInfo { hasPreviousPage startCursor } nodes { digest timestamp } } }",7"variables": {8"before": null9}10});1112const requestOptions = {13method: "POST",14headers: myHeaders,15body: raw,16redirect: "follow"17};1819fetch("https://docs-demo.sui-mainnet.quiknode.pro/graphql", requestOptions)20.then((response) => response.text())21.then((result) => console.log(result))22.catch((error) => console.error(error));23
1const myHeaders = new Headers();2myHeaders.append("Accept", "application/json");3myHeaders.append("Content-Type", "application/json");45const raw = JSON.stringify({6"query": "query ($before: String) { checkpoints(last: 5, before: $before) { pageInfo { hasPreviousPage startCursor } nodes { digest timestamp } } }",7"variables": {8"before": null9}10});1112const requestOptions = {13method: "POST",14headers: myHeaders,15body: raw,16redirect: "follow"17};1819fetch("https://docs-demo.sui-mainnet.quiknode.pro/graphql", requestOptions)20.then((response) => response.text())21.then((result) => console.log(result))22.catch((error) => console.error(error));23
1import requests2import json34url = "https://docs-demo.sui-mainnet.quiknode.pro/graphql"56payload = json.dumps({7"query": "query ($before: String) { checkpoints(last: 5, before: $before) { pageInfo { hasPreviousPage startCursor } nodes { digest timestamp } } }",8"variables": {9"before": None10}11})12headers = {13'Accept': 'application/json',14'Content-Type': 'application/json'15}1617response = requests.request("POST", url, headers=headers, data=payload)1819print(response.text)20
1import requests2import json34url = "https://docs-demo.sui-mainnet.quiknode.pro/graphql"56payload = json.dumps({7"query": "query ($before: String) { checkpoints(last: 5, before: $before) { pageInfo { hasPreviousPage startCursor } nodes { digest timestamp } } }",8"variables": {9"before": None10}11})12headers = {13'Accept': 'application/json',14'Content-Type': 'application/json'15}1617response = requests.request("POST", url, headers=headers, data=payload)1819print(response.text)20
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.sui-mainnet.quiknode.pro/graphql")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Accept"] = "application/json"12request["Content-Type"] = "application/json"13request.body = JSON.dump({14"query" => "query ($before: String) { checkpoints(last: 5, before: $before) { pageInfo { hasPreviousPage startCursor } nodes { digest timestamp } } }",15"variables" => {16"before" => nil17}18})1920response = https.request(request)21puts response.read_body22
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.sui-mainnet.quiknode.pro/graphql")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Accept"] = "application/json"12request["Content-Type"] = "application/json"13request.body = JSON.dump({14"query" => "query ($before: String) { checkpoints(last: 5, before: $before) { pageInfo { hasPreviousPage startCursor } nodes { digest timestamp } } }",15"variables" => {16"before" => nil17}18})1920response = https.request(request)21puts response.read_body22
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free