جلب فئة الأسهم v2.1
curl --request GET \
--url 'https://api.benzinga.com/api/v2.1/fundamentals/shareClass?token='import requests
url = "https://api.benzinga.com/api/v2.1/fundamentals/shareClass?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.benzinga.com/api/v2.1/fundamentals/shareClass?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.1/fundamentals/shareClass?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.1/fundamentals/shareClass?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.1/fundamentals/shareClass?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benzinga.com/api/v2.1/fundamentals/shareClass?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{
"result": [
{
"company": {
"primarySymbol": "AAPL",
"primaryExchange": "NAS",
"cik": "320193",
"isin": "CA03785Y1007",
"cusip": "03785Y100",
"standardName": "Apple",
"countryId": "USA",
"isReit": false,
"industryTemplateCode": "N",
"businessCountryId": "USA",
"isLimitedPartnership": false,
"yearofEstablishment": 1977,
"isLimitedLiabilityCompany": false
},
"shareClass": {
"shareClassId": "0P000000GY",
"companyId": "0C00000ADA",
"symbol": "AAPL",
"exchangeId": "NAS",
"currencyId": "USD",
"ipoDate": "1980-12-12",
"isDepositaryReceipt": false,
"securityType": "ST00000001",
"shareClassStatus": "A",
"isPrimaryShare": true,
"isDividendReinvest": false,
"isDirectInvest": false,
"investmentId": "E0USA002US",
"ipoOfferPrice": 28.75,
"mic": "XNAS",
"exchangeSubMarketGlobalId": "EX$$$$XNGS",
"conversionRatio": 1.0,
"parValue": 1e-05,
"suspensionStatus": false,
"marketDataId": "126.1.AAPL",
"isPrimaryShare1031": true,
"investmentPrimaryIssuer": true
},
"symbol": "AAPL",
"idType": "SYMBOL",
"id": "AAPL"
}
]
}
{
"ok": false,
"errors": [
{
"code": "auth_failed",
"id": "unauthorized",
"value": "인증 토큰이 누락되었거나 유효하지 않습니다"
}
]
}
{
"ok": false,
"errors": [
{
"code": "no_data_found",
"id": "not_found",
"value": "지정한 매개변수에 대한 데이터를 찾을 수 없습니다"
}
]
}
{
"ok": false,
"errors": [
{
"code": "internal_server_error",
"id": "server_error",
"value": "요청을 처리하는 동안 예기치 않은 오류가 발생했습니다"
}
]
}
기업 기초 재무 지표
주식 종류
GET
/
api
/
v2.1
/
fundamentals
/
shareClass
جلب فئة الأسهم v2.1
curl --request GET \
--url 'https://api.benzinga.com/api/v2.1/fundamentals/shareClass?token='import requests
url = "https://api.benzinga.com/api/v2.1/fundamentals/shareClass?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.benzinga.com/api/v2.1/fundamentals/shareClass?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.1/fundamentals/shareClass?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.1/fundamentals/shareClass?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.1/fundamentals/shareClass?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.benzinga.com/api/v2.1/fundamentals/shareClass?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{
"result": [
{
"company": {
"primarySymbol": "AAPL",
"primaryExchange": "NAS",
"cik": "320193",
"isin": "CA03785Y1007",
"cusip": "03785Y100",
"standardName": "Apple",
"countryId": "USA",
"isReit": false,
"industryTemplateCode": "N",
"businessCountryId": "USA",
"isLimitedPartnership": false,
"yearofEstablishment": 1977,
"isLimitedLiabilityCompany": false
},
"shareClass": {
"shareClassId": "0P000000GY",
"companyId": "0C00000ADA",
"symbol": "AAPL",
"exchangeId": "NAS",
"currencyId": "USD",
"ipoDate": "1980-12-12",
"isDepositaryReceipt": false,
"securityType": "ST00000001",
"shareClassStatus": "A",
"isPrimaryShare": true,
"isDividendReinvest": false,
"isDirectInvest": false,
"investmentId": "E0USA002US",
"ipoOfferPrice": 28.75,
"mic": "XNAS",
"exchangeSubMarketGlobalId": "EX$$$$XNGS",
"conversionRatio": 1.0,
"parValue": 1e-05,
"suspensionStatus": false,
"marketDataId": "126.1.AAPL",
"isPrimaryShare1031": true,
"investmentPrimaryIssuer": true
},
"symbol": "AAPL",
"idType": "SYMBOL",
"id": "AAPL"
}
]
}
{
"ok": false,
"errors": [
{
"code": "auth_failed",
"id": "unauthorized",
"value": "인증 토큰이 누락되었거나 유효하지 않습니다"
}
]
}
{
"ok": false,
"errors": [
{
"code": "no_data_found",
"id": "not_found",
"value": "지정한 매개변수에 대한 데이터를 찾을 수 없습니다"
}
]
}
{
"ok": false,
"errors": [
{
"code": "internal_server_error",
"id": "server_error",
"value": "요청을 처리하는 동안 예기치 않은 오류가 발생했습니다"
}
]
}
{
"result": [
{
"company": {
"primarySymbol": "AAPL",
"primaryExchange": "NAS",
"cik": "320193",
"isin": "CA03785Y1007",
"cusip": "03785Y100",
"standardName": "Apple",
"countryId": "USA",
"isReit": false,
"industryTemplateCode": "N",
"businessCountryId": "USA",
"isLimitedPartnership": false,
"yearofEstablishment": 1977,
"isLimitedLiabilityCompany": false
},
"shareClass": {
"shareClassId": "0P000000GY",
"companyId": "0C00000ADA",
"symbol": "AAPL",
"exchangeId": "NAS",
"currencyId": "USD",
"ipoDate": "1980-12-12",
"isDepositaryReceipt": false,
"securityType": "ST00000001",
"shareClassStatus": "A",
"isPrimaryShare": true,
"isDividendReinvest": false,
"isDirectInvest": false,
"investmentId": "E0USA002US",
"ipoOfferPrice": 28.75,
"mic": "XNAS",
"exchangeSubMarketGlobalId": "EX$$$$XNGS",
"conversionRatio": 1.0,
"parValue": 1e-05,
"suspensionStatus": false,
"marketDataId": "126.1.AAPL",
"isPrimaryShare1031": true,
"investmentPrimaryIssuer": true
},
"symbol": "AAPL",
"idType": "SYMBOL",
"id": "AAPL"
}
]
}
{
"ok": false,
"errors": [
{
"code": "auth_failed",
"id": "unauthorized",
"value": "인증 토큰이 누락되었거나 유효하지 않습니다"
}
]
}
{
"ok": false,
"errors": [
{
"code": "no_data_found",
"id": "not_found",
"value": "지정한 매개변수에 대한 데이터를 찾을 수 없습니다"
}
]
}
{
"ok": false,
"errors": [
{
"code": "internal_server_error",
"id": "server_error",
"value": "요청을 처리하는 동안 예기치 않은 오류가 발생했습니다"
}
]
}
인증
쿼리 매개변수
قائمة بالرموز مفصولة بفواصل (على سبيل المثال: AAPL, MSFT)
إرجاع النتائج للتواريخ التي تكون أكبر من أو تساوي التاريخ المحدد في هذا الوسيط (YYYY-MM-DD)
يحدّد الفترة الزمنية للنتائج المُرجَعة (مثل Q1، 2023)
نوع التقرير: TTM (آخر اثني عشر شهرًا متتالية)، A (كما أُبلِغ عنه في الأصل)، R (مُعاد عرضه)، P (أولي)
응답
بيانات فئة السهم
The response is of type string.
⌘I