캔들스틱 데이터 가져오기
curl --request GET \
--url https://openapi.fcontext.com/api/market-data/quote/{symbol}/candlestick \
--header 'x-api-key: <api-key>'import requests
url = "https://openapi.fcontext.com/api/market-data/quote/{symbol}/candlestick"
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/quote/{symbol}/candlestick', 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/quote/{symbol}/candlestick",
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/quote/{symbol}/candlestick"
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/quote/{symbol}/candlestick")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.fcontext.com/api/market-data/quote/{symbol}/candlestick")
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{
"quote": [
{
"close": "<string>",
"open": "<string>",
"low": "<string>",
"high": "<string>",
"volume": "<string>",
"turnover": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>"
}{
"error": "Unauthorized: missing API key"
}시세
캔들스틱 데이터 가져오기
단일 종목의 캔들스틱 데이터를 가져옵니다. 주기는 1m, 5m, 15m, 30m, 1h, day, week, month, year일 수 있습니다.
GET
/
api
/
market-data
/
quote
/
{symbol}
/
candlestick
캔들스틱 데이터 가져오기
curl --request GET \
--url https://openapi.fcontext.com/api/market-data/quote/{symbol}/candlestick \
--header 'x-api-key: <api-key>'import requests
url = "https://openapi.fcontext.com/api/market-data/quote/{symbol}/candlestick"
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/quote/{symbol}/candlestick', 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/quote/{symbol}/candlestick",
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/quote/{symbol}/candlestick"
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/quote/{symbol}/candlestick")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.fcontext.com/api/market-data/quote/{symbol}/candlestick")
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{
"quote": [
{
"close": "<string>",
"open": "<string>",
"low": "<string>",
"high": "<string>",
"volume": "<string>",
"turnover": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>"
}{
"error": "Unauthorized: missing API key"
}인증
ApiKeyHeaderBearerAuth
계정 설정에서 생성한 Financial Context key입니다. x-api-key: <key>로 전송하세요.
경로 매개변수
종목 심볼입니다. 예: AAPL.US.
쿼리 매개변수
캔들스틱 주기입니다. 기본값은 day입니다. 1m, 5m, 15m, 30m, 1h, day, week, month, year를 지원합니다.
반환할 캔들스틱 수입니다. 기본값은 100입니다.
필수 범위:
x >= 1조정 유형: none은 무조정(기본값), forward는 전방 조정 데이터입니다.
adjust의 호환 별칭: 0은 무조정, 1은 전방 조정 데이터입니다.
사용 가능한 옵션:
0, 1 거래 세션: intraday는 정규 세션(기본값), all은 전체 세션입니다.
session의 호환 별칭: 0은 정규 세션, 1은 전체 세션입니다.
사용 가능한 옵션:
0, 1 응답
캔들스틱 목록
Show child attributes
Show child attributes
⌘I