FortiBlox LogoFortiBlox Docs
NexusGeyser API

Account Endpoints

Query X1 Blockchain account data and token balances

Account Endpoints

Access account information, token balances, and account history.

Endpoints

EndpointMethodDescriptionCredits
/geyser/account/:addressGETGet account information10

GET /geyser/account/:address

Get detailed account information including balance and owner.

Authentication

API key via X-API-Key header or Authorization: Bearer header

Request

curl "https://nexus.fortiblox.com/geyser/account/9B5XszUGdMaxCZ7uSQhPzdks5ZQSmWxrmzCSvtJ6Ns6g" \
  -H "X-API-Key: $FORTIBLOX_API_KEY"
const API_KEY = process.env.FORTIBLOX_API_KEY;
const BASE_URL = 'https://nexus.fortiblox.com/geyser';

async function getAccount(address) {
  const response = await fetch(
    `${BASE_URL}/account/${address}`,
    {
      headers: {
        'X-API-Key': API_KEY
      }
    }
  );

  if (!response.ok) {
    throw new Error(`HTTP ${response.status}: ${response.statusText}`);
  }

  const data = await response.json();

  if (!data.success) {
    throw new Error(data.error);
  }

  return data.data;
}

// Usage
const account = await getAccount('9B5XszUGdMaxCZ7uSQhPzdks5ZQSmWxrmzCSvtJ6Ns6g');
console.log('Account:', account);
console.log('Balance (SOL):', account.lamports / 1_000_000_000);
import os
import requests

API_KEY = os.getenv('FORTIBLOX_API_KEY')
BASE_URL = 'https://nexus.fortiblox.com/geyser'

def get_account(address: str):
    """Get account information from Geyser API"""

    response = requests.get(
        f'{BASE_URL}/account/{address}',
        headers={'X-API-Key': API_KEY}
    )

    response.raise_for_status()
    data = response.json()

    if not data['success']:
        raise Exception(data['error'])

    return data['data']

# Usage
account = get_account('9B5XszUGdMaxCZ7uSQhPzdks5ZQSmWxrmzCSvtJ6Ns6g')
print(f"Account: {account}")
print(f"Balance (SOL): {account['lamports'] / 1_000_000_000}")
use reqwest;
use serde::{Deserialize, Serialize};
use std::env;

#[derive(Debug, Deserialize)]
struct GeyserResponse<T> {
    success: bool,
    data: Option<T>,
    error: Option<String>,
}

#[derive(Debug, Deserialize)]
struct AccountInfo {
    address: String,
    lamports: u64,
    owner: String,
    executable: bool,
    rent_epoch: u64,
}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let api_key = env::var("FORTIBLOX_API_KEY")?;
    let account = get_account(
        &api_key,
        "9B5XszUGdMaxCZ7uSQhPzdks5ZQSmWxrmzCSvtJ6Ns6g"
    ).await?;

    println!("Account: {:?}", account);
    println!("Balance (SOL): {}", account.lamports as f64 / 1_000_000_000.0);
    Ok(())
}

async fn get_account(
    api_key: &str,
    address: &str
) -> Result<AccountInfo, Box<dyn std::error::Error>> {
    let client = reqwest::Client::new();
    let url = format!(
        "https://nexus.fortiblox.com/geyser/account/{}",
        address
    );

    let response = client
        .get(&url)
        .header("X-API-Key", api_key)
        .send()
        .await?;

    let data: GeyserResponse<AccountInfo> = response.json().await?;

    if !data.success {
        return Err(data.error.unwrap_or("Unknown error".into()).into());
    }

    Ok(data.data.unwrap())
}
package main

import (
    "encoding/json"
    "fmt"
    "io"
    "net/http"
    "os"
)

type GeyserResponse struct {
    Success bool        `json:"success"`
    Data    AccountInfo `json:"data,omitempty"`
    Error   string      `json:"error,omitempty"`
}

type AccountInfo struct {
    Address    string `json:"address"`
    Lamports   uint64 `json:"lamports"`
    Owner      string `json:"owner"`
    Executable bool   `json:"executable"`
    RentEpoch  uint64 `json:"rent_epoch"`
}

func getAccount(address string) (*AccountInfo, error) {
    apiKey := os.Getenv("FORTIBLOX_API_KEY")
    url := fmt.Sprintf(
        "https://nexus.fortiblox.com/geyser/account/%s",
        address,
    )

    // Create HTTP request
    req, err := http.NewRequest("GET", url, nil)
    if err != nil {
        return nil, err
    }
    req.Header.Set("X-API-Key", apiKey)

    // Make HTTP GET request
    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        return nil, err
    }
    defer resp.Body.Close()

    // Read response body
    body, err := io.ReadAll(resp.Body)
    if err != nil {
        return nil, err
    }

    // Parse JSON response
    var result GeyserResponse
    if err := json.Unmarshal(body, &result); err != nil {
        return nil, err
    }

    // Check for API errors
    if !result.Success {
        return nil, fmt.Errorf("API error: %s", result.Error)
    }

    return &result.Data, nil
}

func main() {
    account, err := getAccount("9B5XszUGdMaxCZ7uSQhPzdks5ZQSmWxrmzCSvtJ6Ns6g")
    if err != nil {
        fmt.Printf("Error: %v\n", err)
        return
    }

    sol := float64(account.Lamports) / 1_000_000_000
    fmt.Printf("Account: %+v\n", account)
    fmt.Printf("Balance (SOL): %.9f\n", sol)
}

Response

{
  "success": true,
  "data": {
    "address": "9B5XszUGdMaxCZ7uSQhPzdks5ZQSmWxrmzCSvtJ6Ns6g",
    "lamports": 5000000000,
    "owner": "11111111111111111111111111111111",
    "executable": false,
    "rent_epoch": 361
  },
  "meta": {
    "timestamp": "2025-11-24T13:36:07.656Z",
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "cached": false,
    "path": "/geyser/account/9B5XszUGdMaxCZ7uSQhPzdks5ZQSmWxrmzCSvtJ6Ns6g",
    "method": "GET",
    "rateLimit": {
      "remaining": 999,
      "limit": 1000,
      "reset": 1763991540
    }
  }
}

404 Behavior

Account Not Found: The endpoint returns a 404 status when:

  • The account address does not exist on the blockchain
  • The account has never been initialized (no transactions or balance)
  • The account address is invalid or malformed

This is expected behavior for accounts that have never received any tokens or been involved in any transactions.

Error Response (404)

{
  "success": false,
  "error": "Account not found",
  "address": "invalid_or_nonexistent_address"
}

For transaction history, see GET /geyser/account/:address/transactions.