TriportRPC

Getting Started

Get a Triport API key and make your first multi-chain JSON-RPC call in under five minutes.

Method / Endpointn/a — quickstart walkthrough
NetworkSolana | Ethereum | Polygon
Authenticationx-token header (SDK-preferred); see Authentication for other forms
Required scope
Tier / rate limitAny tier (free 7-day trial works); see Rate Limits

Overview

Triport is a multi-chain RPC platform. You send standard JSON-RPC requests to a single base URL and Triport routes them to the right network backend, applies your tier's rate limits, and returns the upstream result unchanged.

There are two base URLs:

EnvironmentBase URL
Productionhttps://api.triport.io
Staginghttps://staging.api.triport.io

This page walks you from zero to a verified Solana getBalance response.

1. Get an API key

  1. Sign in to the Triport billing portal.
  2. Create a project — this issues a static API key (it looks like nl_live_…).
  3. Every new account starts on the free tier, which includes a 7-day trial (EU region only). No credit card is required to start; you can upgrade later for more requests-per-second and multi-region routing. See Rate Limits for the full tier matrix.

Keep your key secret. Throughout this guide it is referenced as the environment variable $TRIPORT_API_KEY:

export TRIPORT_API_KEY="nl_live_your_key_here"

2. Make your first request

Triport's SDK-preferred way to send your key is the x-token header. Send a standard JSON-RPC 2.0 body to the base URL with your network's path.

Here is a Solana getBalance request against production:

curl https://api.triport.io/sol \
  -H "x-token: $TRIPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBalance",
    "params": ["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"]
  }'

3. Read the response

A successful call returns the upstream JSON-RPC result verbatim. For getBalance, the balance (in lamports) is under result.value:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "context": { "slot": 268420690 },
    "value": 11110795
  }
}

That's it — you're live. Every other method works the same way: swap the method/params, and (for other chains) the path.

What the path means

NetworkPath
Solanahttps://api.triport.io/sol
Ethereumhttps://api.triport.io/eth
Polygonhttps://api.triport.io/polygon

Authentication, briefly

x-token is the recommended header, but Triport accepts your key in several forms, tried in this priority order:

  1. x-token: <key> header — preferred (used by the SDKs).
  2. Authorization: Bearer <key> header — standard Bearer scheme.
  3. ?api-key=<key> query parameter — legacy.
  4. Path form /<chain>/<key> — works only for nl_live_* API keys.

Full details, including when to use each, are on the Authentication page.

Rate limits, briefly

Triport rate-limits by sustained requests-per-second, scoped to your tier and the request's category, with a global burst multiplier of . There is no daily quota — only the per-second budget.

Rate-limit state is reported on responses via these headers:

HeaderMeaning
X-RateLimit-LimitAllowed RPS for your tier + category
X-RateLimit-RemainingRemaining capacity in the current 1s window
X-RateLimit-ResetUNIX timestamp when the window resets
X-RateLimit-CategoryCategory bucket charged for this request

When you exceed your budget you get an HTTP 429 with a Retry-After header. See Rate Limits for per-tier numbers.

Handling errors

Errors come back as a JSON envelope with a machine-readable error code and a human message. The common ones during onboarding:

HTTPerrorWhen it happens
401unauthorizedMissing or invalid key
401trial_expiredYour free 7-day trial ended
403tier_insufficientMethod requires a higher tier
403method_unknownMethod not part of that chain's product
429rate_limitedSustained RPS exceeded

See the Errors page for the full envelope and the typed error schemas.

Examples

JavaScript (fetch)

const res = await fetch("https://api.triport.io/sol", {
  method: "POST",
  headers: {
    "x-token": process.env.TRIPORT_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "getBalance",
    params: ["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"],
  }),
});


const { result } = await res.json();
console.log("lamports:", result.value);

TypeScript SDK (@triport/sdk)

import { Triport } from "@triport/sdk";


const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });


const balance = await triport.sol.rpc("getBalance", [
  "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
]);
console.log("lamports:", balance.value);

Python (triport-sdk)

import os
from triport import Triport


triport = Triport(api_key=os.environ["TRIPORT_API_KEY"])


balance = triport.sol.rpc("getBalance", ["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"])
print("lamports:", balance["value"])

Next steps

  • Authentication — every supported auth form and when to use it.
  • Rate Limits — per-tier RPS budgets, burst behavior, and the rate-limit headers.
  • Errors — the full error envelope and typed error schemas.
  • Browse the per-method references for Solana, Ethereum, and Polygon to find the call you need.