From c1bd996e692806cd07686acb6003d18fa296ba77 Mon Sep 17 00:00:00 2001 From: samtin0x <40127309+samtin0x@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:04:09 +0100 Subject: [PATCH] feat: set pyv2 client metadata --- v4-client-py-v2/dydx_v4_client/node/message.py | 3 ++- v4-client-py-v2/tests/test_mutating_node_client.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/v4-client-py-v2/dydx_v4_client/node/message.py b/v4-client-py-v2/dydx_v4_client/node/message.py index aedd1186..2ccf1289 100644 --- a/v4-client-py-v2/dydx_v4_client/node/message.py +++ b/v4-client-py-v2/dydx_v4_client/node/message.py @@ -13,6 +13,7 @@ from v4_proto.dydxprotocol.subaccounts.subaccount_pb2 import SubaccountId from v4_proto.dydxprotocol.clob.tx_pb2 import MsgBatchCancel, OrderBatch +PY_V2_CLIENT_ID = 2 def order( order_id: OrderId, @@ -36,7 +37,7 @@ def order( good_til_block_time=good_til_block_time, time_in_force=time_in_force, reduce_only=reduce_only, - client_metadata=client_metadata, + client_metadata=PY_V2_CLIENT_ID, condition_type=condition_type, conditional_order_trigger_subticks=conditional_order_trigger_subticks, ) diff --git a/v4-client-py-v2/tests/test_mutating_node_client.py b/v4-client-py-v2/tests/test_mutating_node_client.py index 7c4ace5c..c2aa435f 100644 --- a/v4-client-py-v2/tests/test_mutating_node_client.py +++ b/v4-client-py-v2/tests/test_mutating_node_client.py @@ -80,6 +80,7 @@ async def test_order( placed = await node_client.place_order( wallet, test_order, + ) assert_successful_broadcast(placed)