Skip to content

Commit

Permalink
v2 client fixes (#225)
Browse files Browse the repository at this point in the history
- Update testnet indexer URL
- Fix long term cancel order example
- Add missing order statuses
  • Loading branch information
samtin0x authored Oct 18, 2024
1 parent aae13ea commit 9b3a6f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions v4-client-py-v2/dydx_v4_client/indexer/rest/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class OrderStatus:
FILLED = "FILLED"
BEST_EFFORT_CANCELED = "BEST_EFFORT_CANCELED"
CANCELED = "CANCELED"
UNTRIGGERED = "UNTRIGGERED"
PENDING = "PENDING"


class TickerType:
Expand Down
2 changes: 1 addition & 1 deletion v4-client-py-v2/dydx_v4_client/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def make_config(
make_testnet = partial(
make_secure,
testnet_node,
rest_indexer="https://dydx-testnet.imperator.co",
rest_indexer="https://indexer.v4testnet.dydx.exchange",
websocket_indexer="wss://indexer.v4testnet.dydx.exchange/v4/ws",
node_url="test-dydx-grpc.kingnodes.com",
)
Expand Down
4 changes: 3 additions & 1 deletion v4-client-py-v2/examples/long_term_order_cancel_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from dydx_v4_client.node.client import NodeClient
from dydx_v4_client.node.market import Market, since_now
from dydx_v4_client.wallet import Wallet
from dydx_v4_client.indexer.rest.constants import OrderType
from tests.conftest import DYDX_TEST_MNEMONIC, TEST_ADDRESS

MARKET_ID = "ETH-USD"
Expand Down Expand Up @@ -44,8 +45,9 @@ async def test():
),
)
print(place)
# FIXME(piwonskp): Remove

wallet.sequence += 1
time.sleep(5)

time.sleep(5)

Expand Down

0 comments on commit 9b3a6f6

Please sign in to comment.