mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Remove arrow from models.py
This commit is contained in:
parent
59cfbbee17
commit
37c8fd6ad7
|
@ -6,7 +6,6 @@ from datetime import datetime, timezone
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from typing import Any, Dict, List, Optional
|
from typing import Any, Dict, List, Optional
|
||||||
|
|
||||||
import arrow
|
|
||||||
from sqlalchemy import (Boolean, Column, DateTime, Float, ForeignKey, Integer, String,
|
from sqlalchemy import (Boolean, Column, DateTime, Float, ForeignKey, Integer, String,
|
||||||
create_engine, desc, func, inspect)
|
create_engine, desc, func, inspect)
|
||||||
from sqlalchemy.exc import NoSuchModuleError
|
from sqlalchemy.exc import NoSuchModuleError
|
||||||
|
@ -160,8 +159,8 @@ class Order(_DECL_BASE):
|
||||||
if self.status in ('closed', 'canceled', 'cancelled'):
|
if self.status in ('closed', 'canceled', 'cancelled'):
|
||||||
self.ft_is_open = False
|
self.ft_is_open = False
|
||||||
if order.get('filled', 0) > 0:
|
if order.get('filled', 0) > 0:
|
||||||
self.order_filled_date = arrow.utcnow().datetime
|
self.order_filled_date = datetime.now(timezone.utc)
|
||||||
self.order_update_date = arrow.utcnow().datetime
|
self.order_update_date = datetime.now(timezone.utc)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def update_orders(orders: List['Order'], order: Dict[str, Any]):
|
def update_orders(orders: List['Order'], order: Dict[str, Any]):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user