curl --request POST \
--url https://data-tools.prd.arrays.org/api/v1/market/first-bars \
--header 'Content-Type: application/json' \
--data '
{
"points": [
{
"at": 1762956031,
"trading_pair": "US_SPOT_NVDA_USD"
}
]
}
'import requests
url = "https://data-tools.prd.arrays.org/api/v1/market/first-bars"
payload = { "points": [
{
"at": 1762956031,
"trading_pair": "US_SPOT_NVDA_USD"
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({points: [{at: 1762956031, trading_pair: 'US_SPOT_NVDA_USD'}]})
};
fetch('https://data-tools.prd.arrays.org/api/v1/market/first-bars', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://data-tools.prd.arrays.org/api/v1/market/first-bars",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'points' => [
[
'at' => 1762956031,
'trading_pair' => 'US_SPOT_NVDA_USD'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://data-tools.prd.arrays.org/api/v1/market/first-bars"
payload := strings.NewReader("{\n \"points\": [\n {\n \"at\": 1762956031,\n \"trading_pair\": \"US_SPOT_NVDA_USD\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://data-tools.prd.arrays.org/api/v1/market/first-bars")
.header("Content-Type", "application/json")
.body("{\n \"points\": [\n {\n \"at\": 1762956031,\n \"trading_pair\": \"US_SPOT_NVDA_USD\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-tools.prd.arrays.org/api/v1/market/first-bars")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"points\": [\n {\n \"at\": 1762956031,\n \"trading_pair\": \"US_SPOT_NVDA_USD\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"at": 1762956031,
"error": {
"code": "RESOURCE_NOT_FOUND",
"details": [
{
"field": "<string>",
"got": "<string>",
"reason": "<string>"
}
],
"docs_url": "<string>",
"examples": [
"<string>"
],
"hint": "<string>",
"message": "The requested resource was not found.",
"suggestions": [
"<string>"
]
},
"price_open": 188.25,
"quote_currency": "USD",
"time_open": 1762956060,
"trading_pair": "US_SPOT_NVDA_USD"
}
],
"error": {
"code": "RESOURCE_NOT_FOUND",
"details": [
{
"field": "<string>",
"got": "<string>",
"reason": "<string>"
}
],
"docs_url": "<string>",
"examples": [
"<string>"
],
"hint": "<string>",
"message": "The requested resource was not found.",
"suggestions": [
"<string>"
]
},
"metadata": "<unknown>",
"pagination": "<unknown>",
"request_id": "<string>",
"success": true
}{
"data": "<unknown>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"details": [
{
"field": "<string>",
"got": "<string>",
"reason": "<string>"
}
],
"docs_url": "<string>",
"examples": [
"<string>"
],
"hint": "<string>",
"message": "The requested resource was not found.",
"suggestions": [
"<string>"
]
},
"metadata": "<unknown>",
"pagination": "<unknown>",
"request_id": "<string>",
"success": true
}Get the first one-minute bar at or after a moment, for many instruments
OpenAPI JSON Spec
Returns, for each point, the first closed one-minute bar that opens at or after the point’s at: its open time and open price. This is the price a market order placed at at would first trade at. Prices are on the current split basis, the same as GET /market/kline returns for that bar today, so they can be compared directly with a current price.
Points: 1 to 500, each a trading_pair (the same format as GET /market/kline) and at in unix seconds. Results are in request order, one per point.
Supported pairs:
| Scenario | trading_pair example | Session |
|---|---|---|
| US stock / ETF spot | US_SPOT_NVDA_USD | Extended hours (04:00-20:00 ET) |
| Non-US stock spot | HK_SPOT_0700_HKD (market = exchange suffix, symbol without suffix) | Exchange session |
| Binance spot | BINANCE_SPOT_BTC_USDT | 24/7 |
| Binance USDT perpetual | BINANCE_PERP_BTC_USDT | 24/7 |
The pair’s currency must be the instrument’s quote: USD for US stocks and ETFs, USDT for Binance, and for a non-US listing its exchange’s quote as GET /market/trading-pairs publishes it (for example HKD, or GBp for London). Any other currency names a different instrument and is INVALID_PARAMETER on its point.
Per point: time_open and price_open are absent while no closed bar has opened since at (for example over a weekend). A point that cannot be read carries error (INVALID_PARAMETER for an unsupported or malformed pair, a currency that is not the instrument’s quote, or an unknown symbol, UNAVAILABLE when its market’s data could not be read) while the other points are still answered.
curl --request POST \
--url https://data-tools.prd.arrays.org/api/v1/market/first-bars \
--header 'Content-Type: application/json' \
--data '
{
"points": [
{
"at": 1762956031,
"trading_pair": "US_SPOT_NVDA_USD"
}
]
}
'import requests
url = "https://data-tools.prd.arrays.org/api/v1/market/first-bars"
payload = { "points": [
{
"at": 1762956031,
"trading_pair": "US_SPOT_NVDA_USD"
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({points: [{at: 1762956031, trading_pair: 'US_SPOT_NVDA_USD'}]})
};
fetch('https://data-tools.prd.arrays.org/api/v1/market/first-bars', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://data-tools.prd.arrays.org/api/v1/market/first-bars",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'points' => [
[
'at' => 1762956031,
'trading_pair' => 'US_SPOT_NVDA_USD'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://data-tools.prd.arrays.org/api/v1/market/first-bars"
payload := strings.NewReader("{\n \"points\": [\n {\n \"at\": 1762956031,\n \"trading_pair\": \"US_SPOT_NVDA_USD\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://data-tools.prd.arrays.org/api/v1/market/first-bars")
.header("Content-Type", "application/json")
.body("{\n \"points\": [\n {\n \"at\": 1762956031,\n \"trading_pair\": \"US_SPOT_NVDA_USD\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-tools.prd.arrays.org/api/v1/market/first-bars")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"points\": [\n {\n \"at\": 1762956031,\n \"trading_pair\": \"US_SPOT_NVDA_USD\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"at": 1762956031,
"error": {
"code": "RESOURCE_NOT_FOUND",
"details": [
{
"field": "<string>",
"got": "<string>",
"reason": "<string>"
}
],
"docs_url": "<string>",
"examples": [
"<string>"
],
"hint": "<string>",
"message": "The requested resource was not found.",
"suggestions": [
"<string>"
]
},
"price_open": 188.25,
"quote_currency": "USD",
"time_open": 1762956060,
"trading_pair": "US_SPOT_NVDA_USD"
}
],
"error": {
"code": "RESOURCE_NOT_FOUND",
"details": [
{
"field": "<string>",
"got": "<string>",
"reason": "<string>"
}
],
"docs_url": "<string>",
"examples": [
"<string>"
],
"hint": "<string>",
"message": "The requested resource was not found.",
"suggestions": [
"<string>"
]
},
"metadata": "<unknown>",
"pagination": "<unknown>",
"request_id": "<string>",
"success": true
}{
"data": "<unknown>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"details": [
{
"field": "<string>",
"got": "<string>",
"reason": "<string>"
}
],
"docs_url": "<string>",
"examples": [
"<string>"
],
"hint": "<string>",
"message": "The requested resource was not found.",
"suggestions": [
"<string>"
]
},
"metadata": "<unknown>",
"pagination": "<unknown>",
"request_id": "<string>",
"success": true
}Body
Points: trading_pair and at (unix seconds), 1 to 500

