amor71 / LiuAlgoTrader

Framework for algorithmic trading

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test issue

github-actions opened this issue · comments

test issue

# TODO test issue

            await strategy.sell_callback(symbol, filled_avg_price, filled_qty)


# TODO test issue
async def update_partially_filled_order(
    symbol: str,
    strategy: Strategy,
    filled_qty: float,
    side: Order.FillSide,
    filled_avg_price: float,
    trade_fee: float,
) -> None:
    new_qty: float = filled_qty - abs(
        trading_data.partial_fills.get(symbol, 0.0)
    )
    if side == Order.FillSide.sell:
        filled_qty *= -1

5f7e48b318350a9d51936cd39a9d31b597a2af00