Skip to content

Short Stock Source

First, you need login.

Get Short Stock Source

In

contracts = [api.Contracts.Stocks['2330'],api.Contracts.Stocks['2317']]
short_stock_sources = api.short_stock_sources(contracts)
short_stock_sources

Out

[ShortStockSource(code='2330', short_stock_source=12678, ts=1589797829000000000), ShortStockSource(code='2317', short_stock_source=20093, ts=1589797829000000000)]

Short Stock Source to DataFrame

In

contracts = [api.Contracts.Stocks['2330'],api.Contracts.Stocks['2317']]
short_stock_sources = api.short_stock_sources(contracts)
df = pd.DataFrame(short_stock_sources)
df.ts = pd.to_datetime(df.ts)
df

Out

code short_stock_source ts
0 2330 12678 2020-05-18 10:30:29
1 2317 20093 2020-05-18 10:30:29

Attributes:

code (str): Contract id.
short_stock_source (float): short_stock_source
ts (int): TimeStamp.