> For the complete documentation index, see [llms.txt](https://liquify-2.gitbook.io/liquify/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://liquify-2.gitbook.io/liquify/supported-chains/chainlist/solana/quickstart-guide.md).

# Quickstart Guide

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

Ensure you [have an API key](/liquify/rpc-quickstart-guide/create-an-rpc-endpoint.md) 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(())
}
```
