Skip to main content

Documentation Index

Fetch the complete documentation index at: https://nexus.gerowallet.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

Get up and running with Gero Nexus in just a few minutes. This guide will walk you through creating an account, getting an access token, and making your first request.

Prerequisites

  • A Gero Nexus account (free tier available)
  • Basic knowledge of HTTP requests
  • A tool to make API calls (cURL, Postman, or code)

Step 1: Create Your Account

1

Sign Up

Visit nexus.gerowallet.io/signup and create your free account.No credit card required for the free tier.
2

Verify Email

Check your email and verify your account.
3

Access Dashboard

Log in to your Gero Nexus Dashboard.

Step 2: Get Your Access Token

Gero Nexus uses JWT (JSON Web Token) authentication. You have two options:
Use your account credentials to get tokens:
curl -X POST "https://nexus-dev.gerowallet.io/api/auth/login" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "your-email@example.com",
    "password": "your-password"
  }'
Response:
{
  "accessToken": "eyJhbGciOiJIUzUxMiJ9...",
  "refreshToken": "eyJhbGciOiJIUzUxMiJ9...",
  "tokenType": "Bearer",
  "expiresIn": 3600000
}
Copy your accessToken - you’ll use it in the Authorization header for all API requests.

Step 3: Make Your First Request

Let’s fetch the latest block from the Cardano blockchain.
curl -X GET "https://nexus-dev.gerowallet.io/api/blocks/latest" \
  -H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9..."

Expected Response

{
  "hash": "4e1ba9d3e6f6b5c8d9a7f3e1c2b4a5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
  "height": 8765432,
  "time": 1738713600,
  "slot": 123456789,
  "epoch": 450,
  "epoch_slot": 123456,
  "slot_leader": "pool1abcdef123456789",
  "size": 24567,
  "tx_count": 42,
  "output": "34567890123456",
  "fees": "456789",
  "block_vrf": "vrf1abcdef...",
  "previous_block": "3d0ca8e2f5b4c7a6e8d9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0",
  "next_block": null,
  "confirmations": 0
}
Success! You’ve made your first API call to Gero Nexus.

Step 4: Explore More Endpoints

Now that you’ve made your first call, try these common endpoints:

Get Block by Hash

GET /api/blocks/{hash}
Fetch detailed information about a specific block

Get Transaction

GET /v1/transactions/{hash}
Retrieve transaction details and UTXOs

Get Address Info

GET /api/addresses/{address}
Check balance and transactions for an address

Get Latest Epoch

GET /api/epoch/latest
Get current epoch information

Using the Interactive Playground

Want to test endpoints without writing code? Use our API Playground:
  1. Visit your Dashboard
  2. Navigate to API Playground
  3. Select an endpoint from the dropdown
  4. Enter your access token
  5. Click “Send Request” to see the response
The playground is great for exploring the API and testing different parameters before writing code.

Best Practices

  • Never commit tokens to version control
  • Use environment variables to store tokens
  • Implement token refresh before expiry
  • Store refresh tokens securely (Keychain/Keystore for mobile)
Access tokens expire after 1 hour. Before expiry, use the refresh token:
const response = await fetch('https://nexus-dev.gerowallet.io/api/auth/refresh', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ refreshToken: yourRefreshToken })
});

const { accessToken } = await response.json();
  • Free tier: 10,000 requests/day
  • Implement exponential backoff for retries
  • Monitor your usage in the dashboard
  • Cache responses when possible
Always check response status codes:
  • 200 - Success
  • 400 - Bad request (invalid parameters)
  • 401 - Unauthorized (invalid/expired token)
  • 404 - Resource not found
  • 429 - Rate limit exceeded
  • 500 - Server error (contact support)

Example: Building a Simple Balance Checker

Here’s a complete example that checks the balance of a Cardano address:
// balance-checker.js

const API_BASE = 'https://nexus-dev.gerowallet.io';
let accessToken = null;
let refreshToken = null;

async function authenticate(email, password) {
  const response = await fetch(`${API_BASE}/api/auth/login`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ email, password })
  });

  const data = await response.json();
  accessToken = data.accessToken;
  refreshToken = data.refreshToken;

  return data;
}

async function getAddressBalance(address) {
  try {
    const response = await fetch(`${API_BASE}/api/addresses/${address}`, {
      headers: {
        'Authorization': `Bearer ${accessToken}`
      }
    });

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

    const data = await response.json();

    // Convert lovelace to ADA (1 ADA = 1,000,000 lovelace)
    const adaBalance = parseInt(data.balance) / 1_000_000;

    console.log(`Address: ${address}`);
    console.log(`Balance: ${adaBalance.toFixed(2)} ADA`);
    console.log(`Transactions: ${data.tx_count}`);

    return data;
  } catch (error) {
    console.error('Error fetching balance:', error.message);
    throw error;
  }
}

// Example usage
async function main() {
  await authenticate('your-email@example.com', 'your-password');
  const address = 'addr1q9xyz...'; // Replace with actual address
  await getAddressBalance(address);
}

main();

Next Steps

Authentication Guide

Learn about JWT tokens and security best practices

API Reference

Explore all available endpoints

Rate Limits

Understand rate limiting and quotas

Error Handling

Learn how to handle API errors gracefully

Need Help?

Join Discord

Chat with our team and community

Contact Support

Email us for assistance

Congratulations! You’re now ready to build with Gero Nexus. Check out the API Reference for a full list of endpoints.