Basic Response

The output of every command is an object which contains the results of the request, along with additional information. It is a custom class, VfObject, and always returns with the four attributes listed below:

results: ...            # Serializable results parsed by VietFin.
provider: ...           # Provider name.
extra: ...              # Additional metadata about the command run.
raw_data: ...           # Raw data returned from the API call.

There are also additional class methods which are helpers to convert the results to a variety of formats.

Example

Let’s start with the command equity.profile() to get familiar with the response of a command.

[3]:
from vietfin import vf

# Get general info of a company by its stock ticker.
vnm = vf.equity.profile(symbol="vnm")

vnm
[3]:
VfObject

results: [{'symbol': 'VNM', 'name': 'VINAMILK', 'legal_name': 'Công ty Cổ phần Sữa ...
provider: tcbs
extra: {'command_run_at': '2024-02-28T05:54:31.539269+00:00', 'symbol': 'VNM', 'rec...
raw_data: {'id': None, 'companyName': 'Công ty Cổ phần Sữa Việt Nam', 'ticker': 'VN...

This command returns an instance of VfObject class. The results attribute of this instance stores the serializable results of the query, which were parsed by VietFin.

The data type of results in this example is List[Data]. Where Data is the Standardized Data Model of VietFin. The Data class is a flexible Pydantic model designed to accommodate various data structures for VietFin’s data processing pipeline as it’s structured to support dynamic field definitions.

[2]:
vnm.results
[2]:
[TcbsEquityProfileData(symbol='VNM', name='VINAMILK', legal_name='Công ty Cổ phần Sữa Việt Nam', stock_exchange='HOSE', long_description='Công ty Cổ phần Sữa Việt Nam (VNM) có tiền thân là Công ty Sữa – Cà Phê Miền Nam,\xa0được thành lập vào năm 1976. Công ty hoạt\xa0động chính trong lĩnh vực\xa0chế biến sản xuất, kinh doanh xuất nhập khẩu các\xa0sản phẩm sữa và các sản phẩm dinh dưỡng khác. VNM chính thức hoạt động theo mô hình công ty cổ phần từ năm\xa02003. VNM là công ty sữa lớn nhất Việt Nam với thị phần là hơn 50% trong ngành sữa Việt Nam.\xa0Sản phẩm của VNM được xuất khẩu trực tiếp đến\xa057\xa0nước trên thế giới. VNM được niêm yết và giao dịch\xa0trên Sở Chứng khoán Thành phố Hồ\xa0Chí Minh (HOSE) từ năm 2006.', company_url=Url('https://www.vinamilk.com.vn/'), employees=9663, industry_category='Thực phẩm và đồ uống')]

The provider attribute stores the provider’s name which was used in the function.

[3]:
vnm.provider
[3]:
'tcbs'

The extra attribute is a dictionary which stores additional metadata about the command run, such as:

  • command_run_at: the datetime at which the command was executed

  • symbol: the symbol for which the command is run

  • records_count: the number of records returned by the command

  • api_url: the API url(s) called by the command

[4]:
vnm.extra
[4]:
{'command_run_at': '2024-02-27T01:47:27.994906+00:00',
 'symbol': 'VNM',
 'records_count': 1,
 'api_url': ['https://apipubaws.tcbs.com.vn/tcanalysis/v1/company/VNM/overview',
  'https://apipubaws.tcbs.com.vn/tcanalysis/v1/ticker/VNM/overview']}

The raw_data attribute is a dictionary which stores the raw data returned by the API request, uninterpreted by VietFin. This might be useful for users who are curious, and want to parse the API response themselves.

[4]:
vnm.raw_data
[4]:
{'id': None,
 'companyName': 'Công ty Cổ phần Sữa Việt Nam',
 'ticker': 'VNM',
 'companyProfile': '<div style="FONT-FAMILY: Arial; FONT-SIZE: 10pt;">C&ocirc;ng ty Cổ phần Sữa Việt Nam (VNM) c&oacute; tiền th&acirc;n l&agrave; C&ocirc;ng ty Sữa &ndash; C&agrave; Ph&ecirc; Miền Nam,&nbsp;được th&agrave;nh lập v&agrave;o năm 1976. C&ocirc;ng ty hoạt&nbsp;động ch&iacute;nh trong lĩnh vực&nbsp;chế biến sản xuất, kinh doanh xuất nhập khẩu c&aacute;c&nbsp;sản phẩm sữa v&agrave; c&aacute;c sản phẩm dinh dưỡng kh&aacute;c. VNM ch&iacute;nh thức hoạt động theo m&ocirc; h&igrave;nh c&ocirc;ng ty cổ phần từ năm&nbsp;2003. VNM l&agrave; c&ocirc;ng ty sữa lớn nhất Việt Nam với thị phần l&agrave; hơn 50% trong ng&agrave;nh sữa Việt Nam.&nbsp;Sản phẩm của VNM được xuất khẩu trực tiếp đến&nbsp;57&nbsp;nước tr&ecirc;n thế giới. VNM được ni&ecirc;m yết v&agrave; giao dịch&nbsp;tr&ecirc;n Sở Chứng kho&aacute;n Th&agrave;nh phố Hồ&nbsp;Ch&iacute; Minh (HOSE) từ năm 2006.</div>\r\n<quillbot-extension-portal></quillbot-extension-portal><quillbot-extension-portal></quillbot-extension-portal>',
 'historyDev': '<div style="FONT-FAMILY: Arial; FONT-SIZE: 10pt;">\r\n<ul>\r\n\t<li>Năm 1976:&nbsp;Tiền th&acirc;n của c&ocirc;ng ty l&agrave; C&ocirc;ng ty Sữa &ndash; C&agrave; Ph&ecirc; Miền Nam, trực thuộc Tổng Cục thực phẩm được th&agrave;nh lập;</li>\r\n\t<li>Năm 1978: Đổi t&ecirc;n th&agrave;nh X&iacute; nghiệp li&ecirc;n hợp Sữa Cafe v&agrave; B&aacute;nh kẹo I;</li>\r\n\t<li>Năm 1989: Nh&agrave; m&aacute;y sữa bột Dielac đi v&agrave;o hoạt động;</li>\r\n\t<li>Năm 1991: Cuộc &ldquo;c&aacute;ch mạng trắng&rdquo; khởi đầu chương tr&igrave;nh x&acirc;y dựng v&ugrave;ng nguy&ecirc;n liệu sữa tươi. Lần đầu ti&ecirc;n giới thiệu sản phẩm sữa UHT v&agrave; sữa chua;</li>\r\n\t<li>Th&aacute;ng 3/1992: X&iacute; Nghiệp li&ecirc;n hiệp Sữa Cafe v&agrave; B&aacute;nh kẹo I ch&iacute;nh thức đổi t&ecirc;n th&agrave;nh C&ocirc;ng ty Sữa Việt Nam;</li>\r\n\t<li>Năm 1994: X&acirc;y dựng th&ecirc;m một nh&agrave; m&aacute;y sữa H&agrave; Nội;</li>\r\n\t<li>Năm 2003: X&acirc;y th&ecirc;m nh&agrave; m&aacute;y sữa Cần Thơ;</li>\r\n\t<li>Th&aacute;ng 11/2003: C&ocirc;ng ty chuyển sang h&igrave;nh thức cổ phần, ch&iacute;nh thức đổi t&ecirc;n l&agrave; C&ocirc;ng ty Cổ phần Sữa Việt Nam (Vinamilk);</li>\r\n\t<li>Th&aacute;ng 04/2004: Mua nh&agrave; m&aacute;y sữa S&agrave;i G&ograve;n (Saigon milk), tăng vốn điều lệ l&ecirc;n 1.590 tỷ đồng;</li>\r\n\t<li>Ng&agrave;y 19/01/2006: Cổ phiếu của Vinamilk ch&iacute;nh thức giao dịch tr&ecirc;n HOSE;</li>\r\n\t<li>Th&aacute;ng 09/2010: L&agrave; doanh nghiệp đầu ti&ecirc;n của Việt Nam lọt v&agrave;o danh s&aacute;ch 200 c&ocirc;ng ty vừa v&agrave; nhỏ tốt nhất Ch&acirc;u &Aacute; của Forbes;</li>\r\n\t<li>Th&aacute;ng 06/2012: Nh&agrave; m&aacute;y sữa Đ&agrave; Nẵng đi v&agrave;o hoạt động;</li>\r\n\t<li>Ng&agrave;y 21/10/2013: Sở Kế hoạch v&agrave; Đầu tư tỉnh Thanh H&oacute;a cấp giấy chứng nhận đăng k&iacute; kinh doanh cho c&ocirc;ng ty TNHH B&ograve; sữa Thống Nhất, Thanh H&oacute;a. Vinamilk nắm giữ 96,33% vốn điều lệ;</li>\r\n\t<li>Năm 2014: G&oacute;p 51% vốn th&agrave;nh lập C&ocirc;ng ty AngkorMilk tại thị trường Campuchia v&agrave;&nbsp;g&oacute;p 100% vốn th&agrave;nh lập c&ocirc;ng ty con Vinamilk Europe Spostkaz Ograniczona Odpowiedzialnoscia tại Ba Lan;</li>\r\n\t<li>Năm 2016: Tham gia g&oacute;p 18% v&agrave;o CTCP APIS nhằm mở rộng v&agrave; ph&aacute;t triển chuỗi gi&aacute; trị c&aacute;c sản phẩm của Vinamilk v&agrave; th&agrave;nh lập Văn ph&ograve;ng đại diện Th&aacute;i Lan;</li>\r\n\t<li>Năm 2017: Th&agrave;nh lập Trung t&acirc;m Sữa tươi nguy&ecirc;n liệu Củ Chi, đầu tư v&agrave;o ng&agrave;nh đường với việc nắm<br />\r\n\t65% cổ phần của C&ocirc;ng ty Cổ phần&nbsp;Đường Việt Nam (tiền th&acirc;n l&agrave; C&ocirc;ng ty Cổ phần&nbsp;Đường Kh&aacute;nh Ho&agrave;) v&agrave; 25% g&oacute;p vốn v&agrave;o C&ocirc;ng ty Cổ phần Chế Biến Dừa &Aacute; Ch&acirc;u;</li>\r\n\t<li>Ng&agrave;y 12/10/2018: Tăng vốn điều lệ l&ecirc;n 17.416.877.930.000 đồng;</li>\r\n\t<li>Năm 2019: Đầu tư nắm giữ 75% cổ phần của C&ocirc;ng ty Cổ phần GTNFoods, qua đ&oacute; tham gia điều h&agrave;nh C&ocirc;ng ty Cổ phần Sữa Mộc Ch&acirc;u;</li>\r\n\t<li>Ng&agrave;y 26/10/2020: Tăng vốn điều lệ l&ecirc;n 20.899.554.450.000 đồng;</li>\r\n</ul>\r\n</div>\r\n<quillbot-extension-portal></quillbot-extension-portal><quillbot-extension-portal></quillbot-extension-portal>',
 'companyPromise': '<div style="FONT-FAMILY: Arial; FONT-SIZE: 10pt;">\r\n<ul>\r\n\t<li>Theo Tập đo&agrave;n nghi&ecirc;n cứu thị trường Euromonitor, doanh thu sữa v&agrave; c&aacute;c sản phẩm từ sữa của Việt Nam dự kiến sẽ duy tr&igrave; ở mức 7-8%/năm trong giai đoạn 2021 - 2025, đạt tổng gi&aacute; trị khoảng 93,8 ngh&igrave;n tỷ đồng v&agrave;o năm 2025. Trong đ&oacute;, sữa chua được kỳ vọng c&oacute; tốc độ tăng trưởng cao nhất với tốc độ tăng trưởng CAGR l&agrave; 12%/năm.</li>\r\n\t<li>Thu nhập b&igrave;nh qu&acirc;n đầu người c&oacute; xu thế gia tăng, kết hợp với xu thế cải thiện thiện sức khỏe v&agrave; tầm v&oacute;c của người Việt Nam khiến cho nhu cầu ti&ecirc;u thụ c&aacute;c sản phẩm sữa lu&ocirc;n giữ mức tăng trưởng cao. Ngo&agrave;i ra, sữa được xem l&agrave; mặt h&agrave;ng thiết yếu n&ecirc;n &iacute;t chịu ảnh hưởng bởi khủng hoảng kinh tế.</li>\r\n</ul>\r\n</div>\r\n<quillbot-extension-portal></quillbot-extension-portal><quillbot-extension-portal></quillbot-extension-portal>',
 'businessRisk': '<div style="FONT-FAMILY: Arial; FONT-SIZE: 10pt;">\r\n<ul>\r\n\t<li>Rủi ro biến động gi&aacute; nguy&ecirc;n liệu: Gi&aacute; thức ăn chăn nu&ocirc;i c&oacute; thể tăng đột ngột do ảnh hưởng của thời tiết hoặc thị trường h&agrave;ng h&oacute;a.</li>\r\n\t<li>Rủi ro sự thay đổi sở th&iacute;ch của người ti&ecirc;u d&ugrave;ng: Sự thay đổi trong sở th&iacute;ch của người ti&ecirc;u d&ugrave;ng c&oacute; thể l&agrave;m giảm nhu cầu ti&ecirc;u thụ sản phẩm sữa truyền thống.</li>\r\n</ul>\r\n</div>\r\n<quillbot-extension-portal></quillbot-extension-portal><quillbot-extension-portal></quillbot-extension-portal>',
 'keyDevelopments': '<div style="FONT-FAMILY: Arial; FONT-SIZE: 10pt;">\r\n<ul>\r\n\t<li>Sản xuất v&agrave; kinh doanh b&aacute;nh, sữa đậu n&agrave;nh, nước giải kh&aacute;t, sữa hộp, sữa bột, bột dinh dưỡng v&agrave; c&aacute;c sản phẩm từ sữa kh&aacute;c;</li>\r\n\t<li>Sản xuất, mua b&aacute;n rượu, bia, đồ uống, thực phẩm v&agrave; nhiều loại c&agrave; ph&ecirc;;</li>\r\n\t<li>Chăn nu&ocirc;i b&ograve; sữa, cung cấp giống vật nu&ocirc;i v&agrave; kỹ thuật nu&ocirc;i;&nbsp;</li>\r\n</ul>\r\n</div>\r\n<quillbot-extension-portal></quillbot-extension-portal><quillbot-extension-portal></quillbot-extension-portal>',
 'businessStrategies': '<div style="FONT-FAMILY: Arial; FONT-SIZE: 10pt;">\r\n<ul>\r\n\t<li>Tiếp tục duy tr&igrave; vị tr&iacute; số 1 trong ng&agrave;nh sữa&nbsp;Việt Nam v&agrave; tiến tới mục ti&ecirc;u trở th&agrave;nh 1 trong Top 30 C&ocirc;ng ty Sữa lớn nhất thế giới về doanh thu;</li>\r\n\t<li>Tiếp tục nghi&ecirc;n cứu v&agrave; ph&aacute;t triển nhiều sản phẩm mới với mục đ&iacute;ch c&aacute;ch t&acirc;n v&agrave; đa dạng h&oacute;a danh mục sản phẩm tr&ecirc;n cơ sở ph&ugrave; hợp với thị hiếu của người ti&ecirc;u d&ugrave;ng v&agrave; nhu cầu của kh&aacute;ch h&agrave;ng;</li>\r\n\t<li>N&acirc;ng cấp v&agrave; x&acirc;y dựng mới c&aacute;c trang trại t&iacute;ch hợp hệ thống m&aacute;y m&oacute;c thiết bị ti&ecirc;n tiến theo hướng ph&aacute;t triển bền vững v&agrave; ph&ugrave; hợp với biến đổi kh&iacute; hậu;</li>\r\n\t<li>T&igrave;m kiếm c&aacute;c cơ hội M&amp;A với c&aacute;c c&ocirc;ng ty sữa tại c&aacute;c quốc gia kh&aacute;c với mục đ&iacute;ch mở rộng thị trường v&agrave; tăng doanh số;</li>\r\n\t<li>Ch&uacute; trọng đầu tư ph&aacute;t triển hoạt động R&amp;D,&nbsp;ph&aacute;t triển thực phẩm hữu cơ v&agrave; ứng dụng C&ocirc;ng nghệ sinh học ti&ecirc;n tiến nhằm hướng đến mục ti&ecirc;u trở th&agrave;nh biểu tượng niềm tin h&agrave;ng đầu Việt Nam về sản phẩm dinh dưỡng v&agrave; sức khỏe phục vụ cuộc sống con người;</li>\r\n\t<li>Tiếp cận v&agrave; x&uacute;c tiến một c&aacute;ch linh hoạt v&agrave; đa dạng c&aacute;c loại h&igrave;nh hợp t&aacute;c kinh doanh với đối t&aacute;c quốc tế;</li>\r\n</ul>\r\n</div>\r\n<quillbot-extension-portal></quillbot-extension-portal><quillbot-extension-portal></quillbot-extension-portal>',
 'exchange': 'HOSE',
 'shortName': 'VINAMILK',
 'industryID': 218,
 'industryIDv2': '3577',
 'industryIdLevel2': '3500',
 'industryIdLevel4': '3577',
 'industry': 'Thực phẩm và đồ uống',
 'industryEn': 'Food & Beverage',
 'establishedYear': '2003',
 'noEmployees': 9663,
 'noShareholders': 0,
 'foreignPercent': 0.529,
 'website': 'https://www.vinamilk.com.vn',
 'stockRating': 2.8,
 'deltaInWeek': 0.001,
 'deltaInMonth': 0.022,
 'deltaInYear': -0.187,
 'outstandingShare': 2090.0,
 'issueShare': 2090.0,
 'companyType': 'CT'}