Skip to content

Onboarding

What you need to do, in order, to go from "have a Solana wallet" to "first authenticated RPC."

Audience

This page assumes you're either:

  • Building a market-maker bot. You'll quote on at least one pair and need a maker_id registered against your pubkey.
  • Building a read-only integration (analytics, charts, alerts). You only need to talk to MarketDataService and may skip the signing flow.

1. Get an endpoint

EnvironmentHost
Mainnethttps://api.superis.exchange:443
Testnethttps://testnet.api.superis.exchange:443
Localhosthttp://localhost:50051 (SUPERIS_INSECURE=1 for the SDKs to skip TLS)

Endpoints are unauthenticated for MarketDataService and require a session token for everything else.

2. Solana wallet

You need an ed25519 keypair. The same key:

  1. Authenticates with the gRPC server (signs the AuthService challenge).
  2. Signs on-chain quoting transactions (UpdateOracleFair, UpdateQuotingParams).

The server only accepts authenticated calls from pubkeys that are registered as quoting authorities for some maker_id.

sh
# Generate a fresh keypair (mainnet → use a hardware wallet instead).
solana-keygen new --no-bip39-passphrase --outfile ~/.config/solana/superis.json
solana address -k ~/.config/solana/superis.json

3. Register your pubkey as a quoting authority

If you don't already have a maker_id, the on-chain admin needs to create one for you. Maker creation is a one-time CreateMaker instruction signed by the admin; ask the operator that runs your deployment.

If you already have a maker_id and want to delegate quoting to a hot wallet, send ManageMaker { AddQuoter } from the admin wallet:

rust
use sweetspot_client::instruction::manage_maker::build_add_quoter_ix;

let ix = build_add_quoter_ix(&program_id, &admin, maker_id, &hot_wallet_pubkey);
// Sign + submit via your own RPC (this is admin-only; not part of
// the SDK's standard surface).

Hot vs. cold wallets

Use a cold wallet to mint your maker_id and set max_balance / risk params (the admin path). Use a delegated hot wallet for the high-frequency UpdateOracleFair / UpdateQuotingParams flow. The SDK's WalletSigner doesn't care which one you give it.

4. Fund the maker

Two on-chain balances gate fills:

BalanceWhereWhat it gates
Per-spot SpotMakerMicroBook.balanceone per spot you quote onMaker's holding of the base token. Sets available_to_sell.
Global per-maker quote balance (GlobalMarket.balances[maker_id])singletonMaker's quote (USDC) holdings. Sets available_to_buy for the base side and is required for SELL fills to land.

The two-balance trap

The on-chain matcher gates SELL fills on the global quote-side balance. With max_balance=0 on the global quote side, sells silently never match — the order shows in the book but the matcher drops it. Set max_balance > 0 on both balances before you start quoting.

Fund both via DepositWithdrawQuote (admin-side) and the standard SPL transfer to your micro-book vault.

5. Install an SDK

sh
cargo add superis tokio --features tokio/macros,tokio/rt-multi-thread
# Or git dep — see `docs/sdks/rust.md`.
sh
go get github.com/superis/sweetspot-maker-client/go/superis
sh
npm install @superis/sweetspot-client \
  @connectrpc/connect @connectrpc/connect-web @bufbuild/protobuf

6. First authenticated call

rust
use std::sync::Arc;
use superis::auth::AuthFlow;

let channel = tonic::transport::Channel::from_static("https://api.superis.exchange:443")
    .connect()
    .await?;

let auth = AuthFlow::new(channel.clone(), Arc::new(my_signer));
let session = auth.token().await?;
println!("authenticated as maker_id={}", session.maker_id);

If AuthFlow::token() returns UNAUTHENTICATED: pubkey not registered as a quoting authority, your pubkey hasn't been added yet — go back to step 3.

7. Verify the program id

Defense in depth. Confirms the server isn't pointing you at a different on-chain program than you expect.

rust
use superis::config::{refresh, verify_program_id, ConfigCache};

let cache = ConfigCache::new();
let cfg = refresh(&cache, &mut market_client, &mut tx_client, server_program_id).await?;
verify_program_id("https://api.mainnet-beta.solana.com", &cfg.program_id).await?;

Run this once at boot; if it fails, refuse to quote until it passes.

8. Pick your path

GoalNext page
Stream books and fillsMarket data
Quote and submit fillsQuoting
Survive network blipsResilience
Pull historical trades / candlesHistorical queries
Sign-in flow detailAuth flow

Apache 2.0