From df07bbc7a82afdf29abe8d9da99cdcbfc6f2da06 Mon Sep 17 00:00:00 2001 From: samtin0x <40127309+samtin0x@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:47:42 +0200 Subject: [PATCH] Update acknowledgements and code references (#180) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update acknowledgements and code references * Require Python 3.9 and newer (#183) * Increase delay and retries in account tests * Use dydx.exchange indexer for tests * Add information to install git hooks to the readme --------- Co-authored-by: Piotr Piwoński --- v4-client-py-v2/README.md | 21 ++-- .../indexer/socket/websocket.py | 2 +- v4-client-py-v2/dydx_v4_client/node/client.py | 2 +- v4-client-py-v2/poetry.lock | 111 +++++++++++++++--- v4-client-py-v2/pyproject.toml | 3 +- v4-client-py-v2/tests/conftest.py | 9 +- .../rest/modules/test_account_endpoints.py | 20 ++-- 7 files changed, 130 insertions(+), 38 deletions(-) diff --git a/v4-client-py-v2/README.md b/v4-client-py-v2/README.md index 40f0d504..27118ea9 100644 --- a/v4-client-py-v2/README.md +++ b/v4-client-py-v2/README.md @@ -15,7 +15,7 @@ Install from github: ```bash -pip install git+https://github.com/NethermindEth/dydx-v4-client +pip install git+https://github.com/dydxprotocol/v4-clients/blob/main/v4-client-py-v2 ``` ## Quickstart @@ -35,7 +35,7 @@ asyncio.run(main()) ### Node `NodeClient` allows to send transactions and fetch node state. E.g. you can deposit funds using the `deposit` method: -https://github.com/NethermindEth/dydx-v4-client/blob/f8be7bf9165fb052e831fcafb8086d14e5af13aa/examples/transfer_example_deposit.py#L1-L24 +https://github.com/dydxprotocol/v4-clients/blob/3330f67752d430f9e0a20b419da4dc9daf7f7be0/v4-client-py-v2/examples/transfer_example_deposit.py#L1-L24 **Note:** It's possible to create a read only node client which doesn't allow to send transactions: ```python @@ -65,7 +65,7 @@ async def test_account(): ### Websocket indexer Websocket indexer allows to subscribe to channels to obtain live updates: -https://github.com/NethermindEth/dydx-v4-client/blob/18eb769dde2a8691fc13445a34f46f0ecb266ec8/examples/websocket_example.py#L1-L24 +https://github.com/dydxprotocol/v4-clients/blob/3330f67752d430f9e0a20b419da4dc9daf7f7be0/v4-client-py-v2/examples/websocket_example.py#L1-L24 ### Networks @@ -121,7 +121,7 @@ indexer = IndexerClient("https://dydx-testnet.imperator.co") ``` ### Faucet Faucet allows to obtain usdc on testnet. To use it create `FaucetClient`: -https://github.com/NethermindEth/dydx-v4-client/blob/18eb769dde2a8691fc13445a34f46f0ecb266ec8/examples/faucet_endpoint.py#L1-L15 +https://github.com/dydxprotocol/v4-clients/blob/3330f67752d430f9e0a20b419da4dc9daf7f7be0/v4-client-py-v2/examples/faucet_endpoint.py#L1-L15 ### Placing order To place order first you have to build the order. @@ -247,6 +247,12 @@ The project employs [`poetry`](https://python-poetry.org/). To install dependenc poetry install ``` +### Preparing development environment +Install git hooks: +```bash +pre-commit install +``` + ### Testing To run tests use: @@ -255,8 +261,7 @@ poetry run pytest ``` ## Acknowledgements -Developed by: -- [Saul M.](https://github.com/samtin0x) -- [Piotr P.](https://github.com/piwonskp) -For more details, check out the [grant](https://www.dydxgrants.com/grants/python-trading-client). +Built by Nethermind: [@piwonskp](https://github.com/piwonskp), [@samtin0x](https://github.com/samtin0x), [@therustmonk](https://github.com/therustmonk) + +For more details about the grant see [link](https://www.dydxgrants.com/grants/python-trading-client). diff --git a/v4-client-py-v2/dydx_v4_client/indexer/socket/websocket.py b/v4-client-py-v2/dydx_v4_client/indexer/socket/websocket.py index b854fd9f..7179a51a 100644 --- a/v4-client-py-v2/dydx_v4_client/indexer/socket/websocket.py +++ b/v4-client-py-v2/dydx_v4_client/indexer/socket/websocket.py @@ -2,9 +2,9 @@ import ssl from dataclasses import dataclass, field from enum import Enum -from typing import Any, Callable, Optional, Self, Union import websocket +from typing_extensions import Any, Callable, Optional, Self, Union class CandlesResolution(Enum): diff --git a/v4-client-py-v2/dydx_v4_client/node/client.py b/v4-client-py-v2/dydx_v4_client/node/client.py index 791596a4..a610fbb5 100644 --- a/v4-client-py-v2/dydx_v4_client/node/client.py +++ b/v4-client-py-v2/dydx_v4_client/node/client.py @@ -1,8 +1,8 @@ from dataclasses import dataclass -from typing import List, Optional, Self import grpc from google.protobuf.message import Message +from typing_extensions import List, Optional, Self from v4_proto.cosmos.auth.v1beta1 import query_pb2_grpc as auth from v4_proto.cosmos.auth.v1beta1.auth_pb2 import BaseAccount from v4_proto.cosmos.auth.v1beta1.query_pb2 import QueryAccountRequest diff --git a/v4-client-py-v2/poetry.lock b/v4-client-py-v2/poetry.lock index d9a2df72..9f041064 100644 --- a/v4-client-py-v2/poetry.lock +++ b/v4-client-py-v2/poetry.lock @@ -12,8 +12,10 @@ files = [ ] [package.dependencies] +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" +typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} [package.extras] doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] @@ -31,6 +33,21 @@ files = [ {file = "asn1crypto-1.5.1.tar.gz", hash = "sha256:13ae38502be632115abf8a24cbe5f4da52e3b5231990aff31123c805306ccb9c"}, ] +[[package]] +name = "backports-tarfile" +version = "1.2.0" +description = "Backport of CPython tarfile module" +optional = false +python-versions = ">=3.8" +files = [ + {file = "backports.tarfile-1.2.0-py3-none-any.whl", hash = "sha256:77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34"}, + {file = "backports_tarfile-1.2.0.tar.gz", hash = "sha256:d75e02c268746e1b8144c278978b6e98e85de6ad16f8e4b0844a154557eca991"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["jaraco.test", "pytest (!=8.0.*)", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)"] + [[package]] name = "bip-utils" version = "2.9.3" @@ -44,11 +61,23 @@ files = [ [package.dependencies] cbor2 = ">=5.1.2,<6.0.0" -coincurve = {version = ">=19.0.1", markers = "python_version >= \"3.12\""} +coincurve = [ + {version = ">=15.0.1", markers = "python_version > \"3.7\" and python_version < \"3.10\""}, + {version = ">=16.0.0", markers = "python_version == \"3.10\""}, + {version = ">=18.0.0", markers = "python_version == \"3.11\""}, + {version = ">=19.0.1", markers = "python_version >= \"3.12\""}, +] crcmod = ">=1.7,<2.0" ecdsa = ">=0.17,<1.0" -ed25519-blake2b = {version = ">=1.4.1,<2.0.0", markers = "python_version >= \"3.12\""} -py-sr25519-bindings = {version = ">=0.2.0,<2.0.0", markers = "python_version >= \"3.11\""} +ed25519-blake2b = [ + {version = ">=1.4,<2.0.0", markers = "python_version < \"3.12\""}, + {version = ">=1.4.1,<2.0.0", markers = "python_version >= \"3.12\""}, +] +py-sr25519-bindings = [ + {version = ">=0.1.3,<2.0.0", markers = "python_version < \"3.10\""}, + {version = ">=0.1.4,<2.0.0", markers = "python_version == \"3.10\""}, + {version = ">=0.2.0,<2.0.0", markers = "python_version >= \"3.11\""}, +] pycryptodome = ">=3.15,<4.0" pynacl = ">=1.5,<2.0" @@ -92,6 +121,8 @@ mypy-extensions = ">=0.4.3" packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] @@ -540,15 +571,29 @@ files = [ {file = "ed25519-blake2b-1.4.1.tar.gz", hash = "sha256:731e9f93cd1ac1a64649575f3519a99ffe0bb1e4cf7bf5f5f0be513a39df7363"}, ] +[[package]] +name = "exceptiongroup" +version = "1.2.1" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, + {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, +] + +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "filelock" -version = "3.15.3" +version = "3.15.4" description = "A platform independent file lock." optional = false python-versions = ">=3.8" files = [ - {file = "filelock-3.15.3-py3-none-any.whl", hash = "sha256:0151273e5b5d6cf753a61ec83b3a9b7d8821c39ae9af9d7ecf2f9e2f17404103"}, - {file = "filelock-3.15.3.tar.gz", hash = "sha256:e1199bf5194a2277273dacd50269f0d87d0682088a3c561c15674ea9005d8635"}, + {file = "filelock-3.15.4-py3-none-any.whl", hash = "sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7"}, + {file = "filelock-3.15.4.tar.gz", hash = "sha256:2207938cbc1844345cb01a5a95524dae30f0ce089eba5b00378295a17e3e90cb"}, ] [package.extras] @@ -757,13 +802,13 @@ files = [ [[package]] name = "importlib-metadata" -version = "7.2.0" +version = "7.2.1" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-7.2.0-py3-none-any.whl", hash = "sha256:04e4aad329b8b948a5711d394fa8759cb80f009225441b4f2a02bd4d8e5f426c"}, - {file = "importlib_metadata-7.2.0.tar.gz", hash = "sha256:3ff4519071ed42740522d494d04819b666541b9752c43012f85afb2cc220fcc6"}, + {file = "importlib_metadata-7.2.1-py3-none-any.whl", hash = "sha256:ffef94b0b66046dd8ea2d619b701fe978d9264d38f3998bc4c27ec3b146a87c8"}, + {file = "importlib_metadata-7.2.1.tar.gz", hash = "sha256:509ecb2ab77071db5137c655e24ceb3eee66e7bbc6574165d0d114d9fc4bbe68"}, ] [package.dependencies] @@ -814,6 +859,9 @@ files = [ {file = "jaraco.context-5.3.0.tar.gz", hash = "sha256:c2f67165ce1f9be20f32f650f25d8edfc1646a8aeee48ae06fb35f90763576d2"}, ] +[package.dependencies] +"backports.tarfile" = {version = "*", markers = "python_version < \"3.12\""} + [package.extras] docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] testing = ["portend", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] @@ -863,6 +911,7 @@ files = [ ] [package.dependencies] +importlib-metadata = {version = ">=4.11.4", markers = "python_version < \"3.12\""} "jaraco.classes" = "*" "jaraco.context" = "*" "jaraco.functools" = "*" @@ -1110,6 +1159,15 @@ files = [ {file = "py_sr25519_bindings-0.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7b56b5cbbfb36b41ddfa462989a03386590ac036f3a755ef64fffeb2fed88654"}, {file = "py_sr25519_bindings-0.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8f06ea3237e06666e3a4ff4719b4fba415472943831b229428753c37d5ecd1b4"}, {file = "py_sr25519_bindings-0.2.0-cp311-none-win_amd64.whl", hash = "sha256:d62af30b2022f5fa787e46c06823c35a21abe791bf55012f498f9ba8e4baabc8"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:ceafa0c31b49f2128461eb2c6ea18dc5d0bfae7218a100be7153f271e46bac49"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:c8dedb8525556591738a64310875df70ea67886e5a40f2799bd96ef8848936cf"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ce149796923696f5cfc6263f135674a14fe2d513fd35b2bfa73226b940aff648"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20d71ca3ba22f98f4c208d509f735fe4eb5aa9e3547a507733a95828adde6cab"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe8e20ee0856e8a60682566df955b81e7631670136607da627ab6892df34790d"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0efd5487e3f6d6053cfc4a891b10f729d69263897270d0354f409ee2106fc9b7"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ae7f2164d510458740145d20912d5d7a5c45e8fcde7cebd4057f60811ecc276f"}, + {file = "py_sr25519_bindings-0.2.0-cp312-none-win32.whl", hash = "sha256:92382456c6f176c07e0d554c71d483853387885ce17714f8a4b50fdcf7552297"}, + {file = "py_sr25519_bindings-0.2.0-cp312-none-win_amd64.whl", hash = "sha256:48ee4e14a77f815f3996beecb7d7abf422b756e9163ee4df739c1aded8a3e8ba"}, {file = "py_sr25519_bindings-0.2.0-cp36-cp36m-macosx_10_7_x86_64.whl", hash = "sha256:c3de899a1e911b8945f09e6389f8d2df68924c12c78e3e66fedb15f1e4ff56ad"}, {file = "py_sr25519_bindings-0.2.0-cp36-cp36m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:758761b605f90e4238304df7520155a3358b13cc55ee18c5113632da17343163"}, {file = "py_sr25519_bindings-0.2.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f63580a224607e68b861eb03421465091c3104b6309e5fca7448f5aa6dbda60"}, @@ -1261,9 +1319,11 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=1.5,<2.0" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -1336,7 +1396,6 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -1509,6 +1568,17 @@ files = [ {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, ] +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + [[package]] name = "twine" version = "4.0.2" @@ -1531,6 +1601,17 @@ rfc3986 = ">=1.4.0" rich = ">=12.0.0" urllib3 = ">=1.26.0" +[[package]] +name = "typing-extensions" +version = "4.12.2" +description = "Backported and Experimental Type Hints for Python 3.8+" +optional = false +python-versions = ">=3.8" +files = [ + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, +] + [[package]] name = "urllib3" version = "2.2.2" @@ -1566,13 +1647,13 @@ protobuf = ">=4.23" [[package]] name = "virtualenv" -version = "20.26.2" +version = "20.26.3" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.7" files = [ - {file = "virtualenv-20.26.2-py3-none-any.whl", hash = "sha256:a624db5e94f01ad993d476b9ee5346fdf7b9de43ccaee0e0197012dc838a0e9b"}, - {file = "virtualenv-20.26.2.tar.gz", hash = "sha256:82bf0f4eebbb78d36ddaee0283d43fe5736b53880b8a8cdcd37390a07ac3741c"}, + {file = "virtualenv-20.26.3-py3-none-any.whl", hash = "sha256:8cc4a31139e796e9a7de2cd5cf2489de1217193116a8fd42328f1bd65f434589"}, + {file = "virtualenv-20.26.3.tar.gz", hash = "sha256:4c43a2a236279d9ea36a0d76f98d84bd6ca94ac4e0f4a3b9d46d05e10fea542a"}, ] [package.dependencies] @@ -1617,5 +1698,5 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" -python-versions = "^3.12" -content-hash = "89e065600541e1fb69ebdba2dc2b1126a3a168ddf97de9591a5341f1e361dad2" +python-versions = "^3.9" +content-hash = "fe3cbede7248009bc396bd57a2915fb079165466d885da21256a6a3116941128" diff --git a/v4-client-py-v2/pyproject.toml b/v4-client-py-v2/pyproject.toml index 377bbea7..423c1f9f 100644 --- a/v4-client-py-v2/pyproject.toml +++ b/v4-client-py-v2/pyproject.toml @@ -6,12 +6,13 @@ authors = ["Piotr Piwoński "] readme = "README.md" [tool.poetry.dependencies] -python = "^3.12" +python = "^3.9" v4-proto = "^4.0.1" httpx = "^0.27.0" websocket-client = "^1.7.0" bip-utils = "^2.9.3" ecdsa = "^0.19.0" +typing-extensions = "^4.12.2" [tool.poetry.group.dev.dependencies] diff --git a/v4-client-py-v2/tests/conftest.py b/v4-client-py-v2/tests/conftest.py index d18455bd..aa13161f 100644 --- a/v4-client-py-v2/tests/conftest.py +++ b/v4-client-py-v2/tests/conftest.py @@ -29,7 +29,7 @@ @pytest.fixture def indexer_rest_client(): - return IndexerClient(TESTNET.rest_indexer) + return IndexerClient("https://indexer.v4testnet.dydx.exchange") @pytest.fixture @@ -103,7 +103,7 @@ async def wallet(node_client, private_key, test_address): return await get_wallet(node_client, private_key, test_address) -def retry_on_forbidden(max_retries=3, delay=1): +def retry_on_forbidden(max_retries=3, delay=1, skip=False): def decorator(func): @wraps(func) async def wrapper(*args, **kwargs): @@ -115,6 +115,11 @@ async def wrapper(*args, **kwargs): if attempt < max_retries - 1: await asyncio.sleep(delay) continue + else: + if skip: + pytest.skip("403 Forbidden error. Skipping the test.") + else: + raise raise raise httpx.HTTPStatusError( request=e.request, diff --git a/v4-client-py-v2/tests/indexer/rest/modules/test_account_endpoints.py b/v4-client-py-v2/tests/indexer/rest/modules/test_account_endpoints.py index d7646ed0..3a1072e7 100644 --- a/v4-client-py-v2/tests/indexer/rest/modules/test_account_endpoints.py +++ b/v4-client-py-v2/tests/indexer/rest/modules/test_account_endpoints.py @@ -5,7 +5,7 @@ @pytest.mark.asyncio -@retry_on_forbidden(max_retries=3, delay=1) +@retry_on_forbidden(max_retries=3, delay=1, skip=True) async def test_subaccounts(indexer_rest_client, test_address): response = await indexer_rest_client.account.get_subaccounts(test_address) subaccounts = response["subaccounts"] @@ -17,7 +17,7 @@ async def test_subaccounts(indexer_rest_client, test_address): @pytest.mark.asyncio -@retry_on_forbidden(max_retries=3, delay=1) +@retry_on_forbidden(max_retries=3, delay=1, skip=True) async def test_subaccount_0(indexer_rest_client, test_address): response = await indexer_rest_client.account.get_subaccount(test_address, 0) subaccount = response["subaccount"] @@ -27,7 +27,7 @@ async def test_subaccount_0(indexer_rest_client, test_address): @pytest.mark.asyncio -@retry_on_forbidden(max_retries=3, delay=1) +@retry_on_forbidden(max_retries=3, delay=1, skip=True) async def test_asset_positions(indexer_rest_client, test_address): response = await indexer_rest_client.account.get_subaccount_asset_positions( test_address, 0 @@ -41,7 +41,7 @@ async def test_asset_positions(indexer_rest_client, test_address): @pytest.mark.asyncio -@retry_on_forbidden(max_retries=3, delay=1) +@retry_on_forbidden(max_retries=3, delay=1, skip=True) async def test_perpetual_positions(indexer_rest_client, test_address): response = await indexer_rest_client.account.get_subaccount_perpetual_positions( test_address, 0 @@ -55,7 +55,7 @@ async def test_perpetual_positions(indexer_rest_client, test_address): @pytest.mark.asyncio -@retry_on_forbidden(max_retries=3, delay=1) +@retry_on_forbidden(max_retries=3, delay=1, skip=True) async def test_transfers(indexer_rest_client, test_address): response = await indexer_rest_client.account.get_subaccount_transfers( test_address, 0 @@ -69,7 +69,7 @@ async def test_transfers(indexer_rest_client, test_address): @pytest.mark.asyncio -@retry_on_forbidden(max_retries=3, delay=1) +@retry_on_forbidden(max_retries=3, delay=1, skip=True) async def test_orders(indexer_rest_client, test_address): response = await indexer_rest_client.account.get_subaccount_orders(test_address, 0) assert response is not None @@ -81,7 +81,7 @@ async def test_orders(indexer_rest_client, test_address): @pytest.mark.asyncio -@retry_on_forbidden(max_retries=3, delay=1) +@retry_on_forbidden(max_retries=3, delay=1, skip=True) async def test_fills(indexer_rest_client, test_address): response = await indexer_rest_client.account.get_subaccount_fills(test_address, 0) assert response is not None @@ -93,7 +93,7 @@ async def test_fills(indexer_rest_client, test_address): @pytest.mark.asyncio -@retry_on_forbidden(max_retries=3, delay=1) +@retry_on_forbidden(max_retries=3, delay=1, skip=True) async def test_historical_pnl(indexer_rest_client, test_address): response = await indexer_rest_client.account.get_subaccount_historical_pnls( test_address, 0 @@ -107,7 +107,7 @@ async def test_historical_pnl(indexer_rest_client, test_address): @pytest.mark.asyncio -@retry_on_forbidden(max_retries=3, delay=1) +@retry_on_forbidden(max_retries=3, delay=1, skip=True) async def test_historical_block_trading_rewards(indexer_rest_client, test_address): limit = 10 response = await indexer_rest_client.account.get_historical_block_trading_rewards( @@ -124,7 +124,7 @@ async def test_historical_block_trading_rewards(indexer_rest_client, test_addres @pytest.mark.asyncio -@retry_on_forbidden(max_retries=3, delay=1) +@retry_on_forbidden(max_retries=3, delay=1, skip=True) async def test_historical_trading_rewards_aggregated(indexer_rest_client, test_address): period = TradingRewardAggregationPeriod.DAILY limit = 10