INNER CODE UNIT · Python

msg2log

DogsTailFarmer/martin-binance · martin_binance/backup.py:56

def msg2log(msg: str, log_level=logging.INFO) -> None:
    if MODE in ('T', 'TC') or log_level >= logging.ERROR:
        logger.log(log_level, msg)


class PydanticOrderSchema(BaseModel):
    model_config = ConfigDict(from_attributes=True)
    id: int
    buy: bool
    amount: DecimalStr
    order_type: str
    received_amount: DecimalStr
    price: DecimalStr
    remaining_amount: DecimalStr
    timestamp: int


def serialize_orders_to_json(orders_manager: Orders) -> Dict[str, Any]:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…