Hướng Dẫn Sử Dụng Nhanh

Cơ bản

import { stock, commodity } from 'vnstock-js';

// Dữ liệu mã cổ phiếu VCI ngày 01-01/2024
const prices = await stock.price('VCI', '2024-01-01');

// Dữ liệu vàng từ SJC
const goldPrices = await commodity.gold.priceSJC();

Nâng cao (đầy đủ tính năng)

import vnstock from 'vnstock-js';

// Truy cập trực tiếp
const prices = await vnstock.stock.quote.history({
  symbols: ['VCI'],
  start: '2024-01-01',
  timeFrame: '1D'
});