Skip to content

Commit

Permalink
Update basic adder side enums (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
samtin0x authored Aug 14, 2024
1 parent e2633f0 commit a124005
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions v4-client-py-v2/examples/basic_adder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging
from decimal import Decimal

from v4_proto.dydxprotocol.clob.order_pb2 import OrderId
from v4_proto.dydxprotocol.clob.order_pb2 import OrderId, Order

from dydx_v4_client.indexer.rest.constants import OrderSide, OrderTimeInForce
from dydx_v4_client.indexer.socket.websocket import (
Expand Down Expand Up @@ -176,7 +176,7 @@ async def place_order(self, side: OrderSide, size: float, px: Decimal):
current_block = await self.node_client.latest_block_height()
new_order = order(
order_id=oid,
side=side,
side=Order.SIDE_BUY if side == OrderSide.BUY else Order.SIDE_SELL,
quantums=(quantums // step_base_quantums) * step_base_quantums,
subticks=(subticks // subticks_per_tick) * subticks_per_tick,
time_in_force=time_in_force,
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.0.0"
version = "1.0.1"
description = ""
authors = ["Piotr Piwoński <piwonskp@gmail.com>"]
readme = "README.md"
Expand Down

0 comments on commit a124005

Please sign in to comment.