Vnstock Logo

Đối chiếu hàm và route giữa thế hệ 5 và thế hệ 6

Chung

Mục lục

Bảng dưới cho biết mỗi hàm ở thế hệ 6 ứng với route nào, và route đó khác thế hệ 5 ra sao. Bản Mở rộng 3.x dùng cùng tên lớp và tên hàm với thế hệ 5, nên bạn đọc theo cột thế hệ 5. Cách chuyển mã từng bước ở Từ thế hệ 5 và 4.

Route là tên định danh của một loại dữ liệu, dạng market.equity.ohlcv. Tên hàm giữ nguyên thì mã gọi hàm không phải sửa. Bạn chỉ cần quan tâm tới route khi đặt quy tắc nguồn bằng vnstock.sources.use(route=...), hoặc khi đọc df.attrs["route"].

Đọc bảng:

  • <tài sản> là chỗ thay bằng nhóm ghi ở cột Nhóm, ví dụ dòng Market.<tài sản>.ohlcv có nhóm equity, etf là Market.equity.ohlcv và Market.etf.ohlcv.
  • Tên khác là các tên cho cùng dữ liệu, gồm cả tên gọi thẳng trên lớp như Market.quote.
  • Giữ nguyên: cùng route ở hai thế hệ. Đổi route: hàm vẫn chạy, tên route khác. Mới ở thế hệ 6: thế hệ 5 chưa có. Chưa có nguồn: giữ tên hàm nhưng các Open API mà bản này kết nối chưa có dữ liệu, gọi sẽ báo VNSTOCK_ROUTE_UNSUPPORTED. Đã ngừng từ thế hệ 5: gọi sẽ báo VNSTOCK_ROUTE_REMOVED.

Cột trả về có thể khác dù route giữ nguyên. Danh sách cột của từng hàm ở trang Thị trường, Tham chiếu, Vĩ mô; sai khác so với thế hệ 5 ở trang chuyển đổi.

Bảng sinh từ thư viện bản 6.0.0.

Trạng tháiSố dòng
Giữ nguyên45
Đổi route31
Mới ở thế hệ 651
Chưa có nguồn45
Đã ngừng từ thế hệ 517

Market

