Quickstart Guide

Ensure you have an API key with the Solana network enabled.

Run the following command in your terminal. This command will retrieve the latest block number from the Solana network.

Replace YOUR-API-KEY with your actual Liquify Gateway API key.

https://gateway.liquify.com/api=YOUR-API-KEY \
-X POST
-H "Content-Type: application/json"
--data '{"jsonrpc": "2.0","id":1,"method":"getBlock","params":[94101948, {"encoding": "jsonParsed","maxSupportedTransactionVersion":0,"transactionDetails":"full","rewards":false}]}'

Ruby

require "uri"
require "json"
require "net/http"

url = URI("https://gateway.liquify.com/api=YOUR-API-KEY \")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlock",
  "params": [
    94101948,
    {
      "encoding": "jsonParsed",
      "maxSupportedTransactionVersion": 0,
      "transactionDetails": "full",
      "rewards": false
    }
  ]
})

response = https.request(request)
puts response.read_body

Solana Web3.js

Solana.py

Rust

Last updated