mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
增加指数代码的判断
This commit is contained in:
@@ -292,7 +292,7 @@ func IsETF(code string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsIndex 是否是指数,sh000001,sz399001
|
||||
// IsIndex 是否是指数,sh000001,sz399001,bj899100
|
||||
func IsIndex(code string) bool {
|
||||
if len(code) != 8 {
|
||||
return false
|
||||
@@ -302,6 +302,7 @@ func IsIndex(code string) bool {
|
||||
case code[0:2] == ExchangeSH.String() && code[2:5] == "000":
|
||||
return true
|
||||
case code[0:2] == ExchangeSZ.String() && code[2:5] == "399":
|
||||
case code[0:2] == ExchangeBJ.String() && code[2:5] == "899":
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user