← Protocols
Tensor
01Description

Pro-grade Solana NFT marketplace and AMM. Fully open-source modular on-chain programs — Marketplace, AMM (TensorSwap), Escrow, Fees, Whitelist — accessible via TypeScript SDKs and a public REST/GraphQL API. Backs the deepest NFT liquidity on Solana and exposes the same data its frontend uses.

02Best for
  • 01Solana NFT trading UIs
  • 02NFT AMM (TensorSwap) liquidity
  • 03compressed NFT listings/buys (tcomp)
  • 04floor sweeping and bulk listing
  • 05Solana marketplace aggregators
03Install
  • pnpm add @tensor-oss/tensorswap-sdk @tensor-oss/tcomp-sdk @tensor-foundation/marketplace @solana/web3.js
04Environment variables
VariableScopeDescription
TENSOR_API_KEYServerAPI key from dev.tensor.trade for the public Tensor REST/GraphQL API.
NEXT_PUBLIC_SOLANA_RPC_URLClientSolana RPC endpoint used to send Tensor SDK transactions.
05Prompt snippet
Use the public Tensor API (REST + GraphQL at `api.tensor.trade`) for collection stats, listings, bids, and activities, authenticated with `TENSOR_API_KEY`. To execute trades, build instructions with `@tensor-oss/tensorswap-sdk` (legacy NFTs / pool trading), `@tensor-foundation/marketplace` (current orderbook), or `@tensor-oss/tcomp-sdk` (compressed NFTs), then sign with the wallet's `@solana/web3.js` keypair. The same SDKs power tensor.trade — flows like `list`, `buyNft`, `sellNftIntoPool` are available client-side.
06Gotchas
  • Royalty enforcement on Solana is voluntary; Tensor honors creator royalties on most transactions but lets users opt down to a minimum (often 0%) on AMM trades — model creator revenue accordingly.
  • Compressed NFTs require Merkle proofs from a DAS-compatible RPC (Helius, Triton). Listings created with stale proofs will fail at settle time; always re-fetch the proof immediately before sending.
  • Tensor has multiple programs (TensorSwap v1/v2, Tensor Marketplace, tcomp) — using the wrong SDK against an asset class (e.g. tensorswap on a cNFT) silently no-ops or fails.
  • API rate limits are aggressive without a key; explore endpoints (collection search, activity feeds) tier separately from trading endpoints.
  • Marketplace fees (currently ~1.5%) and the Tensor Foundation 50/50 split are protocol-level — they apply even when you build your own frontend on top of the SDKs.
  • `@tensor-oss/*` packages and `@tensor-foundation/*` packages overlap in scope; check `docs.tensor.trade` for the currently recommended package per use case.
07Alternatives