HàmNhómRoute thế hệ 5Route thế hệ 6Trạng thái
Market.equity.active_flow—market.equity.active_flowMới ở thế hệ 6
Market.equity.active_session—market.equity.active_sessionMới ở thế hệ 6
Market.crypto.aggregate_trades—market.crypto.aggregate_tradesMới ở thế hệ 6
Market.fund.asset_holding (tên khác: asset_allocation)market.fund.asset_holding—Chưa có nguồn
Market.crypto.best_bid_ask—market.crypto.best_bid_askMới ở thế hệ 6
Market.equity.block_trade_orders—market.equity.block_trade_ordersChưa có nguồn
Market.etf.block_trades (tên khác: put_through)market.equity.block_tradesmarket.etf.block_tradesĐổi route
Market.equity.block_trades (tên khác: put_through, Market.put_through)market.equity.block_tradesmarket.equity.block_tradesGiữ nguyên
Market.<tài sản>.breadthindex, sector—market.<tài sản>.breadthMới ở thế hệ 6
Market.crypto.chart_ohlcv—market.crypto.chart_ohlcvMới ở thế hệ 6
Market.equity.close_price—market.equity.close_priceMới ở thế hệ 6
Market.<tài sản>.comparisonindex, sector—market.<tài sản>.comparisonMới ở thế hệ 6
Market.crypto.daily_stats (tên khác: summary)market.crypto.daily_statsmarket.crypto.daily_statsGiữ nguyên
Market.fund.dividendsmarket.fund.dividends—Chưa có nguồn
Market.equity.expected_price—market.equity.expected_priceMới ở thế hệ 6
Market.equity.foreign_flowmarket.equity.foreign_flowmarket.equity.foreign_flowGiữ nguyên
Market.etf.foreign_flowmarket.equity.foreign_flowmarket.etf.foreign_flowĐổi route
Market.<tài sản>.foreign_flowindex, sector—market.<tài sản>.foreign_flowMới ở thế hệ 6
Market.equity.foreign_room—market.equity.foreign_roomMới ở thế hệ 6
Market.equity.foreign_room_board—market.equity.foreign_room_boardMới ở thế hệ 6
Market.equity.foreign_room_history—market.equity.foreign_room_historyMới ở thế hệ 6
Market.<tài sản>.foreign_sessionequity, index, sector—market.<tài sản>.foreign_sessionMới ở thế hệ 6
Market.fund.history (tên khác: nav, ohlcv)market.fund.historymarket.fund.historyGiữ nguyên
Market.fund.industry_holding (tên khác: industry_allocation)market.fund.industry_holding—Chưa có nguồn
Market.equity.insider_dealfundamental.company.insider_tradingreference.company.insider_tradingĐổi route
Market.crypto.last_pricemarket.crypto.last_pricemarket.crypto.last_priceGiữ nguyên
Market.equity.last_trade—market.equity.last_tradeMới ở thế hệ 6
Market.etf.odd_lotmarket.equity.odd_lot—Chưa có nguồn
Market.equity.odd_lot (tên khác: Market.odd_lot)market.equity.odd_lot—Chưa có nguồn
Market.sector.ohlcv—market.sector.ohlcvMới ở thế hệ 6
Market.<tài sản>.ohlcv (tên khác: history)bond, etfmarket.equity.ohlcvmarket.<tài sản>.ohlcvĐổi route
Market.<tài sản>.ohlcv (tên khác: history)commodity, crypto, equity, forex, futures, index, warrantmarket.<tài sản>.ohlcvmarket.<tài sản>.ohlcvGiữ nguyên
Market.<tài sản>.order_book (tên khác: price_depth)bond, etfmarket.equity.order_bookmarket.<tài sản>.order_bookĐổi route
Market.<tài sản>.order_book (tên khác: price_depth)crypto, equity, futures, warrantmarket.<tài sản>.order_bookmarket.<tài sản>.order_bookGiữ nguyên
Market.equity.order_book_history—market.equity.order_book_historyMới ở thế hệ 6
Market.equity.order_book_intraday—market.equity.order_book_intradayMới ở thế hệ 6
Market.fund.performancemarket.fund.performancemarket.fund.performanceGiữ nguyên
Market.sector.performance—market.sector.performanceMới ở thế hệ 6
Market.equity.proprietary_flowmarket.equity.proprietary_flowmarket.equity.proprietary_flowGiữ nguyên
Market.etf.proprietary_flowmarket.equity.proprietary_flowmarket.etf.proprietary_flowĐổi route
Market.index.proprietary_flow—market.index.proprietary_flowMới ở thế hệ 6
Market.equity.proprietary_session—market.equity.proprietary_sessionMới ở thế hệ 6
Market.<tài sản>.quotecommodity, forex—market.<tài sản>.quoteMới ở thế hệ 6
Market.<tài sản>.quote (tên khác: price_board)bond, etfmarket.equity.quotemarket.<tài sản>.quoteĐổi route
Market.<tài sản>.quote (tên khác: price_board)crypto, futures, index, warrantmarket.<tài sản>.quotemarket.<tài sản>.quoteGiữ nguyên
Market.equity.quote (tên khác: price_board, Market.price_board, Market.quote)market.equity.quotemarket.equity.quoteGiữ nguyên
Market.crypto.reference_pricemarket.crypto.reference_pricemarket.crypto.reference_priceGiữ nguyên
Market.crypto.rolling_statsmarket.crypto.rolling_statsmarket.crypto.rolling_statsGiữ nguyên
Market.equity.screener—market.equity.screenerMới ở thế hệ 6
Market.equity.session_stats (tên khác: trading_stats)market.equity.session_statsmarket.equity.session_statsGiữ nguyên
Market.etf.session_stats (tên khác: trading_stats)market.equity.session_statsmarket.etf.session_statsĐổi route
Market.equity.session_volume—market.equity.session_volumeMới ở thế hệ 6
Market.<tài sản>.summarybond, etfmarket.<tài sản>.summary—Chưa có nguồn
Market.equity.summarymarket.equity.summarymarket.equity.summaryGiữ nguyên
Market.<tài sản>.summaryfutures, index, warrantmarket.<tài sản>.summarymarket.<tài sản>.quoteĐổi route
Market.equity.supply_demand_daily—market.equity.supply_demand_dailyMới ở thế hệ 6
Market.equity.supply_demand_intraday—market.equity.supply_demand_intradayMới ở thế hệ 6
Market.equity.supply_demand_session—market.equity.supply_demand_sessionMới ở thế hệ 6
Market.fund.top_holding (tên khác: holdings)market.fund.top_holding—Chưa có nguồn
Market.<tài sản>.trade_historyequity, indexmarket.<tài sản>.price_historymarket.<tài sản>.daily_statsĐổi route
Market.etf.trade_historymarket.equity.price_historymarket.etf.daily_statsĐổi route
Market.bond.trades (tên khác: intraday)market.equity.trades—Chưa có nguồn
Market.<tài sản>.trades (tên khác: intraday)equity, futures, warrantmarket.<tài sản>.tradesmarket.<tài sản>.tradesGiữ nguyên
Market.etf.trades (tên khác: intraday)market.equity.tradesmarket.etf.tradesĐổi route
Market.crypto.trades (tên khác: intraday, trade_history)market.crypto.tradesmarket.crypto.tradesGiữ nguyên
Market.equity.volume_history—market.equity.volume_historyMới ở thế hệ 6
Market.equity.volume_profile (tên khác: matched_by_price)market.equity.volume_profilemarket.equity.volume_profileGiữ nguyên
Market.etf.volume_profile (tên khác: matched_by_price)market.equity.volume_profilemarket.etf.volume_profileĐổi route
Market.crypto.vwapmarket.crypto.vwapmarket.crypto.vwapGiữ nguyên
Market.bond.yield_history—market.bond.yield_historyMới ở thế hệ 6
Market.index(scope="global").ohlcv (tên khác: history)market.global_index.ohlcvmarket.index.global_ohlcvĐổi route
Đã ngừng từ thế hệ 5 (8)
HàmNhómRoute thế hệ 5Route thế hệ 6Trạng thái
Market.equity.box_tradesmarket.equity.box_trades—Đã ngừng từ thế hệ 5
Market.etf.box_tradesmarket.equity.box_trades—Đã ngừng từ thế hệ 5
Market.fund.quote (tên khác: odd_lot, put_through)——Đã ngừng từ thế hệ 5
Market.index.stock_influence——Đã ngừng từ thế hệ 5
Market.index(scope="global").quote (tên khác: price_board)market.unsupported.combination—Đã ngừng từ thế hệ 5
Market.index(scope="global").stock_influence——Đã ngừng từ thế hệ 5
Market.index(scope="global").summarymarket.global_index.summary—Đã ngừng từ thế hệ 5
Market.index(scope="global").trade_historymarket.global_index.trade_history—Đã ngừng từ thế hệ 5

