diff --git a/poly_market_maker/clob_api.py b/poly_market_maker/clob_api.py index 63bae4b..65f08a4 100644 --- a/poly_market_maker/clob_api.py +++ b/poly_market_maker/clob_api.py @@ -1,7 +1,7 @@ import logging import sys import time -from py_clob_client.client import ClobClient, ApiCreds, OrderArgs, FilterParams +from py_clob_client.client import ClobClient, ApiCreds, OrderArgs, OpenOrderParams from py_clob_client.exceptions import PolyApiException from poly_market_maker.utils import randomize_default_price @@ -83,7 +83,7 @@ def get_orders(self, condition_id: str): self.logger.debug("Fetching open keeper orders from the API...") start_time = time.time() try: - resp = self.client.get_orders(FilterParams(market=condition_id)) + resp = self.client.get_orders(OpenOrderParams(market=condition_id)) clob_requests_latency.labels(method="get_orders", status="ok").observe( (time.time() - start_time) ) diff --git a/requirements.txt b/requirements.txt index b3a7399..ed52fb8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,7 +30,7 @@ parsimonious==0.8.1 pluggy==1.0.0 protobuf==3.19.4 py==1.11.0 -py-clob-client>=0.13.3 +py-clob-client>=0.17.0 py-order-utils>=0.0.21 pycryptodome==3.14.1 pyparsing==3.0.7 diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..3d0fac2 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,11 @@ +# Testing + +## Setup +To be able to run tests, make sure you have run `install.sh` at least once. + +## Starting a Test Run +You can start a test run with the following commands from the root folder of this repo +``` +source .venv/bin/activate +python3 -m unittest +```