Thrive API

Trading

The virtual practice portfolio and virtual trades.

Thrive trading is VIRTUAL. All cash and positions are simulated practice money.

Get the virtual portfolio

GET /v1/portfolio

The key owner's VIRTUAL practice portfolio — simulated cash and positions. No real money is involved.

Authentication: API key · Required scope: portfolio:read

curl "https://jointhrive.org/api/public/v1/portfolio" \
  -H "Authorization: Bearer $THRIVE_API_KEY"
Response · 200
{
  "object": "portfolio",
  "virtual": true,
  "cash": 91234.5,
  "positions": [ { "symbol": "AAPL", "quantity": 20, "avg_cost": 331.2, "current_price": 341.07, "market_value": 6821.4 } ],
  "total_value": 98055.9
}

Errors: invalid_api_key, missing_scope

Try it

Sign in to test this endpoint with one of your keys.

List virtual trades

GET /v1/trades

Recent virtual transactions, newest first.

Authentication: API key · Required scope: trading:read

Parameters · List virtual trades

limitinteger

1–200, default 50.

curl "https://jointhrive.org/api/public/v1/trades" \
  -H "Authorization: Bearer $THRIVE_API_KEY"
Response · 200
{
  "object": "list",
  "virtual": true,
  "data": [ { "symbol": "AAPL", "side": "buy", "quantity": 20, "price": 331.2 } ]
}

Errors: missing_scope, parameter_invalid

Try it

Sign in to test this endpoint with one of your keys.

Place a virtual trade

POST /v1/trades

Buys or sells in the key owner's VIRTUAL practice portfolio at the live price. The server checks cash and holdings and updates positions itself — callers can never set cash, quantity or cost basis. Send an Idempotency-Key so a retry never trades twice.

Authentication: API key · Required scope: trading:write · Supports Idempotency-Key

Parameters · Place a virtual trade

symbolstringrequired

Ticker.

kindstring

stock (default), etf, bond, crypto, commodity, index.

sidestringrequired

buy or sell.

quantitynumber

Shares. Provide this or dollar_amount.

dollar_amountnumber

Dollars to trade. Provide this or quantity.

curl -X POST "https://jointhrive.org/api/public/v1/trades" \
  -H "Authorization: Bearer $THRIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"symbol":"AAPL","side":"buy","quantity":2}'
Response · 200
{
  "object": "trade",
  "virtual": true,
  "symbol": "AAPL",
  "side": "buy",
  "price": 341.07,
  "quantity": 2,
  "newCash": 90552.36
}

Errors: missing_scope, parameter_invalid, trade_rejected, idempotency_conflict, rate_limited