curl --request GET \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/prices \
--header 'Authorization: Bearer <token>'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/prices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
"<unknown>"
],
"meta": {
"resource": "<string>",
"kind": "<string>",
"request": {},
"id_known": true,
"endpoint": "<string>",
"source": "<string>",
"data_through": "2023-12-25",
"coverage_dataset": "<string>",
"data_through_error": "<string>",
"tier": "anonymous",
"tier_cap_reached": true
},
"next_page_url": "<string>"
}{
"error": {
"code": "bad_request",
"reason": "row_cap",
"message": "<string>",
"target": "<string>",
"innererror": {
"sqlstate": "<string>",
"hint": "<string>",
"details": "<string>"
}
}
}Prices
What did it trade at? Daily history (split-adjusted by default), latest quote, sessions, indices, B3 FORWARD prints, and the risk split of a share.
Example: /v2/prices?id=PETR4
Kinds:
history: api.quote_history: one ticker, oldest first, 1 year to the latest session by default, paged with the function’s p_after cursor. With no id: the research universe (the tickers held).latest: api.quote_latest: the ticker’s newest session (raw, adjusted false). With no id: the research universe.session: One session’s quotes from one price view (raw, adjusted false). Paged with order + limit + offset; the default session is pinned in the cursor.index: api.index_history: one B3 index code (IBOV, IFIX, …), levels as published (total-return indices, not adjusted). With no id the SQL refusal names the codes held.forward: api.trade_consolidated_history: one FORWARD-segment ticker; last_price is the close, ref_price is never a trade.risk: api.risk_decompose: one row for one share or unit. market_share, sector_share and residual_share of the daily return variance add to 1; betas, gamma (the sector index’s beta to IBOV), hedge ratios per R$ 1 long, annualized volatilities, and the same split without shock sessions (ex_shock_*). OLS cascade on daily simple returns from the joined total-return levels. The window is from..to (default 12 months); at most 1000 sessions. Realized and historical only, not advice.
With no from, a dated kind reads the last 12 months to to.
GET /v2/prices?help describes the main parameters, ?help=all adds the hidden ones.
curl --request GET \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/prices \
--header 'Authorization: Bearer <token>'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/prices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/prices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
"<unknown>"
],
"meta": {
"resource": "<string>",
"kind": "<string>",
"request": {},
"id_known": true,
"endpoint": "<string>",
"source": "<string>",
"data_through": "2023-12-25",
"coverage_dataset": "<string>",
"data_through_error": "<string>",
"tier": "anonymous",
"tier_cap_reached": true
},
"next_page_url": "<string>"
}{
"error": {
"code": "bad_request",
"reason": "row_cap",
"message": "<string>",
"target": "<string>",
"innererror": {
"sqlstate": "<string>",
"hint": "<string>",
"details": "<string>"
}
}
}Authorizations
Query Parameters
history: one ticker's daily series. latest: its newest session. session: every quote of one session (the seven price views in one). index: a B3 index's daily levels. forward: B3 FORWARD-segment prints (fixed-income ETFs COTAHIST does not carry). risk: one share's daily return variance split into IBOV, a sector index and the residual, one row (realized, not advice). Default: history.
history, latest, session, index, forward, risk By kind: history, latest take a B3 ticker (PETR4); session takes a B3 ticker (none: every ticker of the session); index takes a B3 index code (IBOV, IFIX, ...); forward takes a B3 FORWARD-segment ticker; risk takes a B3 share or unit ticker (ITUB4). Required for kind risk. With no id, kinds history, latest read api.research_universe (what SILO holds). Default: none.
Hidden parameter (?help=all lists it). kind session. all: api.quotes (standard lot, tpmerc 010). Each class reads its own view (equities, bdrs, units, fund_quotas, cash_securities: standard, odd and block lots, with lot on the row; auctions: tpmerc 017), with every column it publishes. Default: all.
all, equity, bdr, unit, fund_quota, cash_security, auction Hidden parameter (?help=all lists it). kind risk. none (market and residual only), or a B3 index code other than IBOV: IFNC, IMAT, IEEX, UTIL, IMOB, ICON, IBXX, IBXL, SMLL, IDIV. Default: SILO's map from the company's CVM setor to a B3 sector index; a setor with no index gets no sector leg.
Was this page helpful?