{"components":{"responses":{},"schemas":{"Calendar":{"properties":{"days":{"type":"integer"},"from":{"description":"Today, UTC.","format":"date","type":"string"},"stocks":{"description":"Soonest ex-date first.","items":{"properties":{"ex_dividend_date":{"format":"date","type":"string"},"name":{"nullable":true,"type":"string"},"payment_frequency":{"example":"quarterly","nullable":true,"type":"string"},"sector":{"nullable":true,"type":"string"},"symbol":{"type":"string"}},"required":["symbol","ex_dividend_date"],"type":"object"},"type":"array"}},"required":["from","days","stocks"],"title":"Calendar","type":"object"},"Dividend":{"description":"A dividend paid to you. All amounts are in the currency it was paid in.","properties":{"amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Gross."},"date":{"description":"Pay date.","format":"date","type":"string"},"isin":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"net":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"What reached you."},"per_share_amount":{"allOf":[{"$ref":"#/components/schemas/Money"}],"nullable":true},"portfolio":{"description":"Which portfolio, when you have more than one and didn't pick one.","type":"string"},"quantity":{"description":"Shares it was paid on.","nullable":true,"type":"integer"},"source":{"description":"How it was recorded, e.g. manual or an import.","type":"string"},"symbol":{"example":"KO","type":"string"},"withholding_tax":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Withheld abroad.","nullable":true}},"required":["symbol","date","amount","net"],"title":"Dividend","type":"object"},"DividendList":{"properties":{"dividends":{"items":{"$ref":"#/components/schemas/Dividend"},"type":"array"}},"required":["dividends"],"title":"DividendList","type":"object"},"Error":{"properties":{"error":{"properties":{"code":{"description":"Stable, for programs to branch on.","enum":["bad_request","unauthorized","forbidden","not_found","invalid_params","rate_limited"],"type":"string"},"message":{"description":"For humans; may change.","type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"title":"Error","type":"object"},"Holding":{"properties":{"average_cost":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Per share, in the currency the position trades in; full precision."},"instrument_type":{"nullable":true,"type":"string"},"isin":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"portfolio":{"description":"Which portfolio, when you have more than one and didn't pick one.","type":"string"},"sector":{"nullable":true,"type":"string"},"shares":{"description":"A decimal string: shares can be fractional.","type":"string"},"symbol":{"example":"KO","type":"string"}},"required":["symbol","name","shares","average_cost"],"title":"Holding","type":"object"},"HoldingList":{"properties":{"holdings":{"items":{"$ref":"#/components/schemas/Holding"},"type":"array"}},"required":["holdings"],"title":"HoldingList","type":"object"},"Income":{"description":"Money is in your preferred currency throughout. Rates are fractions: 0.05 is 5%.","properties":{"annual_income":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Forward, at today's rates, gross."},"current_yield_pct":{"description":"A percentage.","nullable":true,"type":"number"},"drip":{"type":"boolean"},"growth_rate":{"description":"Income-weighted dividend growth, a fraction.","nullable":true,"type":"number"},"holdings":{"description":"Where the income comes from, biggest first.","items":{"properties":{"cagr_5y":{"description":"A fraction.","nullable":true,"type":"number"},"growth":{"description":"A fraction.","nullable":true,"type":"number"},"income":{"$ref":"#/components/schemas/Money"},"net_income":{"$ref":"#/components/schemas/Money"},"streak":{"description":"Consecutive years of increases.","nullable":true,"type":"integer"},"symbol":{"type":"string"}},"required":["symbol","income","net_income"],"type":"object"},"type":"array"},"income_year":{"description":"How a typical year's income falls across the months. Null for a portfolio too small for the shape to mean anything.","nullable":true,"properties":{"average_month":{"$ref":"#/components/schemas/Money"},"biggest_months":{"items":{"maximum":12,"minimum":1,"type":"integer"},"type":"array"},"biggest_months_share":{"description":"Share of the year in the biggest months. 0.25 is perfectly even.","type":"number"},"by_month":{"additionalProperties":{"$ref":"#/components/schemas/Money"},"description":"Keyed by month, \"1\" to \"12\", every month present.","type":"object"},"empty_months":{"items":{"maximum":12,"minimum":1,"type":"integer"},"type":"array"},"net_of_withholding":{"type":"boolean"},"thin_months":{"description":"Below average, thinnest first.","items":{"maximum":12,"minimum":1,"type":"integer"},"type":"array"}},"type":"object"},"net_annual_income":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"The same, net of estimated foreign withholding."},"projection":{"description":"One entry per year, from 0 (now) to `years`.","items":{"properties":{"income":{"$ref":"#/components/schemas/Money"},"net_income":{"$ref":"#/components/schemas/Money"},"year_offset":{"type":"integer"}},"required":["year_offset","income","net_income"],"type":"object"},"type":"array"},"years":{"type":"integer"}},"required":["annual_income","net_annual_income","drip","years","holdings","projection"],"title":"Income","type":"object"},"Me":{"description":"The user the token belongs to.","properties":{"email":{"type":"string"},"id":{"format":"uuid","type":"string"},"name":{"nullable":true,"type":"string"},"preferred_currency":{"description":"ISO 4217; the currency aggregates are reported in.","example":"EUR","type":"string"}},"required":["id","email","preferred_currency"],"title":"Me","type":"object"},"Money":{"description":"An amount and its currency. The amount is a decimal string, never a float.","properties":{"amount":{"example":"12.34","pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},"currency":{"description":"ISO 4217","example":"EUR","type":"string"}},"required":["amount","currency"],"title":"Money","type":"object"},"Portfolio":{"description":"Pass its name (or slug) as `portfolio` to narrow the ledger endpoints to it; without it they aggregate across all portfolios.","properties":{"default":{"type":"boolean"},"name":{"type":"string"},"slug":{"description":"Present only when the portfolio is shared.","type":"string"}},"required":["name","default"],"title":"Portfolio","type":"object"},"PortfolioList":{"properties":{"portfolios":{"items":{"$ref":"#/components/schemas/Portfolio"},"type":"array"}},"required":["portfolios"],"title":"PortfolioList","type":"object"},"Stock":{"properties":{"currency":{"description":"The currency it trades in.","type":"string"},"dividend":{"properties":{"annual":{"allOf":[{"$ref":"#/components/schemas/Money"}],"description":"Per share, per year, from the live quote. Null without a token.","nullable":true},"cagr_5y":{"description":"A fraction.","nullable":true,"type":"number"},"ex_dividend_date":{"format":"date","nullable":true,"type":"string"},"frequency":{"example":"quarterly","nullable":true,"type":"string"},"payment_months":{"items":{"maximum":12,"minimum":1,"type":"integer"},"type":"array"},"safety":{"enum":["safe","watch","at_risk","unknown"],"type":"string"},"streak_years":{"description":"Consecutive years of increases.","nullable":true,"type":"integer"},"yield_avg_5y_pct":{"description":"The average yield over about 5 years, a percentage.","nullable":true,"type":"number"},"yield_pct":{"description":"A percentage.","nullable":true,"type":"number"}},"required":["payment_months","safety"],"type":"object"},"industry":{"nullable":true,"type":"string"},"instrument_type":{"example":"equity","nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"price":{"allOf":[{"$ref":"#/components/schemas/Money"},{"properties":{"as_of":{"description":"When the stored price was seen. Null for a live price.","format":"date-time","nullable":true,"type":"string"},"live":{"type":"boolean"}},"required":["live"],"type":"object"}],"description":"Money, plus whether it is live. Live with a token; without one, the last price Quantic stored and when. Null when there is neither.","nullable":true},"scores":{"description":"Quantic's 0–10 lenses.","properties":{"momentum":{"maximum":10,"minimum":0,"nullable":true,"type":"number"},"rating":{"maximum":10,"minimum":0,"nullable":true,"type":"number"},"value":{"maximum":10,"minimum":0,"nullable":true,"type":"number"}},"type":"object"},"sector":{"nullable":true,"type":"string"},"symbol":{"example":"KO","type":"string"}},"required":["symbol","currency","price","dividend","scores"],"title":"Stock","type":"object"},"StockSearch":{"properties":{"results":{"items":{"properties":{"exchange":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"symbol":{"type":"string"},"tracked":{"description":"Quantic has data for it, so /api/v1/stocks/{symbol} answers.","type":"boolean"},"type":{"example":"EQUITY","nullable":true,"type":"string"}},"required":["symbol","tracked"],"type":"object"},"type":"array"}},"required":["results"],"title":"StockSearch","type":"object"}},"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}}},"info":{"description":"Read-only access to your Quantic portfolio and to public dividend data. Private endpoints take a personal access token (Settings) or an OAuth access token as `Authorization: Bearer …`.","title":"Quantic Finance API","version":"1"},"openapi":"3.0.0","paths":{"/api/v1/calendar":{"get":{"callbacks":{},"description":"Every stock Quantic tracks going ex-dividend in the next `days` days, soonest first. Public: no token needed. Buy before the ex-date to receive the next dividend.","operationId":"QuanticWeb.API.V1.CalendarController.index","parameters":[{"description":"How far ahead, 1 to 120. Default 45.","example":45,"in":"query","name":"days","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calendar"}}},"description":"The calendar"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed days"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Anonymous rate limit"}},"summary":"Upcoming ex-dividend dates","tags":["market"]}},"/api/v1/dividends":{"get":{"callbacks":{},"description":"Dividends paid to you, newest first.","operationId":"QuanticWeb.API.V1.DividendController.index","parameters":[{"description":"Only this ticker. An unknown one matches nothing.","example":"KO","in":"query","name":"symbol","required":false,"schema":{"type":"string"}},{"description":"Paid on or after.","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"Paid on or before.","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}},{"description":"A portfolio name or slug, case-insensitive. Omitted: all portfolios, and each row says which one it is in when you have more than one.","in":"query","name":"portfolio","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DividendList"}}},"description":"Dividends, newest first"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No token, or an invalid one"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown portfolio, or a malformed date"}},"security":[{"bearerAuth":[]}],"summary":"Your received dividends","tags":["portfolio"]}},"/api/v1/holdings":{"get":{"callbacks":{},"description":"Each position's shares and average cost, from the ledger: cost basis, no live prices.","operationId":"QuanticWeb.API.V1.HoldingController.index","parameters":[{"description":"A portfolio name or slug, case-insensitive. Omitted: all portfolios, and each row says which one it is in when you have more than one.","in":"query","name":"portfolio","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldingList"}}},"description":"Holdings, oldest first"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No token, or an invalid one"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown portfolio"}},"security":[{"bearerAuth":[]}],"summary":"Your holdings","tags":["portfolio"]}},"/api/v1/income":{"get":{"callbacks":{},"description":"Forward annual dividend income at today's rates, in your preferred currency, gross and net of estimated foreign withholding; the holdings it comes from; a year-by-year projection; and how a typical year's income falls across the months.","operationId":"QuanticWeb.API.V1.IncomeController.show","parameters":[{"description":"Projection horizon, 1 to 50. Default 10.","example":10,"in":"query","name":"years","required":false,"schema":{"type":"integer"}},{"description":"Compound reinvested dividends. Default false.","in":"query","name":"drip","required":false,"schema":{"type":"boolean"}},{"description":"A portfolio name or slug, case-insensitive. Omitted: all portfolios.","in":"query","name":"portfolio","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Income"}}},"description":"The outlook"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No token, or an invalid one"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown portfolio, or a malformed parameter"}},"security":[{"bearerAuth":[]}],"summary":"Your dividend income outlook","tags":["portfolio"]}},"/api/v1/me":{"get":{"callbacks":{},"description":"Also the cheapest way to check that a token works.","operationId":"QuanticWeb.API.V1.MeController.show","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}},"description":"The user"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No token, or an invalid one"}},"security":[{"bearerAuth":[]}],"summary":"The user the token belongs to","tags":["account"]}},"/api/v1/portfolios":{"get":{"callbacks":{},"operationId":"QuanticWeb.API.V1.PortfolioController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioList"}}},"description":"Default first, then in your order"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"No token, or an invalid one"}},"security":[{"bearerAuth":[]}],"summary":"Your portfolios","tags":["portfolio"]}},"/api/v1/stocks":{"get":{"callbacks":{},"description":"By ticker or company name, up to about 10 matches. Anonymous callers search the stocks Quantic already tracks; with a token the search also asks the market-data provider.","operationId":"QuanticWeb.API.V1.StockController.index","parameters":[{"description":"Ticker or name.","example":"coca","in":"query","name":"q","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockSearch"}}},"description":"Matches"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing q"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Anonymous rate limit"}},"summary":"Search stocks","tags":["market"]}},"/api/v1/stocks/{symbol}":{"get":{"callbacks":{},"description":"Identity, price, dividend profile, dividend safety and the 0–10 scores. With a token the price is live; without one it is the last price Quantic stored, with its time.","operationId":"QuanticWeb.API.V1.StockController.show","parameters":[{"description":"","example":"KO","in":"path","name":"symbol","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stock"}}},"description":"The stock"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Quantic doesn't track that symbol"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Anonymous rate limit"}},"summary":"One stock","tags":["market"]}}},"security":[],"servers":[{"url":"https://quantic.finance","variables":{}}],"tags":[]}