diff --git a/redis/commands/core.py b/redis/commands/core.py
index <HASH>..<HASH> 100644
--- a/redis/commands/core.py
+++ b/redis/commands/core.py
@@ -3842,7 +3842,7 @@ class StreamCommands(CommandsProtocol):
     def xtrim(
         self,
         name: KeyT,
-        maxlen: Union[int, None],
+        maxlen: Union[int, None] = None,
         approximate: bool = True,
         minid: Union[StreamIdT, None] = None,
         limit: Union[int, None] = None,
@@ -3863,6 +3863,9 @@ class StreamCommands(CommandsProtocol):
         if maxlen is not None and minid is not None:
             raise DataError("Only one of ``maxlen`` or ``minid`` " "may be specified")
 
+        if maxlen is None and minid is None:
+            raise DataError("One of ``maxlen`` or ``minid`` must be specified")
+
         if maxlen is not None:
             pieces.append(b"MAXLEN")
         if minid is not None:
Add default None for maxlen at xtrim command (#<I>)

* Add default None for maxlen at xtrim command



* Fix linter