Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set pyv2 client metadata #271

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
from ...chain.aerial.client.utils import prepare_and_broadcast_basic_transaction


PY_V1_CLIENT_ID = 1


class Post:
def __init__(
self,
Expand Down Expand Up @@ -134,7 +137,7 @@ def place_order(
subticks=subticks,
time_in_force=time_in_force,
reduce_only=reduce_only,
client_metadata=client_metadata,
client_metadata=PY_V1_CLIENT_ID,
condition_type=condition_type,
conditional_order_trigger_subticks=conditional_order_trigger_subticks,
)
Expand Down
4 changes: 3 additions & 1 deletion v4-client-py-v2/dydx_v4_client/node/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
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,
Expand All @@ -36,7 +38,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,
)
Expand Down
2 changes: 1 addition & 1 deletion v4-client-py-v2/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dydx-v4-client"
version = "1.1.0"
version = "1.1.1"
description = ""
authors = [
"Saul Martin <saulmartin1@pm.me>",
Expand Down
2 changes: 1 addition & 1 deletion v4-client-py-v2/tests/test_v4_proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)
from tests.conftest import TEST_ADDRESS

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"
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"
SERIALIZED_CANCEL_ORDER = (
b"\n1\n-\n+dydx14zzueazeh0hj67cghhf9jypslcf9sh2n5k6art\x18@\x1d\t\x9cYf"
)
Expand Down
Loading