# Quickstart Guide

## Prerequisites[​](https://docs.infura.io/api/networks/ethereum/quickstart#prerequisites) <a href="#prerequisites" id="prerequisites"></a>

Ensure you [have an API key](https://liquify-2.gitbook.io/liquify/rpc-quickstart-guide/create-an-rpc-endpoint) with the Solana network enabled.

## Make calls[​](https://docs.infura.io/api/networks/ethereum/quickstart#make-calls) <a href="#make-calls" id="make-calls"></a>

### cURL[​](https://docs.infura.io/api/networks/ethereum/quickstart#curl) <a href="#curl" id="curl"></a>

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

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

```
const web3 = require("@solana/web3.js");
(async () => {
  const solana = new web3.Connection("https://gateway.liquify.com/api=YOUR-API-KEY \");
  console.log(
    await solana.getBlock(94101948, { maxSupportedTransactionVersion: 0 })
  );
})();
```

### Solana.py

```
from solana.rpc.api import Client
solana_client = Client("https://gateway.liquify.com/api=YOUR-API-KEY \")
print(solana_client.get_block(94101948, "jsonParsed", max_supported_transaction_version=0))
```

### Rust

```
use reqwest::header;
use reqwest::Client;
use std::error::Error;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let mut headers = header::HeaderMap::new();
    headers.insert("Content-Type", "application/json".parse().unwrap());

    let client = Client::new();
    let json_data = r#"
    {
        "jsonrpc": "2.0",
        "id": 1,
        "method": "getBlock",
        "params": [
            94101948,
            {
                "encoding": "jsonParsed",
                "maxSupportedTransactionVersion": 0,
                "transactionDetails": "full",
                "rewards": false
            }
        ]
    }"#;
    let response = client
        .post("https://gateway.liquify.com/api=YOUR-API-KEY \")
        .headers(headers)
        .body(json_data)
        .send()
        .await?; 

    let body = response.text().await?;
    println!("{}", body);

    Ok(())
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://liquify-2.gitbook.io/liquify/supported-chains/chainlist/solana/quickstart-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
