시장 온도 가져오기
curl --request GET \
--url https://openapi.fcontext.com/api/market-data/market/temperature \
--header 'x-api-key: <api-key>'import requests
url = "https://openapi.fcontext.com/api/market-data/market/temperature"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://openapi.fcontext.com/api/market-data/market/temperature', 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://openapi.fcontext.com/api/market-data/market/temperature",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://openapi.fcontext.com/api/market-data/market/temperature"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://openapi.fcontext.com/api/market-data/market/temperature")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.fcontext.com/api/market-data/market/temperature")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"temperature": {
"market": 123,
"temperature": 123,
"timestamp": "2023-11-07T05:31:56Z",
"records": [
{}
]
}
}{
"error": "<string>"
}{
"error": "Unauthorized: missing API key"
}시장
시장 온도 가져오기
현재 시장 온도를 가져옵니다. history=true이면 요청한 날짜 범위의 과거 시장 온도를 반환합니다.
GET
/
api
/
market-data
/
market
/
temperature
시장 온도 가져오기
curl --request GET \
--url https://openapi.fcontext.com/api/market-data/market/temperature \
--header 'x-api-key: <api-key>'import requests
url = "https://openapi.fcontext.com/api/market-data/market/temperature"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://openapi.fcontext.com/api/market-data/market/temperature', 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://openapi.fcontext.com/api/market-data/market/temperature",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://openapi.fcontext.com/api/market-data/market/temperature"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://openapi.fcontext.com/api/market-data/market/temperature")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.fcontext.com/api/market-data/market/temperature")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"temperature": {
"market": 123,
"temperature": 123,
"timestamp": "2023-11-07T05:31:56Z",
"records": [
{}
]
}
}{
"error": "<string>"
}{
"error": "Unauthorized: missing API key"
}인증
ApiKeyHeaderBearerAuth
계정 설정에서 생성한 Financial Context key입니다. x-api-key: <key>로 전송하세요.
쿼리 매개변수
시장 코드입니다. HK(기본값), US, CN/SH/SZ, SG를 지원합니다.
과거 시계열을 반환할지 여부입니다.
과거 시작일 YYYY-MM-DD. 생략하면 종료일 30일 전이 기본값입니다.
과거 종료일 YYYY-MM-DD. 생략하면 현재 날짜가 기본값입니다.
응답
시장 온도
시장 온도 스냅샷 또는 과거 시계열 데이터입니다.
Show child attributes
Show child attributes
⌘I