Reference

HàmNhómRoute thế hệ 5Route thế hệ 6Trạng thái
Reference.fund.asset_holdingmarket.fund.asset_holding—Chưa có nguồn
Reference.equity.by_exchange (tên khác: list_by_exchange)reference.market.symbols_by_exchangereference.equity.listĐổi route
Reference.equity.by_group (tên khác: list_by_group)reference.market.symbols_by_groupreference.index.membersĐổi route
Reference.equity.catalog—reference.equity.catalogMới ở thế hệ 6
Reference.index.constituents—reference.index.constituentsMới ở thế hệ 6
Reference.equity.corporate_actions—reference.equity.corporate_actionsMới ở thế hệ 6
Reference.fund.fee_structurereference.fund.fee_structure—Chưa có nguồn
Reference.index.groupsreference.index.groupsreference.index.groupsGiữ nguyên
Reference.fund.industry_holdingmarket.fund.industry_holding—Chưa có nguồn
Reference.bond.inforeference.bond.info—Chưa có nguồn
Reference.futures.inforeference.futures.profilereference.futures.listĐổi route
Reference.warrant.inforeference.warrant.profilereference.warrant.infoĐổi route
Reference.crypto.info—reference.crypto.infoMới ở thế hệ 6
Reference.index.info (tên khác: description)reference.index.inforeference.index.infoGiữ nguyên
Reference.<tài sản>.listbond, etf, futures, warrantreference.market.symbols_by_groupreference.<tài sản>.listĐổi route
Reference.<tài sản>.listequity, fund, indexreference.<tài sản>.listreference.<tài sản>.listGiữ nguyên
Reference.<tài sản>.listcommodity, crypto, forex—reference.<tài sản>.listMới ở thế hệ 6
Reference.equity.list_by_industryreference.market.symbols_by_industriesreference.industry.sectorsĐổi route
Reference.index.members (tên khác: by_group, list_by_group)reference.market.symbols_by_groupreference.index.membersĐổi route
Reference.fund.nav_reportmarket.fund.historymarket.fund.historyGiữ nguyên
Reference.equity.price_limits—reference.equity.price_limitsMới ở thế hệ 6
Reference.fund.profilereference.fund.profilereference.fund.profileGiữ nguyên
Reference.fund.reportsreference.fund.reports—Chưa có nguồn
Reference.equity.status—reference.equity.statusMới ở thế hệ 6
Reference.fund.top_holdingmarket.fund.top_holding—Chưa có nguồn
Reference.company.affiliatefundamental.company.affiliate—Chưa có nguồn
Reference.company.capital_historyfundamental.company.capital_history—Chưa có nguồn
Reference.company.eventsfundamental.company.eventsreference.company.eventsĐổi route
Reference.company.info (tên khác: overview)fundamental.company.inforeference.company.infoĐổi route
Reference.company.insider_tradingfundamental.company.insider_tradingreference.company.insider_tradingĐổi route
Reference.company.listing—reference.company.listingMới ở thế hệ 6
Reference.company.officersfundamental.company.officers—Chưa có nguồn
Reference.company.ownershipfundamental.company.ownershipreference.company.ownershipĐổi route
Reference.company.shareholdersfundamental.company.shareholdersreference.company.shareholdersĐổi route
Reference.company.subsidiariesfundamental.company.subsidiaries—Chưa có nguồn
Reference.company.trading_statsmarket.equity.session_statsmarket.equity.session_statsGiữ nguyên
Reference.events.calendarreference.events.calendarreference.events.calendarGiữ nguyên
Reference.events.economic—reference.events.economicMới ở thế hệ 6
Reference.events.marketreference.events.marketreference.events.marketGiữ nguyên
Reference.industry.listreference.market.industries_icbreference.industry.listĐổi route
Reference.industry.members—reference.industry.membersMới ở thế hệ 6
Reference.industry.sectorsreference.market.symbols_by_industriesreference.industry.sectorsĐổi route
Reference.market.sessions—reference.market.sessionsMới ở thế hệ 6
Reference.market.statusreference.market.statusreference.market.statusGiữ nguyên
Reference.market.trading_days—reference.market.trading_daysMới ở thế hệ 6
Reference.search.inforeference.search.inforeference.search.symbolĐổi route
Reference.search.symbolreference.search.symbolreference.search.symbolGiữ nguyên
Đã ngừng từ thế hệ 5 (3)
HàmNhómRoute thế hệ 5Route thế hệ 6Trạng thái
Reference.company.newsfundamental.company.news—Đã ngừng từ thế hệ 5
Reference.company.ratio_summary——Đã ngừng từ thế hệ 5
Reference.company.reportsreference.company.reports—Đã ngừng từ thế hệ 5

