|
| 1 | +# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot) |
| 2 | +# Copyright (c) 2023 Drakkar-Software, All rights reserved. |
| 3 | +# |
| 4 | +# OctoBot is free software; you can redistribute it and/or |
| 5 | +# modify it under the terms of the GNU General Public License |
| 6 | +# as published by the Free Software Foundation; either |
| 7 | +# version 3.0 of the License, or (at your option) any later version. |
| 8 | +# |
| 9 | +# OctoBot is distributed in the hope that it will be useful, |
| 10 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | +# General Public License for more details. |
| 13 | +# |
| 14 | +# You should have received a copy of the GNU General Public |
| 15 | +# License along with OctoBot. If not, see <https://www.gnu.org/licenses/>. |
| 16 | +import pytest |
| 17 | + |
| 18 | +from additional_tests.exchanges_tests import abstract_authenticated_exchange_tester |
| 19 | + |
| 20 | +# All test coroutines will be treated as marked. |
| 21 | +pytestmark = pytest.mark.asyncio |
| 22 | + |
| 23 | + |
| 24 | +class TestHyperliquidAuthenticatedExchange( |
| 25 | + abstract_authenticated_exchange_tester.AbstractAuthenticatedExchangeTester |
| 26 | +): |
| 27 | + # enter exchange name as a class variable here |
| 28 | + EXCHANGE_NAME = "hyperliquid" |
| 29 | + ORDER_CURRENCY = "HYPE" |
| 30 | + SETTLEMENT_CURRENCY = "USDC" |
| 31 | + SYMBOL = f"{ORDER_CURRENCY}/{SETTLEMENT_CURRENCY}" |
| 32 | + ORDER_SIZE = 25 # % of portfolio to include in test orders |
| 33 | + VALID_ORDER_ID = "1777764898965454848" |
| 34 | + CONVERTS_MARKET_INTO_LIMIT_ORDERS = True # when market orders are always converted into limit order by the exchange |
| 35 | + |
| 36 | + async def test_get_portfolio(self): |
| 37 | + await super().test_get_portfolio() |
| 38 | + |
| 39 | + async def test_get_portfolio_with_market_filter(self): |
| 40 | + # pass if not implemented |
| 41 | + pass |
| 42 | + |
| 43 | + async def test_untradable_symbols(self): |
| 44 | + await super().test_untradable_symbols() |
| 45 | + |
| 46 | + async def test_get_account_id(self): |
| 47 | + # pass if not implemented |
| 48 | + pass |
| 49 | + |
| 50 | + async def test_is_authenticated_request(self): |
| 51 | + await super().test_is_authenticated_request() |
| 52 | + |
| 53 | + async def test_invalid_api_key_error(self): |
| 54 | + # pass if not implemented |
| 55 | + pass |
| 56 | + |
| 57 | + async def test_get_api_key_permissions(self): |
| 58 | + # pass if not implemented |
| 59 | + pass |
| 60 | + |
| 61 | + async def test_missing_trading_api_key_permissions(self): |
| 62 | + pass |
| 63 | + |
| 64 | + async def test_api_key_ip_whitelist_error(self): |
| 65 | + await super().test_api_key_ip_whitelist_error() |
| 66 | + |
| 67 | + async def test_get_not_found_order(self): |
| 68 | + await super().test_get_not_found_order() |
| 69 | + |
| 70 | + async def test_is_valid_account(self): |
| 71 | + await super().test_is_valid_account() |
| 72 | + |
| 73 | + async def test_get_special_orders(self): |
| 74 | + await super().test_get_special_orders() |
| 75 | + |
| 76 | + async def test_create_and_cancel_limit_orders(self): |
| 77 | + await super().test_create_and_cancel_limit_orders() |
| 78 | + |
| 79 | + async def test_create_and_fill_market_orders(self): |
| 80 | + await super().test_create_and_fill_market_orders() |
| 81 | + |
| 82 | + async def test_get_my_recent_trades(self): |
| 83 | + await super().test_get_my_recent_trades() |
| 84 | + |
| 85 | + async def test_get_closed_orders(self): |
| 86 | + await super().test_get_closed_orders() |
| 87 | + |
| 88 | + async def test_get_cancelled_orders(self): |
| 89 | + await super().test_get_cancelled_orders() |
| 90 | + |
| 91 | + async def test_create_and_cancel_stop_orders(self): |
| 92 | + # pass if not implemented |
| 93 | + pass |
| 94 | + |
| 95 | + async def test_edit_limit_order(self): |
| 96 | + # pass if not implemented |
| 97 | + pass |
| 98 | + |
| 99 | + async def test_edit_stop_order(self): |
| 100 | + # pass if not implemented |
| 101 | + pass |
| 102 | + |
| 103 | + async def test_create_single_bundled_orders(self): |
| 104 | + # pass if not implemented |
| 105 | + pass |
| 106 | + |
| 107 | + async def test_create_double_bundled_orders(self): |
| 108 | + # pass if not implemented |
| 109 | + pass |
0 commit comments