IBrX 100 Index (Brazil) Convert API: quickstart for currency and units conversion
You need to take the IBrX 100 (Brazil) point value and convert it into currency units (USD or BRL) so you can normalize charts, compute cost-per-point, or set alerts based on currency thresholds. By the end of this quickstart you will: confirm the correct IBrX 100 symbol, fetch the latest quote, read how Indices-API expresses index-unit conversions, and calculate both “index points per USD” and “USD per index point” using the Convert and Latest endpoints.
What you will build: currency and unit conversion around IBrX 100
The concrete workflow:
- Identify the correct IBrX 100 symbol code used by Indices-API (don’t guess; verify).
- Call the Latest endpoint to get current conversion rates relative to USD.
- Read the fields you need: base, date, timestamp, and rates (including the special USD{INDEX} reciprocal symbol when present).
- Use Convert to turn an amount of currency into index points (or vice versa), so your UI and risk calculations can use consistent units.
If you still need an API key, grab a free trial and PRO plan details at Register. You can always refer to endpoint behavior and parameters in the Documentation.
Step 1 — Confirm the IBrX 100 symbol code
Indices-API uses short symbol codes for every index. Do not assume the code for the IBrX 100; confirm it on the symbols page. This avoids integration bugs and mismatches with your internal naming.
Check here to validate the exact IBrX 100 symbol before you call any endpoint: Indices-API Supported Symbols.
Once you have the official symbol, you will use it consistently in both the Latest and Convert endpoints described below.
How the units work: base currency, rates, and the USD{INDEX} reciprocal
Indices-API responses are denominated by a base currency and a set of rates. The API defaults to USD as the base in examples and returns a “rates” object keyed by index symbols. Practically:
- base: the currency your rates are relative to (commonly USD in examples).
- rates[{INDEX}]: how many index points one unit of “base” currency buys (points per USD when base=USD).
- rates.USD{INDEX}: the reciprocal (USD per one index point) where available, useful for cost-per-point metrics.
- timestamp and date: when the quote was computed; use this to decide cache TTLs and to align with market sessions.
This dual representation means you can compute either direction explicitly without performing your own inversion. For example, if base=USD:
- rates.GSPC = 0.0001306 means 1 USD equals 0.0001306 S&P 500 index points.
- rates.USDGSPC = 7652.03 means 1 S&P 500 index point costs 7652.03 USD.
For IBrX 100, once you verify its symbol code on the symbols page, look for both rates.{IBRX100_SYMBOL} and (if provided) rates.USD{IBRX100_SYMBOL} in the Latest response to drive your conversion precisely.
Step 2 — Fetch latest rates you will use in Convert
The Latest endpoint gives you the current conversion context (base, timestamp, and the rates object). Use it to populate your cache and drive user-facing conversions. Plans determine update frequency (e.g., every 60 or 10 minutes), so design your cache window accordingly.
Copy-paste curl: Latest (with official response)
Below is a complete curl call to Latest. Replace YOUR_API_KEY with your key from the registration page.
curl "https://indices-api.com/api/latest?access_key=YOUR_API_KEY"
Official JSON response (use these exact values for your parser during development):
{"data":{"success":true,"timestamp":1790815020,"date":"2026-10-01","base":"USD","rates":{"GSPC":0.00013068427593723,"USD":1,"USDGSPC":7652.03000000029}}}
Fields you will actually use:
- data.success: API-level success boolean.
- data.timestamp: Unix seconds when this snapshot was produced. Use it to key cache entries and avoid stale merges.
- data.date: Trading date for the snapshot in YYYY-MM-DD format.
- data.base: Base currency for the “rates” map (USD in this response).
- data.rates: Dictionary of symbol → rate. Notably:
- rates.GSPC: index points per USD (when base=USD).
- rates.USD: 1 (the base currency is always 1 relative to itself).
- rates.USDGSPC: USD per one GSPC point (the reciprocal).
When you work with IBrX 100, you will look for the matching keys: rates.{IBRX100_SYMBOL} and, when provided, rates.USD{IBRX100_SYMBOL}. Confirm the exact symbol code on the Indices-API Supported Symbols page before implementing.
Step 3 — Convert endpoint for currency-to-index (and back)
With the Latest context cached, the Convert endpoint executes on-demand conversions from a currency amount to an index amount (or from one index to another if supported). For UI actions—like “show me how many IBrX 100 points my BRL 10,000 represents”—call Convert and display the result plus the timestamp.
Important notes before your first call:
- Use access_key as a query parameter. Example: ?access_key=YOUR_API_KEY
- Use from and to to specify conversion direction. from typically USD, BRL, or another supported base; to is your index symbol (e.g., the official IBrX 100 symbol you confirmed).
- amount is the numeric value you want to convert.
- The result will report a numeric value, with unit clarified as “per index” contextually in examples.
Convert example you can adapt to IBrX 100
Here is a copy-pasteable Convert example using GSPC so you can validate your code path. After confirming the IBrX 100 symbol on the symbols page, replace GSPC with that symbol in your production requests.
curl "https://indices-api.com/api/convert?access_key=YOUR_API_KEY&from=USD&to=GSPC&amount=1000"
How to adapt it for IBrX 100:
- Find the IBrX 100 code on Symbols.
- Replace to=GSPC with to={your_verified_IBrX_100_symbol}.
- If you want BRL-based conversions, set from=BRL (if supported) and to={your_verified_IBrX_100_symbol}.
If you need field-level behavior for Convert (query, info.timestamp, info.rate, result), refer to the endpoint details in the Documentation. The shapes mirror the Latest semantics—timestamp for freshness, a single effective rate for the immediate conversion, and a numeric result.
Python example: get latest, compute points-per-USD and USD-per-point, then call Convert
This example calls Latest once and reads the core fields (base, date, timestamp, rates). It then demonstrates how to read both the points-per-USD rate and the USD-per-point reciprocal. Finally, it shows how to invoke Convert. Swap GSPC for the verified IBrX 100 symbol in your code path after you confirm it on the symbols page.
import os
import requests
API_KEY = os.getenv("INDICES_API_KEY", "YOUR_API_KEY")
BASE_URL = "https://indices-api.com/api"
def latest():
url = f"{BASE_URL}/latest"
params = {"access_key": API_KEY}
r = requests.get(url, params=params, timeout=15)
r.raise_for_status()
return r.json()["data"]
def convert(from_code, to_code, amount):
url = f"{BASE_URL}/convert"
params = {
"access_key": API_KEY,
"from": from_code,
"to": to_code,
"amount": amount
}
r = requests.get(url, params=params, timeout=15)
r.raise_for_status()
return r.json()
if __name__ == "__main__":
data = latest()
# Required fields for your cache and UI
ts = data["timestamp"] # unix seconds
trade_date = data["date"] # YYYY-MM-DD
base = data["base"] # "USD" in this example
rates = data["rates"] # dict of symbol -> rate
# Example with GSPC to illustrate the two directions of conversion:
points_per_usd = rates.get("GSPC") # 1 USD equals this many GSPC points
usd_per_point = rates.get("USDGSPC") # 1 GSPC point costs this many USD
print(f"Latest timestamp={ts}, date={trade_date}, base={base}")
print(f"GSPC points per USD: {points_per_usd}")
print(f"USD per GSPC point: {usd_per_point}")
# Convert an amount of USD into GSPC points
amount_usd = 1000
conv = convert("USD", "GSPC", amount_usd)
print("Convert response keys:", list(conv.keys()))
# For IBrX 100: replace 'GSPC' with the verified symbol from the Symbols page.
IBrX 100 specifics: interpreting results and designing your UI
After you confirm the IBrX 100 symbol, here’s how to interpret the Latest and Convert outputs in your app:
- If base is USD and rates includes rates.{IBRX100_SYMBOL}:
- That value is index points per USD. Multiply it by a USD amount to get index points.
- Invert it (1 / value) if you need USD per index point and the USD{INDEX} reciprocal is not present.
- If rates also includes rates.USD{IBRX100_SYMBOL}:
- Use it directly as USD per one IBrX 100 point—no inversion required—suitable for cost-per-point in dashboards.
- When calling Convert with from=BRL and to={IBRX100_SYMBOL}:
- You’ll receive the amount of IBrX 100 points for your BRL amount (if BRL is supported). If your product requires a BRL-per-point label, invert the rate or see if the reciprocal symbol is provided.
For Brazil-focused experiences, consider adding exchange-rate context alongside index conversions if your UI needs to explain the effect of currency moves on index-denominated positions. Your data pipeline can reconcile the index’s trading day with your currency cutoffs so that differences in session times don’t surprise end users.
Trading days, update cadence, and caching strategy
Indices-API updates the Latest endpoint on a cadence determined by your plan (for example, every 60 minutes or every 10 minutes). Choose your client-side or server-side cache TTL to align with that update frequency. A simple baseline is:
- Cache per index symbol and base currency pairing using the returned timestamp as the key.
- Invalidate the cache when a new timestamp appears for that index/base combination.
Trading days: Index venues have their own exchange calendars. On weekends and holidays you may see unchanged values or missing updates depending on the instrument. Your UI should therefore:
- Display the date from data.date prominently so users know which trading day the value represents.
- Fall back to the last available trading day if a same-day print isn’t yet available.
Historical and time-series queries often require a completed trading day. If you specify an end_date equal to today, expect that it may not return until the day completes; use yesterday’s date for backfills and research pipelines. When you need historical shapes, consult the Documentation for the Historical and Time-Series endpoints and use end_date strictly earlier than today for deterministic results.
Scope: focus on two endpoints, link to the rest
In this quickstart we focused on:
- Latest: get the base, date, timestamp, and rates (including reciprocal USD{INDEX} when provided) to set your conversion baseline.
- Convert: turn currency amounts into index points (and vice versa) for the IBrX 100.
If you need OHLC bars, fluctuation analytics, or time-series backfills for the IBrX 100, they are available—review parameter behavior and response fields in the Documentation. For a broader ecosystem view and multi-cloud options, see MCP. And when you expand coverage to related Brazilian benchmarks, always confirm symbols on the Symbols page first.
Quality checks before you ship
- Symbols: Use the exact IBrX 100 code from the symbols page (don’t guess).
- Units: When base=USD, rates.{INDEX} is points per USD; rates.USD{INDEX} is USD per point.
- Caching: TTL aligned to your plan’s update frequency; key by timestamp.
- Non-trading days: Surface data.date in the UI; don’t promise intraday updates on closed markets.
- Backfills: end_date cannot be today; use the last completed day.
For readers needing the benchmark background, B3’s methodology pages are useful context on index construction and rebalance policy. See the exchange operator’s English resources: B3 (Brasil, Bolsa, Balcão).
Frequently asked questions
Q: What’s the simplest way to display “USD per IBrX 100 point” in my app?
A: From Latest, use rates.USD{IBRX100_SYMBOL} if present. If it isn’t present, compute 1 / rates.{IBRX100_SYMBOL} (when base=USD). Always label the timestamp and date next to the value.
Q: Can I convert from BRL directly into IBrX 100 points?
A: Yes, if BRL is supported as a from currency. Call Convert with from=BRL and to={IBRX100_SYMBOL}. Verify the symbol on the Symbols page before implementing.
Q: Why does my end_date=TODAY time-series query return empty or partial results?
A: The day may be incomplete. Use end_date equal to the last completed trading day for deterministic output. Align your job schedules with the venue’s calendar and your plan’s update cadence.
Q: How often should I refresh Latest for a live dashboard?
A: Match your refresh to your subscription’s update interval (e.g., every 60 or 10 minutes). Cache per symbol/base and invalidate on new timestamps to minimize redundant calls.
Q: What’s the difference between using Latest and Convert for one-off calculations?
A: Latest provides the context (base, date, timestamp, and rates) you can cache and reuse. Convert applies a specific amount to that context and returns a result immediately. If you already cached Latest and only need math, you can compute locally; otherwise, call Convert for one-liners in the UI layer.
Get your key and wire up the IBrX 100 in minutes
Start by registering for your API key, confirm the IBrX 100 symbol, and ship your conversion UX with two endpoints: Latest and Convert. The PRO plan (with a 7‑day trial) is available at Register. Keep the Documentation and Symbols pages open as you implement so you can validate parameters and symbol coverage quickly.