How to use the zvt.domain.common.StoreCategory function in zvt

To help you get started, we’ve selected a few zvt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zvtvz / zvt / zvt / domain / common.py View on Github external
coin_1wk_kdata = 'coin_1wk_kdata'


provider_map_category = {
    Provider.EASTMONEY: [StoreCategory.meta,
                         StoreCategory.finance,
                         StoreCategory.dividend_financing,
                         StoreCategory.holder,
                         StoreCategory.trading],

    Provider.SINA: [StoreCategory.meta,
                    StoreCategory.index_1d_kdata,
                    StoreCategory.stock_1d_kdata,
                    StoreCategory.money_flow],

    Provider.NETEASE: [StoreCategory.stock_1d_kdata,
                       StoreCategory.index_1d_kdata],

    Provider.EXCHANGE: [StoreCategory.meta, StoreCategory.macro],

    Provider.ZVT: [StoreCategory.business],

    # TODO:would add other data from joinquant
    Provider.JOINQUANT: [StoreCategory.stock_1m_kdata,
                         StoreCategory.stock_5m_kdata,
                         StoreCategory.stock_15m_kdata,
                         StoreCategory.stock_1h_kdata,
                         StoreCategory.stock_1d_kdata,
                         StoreCategory.stock_1wk_kdata, ],

    Provider.CCXT: [StoreCategory.coin_meta,
                    StoreCategory.coin_tick_kdata,
github zvtvz / zvt / zvt / domain / common.py View on Github external
Provider.EXCHANGE: [StoreCategory.meta, StoreCategory.macro],

    Provider.ZVT: [StoreCategory.business],

    # TODO:would add other data from joinquant
    Provider.JOINQUANT: [StoreCategory.stock_1m_kdata,
                         StoreCategory.stock_5m_kdata,
                         StoreCategory.stock_15m_kdata,
                         StoreCategory.stock_1h_kdata,
                         StoreCategory.stock_1d_kdata,
                         StoreCategory.stock_1wk_kdata, ],

    Provider.CCXT: [StoreCategory.coin_meta,
                    StoreCategory.coin_tick_kdata,
                    StoreCategory.coin_1m_kdata,
                    StoreCategory.coin_5m_kdata,
                    StoreCategory.coin_15m_kdata,
                    StoreCategory.coin_1h_kdata,
                    StoreCategory.coin_1d_kdata,
                    StoreCategory.coin_1wk_kdata],
}

category_map_db = {
    StoreCategory.meta: MetaBase,
    StoreCategory.stock_1m_kdata: Stock1MKdataBase,
    StoreCategory.stock_5m_kdata: Stock5MKdataBase,
    StoreCategory.stock_15m_kdata: Stock15MKdataBase,
    StoreCategory.stock_1h_kdata: Stock1HKdataBase,
    StoreCategory.stock_1d_kdata: Stock1DKdataBase,
    StoreCategory.stock_1wk_kdata: Stock1WKKdataBase,
github zvtvz / zvt / zvt / domain / common.py View on Github external
provider_map_category = {
    Provider.EASTMONEY: [StoreCategory.meta,
                         StoreCategory.finance,
                         StoreCategory.dividend_financing,
                         StoreCategory.holder,
                         StoreCategory.trading],

    Provider.SINA: [StoreCategory.meta,
                    StoreCategory.index_1d_kdata,
                    StoreCategory.stock_1d_kdata,
                    StoreCategory.money_flow],

    Provider.NETEASE: [StoreCategory.stock_1d_kdata,
                       StoreCategory.index_1d_kdata],

    Provider.EXCHANGE: [StoreCategory.meta, StoreCategory.macro],

    Provider.ZVT: [StoreCategory.business],

    # TODO:would add other data from joinquant
    Provider.JOINQUANT: [StoreCategory.stock_1m_kdata,
                         StoreCategory.stock_5m_kdata,
                         StoreCategory.stock_15m_kdata,
                         StoreCategory.stock_1h_kdata,
                         StoreCategory.stock_1d_kdata,
                         StoreCategory.stock_1wk_kdata, ],

    Provider.CCXT: [StoreCategory.coin_meta,
                    StoreCategory.coin_tick_kdata,
                    StoreCategory.coin_1m_kdata,
                    StoreCategory.coin_5m_kdata,
                    StoreCategory.coin_15m_kdata,
github zvtvz / zvt / zvt / domain / common.py View on Github external
Provider.EXCHANGE: [StoreCategory.meta, StoreCategory.macro],

    Provider.ZVT: [StoreCategory.business],

    # TODO:would add other data from joinquant
    Provider.JOINQUANT: [StoreCategory.stock_1m_kdata,
                         StoreCategory.stock_5m_kdata,
                         StoreCategory.stock_15m_kdata,
                         StoreCategory.stock_1h_kdata,
                         StoreCategory.stock_1d_kdata,
                         StoreCategory.stock_1wk_kdata, ],

    Provider.CCXT: [StoreCategory.coin_meta,
                    StoreCategory.coin_tick_kdata,
                    StoreCategory.coin_1m_kdata,
                    StoreCategory.coin_5m_kdata,
                    StoreCategory.coin_15m_kdata,
                    StoreCategory.coin_1h_kdata,
                    StoreCategory.coin_1d_kdata,
                    StoreCategory.coin_1wk_kdata],
}

category_map_db = {
    StoreCategory.meta: MetaBase,
    StoreCategory.stock_1m_kdata: Stock1MKdataBase,
    StoreCategory.stock_5m_kdata: Stock5MKdataBase,
    StoreCategory.stock_15m_kdata: Stock15MKdataBase,
    StoreCategory.stock_1h_kdata: Stock1HKdataBase,
    StoreCategory.stock_1d_kdata: Stock1DKdataBase,
    StoreCategory.stock_1wk_kdata: Stock1WKKdataBase,

    StoreCategory.index_1d_kdata: Index1DKdataBase,
github zvtvz / zvt / zvt / domain / common.py View on Github external
StoreCategory.finance: FinanceBase,
    StoreCategory.dividend_financing: DividendFinancingBase,
    StoreCategory.holder: HolderBase,
    StoreCategory.trading: TradingBase,
    StoreCategory.money_flow: MoneyFlowBase,
    StoreCategory.macro: MacroBase,
    StoreCategory.business: BusinessBase,

    StoreCategory.coin_meta: CoinMetaBase,
    StoreCategory.coin_tick_kdata: CoinTickKdataBase,
    StoreCategory.coin_1m_kdata: Coin1MKdataBase,
    StoreCategory.coin_5m_kdata: Coin5MKdataBase,
    StoreCategory.coin_15m_kdata: Coin15MKdataBase,
    StoreCategory.coin_1h_kdata: Coin1HKdataBase,
    StoreCategory.coin_1d_kdata: Coin1DKdataBase,
    StoreCategory.coin_1wk_kdata: Coin1WKKdataBase
}


def get_store_category(data_schema):
    for category, base in category_map_db.items():
        if isinstance(data_schema(), base):
            return category


class SecurityType(enum.Enum):
    stock = 'stock'
    index = 'index'
    coin = 'coin'
    future = 'future'
github zvtvz / zvt / zvt / domain / common.py View on Github external
provider_map_category = {
    Provider.EASTMONEY: [StoreCategory.meta,
                         StoreCategory.finance,
                         StoreCategory.dividend_financing,
                         StoreCategory.holder,
                         StoreCategory.trading],

    Provider.SINA: [StoreCategory.meta,
                    StoreCategory.index_1d_kdata,
                    StoreCategory.stock_1d_kdata,
                    StoreCategory.money_flow],

    Provider.NETEASE: [StoreCategory.stock_1d_kdata,
                       StoreCategory.index_1d_kdata],

    Provider.EXCHANGE: [StoreCategory.meta, StoreCategory.macro],

    Provider.ZVT: [StoreCategory.business],

    # TODO:would add other data from joinquant
    Provider.JOINQUANT: [StoreCategory.stock_1m_kdata,
                         StoreCategory.stock_5m_kdata,
                         StoreCategory.stock_15m_kdata,
                         StoreCategory.stock_1h_kdata,
                         StoreCategory.stock_1d_kdata,
                         StoreCategory.stock_1wk_kdata, ],

    Provider.CCXT: [StoreCategory.coin_meta,
                    StoreCategory.coin_tick_kdata,
                    StoreCategory.coin_1m_kdata,
github zvtvz / zvt / zvt / domain / common.py View on Github external
StoreCategory.index_1d_kdata],

    Provider.EXCHANGE: [StoreCategory.meta, StoreCategory.macro],

    Provider.ZVT: [StoreCategory.business],

    # TODO:would add other data from joinquant
    Provider.JOINQUANT: [StoreCategory.stock_1m_kdata,
                         StoreCategory.stock_5m_kdata,
                         StoreCategory.stock_15m_kdata,
                         StoreCategory.stock_1h_kdata,
                         StoreCategory.stock_1d_kdata,
                         StoreCategory.stock_1wk_kdata, ],

    Provider.CCXT: [StoreCategory.coin_meta,
                    StoreCategory.coin_tick_kdata,
                    StoreCategory.coin_1m_kdata,
                    StoreCategory.coin_5m_kdata,
                    StoreCategory.coin_15m_kdata,
                    StoreCategory.coin_1h_kdata,
                    StoreCategory.coin_1d_kdata,
                    StoreCategory.coin_1wk_kdata],
}

category_map_db = {
    StoreCategory.meta: MetaBase,
    StoreCategory.stock_1m_kdata: Stock1MKdataBase,
    StoreCategory.stock_5m_kdata: Stock5MKdataBase,
    StoreCategory.stock_15m_kdata: Stock15MKdataBase,
    StoreCategory.stock_1h_kdata: Stock1HKdataBase,
    StoreCategory.stock_1d_kdata: Stock1DKdataBase,
    StoreCategory.stock_1wk_kdata: Stock1WKKdataBase,
github zvtvz / zvt / zvt / domain / common.py View on Github external
StoreCategory.money_flow],

    Provider.NETEASE: [StoreCategory.stock_1d_kdata,
                       StoreCategory.index_1d_kdata],

    Provider.EXCHANGE: [StoreCategory.meta, StoreCategory.macro],

    Provider.ZVT: [StoreCategory.business],

    # TODO:would add other data from joinquant
    Provider.JOINQUANT: [StoreCategory.stock_1m_kdata,
                         StoreCategory.stock_5m_kdata,
                         StoreCategory.stock_15m_kdata,
                         StoreCategory.stock_1h_kdata,
                         StoreCategory.stock_1d_kdata,
                         StoreCategory.stock_1wk_kdata, ],

    Provider.CCXT: [StoreCategory.coin_meta,
                    StoreCategory.coin_tick_kdata,
                    StoreCategory.coin_1m_kdata,
                    StoreCategory.coin_5m_kdata,
                    StoreCategory.coin_15m_kdata,
                    StoreCategory.coin_1h_kdata,
                    StoreCategory.coin_1d_kdata,
                    StoreCategory.coin_1wk_kdata],
}

category_map_db = {
    StoreCategory.meta: MetaBase,
    StoreCategory.stock_1m_kdata: Stock1MKdataBase,
    StoreCategory.stock_5m_kdata: Stock5MKdataBase,
    StoreCategory.stock_15m_kdata: Stock15MKdataBase,
github zvtvz / zvt / zvt / domain / common.py View on Github external
macro = 'macro'
    business = 'business'

    coin_meta = 'coin_meta'
    coin_tick_kdata = 'coin_tick_kdata'
    coin_1m_kdata = 'coin_1m_kdata'
    coin_5m_kdata = 'coin_5m_kdata'
    coin_15m_kdata = 'coin_15m_kdata'
    coin_1h_kdata = 'coin_1h_kdata'
    coin_1d_kdata = 'coin_1d_kdata'
    coin_1wk_kdata = 'coin_1wk_kdata'


provider_map_category = {
    Provider.EASTMONEY: [StoreCategory.meta,
                         StoreCategory.finance,
                         StoreCategory.dividend_financing,
                         StoreCategory.holder,
                         StoreCategory.trading],

    Provider.SINA: [StoreCategory.meta,
                    StoreCategory.index_1d_kdata,
                    StoreCategory.stock_1d_kdata,
                    StoreCategory.money_flow],

    Provider.NETEASE: [StoreCategory.stock_1d_kdata,
                       StoreCategory.index_1d_kdata],

    Provider.EXCHANGE: [StoreCategory.meta, StoreCategory.macro],

    Provider.ZVT: [StoreCategory.business],
github zvtvz / zvt / zvt / domain / common.py View on Github external
Provider.SINA: [StoreCategory.meta,
                    StoreCategory.index_1d_kdata,
                    StoreCategory.stock_1d_kdata,
                    StoreCategory.money_flow],

    Provider.NETEASE: [StoreCategory.stock_1d_kdata,
                       StoreCategory.index_1d_kdata],

    Provider.EXCHANGE: [StoreCategory.meta, StoreCategory.macro],

    Provider.ZVT: [StoreCategory.business],

    # TODO:would add other data from joinquant
    Provider.JOINQUANT: [StoreCategory.stock_1m_kdata,
                         StoreCategory.stock_5m_kdata,
                         StoreCategory.stock_15m_kdata,
                         StoreCategory.stock_1h_kdata,
                         StoreCategory.stock_1d_kdata,
                         StoreCategory.stock_1wk_kdata, ],

    Provider.CCXT: [StoreCategory.coin_meta,
                    StoreCategory.coin_tick_kdata,
                    StoreCategory.coin_1m_kdata,
                    StoreCategory.coin_5m_kdata,
                    StoreCategory.coin_15m_kdata,
                    StoreCategory.coin_1h_kdata,
                    StoreCategory.coin_1d_kdata,
                    StoreCategory.coin_1wk_kdata],
}

category_map_db = {
    StoreCategory.meta: MetaBase,