Skip to content

Commit

Permalink
Fix bug in submit_order function (both bfxapi.rest and bfxapi.websock…
Browse files Browse the repository at this point in the history
…et).
  • Loading branch information
Davi0kProgramsThings committed Apr 3, 2024
1 parent 8814d18 commit 6405f23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bfxapi/rest/_interfaces/rest_auth_endpoints.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from decimal import Decimal
from typing import Dict, List, Literal, Optional, Tuple, Union
from typing import Any, Dict, List, Literal, Optional, Tuple, Union

from bfxapi.rest._interface import Interface
from bfxapi.types import (
Expand Down Expand Up @@ -98,6 +98,7 @@ def submit_order(
cid: Optional[int] = None,
flags: Optional[int] = None,
tif: Optional[str] = None,
meta: Optional[Dict[str, Any]] = None,
) -> Notification[Order]:
body = {
"type": type,
Expand All @@ -112,6 +113,7 @@ def submit_order(
"cid": cid,
"flags": flags,
"tif": tif,
"meta": meta,
}

return _Notification[Order](serializers.Order).parse(
Expand Down
4 changes: 3 additions & 1 deletion bfxapi/websocket/_client/bfx_websocket_inputs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from decimal import Decimal
from typing import Any, Awaitable, Callable, List, Optional, Tuple, Union
from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Union

_Handler = Callable[[str, Any], Awaitable[None]]

Expand All @@ -23,6 +23,7 @@ async def submit_order(
cid: Optional[int] = None,
flags: Optional[int] = None,
tif: Optional[str] = None,
meta: Optional[Dict[str, Any]] = None,
) -> None:
await self.__handle_websocket_input(
"on",
Expand All @@ -39,6 +40,7 @@ async def submit_order(
"cid": cid,
"flags": flags,
"tif": tif,
"meta": meta,
},
)

Expand Down

0 comments on commit 6405f23

Please sign in to comment.