TriportRPC

Create a watchlist entry

POSThttps://api.triport.io/v1/sol/watchlist

Register a Solana account (pubkey) to be watched and have changes delivered to a webhook or WebSocket push channel.

Solanasol_watchlistBusiness (or higher) — up to 10,000 watched pubkeys per tenant; RPS-per-tier with 2× burst

A watchlist entry subscribes Triport to on-chain changes for a single Solana account and forwards every observed change to a delivery target you control. When the watched account's data changes at the requested commitment level, Triport pushes an event either to your HTTPS webhook (callback_type: webhook) or over the live WebSocket channel (callback_type: ws).

Use this endpoint to build account-change notifications without holding an open subscription yourself — Triport maintains the upstream subscription and the delivery fan-out on your behalf. Each call creates one entry for one pubkey; call it repeatedly to watch multiple accounts. The created entry is scoped to your tenant (derived from the authenticated API key) and is returned with a server-generated id you use to fetch or delete it later.

Gotchas:

  • callback_type: telegram is reserved and not yet accepted — sending it returns 400 invalid_params.
  • For callback_type: ws, the callback_url is treated as a client-side identifier (the channel to associate the entry with), not an HTTP destination. Events are delivered over the live WebSocket channel rather than pushed to a URL.
  • commitment defaults to confirmed when omitted.

Parameters

This endpoint takes a JSON request body (Content-Type: application/json).

pubkeystring (base58, 32–44 chars)required
The Solana account to watch.
callback_typestring enum: webhook | wsrequired
Delivery transport. telegram is reserved → 400.
callback_urlstring (URI)optional
HTTPS endpoint for webhook; client-side channel identifier for ws. *Required in practice for both delivery types.
commitmentstring enum: processed | confirmed | finalizedoptional
Commitment level at which changes are reported. Default confirmed.

Response

201 Created

idstring (UUID)
Server-generated entry id; use it with GET/DELETE /v1/sol/watchlist/{id}.
tenant_idstring
Owner of the entry, derived from the authenticated key.
created_atstring (date-time)
When the entry was created (RFC 3339 / ISO 8601).
pubkeystring
The watched account, echoed back.
callback_typestring
Delivery transport (webhook or ws).
callback_urlstring (URI)
Delivery target or client-side channel identifier.
commitmentstring
Effective commitment level (defaults to confirmed).

Errors

CodeMeaningWhen it happens
400invalid_paramsMissing/invalid pubkey or callback_type, malformed callback_url, or callback_type: telegram (reserved).
401unauthorized / trial_expired / subscription_expiredMissing, invalid, or expired credentials.
403tier_insufficient / method_unknownAPI key tier below Business, or key lacks the sol_watchlist scope.
429rate_limitedSustained RPS for your tier exceeded (burst is 2× the sustained limit).

All errors use the shared error envelope (error, message, request_id). See errors for the full schema, the 403 tier-upgrade fields, and the 429 Retry-After / X-RateLimit-* headers.

Example 403:

{
  "error": "tier_insufficient",
  "message": "sol_watchlist requires the business tier",
  "request_id": "req_9c1f7a",
  "current_tier": "pro",
  "required_tier": "business",
  "category": "sol_watchlist"
}

Examples

JavaScript (fetch)

const res = await fetch("https://api.triport.io/v1/sol/watchlist", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TRIPORT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    pubkey: "So11111111111111111111111111111111111111112",
    callback_type: "webhook",
    callback_url: "https://hooks.example.com/sol/account-change",
    commitment: "confirmed",
  }),
});


if (!res.ok) throw new Error(`watchlist create failed: ${res.status}`);
const entry = await res.json();
console.log(entry.id); // 8f1d6c2a-...

TypeScript SDK (@triport/sdk)

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


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


const entry = await client.sol.watchlist.create({
  pubkey: "So11111111111111111111111111111111111111112",
  callbackType: "webhook",
  callbackUrl: "https://hooks.example.com/sol/account-change",
  commitment: "confirmed",
});


console.log(entry.id, entry.createdAt);

Python (triport-sdk)

import os
from triport import Triport


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


entry = client.sol.watchlist.create(
    pubkey="So11111111111111111111111111111111111111112",
    callback_type="webhook",
    callback_url="https://hooks.example.com/sol/account-change",
    commitment="confirmed",
)


print(entry.id, entry.created_at)

Notes

  • Manage entries: list all of your entries with GET /v1/sol/watchlist, fetch one with GET /v1/sol/watchlist/{id}, and remove one with DELETE /v1/sol/watchlist/{id} (idempotent — a repeat delete returns 404).
  • Capacity: the Business tier allows up to 10,000 watched pubkeys per tenant. Creating beyond your cap is rejected.
  • WebSocket delivery: when callback_type is ws, connect to the live watchlist push channel to receive events for entries created under your key; the entry's callback_url ties the entry to your channel.
  • Commitment trade-off: processed is fastest but may be rolled back; finalized is safest but lags. confirmed (the default) balances the two.