curl --request GET \
--url 'https://api.benzinga.com/api/v2/bars?token='import requests
url = "https://api.benzinga.com/api/v2/bars?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.benzinga.com/api/v2/bars?token=', 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://api.benzinga.com/api/v2/bars?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.benzinga.com/api/v2/bars?token="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.benzinga.com/api/v2/bars?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benzinga.com/api/v2/bars?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"symbol": "AAPL",
"interval": 7200,
"candles": [
{
"time": "1765202400000",
"open": 278.11,
"high": 279.6693,
"low": 277.05,
"close": 277.335,
"volume": "9174901",
"dateTime": "2025-12-08T09:00:00.000-05:00"
},
{
"time": "1765209600000",
"open": 277.335,
"high": 277.88,
"low": 276.7,
"close": 277.33,
"volume": "6501561",
"dateTime": "2025-12-08T11:00:00.000-05:00"
},
{
"time": "1765987200000",
"open": 274.6,
"high": 275.07,
"low": 272.28,
"close": 273.38,
"volume": "7179965",
"dateTime": "2025-12-17T11:00:00.000-05:00"
},
{
"time": "1766073600000",
"open": 272,
"high": 273.164,
"low": 269.94,
"close": 272.4,
"volume": "8374648",
"dateTime": "2025-12-18T11:00:00.000-05:00"
},
{
"time": "1766080800000",
"open": 272.37,
"high": 272.96,
"low": 270.5,
"close": 270.865,
"volume": "6415588",
"dateTime": "2025-12-18T13:00:00.000-05:00"
},
{
"time": "1767636000000",
"open": 267.57,
"high": 267.89,
"low": 266.14,
"close": 266.61,
"volume": "5846734",
"dateTime": "2026-01-05T13:00:00.000-05:00"
}
]
}
]
Barras históricas
curl --request GET \
--url 'https://api.benzinga.com/api/v2/bars?token='import requests
url = "https://api.benzinga.com/api/v2/bars?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.benzinga.com/api/v2/bars?token=', 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://api.benzinga.com/api/v2/bars?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.benzinga.com/api/v2/bars?token="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.benzinga.com/api/v2/bars?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benzinga.com/api/v2/bars?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"symbol": "AAPL",
"interval": 7200,
"candles": [
{
"time": "1765202400000",
"open": 278.11,
"high": 279.6693,
"low": 277.05,
"close": 277.335,
"volume": "9174901",
"dateTime": "2025-12-08T09:00:00.000-05:00"
},
{
"time": "1765209600000",
"open": 277.335,
"high": 277.88,
"low": 276.7,
"close": 277.33,
"volume": "6501561",
"dateTime": "2025-12-08T11:00:00.000-05:00"
},
{
"time": "1765987200000",
"open": 274.6,
"high": 275.07,
"low": 272.28,
"close": 273.38,
"volume": "7179965",
"dateTime": "2025-12-17T11:00:00.000-05:00"
},
{
"time": "1766073600000",
"open": 272,
"high": 273.164,
"low": 269.94,
"close": 272.4,
"volume": "8374648",
"dateTime": "2025-12-18T11:00:00.000-05:00"
},
{
"time": "1766080800000",
"open": 272.37,
"high": 272.96,
"low": 270.5,
"close": 270.865,
"volume": "6415588",
"dateTime": "2025-12-18T13:00:00.000-05:00"
},
{
"time": "1767636000000",
"open": 267.57,
"high": 267.89,
"low": 266.14,
"close": 266.61,
"volume": "5846734",
"dateTime": "2026-01-05T13:00:00.000-05:00"
}
]
}
]
[
{
"symbol": "AAPL",
"interval": 7200,
"candles": [
{
"time": "1765202400000",
"open": 278.11,
"high": 279.6693,
"low": 277.05,
"close": 277.335,
"volume": "9174901",
"dateTime": "2025-12-08T09:00:00.000-05:00"
},
{
"time": "1765209600000",
"open": 277.335,
"high": 277.88,
"low": 276.7,
"close": 277.33,
"volume": "6501561",
"dateTime": "2025-12-08T11:00:00.000-05:00"
},
{
"time": "1765987200000",
"open": 274.6,
"high": 275.07,
"low": 272.28,
"close": 273.38,
"volume": "7179965",
"dateTime": "2025-12-17T11:00:00.000-05:00"
},
{
"time": "1766073600000",
"open": 272,
"high": 273.164,
"low": 269.94,
"close": 272.4,
"volume": "8374648",
"dateTime": "2025-12-18T11:00:00.000-05:00"
},
{
"time": "1766080800000",
"open": 272.37,
"high": 272.96,
"low": 270.5,
"close": 270.865,
"volume": "6415588",
"dateTime": "2025-12-18T13:00:00.000-05:00"
},
{
"time": "1767636000000",
"open": 267.57,
"high": 267.89,
"low": 266.14,
"close": 266.61,
"volume": "5846734",
"dateTime": "2026-01-05T13:00:00.000-05:00"
}
]
}
]
Autorizaciones
Parámetros de consulta
قائمة من رموز تداول الأسهم مفصولة بفواصل (مثل: AAPL,MSFT,TSLA). حقل مطلوب.
تاريخ/وقت البداية لـ bars. الصيغ المدعومة: YYYY-MM-DD، YYYY-MM-DDTHH:MM:SS، YTD (منذ بداية السنة)، أو قيم نسبية مثل 1MONTH/1m/1M، 1WEEK/1w/1W، 1DAY/1d/1D. هذا الحقل مطلوب.
تاريخ/وقت الانتهاء للبيانات الشريطية (bars). التنسيق: YYYY-MM-DD أو YYYY-MM-DDTHH:MM:SS. القيمة الافتراضية هي التاريخ/الوقت الحالي إذا لم يُحدَّد.
الفاصل الزمني لتجميع شموع الأسعار. القيم المدعومة: 1m (دقيقة واحدة)، 5m (5 دقائق)، 15m (15 دقيقة)، 30m (30 دقيقة)، 1h (ساعة واحدة)، 1d (يوم واحد)، 1w (أسبوع واحد)، 1M (شهر واحد). القيمة الافتراضية: 1d
عامل تصفية لجلسة التداول. القيم المدعومة: ANY (جميع الجلسات)، PRE_MARKET (تداول ما قبل الافتتاح)، REGULAR (ساعات التداول العادية)، AFTER_MARKET (تداول ما بعد الإغلاق). القيمة الافتراضية: ANY
¿Esta página le ayudó?