Đối chiếu hàm và route giữa thế hệ 5 và thế hệ 6
ChungTài liệu chungCập nhật
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òngMarket.<tài sản>.ohlcvcó nhómequity,etflàMarket.equity.ohlcvvà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áoVNSTOCK_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ái | Số dòng |
|---|---|
| Giữ nguyên | 45 |
| Đổi route | 31 |
| Mới ở thế hệ 6 | 51 |
| Chưa có nguồn | 45 |
| Đã ngừng từ thế hệ 5 | 17 |
Market
| Hàm | Nhóm | Route thế hệ 5 | Route thế hệ 6 | Trạng thái |
|---|---|---|---|---|
Market.equity.active_flow | — | market.equity.active_flow | Mới ở thế hệ 6 | |
Market.equity.active_session | — | market.equity.active_session | Mới ở thế hệ 6 | |
Market.crypto.aggregate_trades | — | market.crypto.aggregate_trades | Mớ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_ask | Mới ở thế hệ 6 | |
Market.equity.block_trade_orders | — | market.equity.block_trade_orders | Chưa có nguồn | |
Market.etf.block_trades (tên khác: put_through) | market.equity.block_trades | market.etf.block_trades | Đổi route | |
Market.equity.block_trades (tên khác: put_through, Market.put_through) | market.equity.block_trades | market.equity.block_trades | Giữ nguyên | |
Market.<tài sản>.breadth | index, sector | — | market.<tài sản>.breadth | Mới ở thế hệ 6 |
Market.crypto.chart_ohlcv | — | market.crypto.chart_ohlcv | Mới ở thế hệ 6 | |
Market.equity.close_price | — | market.equity.close_price | Mới ở thế hệ 6 | |
Market.<tài sản>.comparison | index, sector | — | market.<tài sản>.comparison | Mới ở thế hệ 6 |
Market.crypto.daily_stats (tên khác: summary) | market.crypto.daily_stats | market.crypto.daily_stats | Giữ nguyên | |
Market.fund.dividends | market.fund.dividends | — | Chưa có nguồn | |
Market.equity.expected_price | — | market.equity.expected_price | Mới ở thế hệ 6 | |
Market.equity.foreign_flow | market.equity.foreign_flow | market.equity.foreign_flow | Giữ nguyên | |
Market.etf.foreign_flow | market.equity.foreign_flow | market.etf.foreign_flow | Đổi route | |
Market.<tài sản>.foreign_flow | index, sector | — | market.<tài sản>.foreign_flow | Mới ở thế hệ 6 |
Market.equity.foreign_room | — | market.equity.foreign_room | Mới ở thế hệ 6 | |
Market.equity.foreign_room_board | — | market.equity.foreign_room_board | Mới ở thế hệ 6 | |
Market.equity.foreign_room_history | — | market.equity.foreign_room_history | Mới ở thế hệ 6 | |
Market.<tài sản>.foreign_session | equity, index, sector | — | market.<tài sản>.foreign_session | Mới ở thế hệ 6 |
Market.fund.history (tên khác: nav, ohlcv) | market.fund.history | market.fund.history | Giữ nguyên | |
Market.fund.industry_holding (tên khác: industry_allocation) | market.fund.industry_holding | — | Chưa có nguồn | |
Market.equity.insider_deal | fundamental.company.insider_trading | reference.company.insider_trading | Đổi route | |
Market.crypto.last_price | market.crypto.last_price | market.crypto.last_price | Giữ nguyên | |
Market.equity.last_trade | — | market.equity.last_trade | Mới ở thế hệ 6 | |
Market.etf.odd_lot | market.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.ohlcv | Mới ở thế hệ 6 | |
Market.<tài sản>.ohlcv (tên khác: history) | bond, etf | market.equity.ohlcv | market.<tài sản>.ohlcv | Đổi route |
Market.<tài sản>.ohlcv (tên khác: history) | commodity, crypto, equity, forex, futures, index, warrant | market.<tài sản>.ohlcv | market.<tài sản>.ohlcv | Giữ nguyên |
Market.<tài sản>.order_book (tên khác: price_depth) | bond, etf | market.equity.order_book | market.<tài sản>.order_book | Đổi route |
Market.<tài sản>.order_book (tên khác: price_depth) | crypto, equity, futures, warrant | market.<tài sản>.order_book | market.<tài sản>.order_book | Giữ nguyên |
Market.equity.order_book_history | — | market.equity.order_book_history | Mới ở thế hệ 6 | |
Market.equity.order_book_intraday | — | market.equity.order_book_intraday | Mới ở thế hệ 6 | |
Market.fund.performance | market.fund.performance | market.fund.performance | Giữ nguyên | |
Market.sector.performance | — | market.sector.performance | Mới ở thế hệ 6 | |
Market.equity.proprietary_flow | market.equity.proprietary_flow | market.equity.proprietary_flow | Giữ nguyên | |
Market.etf.proprietary_flow | market.equity.proprietary_flow | market.etf.proprietary_flow | Đổi route | |
Market.index.proprietary_flow | — | market.index.proprietary_flow | Mới ở thế hệ 6 | |
Market.equity.proprietary_session | — | market.equity.proprietary_session | Mới ở thế hệ 6 | |
Market.<tài sản>.quote | commodity, forex | — | market.<tài sản>.quote | Mới ở thế hệ 6 |
Market.<tài sản>.quote (tên khác: price_board) | bond, etf | market.equity.quote | market.<tài sản>.quote | Đổi route |
Market.<tài sản>.quote (tên khác: price_board) | crypto, futures, index, warrant | market.<tài sản>.quote | market.<tài sản>.quote | Giữ nguyên |
Market.equity.quote (tên khác: price_board, Market.price_board, Market.quote) | market.equity.quote | market.equity.quote | Giữ nguyên | |
Market.crypto.reference_price | market.crypto.reference_price | market.crypto.reference_price | Giữ nguyên | |
Market.crypto.rolling_stats | market.crypto.rolling_stats | market.crypto.rolling_stats | Giữ nguyên | |
Market.equity.screener | — | market.equity.screener | Mới ở thế hệ 6 | |
Market.equity.session_stats (tên khác: trading_stats) | market.equity.session_stats | market.equity.session_stats | Giữ nguyên | |
Market.etf.session_stats (tên khác: trading_stats) | market.equity.session_stats | market.etf.session_stats | Đổi route | |
Market.equity.session_volume | — | market.equity.session_volume | Mới ở thế hệ 6 | |
Market.<tài sản>.summary | bond, etf | market.<tài sản>.summary | — | Chưa có nguồn |
Market.equity.summary | market.equity.summary | market.equity.summary | Giữ nguyên | |
Market.<tài sản>.summary | futures, index, warrant | market.<tài sản>.summary | market.<tài sản>.quote | Đổi route |
Market.equity.supply_demand_daily | — | market.equity.supply_demand_daily | Mới ở thế hệ 6 | |
Market.equity.supply_demand_intraday | — | market.equity.supply_demand_intraday | Mới ở thế hệ 6 | |
Market.equity.supply_demand_session | — | market.equity.supply_demand_session | Mớ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_history | equity, index | market.<tài sản>.price_history | market.<tài sản>.daily_stats | Đổi route |
Market.etf.trade_history | market.equity.price_history | market.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, warrant | market.<tài sản>.trades | market.<tài sản>.trades | Giữ nguyên |
Market.etf.trades (tên khác: intraday) | market.equity.trades | market.etf.trades | Đổi route | |
Market.crypto.trades (tên khác: intraday, trade_history) | market.crypto.trades | market.crypto.trades | Giữ nguyên | |
Market.equity.volume_history | — | market.equity.volume_history | Mới ở thế hệ 6 | |
Market.equity.volume_profile (tên khác: matched_by_price) | market.equity.volume_profile | market.equity.volume_profile | Giữ nguyên | |
Market.etf.volume_profile (tên khác: matched_by_price) | market.equity.volume_profile | market.etf.volume_profile | Đổi route | |
Market.crypto.vwap | market.crypto.vwap | market.crypto.vwap | Giữ nguyên | |
Market.bond.yield_history | — | market.bond.yield_history | Mới ở thế hệ 6 | |
Market.index(scope="global").ohlcv (tên khác: history) | market.global_index.ohlcv | market.index.global_ohlcv | Đổi route |
Đã ngừng từ thế hệ 5 (8)
| Hàm | Nhóm | Route thế hệ 5 | Route thế hệ 6 | Trạng thái |
|---|---|---|---|---|
Market.equity.box_trades | market.equity.box_trades | — | Đã ngừng từ thế hệ 5 | |
Market.etf.box_trades | market.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").summary | market.global_index.summary | — | Đã ngừng từ thế hệ 5 | |
Market.index(scope="global").trade_history | market.global_index.trade_history | — | Đã ngừng từ thế hệ 5 |
Reference
| Hàm | Nhóm | Route thế hệ 5 | Route thế hệ 6 | Trạng thái |
|---|---|---|---|---|
Reference.fund.asset_holding | market.fund.asset_holding | — | Chưa có nguồn | |
Reference.equity.by_exchange (tên khác: list_by_exchange) | reference.market.symbols_by_exchange | reference.equity.list | Đổi route | |
Reference.equity.by_group (tên khác: list_by_group) | reference.market.symbols_by_group | reference.index.members | Đổi route | |
Reference.equity.catalog | — | reference.equity.catalog | Mới ở thế hệ 6 | |
Reference.index.constituents | — | reference.index.constituents | Mới ở thế hệ 6 | |
Reference.equity.corporate_actions | — | reference.equity.corporate_actions | Mới ở thế hệ 6 | |
Reference.fund.fee_structure | reference.fund.fee_structure | — | Chưa có nguồn | |
Reference.index.groups | reference.index.groups | reference.index.groups | Giữ nguyên | |
Reference.fund.industry_holding | market.fund.industry_holding | — | Chưa có nguồn | |
Reference.bond.info | reference.bond.info | — | Chưa có nguồn | |
Reference.futures.info | reference.futures.profile | reference.futures.list | Đổi route | |
Reference.warrant.info | reference.warrant.profile | reference.warrant.info | Đổi route | |
Reference.crypto.info | — | reference.crypto.info | Mới ở thế hệ 6 | |
Reference.index.info (tên khác: description) | reference.index.info | reference.index.info | Giữ nguyên | |
Reference.<tài sản>.list | bond, etf, futures, warrant | reference.market.symbols_by_group | reference.<tài sản>.list | Đổi route |
Reference.<tài sản>.list | equity, fund, index | reference.<tài sản>.list | reference.<tài sản>.list | Giữ nguyên |
Reference.<tài sản>.list | commodity, crypto, forex | — | reference.<tài sản>.list | Mới ở thế hệ 6 |
Reference.equity.list_by_industry | reference.market.symbols_by_industries | reference.industry.sectors | Đổi route | |
Reference.index.members (tên khác: by_group, list_by_group) | reference.market.symbols_by_group | reference.index.members | Đổi route | |
Reference.fund.nav_report | market.fund.history | market.fund.history | Giữ nguyên | |
Reference.equity.price_limits | — | reference.equity.price_limits | Mới ở thế hệ 6 | |
Reference.fund.profile | reference.fund.profile | reference.fund.profile | Giữ nguyên | |
Reference.fund.reports | reference.fund.reports | — | Chưa có nguồn | |
Reference.equity.status | — | reference.equity.status | Mới ở thế hệ 6 | |
Reference.fund.top_holding | market.fund.top_holding | — | Chưa có nguồn | |
Reference.company.affiliate | fundamental.company.affiliate | — | Chưa có nguồn | |
Reference.company.capital_history | fundamental.company.capital_history | — | Chưa có nguồn | |
Reference.company.events | fundamental.company.events | reference.company.events | Đổi route | |
Reference.company.info (tên khác: overview) | fundamental.company.info | reference.company.info | Đổi route | |
Reference.company.insider_trading | fundamental.company.insider_trading | reference.company.insider_trading | Đổi route | |
Reference.company.listing | — | reference.company.listing | Mới ở thế hệ 6 | |
Reference.company.officers | fundamental.company.officers | — | Chưa có nguồn | |
Reference.company.ownership | fundamental.company.ownership | reference.company.ownership | Đổi route | |
Reference.company.shareholders | fundamental.company.shareholders | reference.company.shareholders | Đổi route | |
Reference.company.subsidiaries | fundamental.company.subsidiaries | — | Chưa có nguồn | |
Reference.company.trading_stats | market.equity.session_stats | market.equity.session_stats | Giữ nguyên | |
Reference.events.calendar | reference.events.calendar | reference.events.calendar | Giữ nguyên | |
Reference.events.economic | — | reference.events.economic | Mới ở thế hệ 6 | |
Reference.events.market | reference.events.market | reference.events.market | Giữ nguyên | |
Reference.industry.list | reference.market.industries_icb | reference.industry.list | Đổi route | |
Reference.industry.members | — | reference.industry.members | Mới ở thế hệ 6 | |
Reference.industry.sectors | reference.market.symbols_by_industries | reference.industry.sectors | Đổi route | |
Reference.market.sessions | — | reference.market.sessions | Mới ở thế hệ 6 | |
Reference.market.status | reference.market.status | reference.market.status | Giữ nguyên | |
Reference.market.trading_days | — | reference.market.trading_days | Mới ở thế hệ 6 | |
Reference.search.info | reference.search.info | reference.search.symbol | Đổi route | |
Reference.search.symbol | reference.search.symbol | reference.search.symbol | Giữ nguyên |
Đã ngừng từ thế hệ 5 (3)
| Hàm | Nhóm | Route thế hệ 5 | Route thế hệ 6 | Trạng thái |
|---|---|---|---|---|
Reference.company.news | fundamental.company.news | — | Đã ngừng từ thế hệ 5 | |
Reference.company.ratio_summary | — | — | Đã ngừng từ thế hệ 5 | |
Reference.company.reports | reference.company.reports | — | Đã ngừng từ thế hệ 5 |
Fundamental
| Hàm | Nhóm | Route thế hệ 5 | Route thế hệ 6 | Trạng thái |
|---|---|---|---|---|
Fundamental.equity.balance_sheet | fundamental.equity.balance_sheet | fundamental.equity.balance_sheet | Giữ nguyên | |
Fundamental.equity.cash_flow | fundamental.equity.cash_flow | fundamental.equity.cash_flow | Giữ nguyên | |
Fundamental.equity.download_filing | fundamental.equity.filing_file | — | Chưa có nguồn | |
Fundamental.equity.filing | fundamental.equity.filing | — | Chưa có nguồn | |
Fundamental.equity.financial_health | fundamental.equity.financial_health | — | Chưa có nguồn | |
Fundamental.equity.income_statement | fundamental.equity.income_statement | fundamental.equity.income_statement | Giữ nguyên | |
Fundamental.equity.note | fundamental.equity.note | — | Chưa có nguồn | |
Fundamental.equity.ratio | fundamental.equity.ratio | fundamental.equity.ratio | Giữ nguyên |
Macro
| Hàm | Nhóm | Route thế hệ 5 | Route thế hệ 6 | Trạng thái |
|---|---|---|---|---|
Macro.currency.central_bank_assets | — | macro.currency.central_bank_assets | Mới ở thế hệ 6 | |
Macro.currency.deposit_rate | macro.currency.deposit_rate | macro.currency.deposit_rate | Giữ nguyên | |
Macro.currency.exchange_rate | macro.currency.exchange_rate | — | Chưa có nguồn | |
Macro.currency.fx_reserves | — | macro.currency.fx_reserves | Mới ở thế hệ 6 | |
Macro.currency.interbank_rate | macro.currency.interbank_rate | — | Chưa có nguồn | |
Macro.currency.omo | macro.currency.omo | — | Chưa có nguồn | |
Macro.currency.policy_rate | macro.currency.policy_rate | macro.currency.policy_rate | Giữ nguyên | |
Macro.economy.cpi | macro.economy.cpi | macro.economy.cpi | Giữ nguyên | |
Macro.economy.credit | macro.economy.credit | — | Chưa có nguồn | |
Macro.economy.fdi | macro.economy.fdi | macro.economy.fdi | Giữ nguyên | |
Macro.economy.gdp | macro.economy.gdp | macro.economy.gdp | Giữ nguyên | |
Macro.economy.housing | — | macro.economy.housing | Mới ở thế hệ 6 | |
Macro.economy.import_export | macro.economy.import_export | macro.economy.import_export | Giữ nguyên | |
Macro.economy.industry_prod | macro.economy.industry_prod | macro.economy.industry_prod | Giữ nguyên | |
Macro.economy.money_supply | macro.currency.money_supply | macro.economy.money_supply | Đổi route | |
Macro.economy.population_labor | macro.economy.population_labor | macro.economy.population_labor | Giữ nguyên | |
Macro.economy.prices | — | macro.economy.prices | Mới ở thế hệ 6 | |
Macro.economy.retail | macro.economy.retail | macro.economy.retail | Giữ nguyên | |
Macro.economy.state_budget | macro.economy.state_budget | macro.economy.state_budget | Giữ nguyên | |
Macro.economy.total_investment | macro.economy.total_investment | — | Chưa có nguồn | |
Macro.global.bond_yield | — | macro.global.bond_yield | Mới ở thế hệ 6 | |
Macro.global.fed_rate | — | macro.global.fed_rate | Mới ở thế hệ 6 | |
Macro.global.index | — | — | Chưa có nguồn | |
Macro.global_macro.bond_yield | macro.global.bond_yield | macro.global.bond_yield | Giữ nguyên | |
Macro.global_macro.fed_rate | macro.global.fed_rate | macro.global.fed_rate | Giữ nguyên | |
Macro.global_macro.index | macro.global.index | — | Chưa có nguồn |
Đã ngừng từ thế hệ 5 (2)
| Hàm | Nhóm | Route thế hệ 5 | Route thế hệ 6 | Trạ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_rate | macro.currency.interest_rate | — | Đã ngừng từ thế hệ 5 |
Insights
| Hàm | Nhóm | Route thế hệ 5 | Route thế hệ 6 | Trạng thái |
|---|---|---|---|---|
Insights.sector.members | insights.sector.members | reference.industry.members | Đổi route | |
Insights.flow.foreign | insights.flow.foreign | — | Chưa có nguồn | |
Insights.flow.proprietary | insights.flow.proprietary | — | Chưa có nguồn | |
Insights.ranking.deal | insights.ranking.deal | — | Chưa có nguồn | |
Insights.ranking.foreign_buy | insights.ranking.foreign_buy | — | Chưa có nguồn | |
Insights.ranking.foreign_sell | insights.ranking.foreign_sell | — | Chưa có nguồn | |
Insights.ranking.gainer | insights.ranking.gainer | — | Chưa có nguồn | |
Insights.ranking.loser | insights.ranking.loser | — | Chưa có nguồn | |
Insights.ranking.value | insights.ranking.value | — | Chưa có nguồn | |
Insights.ranking.volume | insights.ranking.volume | — | Chưa có nguồn | |
Insights.sentiment.breadth | insights.sentiment.breadth | — | Chưa có nguồn | |
Insights.sentiment.contribution | insights.sentiment.contribution | — | Chưa có nguồn | |
Insights.sentiment.heatmap | insights.sentiment.heatmap | — | Chưa có nguồn |
Đã ngừng từ thế hệ 5 (4)
| Hàm | Nhóm | Route thế hệ 5 | Route thế hệ 6 | Trạ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.active | insights.flow.active | — | Đã ngừng từ thế hệ 5 | |
Insights.screener.filter (tên khác: criteria) | — | — | Đã ngừng từ thế hệ 5 |
Analytics
| Hàm | Nhóm | Route thế hệ 5 | Route thế hệ 6 | Trạng thái |
|---|---|---|---|---|
Analytics.valuation.evaluation | insights.valuation.evaluation | — | Chưa có nguồn | |
Analytics.valuation.pb | insights.valuation.pb | — | Chưa có nguồn | |
Analytics.valuation.pe | insights.valuation.pe | — | Chưa có nguồn |
Retail
| Hàm | Nhóm | Route thế hệ 5 | Route thế hệ 6 | Trạng thái |
|---|---|---|---|---|
Retail.gold.history | — | retail.gold.history | Mới ở thế hệ 6 | |
Retail.gold.price (tên khác: Retail.gold) | — | retail.gold.price | Mới ở thế hệ 6 | |
Retail.silver.history | — | retail.silver.history | Mới ở thế hệ 6 | |
Retail.silver.price (tên khác: Retail.silver) | — | retail.silver.price | Mới ở thế hệ 6 |
