typed-evedex 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. typed_evedex-0.1.0/LICENSE +21 -0
  2. typed_evedex-0.1.0/PKG-INFO +106 -0
  3. typed_evedex-0.1.0/README.md +85 -0
  4. typed_evedex-0.1.0/pyproject.toml +32 -0
  5. typed_evedex-0.1.0/setup.cfg +4 -0
  6. typed_evedex-0.1.0/src/typed_evedex/__init__.py +15 -0
  7. typed_evedex-0.1.0/src/typed_evedex/__init__.pyi +27 -0
  8. typed_evedex-0.1.0/src/typed_evedex/auth/__init__.py +53 -0
  9. typed_evedex-0.1.0/src/typed_evedex/auth/api_keys/__init__.py +14 -0
  10. typed_evedex-0.1.0/src/typed_evedex/auth/api_keys/create.py +51 -0
  11. typed_evedex-0.1.0/src/typed_evedex/auth/api_keys/delete.py +37 -0
  12. typed_evedex-0.1.0/src/typed_evedex/auth/api_keys/list.py +139 -0
  13. typed_evedex-0.1.0/src/typed_evedex/auth/api_keys/regenerate.py +38 -0
  14. typed_evedex-0.1.0/src/typed_evedex/auth/api_keys/restore.py +37 -0
  15. typed_evedex-0.1.0/src/typed_evedex/auth/location.py +63 -0
  16. typed_evedex-0.1.0/src/typed_evedex/auth/nonce.py +32 -0
  17. typed_evedex-0.1.0/src/typed_evedex/auth/ping.py +29 -0
  18. typed_evedex-0.1.0/src/typed_evedex/auth/session/__init__.py +11 -0
  19. typed_evedex-0.1.0/src/typed_evedex/auth/session/logout.py +25 -0
  20. typed_evedex-0.1.0/src/typed_evedex/auth/session/revoke.py +25 -0
  21. typed_evedex-0.1.0/src/typed_evedex/auth/sub_accounts/__init__.py +13 -0
  22. typed_evedex-0.1.0/src/typed_evedex/auth/sub_accounts/create.py +84 -0
  23. typed_evedex-0.1.0/src/typed_evedex/auth/sub_accounts/list.py +130 -0
  24. typed_evedex-0.1.0/src/typed_evedex/auth/sub_accounts/switch.py +41 -0
  25. typed_evedex-0.1.0/src/typed_evedex/auth/sub_accounts/update.py +50 -0
  26. typed_evedex-0.1.0/src/typed_evedex/auth/user/__init__.py +12 -0
  27. typed_evedex-0.1.0/src/typed_evedex/auth/user/balance.py +35 -0
  28. typed_evedex-0.1.0/src/typed_evedex/auth/user/me.py +22 -0
  29. typed_evedex-0.1.0/src/typed_evedex/auth/user/wallet_transfers.py +321 -0
  30. typed_evedex-0.1.0/src/typed_evedex/core/__init__.py +5 -0
  31. typed_evedex-0.1.0/src/typed_evedex/core/__init__.pyi +53 -0
  32. typed_evedex-0.1.0/src/typed_evedex/core/auth.py +268 -0
  33. typed_evedex-0.1.0/src/typed_evedex/core/client.py +121 -0
  34. typed_evedex-0.1.0/src/typed_evedex/core/endpoint/__init__.py +1 -0
  35. typed_evedex-0.1.0/src/typed_evedex/core/endpoint/rpc.py +200 -0
  36. typed_evedex-0.1.0/src/typed_evedex/core/endpoint/stream.py +135 -0
  37. typed_evedex-0.1.0/src/typed_evedex/core/environments.py +53 -0
  38. typed_evedex-0.1.0/src/typed_evedex/core/exc.py +23 -0
  39. typed_evedex-0.1.0/src/typed_evedex/core/signing.py +292 -0
  40. typed_evedex-0.1.0/src/typed_evedex/core/transport/__init__.py +1 -0
  41. typed_evedex-0.1.0/src/typed_evedex/core/transport/http.py +151 -0
  42. typed_evedex-0.1.0/src/typed_evedex/core/transport/ws.py +494 -0
  43. typed_evedex-0.1.0/src/typed_evedex/core/types.py +61 -0
  44. typed_evedex-0.1.0/src/typed_evedex/core/wire.py +95 -0
  45. typed_evedex-0.1.0/src/typed_evedex/exchange/__init__.py +82 -0
  46. typed_evedex-0.1.0/src/typed_evedex/exchange/account/__init__.py +41 -0
  47. typed_evedex-0.1.0/src/typed_evedex/exchange/account/available_balance.py +92 -0
  48. typed_evedex-0.1.0/src/typed_evedex/exchange/account/balance.py +40 -0
  49. typed_evedex-0.1.0/src/typed_evedex/exchange/account/balance_chart.py +76 -0
  50. typed_evedex-0.1.0/src/typed_evedex/exchange/account/create.py +44 -0
  51. typed_evedex-0.1.0/src/typed_evedex/exchange/account/deposit_details.py +46 -0
  52. typed_evedex-0.1.0/src/typed_evedex/exchange/account/faucet/__init__.py +11 -0
  53. typed_evedex-0.1.0/src/typed_evedex/exchange/account/faucet/check.py +29 -0
  54. typed_evedex-0.1.0/src/typed_evedex/exchange/account/faucet/claim.py +25 -0
  55. typed_evedex-0.1.0/src/typed_evedex/exchange/account/funding.py +42 -0
  56. typed_evedex-0.1.0/src/typed_evedex/exchange/account/funding_transfers.py +222 -0
  57. typed_evedex-0.1.0/src/typed_evedex/exchange/account/me.py +25 -0
  58. typed_evedex-0.1.0/src/typed_evedex/exchange/account/power.py +73 -0
  59. typed_evedex-0.1.0/src/typed_evedex/exchange/account/statistics.py +50 -0
  60. typed_evedex-0.1.0/src/typed_evedex/exchange/fills.py +127 -0
  61. typed_evedex-0.1.0/src/typed_evedex/exchange/market/__init__.py +18 -0
  62. typed_evedex-0.1.0/src/typed_evedex/exchange/market/coins.py +51 -0
  63. typed_evedex-0.1.0/src/typed_evedex/exchange/market/info.py +58 -0
  64. typed_evedex-0.1.0/src/typed_evedex/exchange/market/instrument.py +32 -0
  65. typed_evedex-0.1.0/src/typed_evedex/exchange/market/instruments.py +221 -0
  66. typed_evedex-0.1.0/src/typed_evedex/exchange/market/order_book.py +80 -0
  67. typed_evedex-0.1.0/src/typed_evedex/exchange/market/recent_trades.py +55 -0
  68. typed_evedex-0.1.0/src/typed_evedex/exchange/market/trades.py +64 -0
  69. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/__init__.py +38 -0
  70. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/cancel.py +37 -0
  71. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/cancel_by_ids.py +51 -0
  72. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/cancel_by_instrument.py +47 -0
  73. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/fills.py +72 -0
  74. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/get.py +33 -0
  75. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/list.py +369 -0
  76. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/opened.py +83 -0
  77. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/place_limit.py +92 -0
  78. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/place_limit_batch.py +80 -0
  79. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/place_market.py +80 -0
  80. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/place_stop_limit.py +85 -0
  81. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/replace_limit.py +65 -0
  82. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/replace_limit_batch.py +72 -0
  83. typed_evedex-0.1.0/src/typed_evedex/exchange/orders/replace_stop_limit.py +63 -0
  84. typed_evedex-0.1.0/src/typed_evedex/exchange/ping.py +29 -0
  85. typed_evedex-0.1.0/src/typed_evedex/exchange/positions/__init__.py +13 -0
  86. typed_evedex-0.1.0/src/typed_evedex/exchange/positions/close.py +62 -0
  87. typed_evedex-0.1.0/src/typed_evedex/exchange/positions/history.py +191 -0
  88. typed_evedex-0.1.0/src/typed_evedex/exchange/positions/list.py +52 -0
  89. typed_evedex-0.1.0/src/typed_evedex/exchange/positions/set_leverage.py +57 -0
  90. typed_evedex-0.1.0/src/typed_evedex/exchange/sub_accounts/__init__.py +15 -0
  91. typed_evedex-0.1.0/src/typed_evedex/exchange/sub_accounts/order.py +39 -0
  92. typed_evedex-0.1.0/src/typed_evedex/exchange/sub_accounts/orders.py +370 -0
  93. typed_evedex-0.1.0/src/typed_evedex/exchange/sub_accounts/position_history.py +198 -0
  94. typed_evedex-0.1.0/src/typed_evedex/exchange/sub_accounts/positions.py +53 -0
  95. typed_evedex-0.1.0/src/typed_evedex/exchange/sub_accounts/state.py +41 -0
  96. typed_evedex-0.1.0/src/typed_evedex/exchange/sub_accounts/statistics.py +62 -0
  97. typed_evedex-0.1.0/src/typed_evedex/exchange/tpsl/__init__.py +13 -0
  98. typed_evedex-0.1.0/src/typed_evedex/exchange/tpsl/cancel.py +38 -0
  99. typed_evedex-0.1.0/src/typed_evedex/exchange/tpsl/create.py +66 -0
  100. typed_evedex-0.1.0/src/typed_evedex/exchange/tpsl/list.py +136 -0
  101. typed_evedex-0.1.0/src/typed_evedex/exchange/tpsl/update.py +66 -0
  102. typed_evedex-0.1.0/src/typed_evedex/exchange/transfers/__init__.py +12 -0
  103. typed_evedex-0.1.0/src/typed_evedex/exchange/transfers/detail.py +38 -0
  104. typed_evedex-0.1.0/src/typed_evedex/exchange/transfers/list.py +207 -0
  105. typed_evedex-0.1.0/src/typed_evedex/exchange/transfers/withdraw.py +59 -0
  106. typed_evedex-0.1.0/src/typed_evedex/main.py +51 -0
  107. typed_evedex-0.1.0/src/typed_evedex/market_data/__init__.py +11 -0
  108. typed_evedex-0.1.0/src/typed_evedex/market_data/candles.py +207 -0
  109. typed_evedex-0.1.0/src/typed_evedex/market_data/ping.py +29 -0
  110. typed_evedex-0.1.0/src/typed_evedex/py.typed +0 -0
  111. typed_evedex-0.1.0/src/typed_evedex/schemas.py +1012 -0
  112. typed_evedex-0.1.0/src/typed_evedex/streams/__init__.py +41 -0
  113. typed_evedex-0.1.0/src/typed_evedex/streams/account/__init__.py +17 -0
  114. typed_evedex-0.1.0/src/typed_evedex/streams/account/fees.py +50 -0
  115. typed_evedex-0.1.0/src/typed_evedex/streams/account/fills.py +50 -0
  116. typed_evedex-0.1.0/src/typed_evedex/streams/account/funding.py +42 -0
  117. typed_evedex-0.1.0/src/typed_evedex/streams/account/orders.py +101 -0
  118. typed_evedex-0.1.0/src/typed_evedex/streams/account/positions.py +62 -0
  119. typed_evedex-0.1.0/src/typed_evedex/streams/account/tpsl.py +56 -0
  120. typed_evedex-0.1.0/src/typed_evedex/streams/account/transfers.py +68 -0
  121. typed_evedex-0.1.0/src/typed_evedex/streams/account/user.py +37 -0
  122. typed_evedex-0.1.0/src/typed_evedex/streams/candles.py +40 -0
  123. typed_evedex-0.1.0/src/typed_evedex/streams/coin_prices.py +44 -0
  124. typed_evedex-0.1.0/src/typed_evedex/streams/funding_rates.py +40 -0
  125. typed_evedex-0.1.0/src/typed_evedex/streams/heartbeat.py +35 -0
  126. typed_evedex-0.1.0/src/typed_evedex/streams/info.py +37 -0
  127. typed_evedex-0.1.0/src/typed_evedex/streams/instruments.py +87 -0
  128. typed_evedex-0.1.0/src/typed_evedex/streams/order_book.py +70 -0
  129. typed_evedex-0.1.0/src/typed_evedex/streams/order_book_best.py +68 -0
  130. typed_evedex-0.1.0/src/typed_evedex/streams/recent_trades.py +50 -0
  131. typed_evedex-0.1.0/src/typed_evedex/streams/trades.py +43 -0
  132. typed_evedex-0.1.0/src/typed_evedex.egg-info/PKG-INFO +106 -0
  133. typed_evedex-0.1.0/src/typed_evedex.egg-info/SOURCES.txt +134 -0
  134. typed_evedex-0.1.0/src/typed_evedex.egg-info/dependency_links.txt +1 -0
  135. typed_evedex-0.1.0/src/typed_evedex.egg-info/requires.txt +3 -0
  136. typed_evedex-0.1.0/src/typed_evedex.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tribulnation Labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: typed-evedex
