INNER CODE UNIT · Python

position_close_by_id

ejtraderLabs/ejtraderCT · app.py:133

async def position_close_by_id(id_model: IdModel):
    api.positionCloseById(id_model.id)
    return {"message": "Position closed"}


@app.post("/cancel_all")
async def cancel_all():
    api.cancel_all()
    return {"message": "All orders cancelled"}


@app.post("/close_all")
async def close_all():
    api.close_all()
    return {"message": "All positions closed"}


@app.post("/positionModify")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…