Skip to content

How do I call the API?

The API starts at https://api.squeeze.plus/api/v1. Version 1 uses JSON for most replies. It uses a live event stream for change notes.

Terminal window
curl https://api.squeeze.plus/api/v1/treasury

For a local build, use http://localhost:8787/api/v1.

RouteReturns
GET /gap-indexThe latest Gap Index reading
GET /gap-index/history?range=Gap Index points
GET /pairs?fresh=&kind=&symbol=Pairs, newest first
GET /treasuryEquity, PnL, positions, buyback, vault
GET /treasury/trades?limit=&before=Fills, newest first
GET /treasury/equity?range=Equity points
GET /treasury/decisions?limit=Why the engine did or did not trade
GET /stocksStock rows
GET /stocks/:symbolOne stock with chart data
GET /pools, GET /pools/:idPools
GET /alertsAlert events
GET /health, GET /statusService and source health
GET /streamLive change notes

Times are Unix seconds. Missing facts use null. Bad input gets a short error. A missing item does too:

{ "error": "range must be one of 1h, 6h, 24h, 7d" }

Bad query input gets HTTP 400. An unknown stock symbol or pool gets HTTP 404.

GET /api/v1/stocks returns a JSON array of stock rows. It does not wrap the array in rows.

Read the Gap Index route.