Santiago Stock Exchange: IPSA and stocks
IPSA and IGPA indices, instruments, prices, quotes, trades and fixed income from the Brain Data API, with your own key (free plan available).
get_santiago_stock_exchange_data
Use it over MCP
- Connect the server
https://mcp.betterllama.com/mcpin your client (setup per client). - Ask your agent, for example:
- «How did the IPSA close yesterday?»
- «SQM-B trades over the last week»
- Or call the tool
get_santiago_stock_exchange_datawith these arguments:
{
"operation": "indices"
}You need your own free key for this tool. Yes, your own Brain Data API key: sign up at api-braindata.bolsadesantiago.com and subscribe to the free «API Free trial» plan. The exchange's terms do not allow us to share our key. Send it in the X-Bolsa-Api-Key header (or the apiKey argument); Better Llama does not store it.
Headers: X-Bolsa-Api-Key. Example for Cursor:
{
"mcpServers": {
"better-llama": {
"url": "https://mcp.betterllama.com/mcp",
"headers": {
"X-Bolsa-Api-Key": "<your key>"
}
}
}
}Beta: free and with no sign-up while we test the service.
Direct HTTP call (JSON-RPC)
Without an MCP client, POST to the same server:
curl -s https://mcp.betterllama.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-Bolsa-Api-Key: $BOLSA_API_KEY" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_santiago_stock_exchange_data", "arguments": {"operation": "indices"}}}'import json, os, requests
# Call a Better Llama MCP tool over HTTP (JSON-RPC)
URL = "https://mcp.betterllama.com/mcp"
HEADERS = {"Accept": "application/json, text/event-stream",
"X-Bolsa-Api-Key": os.environ["BOLSA_API_KEY"]}
def call(tool, arguments):
body = {"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {"name": tool, "arguments": arguments}}
r = requests.post(URL, json=body, headers=HEADERS, timeout=120)
r.raise_for_status()
result = r.json()["result"]
data = json.loads(result["content"][0]["text"])
if result.get("isError"):
raise RuntimeError(data["error"])
return data
data = call("get_santiago_stock_exchange_data", {"operation": "indices"})
for row in data["results"]:
print(row)
print(data["attribution"])The answer text is JSON with results, count, warnings, attribution and source.
Parameters
| Argument | Description | Type |
|---|---|---|
apiKey | API Brain Data API key — Your personal, free key from the provider (https://api-braindata.bolsadesantiago.com). You can also send it in an HTTP header (see the tool page). It is used only for that request; it is never stored or logged. | string |
operation | Operation — What to query. The free plan includes indices, instruments, best bid/ask (puntas), trades, stock summary and capital changes (equities, end of day). Values: indices, instrumentos, precios, puntas, transacciones, resumen_accion, variaciones_capital, rf_instrumentos, rf_indices, rf_transacciones, rf_resumen_transacciones, rf_benchmark, if_instrumentos, if_transacciones …; Default: "indices" | string |
product | Product — Product of your subscription. Default: «free_trial» if the operation offers it; otherwise «mercado_valores» (equities, fixed income and financial intermediation) or «compensacion». Values: free_trial, mercado_valores, compensacion | string |
nemos | Tickers — E.g. SQM-B, CHILE, COPEC. Required for transacciones, resumen_accion, variaciones_capital, precios and rf_transacciones; queried one by one. | array<string> |
fechaDesde | From — YYYY-MM-DD. Default: 7 days before «To». | string |
fechaHasta | To — YYYY-MM-DD. Default: today (Chile). | string |
fecha | Date — YYYY-MM-DD. For indices (paid plan), rf_benchmark and cg_garantia. | string |
indice | Index — Index code (e.g. IPSA) for paid-plan indices, rf_indices and rf_benchmark. | string |
periodo | Period — Period as defined by the API (resumen_accion, indices, summaries). | string |
mercado | Market — Market for paid-plan instruments (e.g. ACC, CFI). | string |
dividendo | Index with dividends — Paid-plan indices only. Default: false | boolean |
condicionLiquidacion | Settlement condition — Optional for puntas (paid plan). | string |
familia | Family (fixed income) — Required for rf_instrumentos and rf_resumen_transacciones. | string |
emisor | Issuer (intermediation) — Required for if_transacciones and if_resumen_transacciones. | string |
camara | Clearing house (clearing) — Required for cg_saldo_neto and cg_posicion_neta. | string |
codigoCorredor | Broker code — Optional for clearing. | string |
grupo | Group (collateral) — Required for cg_garantia. | string |
maxItems | Maximum number of results to return (1-500). Default 50. Default: 50; Max: 500 | integer |
Source and attribution
Fuente: Bolsa de Santiago, API Brain Data — https://api-braindata.bolsadesantiago.com Source site: api-braindata.bolsadesantiago.com.
FAQ
What Santiago Stock Exchange data does it return?
From the Bolsa de Comercio de Santiago Brain Data API: indices (IPSA, IGPA and others), instruments, closing prices, order-book tops, trades, per-stock summary, dividends and capital changes, plus fixed income, money-market and clearing data depending on your plan. It is read-only and not financial advice.
Which API key do I need?
Yes, your own Brain Data API key: sign up at api-braindata.bolsadesantiago.com and subscribe to the free «API Free trial» plan. The exchange's terms do not allow us to share our key. Send it in the X-Bolsa-Api-Key header (or the apiKey argument); Better Llama does not store it.
What if my plan does not include an operation?
The product is chosen automatically (the free plan when the operation exists there). If your plan does not include the operation, the API returns 404 and the tool explains it with a clear error.
How much does it cost?
Free during the beta, with no sign-up and a limit of 60 requests per minute per IP. If paid plans come later, we will announce them on betterllama.com first.