curl --request GET \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives \
--header 'apikey: <api-key>'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
"<unknown>"
],
"meta": {
"resource": "<string>",
"kind": "<string>",
"request": {},
"id_known": true,
"endpoint": "<string>"
},
"next_page_url": "<string>"
}{
"error": {
"code": "bad_request",
"message": "<string>",
"target": "<string>",
"innererror": {
"sqlstate": "<string>",
"hint": "<string>",
"details": "<string>"
}
}
}v2 derivatives
silo-api.Options, termo and futures: chains, histories, exercises, the DI1 settlement.
Example: /v2/derivatives?id=PETR&kind=chain
Kinds:
chain: api.option_chain: calls and puts of one prefix on one session, by expiry, strike, side. One call holds the chain, served in pages; a chain the SQL may have cut (199 anonymous, 1,000 rows) is refused.history: api.option_history: one option code’s daily quotes, oldest first. Refuses above 1000 rows: narrow from/to.exercises: api.option_exercises: exercise prints for a prefix, oldest first. Paged by date windows; a window the SQL may have cut is halved.termo: api.termo_history: one termo code’s daily quotes, oldest first. Refuses above 1000 rows: narrow from/to.futures: api.future_series: one DI1, DOL or WDO contract through time, oldest first. Refuses above 1000 rows.futures_curve: api.future_curve: every contract of a root (id, default DI1) on one session, nearest first.di_settlement: api.di_settlement (a GET view): DI1 settlement rate, previous rate, open interest per session and contract, newest first. With no id, every contract, paged with order + limit + offset.
With no from, a dated kind reads the last 12 months to to.
id per kind: chain and exercises take an option prefix (at least 3 characters, e.g. PETR); history and termo one B3 code (codneg); futures one outright contract (DI1F27, DOLF27); futures_curve a root (DI1, DOL or WDO; none: DI1); di_settlement one DI1 contract (none: every contract).
chain and exercises are cut by the SQL at a tier ceiling without saying so, so the gateway asks for 1,001 rows: a count equal to a tier ceiling (chain 200 or 2000, exercises 500 or 5000, or PostgREST’s 1000) or above 1,000 cannot be told from a cut. chain refuses it (over_limit); exercises halves its date window and tries again, and refuses only a single day that is still cut.
Exercises are exercise events, not quotes. DI1 rates are % a.a. on 252 business days, as B3 settles them; nothing is derived.
GET /v2/derivatives?help describes the main parameters, ?help=all adds the hidden ones.
curl --request GET \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives \
--header 'apikey: <api-key>'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/derivatives")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
"<unknown>"
],
"meta": {
"resource": "<string>",
"kind": "<string>",
"request": {},
"id_known": true,
"endpoint": "<string>"
},
"next_page_url": "<string>"
}{
"error": {
"code": "bad_request",
"message": "<string>",
"target": "<string>",
"innererror": {
"sqlstate": "<string>",
"hint": "<string>",
"details": "<string>"
}
}
}Authorizations
The public publishable key. It identifies the project, not you, and is the anonymous tier.
Query Parameters
chain: one session's option chain for a prefix. history: one option's daily quotes. exercises: option exercise events for a prefix. termo: one forward (termo) code's quotes. futures: one futures contract's daily settlement. futures_curve: every contract of a root on one session. di_settlement: DI1 settlement rates per session and contract. Default: chain.
chain, history, exercises, termo, futures, futures_curve, di_settlement kind chain and futures_curve: the B3 session, YYYY-MM-DD. A date with no session returns no rows. Default: the latest session held (chain: the newest option session; futures_curve: the root's newest session).
By kind: chain, exercises take an option prefix, at least 3 characters (PETR); history takes one option code (codneg); termo takes one termo code (codneg); futures takes one outright futures contract (DI1F27, DOLF27); futures_curve takes a futures root, DI1, DOL or WDO (none: DI1); di_settlement takes one DI1 contract (none: every contract). Required for kinds chain, history, exercises, termo, futures. Default: none.
First date of the window, YYYY-MM-DD. Default: the resource's default window, counted back from to.
Last date of the window, YYYY-MM-DD. Default: the latest complete period, from coverage.
The page size. More rows than one page come through next_page_url, never cut silently; a call stops at the tier's rows-per-call cap with meta.tier_cap_reached. Default: the tier's page maximum (10 anonymous, 100 signed in); a larger value is coerced to it.
x >= 1The opaque cursor from a previous next_page_url. It carries every other parameter: send it alone (another parameter with a different value is bad_request). Default: none: the first page.
Hidden parameter (?help=all lists it). kind chain: only series expiring on or after this date. Default: today (the SQL's CURRENT_DATE): expired series are left out.
Was this page helpful?