Bulliza베타
API REFERENCE

섹터별 수출 + YoY 증감률

한국 수출을 섹터(반도체·자동차·조선·이차전지 등)별로 집계한 월별 시계열에 전년동월대비(YoY) 증감률을 같이 계산해서 반환해요. 매크로 시그널 봇이나 섹터 로테이션 전략 백엔드에 써요.

요청

http
GET /api/public/v2/exports/sectors?from=2024-01&to=2026-05&top=10 HTTP/1.1
Host: www.bulliza.com
Authorization: Bearer rfk_live_<your-key>

쿼리 파라미터

이름타입기본값설명
fromYYYY-MM— (전체)시작월
toYYYY-MM— (최신)종료월
topnumber10상위 N 섹터 (1 ~ 50). 24개월 누적 수출액 기준

응답

필드타입설명
currencystring항상 <InlineCode>USD</InlineCode>
topnumber실제 반환된 섹터 수
sectorsobject[]섹터 배열 — 24m 누적 수출액 내림차순
sectors[].sectorstring정규화된 섹터명 (예: "반도체")
sectors[].monthlyobject[]월별 데이터 배열
sectors[].monthly[].periodstringYYYY-MM
sectors[].monthly[].export_valuenumber해당 월 수출액 (USD)
sectors[].monthly[].yoy_pctnumber | null전년동월대비 % (12개월 전 데이터 없으면 null)
sectors[].total24mnumber최근 24개월 누적 수출액
sectors[].yoy24m_pctnumber | null24개월 누적 YoY %
json
{
  "from": "2024-01",
  "to": "2026-05",
  "currency": "USD",
  "top": 5,
  "sectors": [
    {
      "sector": "반도체",
      "monthly": [
        { "period": "2024-01", "export_value": 9200000000, "yoy_pct": 56.0 },
        { "period": "2024-02", "export_value": 10500000000, "yoy_pct": 66.7 }
      ],
      "total24m": 245000000000,
      "yoy24m_pct": 38.2
    },
    {
      "sector": "자동차",
      "monthly": [...],
      "total24m": 138000000000,
      "yoy24m_pct": 12.4
    }
  ],
  "disclaimer": "관세청 customs_exports HS 매핑 + 섹터 정규화 기반 집계입니다."
}
섹터는 정규화돼요
HS 코드의 세부 분류는 "반도체-메모리", "반도체-시스템" 같이 나뉘어 있지만 응답에서는"반도체" 하나로 통합해요. 이게 산업 분석 일반 분류와 일치하고, 종목 매핑도 섹터 단위로 되어 있어서 더 쓰기 편해요.

호출 예시

bash
# 최근 2년 TOP 5
curl -H "Authorization: Bearer rfk_live_<your-key>" \
  "https://bulliza.com/api/public/v2/exports/sectors?from=2024-01&top=5"

# 전체 50개 섹터
curl -H "Authorization: Bearer rfk_live_<your-key>" \
  "https://bulliza.com/api/public/v2/exports/sectors?top=50"
python
import os, requests

r = requests.get(
    "https://bulliza.com/api/public/v2/exports/sectors",
    params={"from": "2024-01", "top": 10},
    headers={"Authorization": f"Bearer {os.environ['RICHGO_API_KEY']}"},
).json()

# 가장 잘 나가는 섹터 TOP 3
sorted_sectors = sorted(r["sectors"], key=lambda s: s["yoy24m_pct"] or 0, reverse=True)
for s in sorted_sectors[:3]:
    print(f"{s['sector']}: 24m YoY {s['yoy24m_pct']:.1f}%")