Fundamental

HàmNhómRoute thế hệ 5Route thế hệ 6Trạng thái
Fundamental.equity.balance_sheetfundamental.equity.balance_sheetfundamental.equity.balance_sheetGiữ nguyên
Fundamental.equity.cash_flowfundamental.equity.cash_flowfundamental.equity.cash_flowGiữ nguyên
Fundamental.equity.download_filingfundamental.equity.filing_file—Chưa có nguồn
Fundamental.equity.filingfundamental.equity.filing—Chưa có nguồn
Fundamental.equity.financial_healthfundamental.equity.financial_health—Chưa có nguồn
Fundamental.equity.income_statementfundamental.equity.income_statementfundamental.equity.income_statementGiữ nguyên
Fundamental.equity.notefundamental.equity.note—Chưa có nguồn
Fundamental.equity.ratiofundamental.equity.ratiofundamental.equity.ratioGiữ nguyên

Macro

HàmNhómRoute thế hệ 5Route thế hệ 6Trạng thái
Macro.currency.central_bank_assets—macro.currency.central_bank_assetsMới ở thế hệ 6
Macro.currency.deposit_ratemacro.currency.deposit_ratemacro.currency.deposit_rateGiữ nguyên
Macro.currency.exchange_ratemacro.currency.exchange_rate—Chưa có nguồn
Macro.currency.fx_reserves—macro.currency.fx_reservesMới ở thế hệ 6
Macro.currency.interbank_ratemacro.currency.interbank_rate—Chưa có nguồn
Macro.currency.omomacro.currency.omo—Chưa có nguồn
Macro.currency.policy_ratemacro.currency.policy_ratemacro.currency.policy_rateGiữ nguyên
Macro.economy.cpimacro.economy.cpimacro.economy.cpiGiữ nguyên
Macro.economy.creditmacro.economy.credit—Chưa có nguồn
Macro.economy.fdimacro.economy.fdimacro.economy.fdiGiữ nguyên
Macro.economy.gdpmacro.economy.gdpmacro.economy.gdpGiữ nguyên
Macro.economy.housing—macro.economy.housingMới ở thế hệ 6
Macro.economy.import_exportmacro.economy.import_exportmacro.economy.import_exportGiữ nguyên
Macro.economy.industry_prodmacro.economy.industry_prodmacro.economy.industry_prodGiữ nguyên
Macro.economy.money_supplymacro.currency.money_supplymacro.economy.money_supplyĐổi route
Macro.economy.population_labormacro.economy.population_labormacro.economy.population_laborGiữ nguyên
Macro.economy.prices—macro.economy.pricesMới ở thế hệ 6
Macro.economy.retailmacro.economy.retailmacro.economy.retailGiữ nguyên
Macro.economy.state_budgetmacro.economy.state_budgetmacro.economy.state_budgetGiữ nguyên
Macro.economy.total_investmentmacro.economy.total_investment—Chưa có nguồn
Macro.global.bond_yield—macro.global.bond_yieldMới ở thế hệ 6
Macro.global.fed_rate—macro.global.fed_rateMới ở thế hệ 6
Macro.global.index——Chưa có nguồn
Macro.global_macro.bond_yieldmacro.global.bond_yieldmacro.global.bond_yieldGiữ nguyên
Macro.global_macro.fed_ratemacro.global.fed_ratemacro.global.fed_rateGiữ nguyên
Macro.global_macro.indexmacro.global.index—Chưa có nguồn
Đã ngừng từ thế hệ 5 (2)
HàmNhómRoute thế hệ 5Route thế hệ 6Trạng thái
Macro.commodity.gas (tên khác: coke, corn, fertilizer_ure, gold, iron_ore, oil_crude, pork, soybean, steel, sugar)——Đã ngừng từ thế hệ 5
Macro.currency.interest_ratemacro.currency.interest_rate—Đã ngừng từ thế hệ 5

