Skip to content

API

Six gRPC services in sweetspot.api.v1. MarketDataService, StatsService, HistoricalService, and AuthService are public. MakerService and TxService require credentials.

ServiceAuthWhat you use it for
AuthServicenoneMint or revoke bearer session tokens.
MarketDataServicenoneStream books, fills, market snapshots; list pairs; snapshot a single book.
StatsServicenonePublic aggregate stats — summary, volume breakdown/series, asset TVLs.
HistoricalServicenoneClickHouse-backed historical trades + candles.
MakerServicebearer session or org API keyPer-maker balances, fills, market snapshots, volume, and activity stats.
TxServicekeypair bearer sessionSubmit signed transactions, stream blockhash + tx status.

Each is fully wire-compatible with vanilla gRPC and gRPC-Web on the same URL. Pick whichever transport fits your stack — the SDKs hide the difference.

Schema

  • api.proto — bundled protobuf source covering every service in the package. Use the checked-in proto/ tree when you want a per-service slice.
  • openapi.yaml — OpenAPI 3.1 schema for the same service URLs used by gRPC-Web clients, suitable for Postman, Insomnia, Stoplight, or client-generation tools.

CI fails the build if these files diverge from the upstream proto.

URL convention

POST https://<host>/sweetspot.api.v1.<Service>/<Method>
Content-Type: application/grpc             (gRPC binary, hot path)
              application/grpc-web+proto   (browser-native)

No URL params, no path-based versioning beyond the package name.

Authentication

MarketDataService, StatsService, HistoricalService, and AuthService are open. MakerService and TxService expect:

authorization: Bearer <session_token>

Mint a keypair token via AuthService.Challenge → sign → Authenticate. MakerService also accepts passwordless organization sessions and organization API keys. See the Auth flow recipe for the per-SDK helpers.

Build on Solana