Skip to content

Commit ee71838

Browse files
authored
feat: set pyv2 client metadata (#271)
1 parent b859d59 commit ee71838

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

v4-client-py-deprecated/v4_client_py/clients/modules/post.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
from ...chain.aerial.client.utils import prepare_and_broadcast_basic_transaction
1616

1717

18+
PY_V1_CLIENT_ID = 1
19+
20+
1821
class Post:
1922
def __init__(
2023
self,
@@ -134,7 +137,7 @@ def place_order(
134137
subticks=subticks,
135138
time_in_force=time_in_force,
136139
reduce_only=reduce_only,
137-
client_metadata=client_metadata,
140+
client_metadata=PY_V1_CLIENT_ID,
138141
condition_type=condition_type,
139142
conditional_order_trigger_subticks=conditional_order_trigger_subticks,
140143
)

v4-client-py-v2/dydx_v4_client/node/message.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
from v4_proto.dydxprotocol.subaccounts.subaccount_pb2 import SubaccountId
1414
from v4_proto.dydxprotocol.clob.tx_pb2 import MsgBatchCancel, OrderBatch
1515

16+
PY_V2_CLIENT_ID = 2
17+
1618

1719
def order(
1820
order_id: OrderId,
@@ -36,7 +38,7 @@ def order(
3638
good_til_block_time=good_til_block_time,
3739
time_in_force=time_in_force,
3840
reduce_only=reduce_only,
39-
client_metadata=client_metadata,
41+
client_metadata=PY_V2_CLIENT_ID,
4042
condition_type=condition_type,
4143
conditional_order_trigger_subticks=conditional_order_trigger_subticks,
4244
)

v4-client-py-v2/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "dydx-v4-client"
3-
version = "1.1.0"
3+
version = "1.1.1"
44
description = ""
55
authors = [
66
"Saul Martin <[email protected]>",

v4-client-py-v2/tests/test_v4_proto.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
)
1414
from tests.conftest import TEST_ADDRESS
1515

16-
SERIALIZED_PLACE_ORDER = b"\nF\n1\n-\n+dydx14zzueazeh0hj67cghhf9jypslcf9sh2n5k6art\x18@\x10\x01\x18\x80\xad\xe2\x04 \x80\xa0\xbe\x81\x95\x015\t\x9cYf"
16+
SERIALIZED_PLACE_ORDER = b"\nH\n1\n-\n+dydx14zzueazeh0hj67cghhf9jypslcf9sh2n5k6art\x18@\x10\x01\x18\x80\xad\xe2\x04 \x80\xa0\xbe\x81\x95\x015\t\x9cYfH\x02"
1717
SERIALIZED_CANCEL_ORDER = (
1818
b"\n1\n-\n+dydx14zzueazeh0hj67cghhf9jypslcf9sh2n5k6art\x18@\x1d\t\x9cYf"
1919
)

0 commit comments

Comments
 (0)