Concepts
User
One of your customers. Created via the API; Stockly provisions a self-custodial
Solana wallet for them automatically.
Wallet
The user’s own Solana wallet (provisioned via Privy). Purchased stock is delivered
here — the user holds it, not Stockly.
Stock award
Stock you give a user (e.g. “$1 of AAPL”). Recorded first, then executed on-chain —
read it back any time to track status and the transaction.
Portfolio
A user’s live holdings, valued at market prices — read it any time with
GET /v1/users/{userId}/portfolio.How it works
Create a user
POST /v1/users with an email or your own externalId. Stockly creates the user and
a Solana wallet for them.Give stock
POST /v1/rewards with the user, an amount in USD, and a stock symbol (from the
catalog). The award is stored with status recorded.Stockly executes
Stockly purchases the fractional stock and delivers it to the user’s wallet. The
award’s
status, txSignature, and explorerUrl populate on the award object.What you can give
Give any stock in the catalog —GET /v1/assets. Only stocks with enough on-chain
liquidity to fill near fair value are listed, so a 1 of stock. Use the
symbol from the catalog as assetSymbol when giving stock.
Conventions
- Base URL — your Stockly API base URL, e.g.
https://api.stockly.com. All endpoints live under/v1. - JSON — all request and response bodies are JSON.
- IDs are UUIDs; timestamps are ISO 8601 UTC.
- Request IDs — every response includes an
x-request-idheader, echoed in error bodies, for support and correlation.