3
+ Version: 0.1.0
4
+ Summary: A fully typed, validated async client for the Evedex API.
5
+ Author-email: Marcel Claramunt <marcel@tribulnation.com>
6
+ License-Expression: MIT
7
+ Project-URL: Repository, https://github.com/tribulnation/typed
8
+ Project-URL: Documentation, https://tribulnation.com/typed/evedex
9
+ Project-URL: Website, https://tribulnation.com/typed
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Typing :: Typed
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: typed-core
18
+ Requires-Dist: lazy-loader
19
+ Requires-Dist: eth-account
20
+ Dynamic: license-file
21
+
22
+ # Typed EVEDEX
23
+
24
+ <p align="center">
25
+ <em>A fully typed, validated async client for the EVEDEX API.</em>
26
+ </p>
27
+
28
+ <p align="center">
29
+ <a href="https://pypi.org/project/typed-evedex/">
30
+ <img src="https://img.shields.io/pypi/v/typed-evedex.svg" alt="PyPI version">
31
+ </a>
32
+ <a href="https://pypi.org/project/typed-evedex/">
33
+ <img src="https://img.shields.io/pypi/pyversions/typed-evedex.svg" alt="Python versions">
34
+ </a>
35
+ <a href="https://tribulnation.com/typed/evedex">
36
+ <img src="https://img.shields.io/badge/docs-live-black" alt="Docs">
37
+ </a>
38
+ <a href="LICENSE">
39
+ <img src="https://img.shields.io/pypi/l/typed-evedex.svg" alt="License">
40
+ </a>
41
+ </p>
42
+
43
+ ---
44
+
45
+ - **Documentation**: [https://tribulnation.com/typed/evedex](https://tribulnation.com/typed/evedex)
46
+ - **Source Code**: [https://github.com/tribulnation/typed/tree/main/packages/evedex](https://github.com/tribulnation/typed/tree/main/packages/evedex)
47
+
48
+ ---
49
+
50
+ ```python
51
+ from typed_evedex import Evedex
52
+
53
+ async with Evedex.new(public=True) as client:
54
+ book = await client.exchange.market.order_book(instrument='BTCUSD')
55
+ print(book['bids'][0], book['asks'][0])
56
+ ```
57
+
58
+ ## Why Typed EVEDEX?
59
+
60
+ - **🎯 Precise Types**: Typed requests and responses for every EVEDEX perpetual endpoint, with prices and sizes as `Decimal` and times as `datetime`, not `dict`/`Any`.
61
+ - **✅ Runtime Validation**: Every HTTP response and WebSocket publication is validated by default, not just typed on paper.
62
+ - **⚡ Async First**: Async HTTP for the Exchange, Auth and market-data services and async Centrifugo streams, sharing one client.
63
+ - **📚 Full Surface**: Market data, account, orders (single and batch), positions, TP/SL, transfers, sub-accounts, API keys and every public and private channel, with EIP-712 signing built in.
64
+
65
+ ## Installation
66
+
67
+ ```bash
68
+ pip install typed-evedex
69
+ ```
70
+
71
+ ## Getting Started
72
+
73
+ Public market data needs no credentials: build the client with `public=True`, as above.
74
+ Reading your account needs an API key or your wallet's private key; trading needs the
75
+ private key, which signs every order. See [Authenticated Setup](https://tribulnation.com/typed/evedex/authenticated-setup).
76
+
77
+ ```python
78
+ from typed_evedex import Evedex
79
+
80
+ async with Evedex.new() as client: # reads EVEDEX_PRIVATE_KEY / EVEDEX_API_KEY
81
+ balance = await client.exchange.account.available_balance()
82
+ print(balance['availableBalance'])
83
+ ```
84
+
85
+ Pass `env='demo'` to use the EVEDEX demo environment (`evedex.io`) instead of production.
86
+
87
+ ## How To
88
+
89
+ - [Fetch Market Data](https://tribulnation.com/typed/evedex/how-to/fetch-market-data)
90
+ - [Fetch Account Data](https://tribulnation.com/typed/evedex/how-to/fetch-account-data)
91
+ - [Place & Manage Orders](https://tribulnation.com/typed/evedex/how-to/place-and-manage-orders)
92
+ - [Manage Positions & TP/SL](https://tribulnation.com/typed/evedex/how-to/manage-positions)
93
+ - [Listen To Live Streams](https://tribulnation.com/typed/evedex/how-to/listen-to-live-streams)
94
+ - [Paginate Through Results](https://tribulnation.com/typed/evedex/how-to/paginate-through-results)
95
+
96
+ ## Reference
97
+
98
+ - [Authenticated Setup](https://tribulnation.com/typed/evedex/authenticated-setup)
99
+ - [Async Usage](https://tribulnation.com/typed/evedex/reference/async-usage)
100
+ - [Error Handling](https://tribulnation.com/typed/evedex/reference/error-handling)
101
+ - [Environment Variables](https://tribulnation.com/typed/evedex/reference/env-vars)
102
+ - [Timestamps](https://tribulnation.com/typed/evedex/reference/timestamps)
103
+
104
+ ## License
105
+
106
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,85 @@
1
+ # Typed EVEDEX
2
+
3
+ <p align="center">
4
+ <em>A fully typed, validated async client for the EVEDEX API.</em>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://pypi.org/project/typed-evedex/">
9
+ <img src="https://img.shields.io/pypi/v/typed-evedex.svg" alt="PyPI version">
10
+ </a>
11
+ <a href="https://pypi.org/project/typed-evedex/">
12
+ <img src="https://img.shields.io/pypi/pyversions/typed-evedex.svg" alt="Python versions">
13
+ </a>
14
+ <a href="https://tribulnation.com/typed/evedex">
15
+ <img src="https://img.shields.io/badge/docs-live-black" alt="Docs">
16
+ </a>
17
+ <a href="LICENSE">
18
+ <img src="https://img.shields.io/pypi/l/typed-evedex.svg" alt="License">
19
+ </a>
20
+ </p>
21
+
22
+ ---
23
+
24
+ - **Documentation**: [https://tribulnation.com/typed/evedex](https://tribulnation.com/typed/evedex)
25
+ - **Source Code**: [https://github.com/tribulnation/typed/tree/main/packages/evedex](https://github.com/tribulnation/typed/tree/main/packages/evedex)
26
+
27
+ ---
28
+
29
+ ```python
30
+ from typed_evedex import Evedex
31
+
32
+ async with Evedex.new(public=True) as client:
33
+ book = await client.exchange.market.order_book(instrument='BTCUSD')
34
+ print(book['bids'][0], book['asks'][0])
35
+ ```
36
+
37
+ ## Why Typed EVEDEX?
38
+
39
+ - **🎯 Precise Types**: Typed requests and responses for every EVEDEX perpetual endpoint, with prices and sizes as `Decimal` and times as `datetime`, not `dict`/`Any`.
40
+ - **✅ Runtime Validation**: Every HTTP response and WebSocket publication is validated by default, not just typed on paper.
41
+ - **⚡ Async First**: Async HTTP for the Exchange, Auth and market-data services and async Centrifugo streams, sharing one client.
42
+ - **📚 Full Surface**: Market data, account, orders (single and batch), positions, TP/SL, transfers, sub-accounts, API keys and every public and private channel, with EIP-712 signing built in.
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ pip install typed-evedex
48
+ ```
49
+
50
+ ## Getting Started
51
+
52
+ Public market data needs no credentials: build the client with `public=True`, as above.
53
+ Reading your account needs an API key or your wallet's private key; trading needs the
54
+ private key, which signs every order. See [Authenticated Setup](https://tribulnation.com/typed/evedex/authenticated-setup).
55
+
56
+ ```python
57
+ from typed_evedex import Evedex
58
+
59
+ async with Evedex.new() as client: # reads EVEDEX_PRIVATE_KEY / EVEDEX_API_KEY
60
+ balance = await client.exchange.account.available_balance()
61
+ print(balance['availableBalance'])
62
+ ```
63
+
64
+ Pass `env='demo'` to use the EVEDEX demo environment (`evedex.io`) instead of production.
65
+
66
+ ## How To
67
+
68
+ - [Fetch Market Data](https://tribulnation.com/typed/evedex/how-to/fetch-market-data)
69
+ - [Fetch Account Data](https://tribulnation.com/typed/evedex/how-to/fetch-account-data)
70
+ - [Place & Manage Orders](https://tribulnation.com/typed/evedex/how-to/place-and-manage-orders)
71
+ - [Manage Positions & TP/SL](https://tribulnation.com/typed/evedex/how-to/manage-positions)
72
+ - [Listen To Live Streams](https://tribulnation.com/typed/evedex/how-to/listen-to-live-streams)
73
+ - [Paginate Through Results](https://tribulnation.com/typed/evedex/how-to/paginate-through-results)
74
+
75
+ ## Reference
76
+
77
+ - [Authenticated Setup](https://tribulnation.com/typed/evedex/authenticated-setup)
78
+ - [Async Usage](https://tribulnation.com/typed/evedex/reference/async-usage)
79
+ - [Error Handling](https://tribulnation.com/typed/evedex/reference/error-handling)
80
+ - [Environment Variables](https://tribulnation.com/typed/evedex/reference/env-vars)
81
+ - [Timestamps](https://tribulnation.com/typed/evedex/reference/timestamps)
82
+
83
+ ## License
84
+
85
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["setuptools", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "typed-evedex"
7
+ version = "0.1.0"
8
+ authors = [
9
+ {name="Marcel Claramunt", email="marcel@tribulnation.com"}
10
+ ]
11
+ description = "A fully typed, validated async client for the Evedex API."
12
+ license = "MIT"
13
+ license-files = ["LICENSE"]
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.10",
17
+ "Programming Language :: Python :: 3.11",
18
+ "Typing :: Typed",
19
+ ]
20
+ dependencies = [
21
+ "typed-core", "lazy-loader", "eth-account",
22
+ ]
23
+ requires-python = ">=3.10"
24
+ readme = {file="README.md", content-type="text/markdown"}
25
+
26
+ [tool.setuptools.package-data]
27
+ "typed_evedex" = ["py.typed", "*.pyi", "**/*.pyi"]
28
+
29
+ [project.urls]
30
+ Repository = "https://github.com/tribulnation/typed"
31
+ Documentation = "https://tribulnation.com/typed/evedex"
32
+ Website = "https://tribulnation.com/typed"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,15 @@
1
+ """A fully typed, validated async client for the Evedex API.
2
+
3
+ Examples:
4
+ ```python
5
+ from typed_evedex import Evedex
6
+
7
+ async with Evedex.new(public=True) as client:
8
+ info = await client.exchange.market.info()
9
+ print(info['state'])
10
+ ```
11
+ """
12
+
13
+ import lazy_loader as lazy
14
+
15
+ __getattr__, __dir__, __all__ = lazy.attach_stub(__name__, __file__)
@@ -0,0 +1,27 @@
1
+ from .main import Evedex
2
+ from .core import (
3
+ Error,
4
+ NetworkError,
5
+ ValidationError,
6
+ ApiError,
7
+ BadRequest,
8
+ AuthError,
9
+ RateLimited,
10
+ LogicError,
11
+ Environment,
12
+ EnvironmentProfile,
13
+ )
14
+
15
+ __all__ = [
16
+ 'Evedex',
17
+ 'Error',
18
+ 'NetworkError',
19
+ 'ValidationError',
20
+ 'ApiError',
21
+ 'BadRequest',
22
+ 'AuthError',
23
+ 'RateLimited',
24
+ 'LogicError',
25
+ 'Environment',
26
+ 'EnvironmentProfile',
27
+ ]
@@ -0,0 +1,53 @@
1
+ # Generated by typed-dev — see CONTRIBUTING.md.
2
+ from functools import cached_property
3
+ from .api_keys import ApiKeys
4
+ from .location import LocationEndpoint
5
+ from .nonce import NonceEndpoint
6
+ from .ping import Ping
7
+ from .session import Session
8
+ from .sub_accounts import SubAccounts
9
+ from .user import User
10
+
11
+
12
+ class Auth(LocationEndpoint, NonceEndpoint, Ping):
13
+ """Auth REST service (`auth-api`): Sign-In with Ethereum sessions, the wallet user, API keys and sub-accounts.
14
+
15
+ References:
16
+ - [Upstream docs](https://docs.evedex.com/developers/developers/authorization)
17
+ """
18
+
19
+ @cached_property
20
+ def api_keys(self) -> ApiKeys:
21
+ """API keys for read access to the Exchange service: list, create (EIP-712 signed), regenerate, restore and delete.
22
+
23
+ References:
24
+ - [Upstream docs](https://docs.evedex.com/developers/developers/authorization)
25
+ """
26
+ return ApiKeys(client=self.client)
27
+
28
+ @cached_property
29
+ def session(self) -> Session:
30
+ """Sign-In with Ethereum (EIP-4361) sessions: sign in, refresh, revoke and log out.
31
+
32
+ References:
33
+ - [Upstream docs](https://docs.evedex.com/developers/developers/authorization)
34
+ """
35
+ return Session(client=self.client)
36
+
37
+ @cached_property
38
+ def sub_accounts(self) -> SubAccounts:
39
+ """Sub-accounts of the wallet: list, create, switch the session to one, rename or archive.
40
+
41
+ References:
42
+ - [Upstream docs](https://docs.evedex.com/developers/developers/authorization)
43
+ """
44
+ return SubAccounts(client=self.client)
45
+
46
+ @cached_property
47
+ def user(self) -> User:
48
+ """The wallet's Auth-service user: profile, wallet balance and wallet transfers.
49
+
50
+ References:
51
+ - [Upstream docs](https://docs.evedex.com/developers/developers/authorization)
52
+ """
53
+ return User(client=self.client)
@@ -0,0 +1,14 @@
1
+ # Generated by typed-dev — see CONTRIBUTING.md.
2
+ from .create import Create
3
+ from .delete import Delete
4
+ from .list import List
5
+ from .regenerate import Regenerate
6
+ from .restore import Restore
7
+
8
+
9
+ class ApiKeys(Create, Delete, List, Regenerate, Restore):
10
+ """API keys for read access to the Exchange service: list, create (EIP-712 signed), regenerate, restore and delete.
11
+
12
+ References:
13
+ - [Upstream docs](https://docs.evedex.com/developers/developers/authorization)
14
+ """
@@ -0,0 +1,51 @@
1
+ # Generated by typed-dev — see CONTRIBUTING.md.
2
+ from typing_extensions import Literal, NotRequired, TypedDict
3
+ from typed_evedex.core import RpcEndpoint, TimestampIso
4
+ from typed_evedex.schemas import IssuedApiKey
5
+
6
+
7
+ class Request(TypedDict):
8
+ name: str
9
+ """Name of the key."""
10
+ expireAt: NotRequired[TimestampIso | None]
11
+ """When the key expires; omitted or `null` for a key that never expires. Sent RFC 3339, signed as epoch seconds."""
12
+ scopes: NotRequired[list[Literal['partner', 'exchange']]]
13
+ """Services the key grants access to; signed comma-joined."""
14
+
15
+
16
+ class Create(RpcEndpoint):
17
+ """Create an API key and return its secret (shown only here and on regenerate). Requires the session and an EIP-712 `create_new_api_key` signature by the wallet, which the core adds. An `exchange`-scoped key authorizes read-only Exchange calls via `X-API-Key`."""
18
+
19
+ async def create(
20
+ self,
21
+ name: str,
22
+ *,
23
+ expire_at: TimestampIso | None = None,
24
+ scopes: list[Literal['partner', 'exchange']] | None = None,
25
+ validate: bool | None = None,
26
+ ) -> IssuedApiKey:
27
+ """Create an API key and return its secret (shown only here and on regenerate). Requires the session and an EIP-712 `create_new_api_key` signature by the wallet, which the core adds. An `exchange`-scoped key authorizes read-only Exchange calls via `X-API-Key`.
28
+
29
+ Args:
30
+ name: Name of the key.
31
+ expire_at: When the key expires; omitted or `null` for a key that never expires. Sent RFC 3339, signed as epoch seconds.
32
+ scopes: Services the key grants access to; signed comma-joined.
33
+ validate: Override this call's response validation; falls back to the client-level default when omitted.
34
+
35
+ References:
36
+ - [Official docs](https://docs.evedex.com/developers/developers/authorization)
37
+ """
38
+ request: Request = Request(name=name)
39
+ if expire_at is not None:
40
+ request['expireAt'] = expire_at
41
+ if scopes is not None:
42
+ request['scopes'] = scopes
43
+ return await self.request(
44
+ request,
45
+ method='POST',
46
+ path='/auth/api-key',
47
+ meta={'auth': 'private', 'sign': 'create_new_api_key'},
48
+ validate=validate,
49
+ request_type=Request,
50
+ response_type=IssuedApiKey,
51
+ )
@@ -0,0 +1,37 @@
1
+ # Generated by typed-dev — see CONTRIBUTING.md.
2
+ from typing_extensions import Any, TypedDict
3
+ from typed_evedex.core import RpcEndpoint
4
+
5
+
6
+ DeletedApiKey = dict[str, Any]
7
+
8
+
9
+ class Request(TypedDict):
10
+ apiKeyId: str
11
+ """Id of the key to delete."""
12
+
13
+
14
+ class Delete(RpcEndpoint):
15
+ """Delete (archive) an API key so it no longer authorizes. Requires the session. A deleted key can be brought back with `restore`."""
16
+
17
+ async def delete(
18
+ self, api_key_id: str, *, validate: bool | None = None
19
+ ) -> DeletedApiKey:
20
+ """Delete (archive) an API key so it no longer authorizes. Requires the session. A deleted key can be brought back with `restore`.
21
+
22
+ Args:
23
+ api_key_id: Id of the key to delete.
24
+ validate: Override this call's response validation; falls back to the client-level default when omitted.
25
+
26
+ References:
27
+ - [Official docs](https://docs.evedex.com/developers/developers/authorization)
28
+ """
29
+ return await self.request(
30
+ Request(apiKeyId=api_key_id),
31
+ method='DELETE',
32
+ path='/auth/api-key/{apiKeyId}',
33
+ meta={'auth': 'private'},
34
+ validate=validate,
35
+ request_type=Request,
36
+ response_type=DeletedApiKey,
37
+ )
@@ -0,0 +1,139 @@
1
+ # Generated by typed-dev — see CONTRIBUTING.md.
2
+ from typed_core import PaginatedResponse
3
+ from typing_extensions import Literal, NotRequired, Sequence, TypedDict
4
+ from typed_evedex.core import RpcEndpoint, TimestampIso
5
+
6
+
7
+ class ApiKeySettings(TypedDict):
8
+ """Key settings."""
9
+
10
+ scopes: list[Literal['partner', 'exchange']]
11
+ """Services the key grants access to."""
12
+
13
+
14
+ class Request(TypedDict):
15
+ withDeleted: NotRequired[Literal['yes', 'no', 'true', 'false', '']]
16
+ """Include deleted keys."""
17
+ withExpired: NotRequired[Literal['yes', 'no', 'true', 'false', '']]
18
+ """Include expired keys."""
19
+ limit: NotRequired[int]
20
+ """Page size."""
21
+ offset: NotRequired[int]
22
+ """Number of keys to skip."""
23
+
24
+
25
+ class ApiKeyInfo(TypedDict):
26
+ """One API key, without its secret."""
27
+
28
+ id: str
29
+ """API key id."""
30
+ name: str
31
+ """Name given at creation."""
32
+ mask: str
33
+ """Masked form of the key, for display."""
34
+ isArchived: bool
35
+ """Whether the key is archived (true once deleted)."""
36
+ expireAt: TimestampIso | None
37
+ """When the key expires; `null` if it never does."""
38
+ createdAt: TimestampIso
39
+ """When the key was created."""
40
+ updatedAt: TimestampIso | None
41
+ """When the key was last updated (regenerated); `null` if never."""
42
+ deletedAt: TimestampIso | None
43
+ """When the key was deleted; `null` if it is not."""
44
+ settings: ApiKeySettings
45
+
46
+
47
+ class ApiKeyPage(TypedDict):
48
+ """One page of API keys."""
49
+
50
+ list: list[ApiKeyInfo]
51
+ """API keys on this page."""
52
+ count: int
53
+ """Total number of keys matching the filters."""
54
+ next: NotRequired[str]
55
+ """Opaque continuation marker; unused by the offset walk."""
56
+
57
+
58
+ class List(RpcEndpoint):
59
+ """List the account's API keys (masked; the secret is shown only when a key is created or regenerated). Requires the session. Deleted and expired keys are left out unless asked for."""
60
+
61
+ def list_paged(
62
+ self,
63
+ *,
64
+ with_deleted: Literal['yes', 'no', 'true', 'false', ''] | None = None,
65
+ with_expired: Literal['yes', 'no', 'true', 'false', ''] | None = None,
66
+ limit: int | None = None,
67
+ validate: bool | None = None,
68
+ ) -> PaginatedResponse[ApiKeyInfo, int]:
69
+ """List the account's API keys (masked; the secret is shown only when a key is created or regenerated). Requires the session. Deleted and expired keys are left out unless asked for.
70
+
71
+ Paged variant of `list`: Advances `offset` by `len(rows)` and stops once it has covered the `count` items the response reports, or on an empty page. Awaitable (flattens every page) or async-iterable (one page at a time).
72
+
73
+ Args:
74
+ with_deleted: Include deleted keys.
75
+ with_expired: Include expired keys.
76
+ limit: Page size.
77
+ validate: Override this call's response validation; falls back to the client-level default when omitted.
78
+
79
+ References:
80
+ - [Official docs](https://docs.evedex.com/developers/developers/authorization)
81
+ """
82
+
83
+ async def next(offset: int) -> tuple[Sequence[ApiKeyInfo], int | None]:
84
+ response = await self.list(
85
+ with_deleted=with_deleted,
86
+ with_expired=with_expired,
87
+ limit=limit,
88
+ offset=offset,
89
+ validate=validate,
90
+ )
91
+ rows = response.get('list')
92
+ rows = rows if rows is not None else []
93
+ total = response.get('count')
94
+ total = int(total) if total is not None else None
95
+ if not rows or (total is not None and (offset + len(rows)) >= total):
96
+ return rows, None
97
+ return rows, offset + len(rows)
98
+
99
+ return PaginatedResponse(0, next)
100
+
101
+ async def list(
102
+ self,
103
+ *,
104
+ with_deleted: Literal['yes', 'no', 'true', 'false', ''] | None = None,
105
+ with_expired: Literal['yes', 'no', 'true', 'false', ''] | None = None,
106
+ limit: int | None = None,
107
+ offset: int | None = None,
108
+ validate: bool | None = None,
109
+ ) -> ApiKeyPage:
110
+ """List the account's API keys (masked; the secret is shown only when a key is created or regenerated). Requires the session. Deleted and expired keys are left out unless asked for.
111
+
112
+ Args:
113
+ with_deleted: Include deleted keys.
114
+ with_expired: Include expired keys.
115
+ limit: Page size.
116
+ offset: Number of keys to skip.
117
+ validate: Override this call's response validation; falls back to the client-level default when omitted.
118
+
119
+ References:
120
+ - [Official docs](https://docs.evedex.com/developers/developers/authorization)
121
+ """
122
+ request: Request = Request()
123
+ if with_deleted is not None:
124
+ request['withDeleted'] = with_deleted
125
+ if with_expired is not None:
126
+ request['withExpired'] = with_expired
127
+ if limit is not None:
128
+ request['limit'] = limit
129
+ if offset is not None:
130
+ request['offset'] = offset
131
+ return await self.request(
132
+ request,
133
+ method='GET',
134
+ path='/auth/api-key',
135
+ meta={'auth': 'private'},
136
+ validate=validate,
137
+ request_type=Request,
138
+ response_type=ApiKeyPage,
139
+ )
@@ -0,0 +1,38 @@
1
+ # Generated by typed-dev — see CONTRIBUTING.md.
2
+ from typing_extensions import TypedDict
3
+ from typed_evedex.core import RpcEndpoint
4
+ from typed_evedex.schemas import IssuedApiKey
5
+
6
+
7
+ class Request(TypedDict):
8
+ apiKeyId: str
9
+ """Id of the key to regenerate."""
10
+
11
+
12
+ class Regenerate(RpcEndpoint):
13
+ """Issue a new secret for an API key, invalidating the old one, and return it. Requires the session. The key keeps its id, name, scopes and expiry."""
14
+
15
+ async def regenerate(
16
+ self,
17
+ api_key_id: str,
18
+ *,
19
+ validate: bool | None = None,
20
+ ) -> IssuedApiKey:
21
+ """Issue a new secret for an API key, invalidating the old one, and return it. Requires the session. The key keeps its id, name, scopes and expiry.
22
+
23
+ Args:
24
+ api_key_id: Id of the key to regenerate.
25
+ validate: Override this call's response validation; falls back to the client-level default when omitted.
26
+
27
+ References:
28
+ - [Official docs](https://docs.evedex.com/developers/developers/authorization)
29
+ """
30
+ return await self.request(
31
+ Request(apiKeyId=api_key_id),
32
+ method='PUT',
33
+ path='/auth/api-key/{apiKeyId}/regenerate',
34
+ meta={'auth': 'private'},
35
+ validate=validate,
36
+ request_type=Request,
37
+ response_type=IssuedApiKey,
38
+ )
@@ -0,0 +1,37 @@
1
+ # Generated by typed-dev — see CONTRIBUTING.md.
2
+ from typing_extensions import Any, TypedDict
3
+ from typed_evedex.core import RpcEndpoint
4
+
5
+
6
+ class Request(TypedDict):
7
+ apiKeyId: str
8
+ """Id of the deleted key to restore."""
9
+
10
+
11
+ RestoredApiKey = dict[str, Any]
12
+
13
+
14
+ class Restore(RpcEndpoint):
15
+ """Restore a deleted API key. Requires the session."""
16
+
17
+ async def restore(
18
+ self, api_key_id: str, *, validate: bool | None = None
19
+ ) -> RestoredApiKey:
20
+ """Restore a deleted API key. Requires the session.
21
+
22
+ Args:
23
+ api_key_id: Id of the deleted key to restore.
24
+ validate: Override this call's response validation; falls back to the client-level default when omitted.
25
+
26
+ References:
27
+ - [Official docs](https://docs.evedex.com/developers/developers/authorization)
28
+ """
29
+ return await self.request(
30
+ Request(apiKeyId=api_key_id),
31
+ method='POST',
32
+ path='/auth/api-key/{apiKeyId}/restore',
33
+ meta={'auth': 'private'},
34
+ validate=validate,
35
+ request_type=Request,
36
+ response_type=RestoredApiKey,
37
+ )