dev 6
This commit is contained in:
22
py-client/strategy/ipo/boot.py
Normal file
22
py-client/strategy/ipo/boot.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from sdk import Client
|
||||
import config
|
||||
|
||||
def AutoBuyIpo() -> None:
|
||||
client = Client(
|
||||
config.global_config.qmt_base_url,
|
||||
config.global_config.qmt_token,
|
||||
config.HTTP_TIMEOUT,
|
||||
)
|
||||
|
||||
result = client.ipo_data("STOCK")
|
||||
for stock in result:
|
||||
ipo_price = result[stock]['issuePrice'] # 发行价
|
||||
maxPurchaseNum = result[stock]['maxPurchaseNum'] # 可申购额度
|
||||
client.passorder(
|
||||
op_type=23,
|
||||
stock=stock,
|
||||
volume=maxPurchaseNum,
|
||||
pr_type=11,
|
||||
price=ipo_price,
|
||||
strategy_name="新股申购",
|
||||
)
|
||||
Reference in New Issue
Block a user