or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

company-info.mddata-visualization.mdfinancial-statements.mdindex.mdmain-client.mdmarket-listings.mdmutual-funds.mdquote-data.mdstock-screening.mdtrading-analytics.md

market-listings.mddocs/

0

# Market Listings

1

2

The Listing class provides access to securities listing data including symbol directories, industry classifications, exchange groupings, and various market segments for Vietnamese and international markets.

3

4

## Capabilities

5

6

### Listing Class

7

8

Adapter for securities listing data with support for multiple classification systems and market segments.

9

10

```python { .api }

11

class Listing:

12

"""

13

Listing data adapter for securities classification and directories.

14

15

Supported sources: VCI, MSN

16

"""

17

18

def __init__(self, source: str = "vci", random_agent: bool = False, show_log: bool = False):

19

"""

20

Initialize Listing data adapter.

21

22

Args:

23

source (str): Data source ("vci", "msn"), defaults to "vci"

24

random_agent (bool): Use random user agent, defaults to False

25

show_log (bool): Enable logging, defaults to False

26

"""

27

```

28

29

### Symbol Directory

30

31

Comprehensive symbol listings with filtering capabilities for different security types.

32

33

```python { .api }

34

def all_symbols(self, *args, **kwargs) -> pd.DataFrame:

35

"""

36

Get all available symbols filtered to STOCK type.

37

38

Returns:

39

pd.DataFrame: Symbol data including:

40

- symbol: Trading symbol

41

- company_name: Company name

42

- exchange: Stock exchange (HOSE, HNX, UPCOM)

43

- industry: Industry classification

44

- sector: Business sector

45

- market_cap: Market capitalization

46

- listing_date: Stock listing date

47

"""

48

49

def symbols_by_industries(self, *args, **kwargs) -> pd.DataFrame:

50

"""

51

Get symbols grouped by ICB industry classifications.

52

53

Returns:

54

pd.DataFrame: Symbols organized by industry with ICB codes

55

"""

56

57

def symbols_by_exchange(self, *args, **kwargs) -> pd.DataFrame:

58

"""

59

Get symbols organized by exchange/board.

60

61

Returns:

62

pd.DataFrame: Symbols grouped by HOSE, HNX, UPCOM exchanges

63

"""

64

65

def industries_icb(self, *args, **kwargs) -> pd.DataFrame:

66

"""

67

Get ICB code hierarchy and industry mapping.

68

69

Returns:

70

pd.DataFrame: ICB industry classification structure

71

"""

72

73

def symbols_by_group(self, *args, **kwargs) -> pd.DataFrame:

74

"""

75

Get symbols by predefined market groups.

76

77

Common parameters:

78

group (str): Group name ("VN30", "HNX30", "CW", "FU_INDEX", "FU_BOND", "BOND")

79

80

Returns:

81

pd.DataFrame: Symbols in specified market group

82

"""

83

```

84

85

### Specialized Market Segments

86

87

Convenience methods for accessing specific market segments and security types.

88

89

```python { .api }

90

def all_future_indices(self, **kwargs) -> pd.DataFrame:

91

"""

92

Get all futures indices (group='FU_INDEX').

93

94

Returns:

95

pd.DataFrame: Futures indices symbols and details

96

"""

97

98

def all_government_bonds(self, **kwargs) -> pd.DataFrame:

99

"""

100

Get all government bonds (group='FU_BOND').

101

102

Returns:

103

pd.DataFrame: Government bond symbols and details

104

"""

105

106

def all_covered_warrant(self, **kwargs) -> pd.DataFrame:

107

"""

108

Get all covered warrants (group='CW').

109

110

Returns:

111

pd.DataFrame: Covered warrant symbols and details

112

"""

113

114

def all_bonds(self, **kwargs) -> pd.DataFrame:

115

"""

116

Get all bonds (group='BOND').

117

118

Returns:

119

pd.DataFrame: Bond symbols and details

120

"""

121

```

122

123

## Usage Examples

124

125

```python

126

from vnstock import Listing

127

128

# Initialize listing adapter

129

listing = Listing(source="vci")

130

131

# Get all stock symbols

132

all_stocks = listing.all_symbols()

133

134

# Get symbols by industry

135

tech_stocks = listing.symbols_by_industries()

136

137

# Get VN30 index components

138

vn30_stocks = listing.symbols_by_group(group="VN30")

139

140

# Get covered warrants

141

covered_warrants = listing.all_covered_warrant()

142

143

# Get government bonds

144

gov_bonds = listing.all_government_bonds()

145

```