Skip to content
Logo

Endpoints

Use the RPC, public API and maker API URLs supplied by your operator. Set them explicitly: SDK defaults select the mainnet hosts and do not discover the network from your trader ID. For an isolated network, use Local maker testing and its generated manifest.

The tables below identify SDK endpoint constants and program addresses. They do not establish availability or version compatibility. The operator must verify the program, gateway and SDK combination before onboarding a maker.

Environments

Devnet reference values

WhatValue
Public API (flint.margin.user.v1, plus maker AuthService / MakerService / NodeService)https://devnet.api.flint.trade
Authenticated API (every flint.margin.maker.v1 service)https://devnet.makerapi.flint.trade
Flint margin program4MxEr7W5f9xtajcTTpTTd5wfdBmwrF72j2NMg6YzXgMo
Flint oracle programfnt2ARonSBGhBY1RTxVSvZ3p8JSYi9iAE9Hkq5jXcmf
Trading appdevnet.app.flint.trade/perps
Dashboard (Kellnr token)devnet.dash.flint.trade
Solana RPCBring your own devnet RPC (e.g. https://api.devnet.solana.com).

Mainnet SDK defaults

WhatValue
Public APIhttps://mainnet.api.flint.trade (SDK default)
Authenticated APIhttps://mainnet.makerapi.flint.trade (SDK default)
Flint margin programObtain the tested address and SDK combination from the operator.

Collateral assets, mints, and perp contracts are discovered at runtime — MarketService.ListMarkets returns each collateral market's mint and decimals, and PerpMarketService.ListPerpMarkets returns every perp contract. Read them before selecting a collateral mint or perp ID.

Public and authenticated hosts

Margin uses the spot API's two listeners. Each host can have a different ingress policy:

HostMargin servicesAuth
api (public)All eight flint.margin.user.v1 services; maker AuthService, MakerService, and NodeServiceNone for user services and NodeService; bearer session for MakerService.
makerapi (authenticated)Maker AuthService, MakerService, NodeService, TxService, SessionService, SpreadProtectService, EscalationServiceBearer session for all except AuthService and NodeService.

TxService, SessionService, SpreadProtectService, and EscalationService exist only on the authenticated host. Makers should point their whole maker client — AuthService included — at the authenticated host, so the session and the services that use it share one connection.

Node discovery

Each hostname can resolve to several Flint nodes. The Rust maker client picks one for you:

  • It resolves the host to every address and probes each with NodeService.GetNodeInfo — connect time plus the median of three calls — skipping nodes that report themselves degraded or halted.
  • It pins the channel to the fastest healthy node, keeping the hostname for TLS, and re-probes every 10 s. It moves at once when the current node fails its probe, and for latency only when another node is both 10% and 5 ms faster on two probes in a row.
  • The maker and public channels are discovered independently. discovered_endpoint() and discovered_public_endpoint() report the pick; reprobe_endpoints() probes now.
  • .endpoint_discovery(false) on Client::builder() turns it off. IP literals and channels you supply connect directly.

NodeService.ListNodes returns the published endpoints for a cluster; a listed endpoint is not a promise that it is healthy. The Rust user client connects to the endpoint you give it. The TypeScript transport can race a list of hosts you pass it — see TypeScript.

Choosing the endpoint in an SDK

Every SDK exports MAINNET_*, DEVNET_*, and DEFAULT_* endpoint constants (DEFAULT_* is mainnet):

PackageConstants
flint-margin-user-client / @superis-labs/flint-margin-user-clientMAINNET_PUBLIC_ENDPOINT, DEVNET_PUBLIC_ENDPOINT, DEFAULT_PUBLIC_ENDPOINT
flint-margin-maker-client / @superis-labs/flint-margin-maker-clientMAINNET_MAKER_ENDPOINT, DEVNET_MAKER_ENDPOINT, DEFAULT_MAKER_ENDPOINT
use std::sync::Arc;
 
use flint_margin_maker_client::DEVNET_MAKER_ENDPOINT;
use flint_margin_user_client::DEVNET_PUBLIC_ENDPOINT;
 
// Public user API.
let user = flint_margin_user_client::Client::connect(DEVNET_PUBLIC_ENDPOINT).await?;
 
// Maker API — authenticated host, so TxService is available.
let maker = flint_margin_maker_client::Client::connect(
    DEVNET_MAKER_ENDPOINT,
    Arc::new(keypair),
)
.await?;

The program address is baked into the on-chain clients as FLINT_ID (Rust) and FLINT_PROGRAM_ADDRESS (TypeScript). See On-chain clients.