Skip to content

Commit eabae97

Browse files
Fix bug in submit_order function (both bfxapi.rest and bfxapi.websocket).
1 parent c80e80f commit eabae97

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

bfxapi/rest/_interfaces/rest_auth_endpoints.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from decimal import Decimal
2-
from typing import Dict, List, Literal, Optional, Tuple, Union
2+
from typing import Any, Dict, List, Literal, Optional, Tuple, Union
33

44
from bfxapi.rest._interface import Interface
55
from bfxapi.types import (
@@ -98,6 +98,7 @@ def submit_order(
9898
cid: Optional[int] = None,
9999
flags: Optional[int] = None,
100100
tif: Optional[str] = None,
101+
meta: Optional[Dict[str, Any]] = None,
101102
) -> Notification[Order]:
102103
body = {
103104
"type": type,
@@ -112,6 +113,7 @@ def submit_order(
112113
"cid": cid,
113114
"flags": flags,
114115
"tif": tif,
116+
"meta": meta,
115117
}
116118

117119
return _Notification[Order](serializers.Order).parse(

bfxapi/websocket/_client/bfx_websocket_inputs.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from decimal import Decimal
2-
from typing import Any, Awaitable, Callable, List, Optional, Tuple, Union
2+
from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Union
33

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

@@ -23,6 +23,7 @@ async def submit_order(
2323
cid: Optional[int] = None,
2424
flags: Optional[int] = None,
2525
tif: Optional[str] = None,
26+
meta: Optional[Dict[str, Any]] = None,
2627
) -> None:
2728
await self.__handle_websocket_input(
2829
"on",
@@ -39,6 +40,7 @@ async def submit_order(
3940
"cid": cid,
4041
"flags": flags,
4142
"tif": tif,
43+
"meta": meta,
4244
},
4345
)
4446

0 commit comments

Comments
 (0)