Stock marketChileBring your free keyBeta

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

  1. Connect the server https://mcp.betterllama.com/mcp in your client (setup per client).
  2. Ask your agent, for example:
    • «How did the IPSA close yesterday?»
    • «SQM-B trades over the last week»
  3. Or call the tool get_santiago_stock_exchange_data with these arguments:
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:

mcp.json
{
  "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
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"}}}'
python
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

ArgumentDescriptionType
apiKeyAPI 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
operationOperation — 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
productProduct — 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
nemosTickers — E.g. SQM-B, CHILE, COPEC. Required for transacciones, resumen_accion, variaciones_capital, precios and rf_transacciones; queried one by one.array<string>
fechaDesdeFrom — YYYY-MM-DD. Default: 7 days before «To».string
fechaHastaTo — YYYY-MM-DD. Default: today (Chile).string
fechaDate — YYYY-MM-DD. For indices (paid plan), rf_benchmark and cg_garantia.string
indiceIndex — Index code (e.g. IPSA) for paid-plan indices, rf_indices and rf_benchmark.string
periodoPeriod — Period as defined by the API (resumen_accion, indices, summaries).string
mercadoMarket — Market for paid-plan instruments (e.g. ACC, CFI).string
dividendoIndex with dividends — Paid-plan indices only.
Default: false
boolean
condicionLiquidacionSettlement condition — Optional for puntas (paid plan).string
familiaFamily (fixed income) — Required for rf_instrumentos and rf_resumen_transacciones.string
emisorIssuer (intermediation) — Required for if_transacciones and if_resumen_transacciones.string
camaraClearing house (clearing) — Required for cg_saldo_neto and cg_posicion_neta.string
codigoCorredorBroker code — Optional for clearing.string
grupoGroup (collateral) — Required for cg_garantia.string
maxItemsMaximum 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.