NYSE Composite API in PHP: Read NYA From Latest
A NYSE Composite API in PHP is one GET. On Indices-API: GET https://indices-api.com/api/latest with access_key, base=USD, symbols=NYA. On latest, the USD-prefixed invert is rates.USDNYA. Official OHLC sibling for the same symbol is dated 2024-10-09.
PRO is $49.99/mo (5 indices per request, 10-minute updates) with a 7-day trial. Most index history in the docs starts October 2024. MCP: indices-api.com/mcp. Docs: indices-api.com/documentation.
PHP: latest NYA
$url = 'https://indices-api.com/api/latest?access_key=YOUR_API_KEY&base=USD&symbols=NYA';
$json = json_decode(file_get_contents($url), true);
$usd = $json['rates']['USDNYA'] ?? null;
Do not invent a live USDNYA print here. The published numeric fixture is the OHLC candle for 2024-10-09:
{
"success": true,
"timestamp": 1767195729,
"date": "2024-10-09",
"base": "USD",
"symbol": "NYA",
"rates": {
"open": 5.1453483735297e-5,
"high": 5.1472711484643e-5,
"low": 5.115851003909e-5,
"close": 5.115851003909e-5
}
}
That envelope is GET /api/open-high-low-close/2024-10-09. Invert 1 / rates.close for a USD index level. Latest uses USDNYA instead.
Go live
Read NYA from PHP with an Indices key →