22 lines
616 B
Python
22 lines
616 B
Python
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="新股申购",
|
|
) |