金
Swiss National Bank API
5 endpointsFinance & CryptoCHsocial:read5 real examples
Returns SNB data cubes, SARON and money-market rates, Swiss bond yields and central bank policy rates.
View as Markdown| GET | /snb/cubeDimensions | The dimension tree of one SNB cube: the member ids that the select filter of cube and the other endpoints take. |
| GET | /snb/moneyMarket | SARON and the CHF money-market complex: the SARON term structure and the reference rates, in one answer. |
| GET | /snb/bondYields | Swiss Confederation bond yields by maturity, one series per maturity. |
| GET | /snb/policyRates | Official policy rates of the SNB, the Fed, the ECB, the Bank of England and the Bank of Japan, from one Swiss cube. |
| GET | /snb/cube | Any SNB data cube, raw: its series with dates and values, narrowed by the select filter. |
cubeDimensions
GET
/v1/snb/cubeDimensionsThe dimension tree of one SNB cube: the member ids that the select filter of cube and the other endpoints take.
scope social:read1 unitcached 24 h
Parameters
cubestring required | SNB cube id. Confirmed: snboffzisa, zirepo, zimoma, rendoblim, devkum. e.g. rendoblim |
langstring | Language of the series names: en, de, fr or it. Default en.endefritdefault en |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
5 fields
cube | string |
dimensions | DimensionNode[] |
id | string |
items | DimensionNode[] |
name | string |
curl "https://api.hoshime.com/v1/snb/cubeDimensions?cube=rendoblim" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/snb/cubeDimensions?cube=rendoblim", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/snb/cubeDimensions?cube=rendoblim", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "cube": "rendoblim", "dimensions": [ { "id": "D0", "items": [ { "id": "D0_0", "items": [ { "id": "1J", "items": [], "name": "1 year" }, { "id": "2J", "items": [], "name": "2 years" } ], "name": "CHF Swiss Confederation bond issues" } ], "name": "Overview" } ] }, "meta": { "cached": false, "endpoint": "cubeDimensions", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "snb", "requestId": "req_2Xb9kQ…", "units": 1 } }
moneyMarket
GET
/v1/snb/moneyMarketSARON and the CHF money-market complex: the SARON term structure and the reference rates, in one answer.
scope social:read1 unitcached 1 hpaginated
Parameters
setstring | Which table: saron (the SARON term structure), reference (SARON, TOMN, EGMBF, LIBOR and the non-CHF benchmarks), or all. Default all.allsaronreferencedefault alle.g. saron |
fromstring | Earliest observation date, YYYY, YYYY-MM or YYYY-MM-DD. |
tostring | Latest observation date, YYYY, YYYY-MM or YYYY-MM-DD. |
selectstring | Dimension filter in the upstream's own syntax, such as D0(H0,H6). Narrows the answer to those members. |
lengthinteger | Observations per series, newest first. Default 100, max 20000. default 100 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
7 fields
frequency | string |
key | string |
name | string |
observations | Observation[] |
date | string |
value | number (double) | null |
unit | string |
curl "https://api.hoshime.com/v1/snb/moneyMarket?set=saron" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/snb/moneyMarket?set=saron", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/snb/moneyMarket?set=saron", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "frequency": "P1D_L", "key": "EPB@SNB.zirepo{H0}", "name": "Overnight (SARON), close of trading", "observations": [ { "date": "2026-10-15", "value": -0.045861 }, { "date": "2026-10-14", "value": -0.044581 } ], "unit": "In percent" }, { "frequency": "P1D_L", "key": "EPB@SNB.zirepo{H6}", "name": "SARON 1M Compound Rate", "observations": [ { "date": "2026-10-15", "value": -0.0407 }, { "date": "2026-10-14", "value": -0.0405 } ], "unit": "In percent" } ], "meta": { "cached": false, "endpoint": "moneyMarket", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "snb", "requestId": "req_2Xb9kQ…", "units": 1 } }
bondYields
GET
/v1/snb/bondYieldsSwiss Confederation bond yields by maturity, one series per maturity.
scope social:read1 unitcached 6 hpaginated
Parameters
maturitystring | Maturities in years, comma-separated. Published: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30. Default all. e.g. 2,10 |
fromstring | Earliest observation date, YYYY, YYYY-MM or YYYY-MM-DD. |
tostring | Latest observation date, YYYY, YYYY-MM or YYYY-MM-DD. |
lengthinteger | Observations per series, newest first. Default 200, max 20000. default 200 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
7 fields
frequency | string |
key | string |
name | string |
observations | Observation[] |
date | string |
value | number (double) | null |
unit | string |
curl "https://api.hoshime.com/v1/snb/bondYields?maturity=2%2C10" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/snb/bondYields?maturity=2%2C10", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/snb/bondYields?maturity=2%2C10", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "frequency": "P1M", "key": "EPB@SNB.rendoblim{2J}", "name": "CHF Swiss Confederation bond issues - 2 years", "observations": [ { "date": "2025-07", "value": -0.083 }, { "date": "2025-06", "value": -0.061 } ], "unit": "In percent" }, { "frequency": "P1M", "key": "EPB@SNB.rendoblim{10J}", "name": "CHF Swiss Confederation bond issues - 10 years", "observations": [ { "date": "2025-07", "value": 0.378 }, { "date": "2025-06", "value": 0.41 } ], "unit": "In percent" } ], "meta": { "cached": false, "endpoint": "bondYields", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "snb", "requestId": "req_2Xb9kQ…", "units": 1 } }
policyRates
GET
/v1/snb/policyRatesOfficial policy rates of the SNB, the Fed, the ECB, the Bank of England and the Bank of Japan, from one Swiss cube.
scope social:read1 unitcached 6 hpaginated
Parameters
bankstring | Central banks to return, comma-separated: snb, fed, ecb, boe, boj. Default all five. e.g. snb,ecb |
fromstring | Earliest observation date, YYYY, YYYY-MM or YYYY-MM-DD. |
tostring | Latest observation date, YYYY, YYYY-MM or YYYY-MM-DD. |
lengthinteger | Observations per series, newest first. Default 200, max 20000. default 200 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
7 fields
frequency | string |
key | string |
name | string |
observations | Observation[] |
date | string |
value | number (double) | null |
unit | string |
curl "https://api.hoshime.com/v1/snb/policyRates?bank=snb%2Cecb" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/snb/policyRates?bank=snb%2Cecb", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/snb/policyRates?bank=snb%2Cecb", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "frequency": "P1M", "key": "EPB@SNB.snboffzisa{LZ}", "name": "Switzerland - SNB policy rate", "observations": [ { "date": "2026-09", "value": 0 }, { "date": "2026-08", "value": 0 } ], "unit": "In percent" }, { "frequency": "P1M", "key": "EPB@SNB.snboffzisa{H}", "name": "Euro area/ECB - Main refinancing rate", "observations": [ { "date": "2026-09", "value": 2.65 }, { "date": "2026-08", "value": 2.4 } ], "unit": "In percent" } ], "meta": { "cached": false, "endpoint": "policyRates", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "snb", "requestId": "req_2Xb9kQ…", "units": 1 } }
cube
GET
/v1/snb/cubeAny SNB data cube, raw: its series with dates and values, narrowed by the select filter.
scope social:read1 unitcached 1 hpaginated
Parameters
cubestring required | SNB cube id. Confirmed: snboffzisa, zirepo, zimoma, rendoblim, devkum. e.g. zirepo |
langstring | Language of the series names: en, de, fr or it. Default en.endefritdefault en |
fromstring | Earliest observation date, YYYY, YYYY-MM or YYYY-MM-DD. |
tostring | Latest observation date, YYYY, YYYY-MM or YYYY-MM-DD. |
selectstring | Dimension filter in the upstream's own syntax, such as D0(H0,H6). Narrows the answer to those members. e.g. D0(H0) |
lengthinteger | Observations per series, newest first. Default 200, max 20000. default 200 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
7 fields
frequency | string |
key | string |
name | string |
observations | Observation[] |
date | string |
value | number (double) | null |
unit | string |
curl "https://api.hoshime.com/v1/snb/cube?cube=zirepo&select=D0%28H0%29" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/snb/cube?cube=zirepo&select=D0%28H0%29", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/snb/cube?cube=zirepo&select=D0%28H0%29", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "frequency": "P1D_L", "key": "EPB@SNB.zirepo{H0}", "name": "Overnight (SARON), close of trading", "observations": [ { "date": "2026-10-15", "value": -0.045861 }, { "date": "2026-10-14", "value": -0.044581 } ], "unit": "In percent" } ], "meta": { "cached": false, "endpoint": "cube", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "snb", "requestId": "req_2Xb9kQ…", "units": 1 } }