매수만 취소
This commit is contained in:
@@ -2,7 +2,7 @@ import os
|
||||
import pandas as pd
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from OrderItem import OrderItem
|
||||
from OrderType import OrderType
|
||||
|
||||
class OrderChecker:
|
||||
|
||||
@@ -33,6 +33,7 @@ class OrderChecker:
|
||||
if len(orderList) > 0:
|
||||
# 만약 두시간 전 주문을 찾는다.
|
||||
orderNum_df = self.order_df.loc[self.order_df["datetime"] <= before_two_hour]
|
||||
orderNum_df = orderNum_df.loc[orderNum_df["type"] == OrderType.buy]
|
||||
orderNumSet = set(list(orderNum_df["orderNum"]))
|
||||
for item in orderList:
|
||||
if item.orderNum in orderNumSet:
|
||||
@@ -54,5 +55,5 @@ if __name__ == "__main__":
|
||||
a = a.append({"a": 2, "b": 3, "c": 0, "d": 3, "e": 9}, ignore_index=True)
|
||||
a = a.append({"a": 3, "b": 9, "c": 9, "d": 8, "e": 4}, ignore_index=True)
|
||||
|
||||
a = a.loc[a["c"] != 9]
|
||||
a = a.loc[a["b"] != 3]
|
||||
print(a.tail())
|
||||
Reference in New Issue
Block a user