Insights

HàmNhómRoute thế hệ 5Route thế hệ 6Trạng thái
Insights.sector.membersinsights.sector.membersreference.industry.membersĐổi route
Insights.flow.foreigninsights.flow.foreign—Chưa có nguồn
Insights.flow.proprietaryinsights.flow.proprietary—Chưa có nguồn
Insights.ranking.dealinsights.ranking.deal—Chưa có nguồn
Insights.ranking.foreign_buyinsights.ranking.foreign_buy—Chưa có nguồn
Insights.ranking.foreign_sellinsights.ranking.foreign_sell—Chưa có nguồn
Insights.ranking.gainerinsights.ranking.gainer—Chưa có nguồn
Insights.ranking.loserinsights.ranking.loser—Chưa có nguồn
Insights.ranking.valueinsights.ranking.value—Chưa có nguồn
Insights.ranking.volumeinsights.ranking.volume—Chưa có nguồn
Insights.sentiment.breadthinsights.sentiment.breadth—Chưa có nguồn
Insights.sentiment.contributioninsights.sentiment.contribution—Chưa có nguồn
Insights.sentiment.heatmapinsights.sentiment.heatmap—Chưa có nguồn
Đã ngừng từ thế hệ 5 (4)
HàmNhómRoute thế hệ 5Route thế hệ 6Trạng thái
Insights.sector.rrg (tên khác: flow, flow_intraday, index_intraday, valuation)——Đã ngừng từ thế hệ 5
Insights.equity.rrg (tên khác: order_flow, order_flow_history, peer_compare)——Đã ngừng từ thế hệ 5
Insights.flow.activeinsights.flow.active—Đã ngừng từ thế hệ 5
Insights.screener.filter (tên khác: criteria)——Đã ngừng từ thế hệ 5

Analytics

HàmNhómRoute thế hệ 5Route thế hệ 6Trạng thái
Analytics.valuation.evaluationinsights.valuation.evaluation—Chưa có nguồn
Analytics.valuation.pbinsights.valuation.pb—Chưa có nguồn
Analytics.valuation.peinsights.valuation.pe—Chưa có nguồn

Retail

HàmNhómRoute thế hệ 5Route thế hệ 6Trạng thái
Retail.gold.history—retail.gold.historyMới ở thế hệ 6
Retail.gold.price (tên khác: Retail.gold)—retail.gold.priceMới ở thế hệ 6
Retail.silver.history—retail.silver.historyMới ở thế hệ 6
Retail.silver.price (tên khác: Retail.silver)—retail.silver.priceMới ở thế hệ 6