Administrator
3 天以前 ad3cc1a24c4b413bae3069cc6d1c2a1923540ce3
trade/trade_juejin.py
@@ -66,12 +66,12 @@
def order_volume(code, price, count):
    if not constant.TRADE_ENABLE:
        return
    if not tool.is_shsz_code(code):
    if not tool.is_can_buy_code(code):
        raise Exception("只支持00开头与60开头的代码下单")
    code_str = code
    if code[0:2] == '00':
    if tool.is_sz_code(code):
        code_str = f"SZSE.{code}"
    elif code[0:2] == '60':
    elif tool.is_sh_code(code):
        code_str = f"SHSE.{code}"
    start_time = time.time()
    results = gmapi.order_volume(code_str, count, gmapi.OrderSide_Buy, gmapi.OrderType_Limit, gmapi.PositionEffect_Open,