avantis-trader-sdk 0.8.13__py3-none-any.whl → 0.8.14__py3-none-any.whl
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.
- avantis_trader_sdk/__init__.py +2 -1
- avantis_trader_sdk/abis/Trading.sol/Trading.json +1347 -1
- avantis_trader_sdk/config.py +2 -0
- avantis_trader_sdk/feed/feed_client.py +96 -6
- avantis_trader_sdk/rpc/pairs_cache.py +19 -0
- avantis_trader_sdk/rpc/trade.py +49 -20
- avantis_trader_sdk/types.py +72 -0
- {avantis_trader_sdk-0.8.13.dist-info → avantis_trader_sdk-0.8.14.dist-info}/METADATA +1 -1
- {avantis_trader_sdk-0.8.13.dist-info → avantis_trader_sdk-0.8.14.dist-info}/RECORD +11 -11
- {avantis_trader_sdk-0.8.13.dist-info → avantis_trader_sdk-0.8.14.dist-info}/WHEEL +0 -0
- {avantis_trader_sdk-0.8.13.dist-info → avantis_trader_sdk-0.8.14.dist-info}/top_level.txt +0 -0
avantis_trader_sdk/config.py
CHANGED
|
@@ -11,5 +11,7 @@ MAINNET_ADDRESSES = {
|
|
|
11
11
|
|
|
12
12
|
AVANTIS_SOCKET_API = "https://socket-api-pub.avantisfi.com/socket-api/v1/data"
|
|
13
13
|
AVANTIS_CORE_API_BASE_URL = "https://core.avantisfi.com"
|
|
14
|
+
AVANTIS_FEED_V3_URL = "https://feed-v3.avantisfi.com"
|
|
15
|
+
PYTH_LAZER_SSE_URL = "https://pyth-lazer-proxy-3.dourolabs.app/v1/stream"
|
|
14
16
|
|
|
15
17
|
CONTRACT_ADDRESSES = MAINNET_ADDRESSES
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import websockets
|
|
3
|
-
from ..types import
|
|
4
|
-
|
|
3
|
+
from ..types import (
|
|
4
|
+
PriceFeedResponse,
|
|
5
|
+
PriceFeedUpdatesResponse,
|
|
6
|
+
PairInfoFeed,
|
|
7
|
+
FeedV3PriceResponse,
|
|
8
|
+
LazerPriceFeedResponse,
|
|
9
|
+
)
|
|
10
|
+
from typing import List, Callable, Optional
|
|
5
11
|
import requests
|
|
6
12
|
from pydantic import ValidationError
|
|
7
|
-
from ..config import AVANTIS_SOCKET_API
|
|
13
|
+
from ..config import AVANTIS_SOCKET_API, AVANTIS_FEED_V3_URL, PYTH_LAZER_SSE_URL
|
|
8
14
|
import asyncio
|
|
9
15
|
from concurrent.futures import ThreadPoolExecutor
|
|
16
|
+
import aiohttp
|
|
10
17
|
|
|
11
18
|
|
|
12
19
|
class FeedClient:
|
|
@@ -22,14 +29,21 @@ class FeedClient:
|
|
|
22
29
|
hermes_url="https://hermes.pyth.network/v2/updates/price/latest",
|
|
23
30
|
socket_api: str = AVANTIS_SOCKET_API,
|
|
24
31
|
pair_fetcher: Callable = None,
|
|
32
|
+
feed_v3_url: str = AVANTIS_FEED_V3_URL,
|
|
33
|
+
lazer_sse_url: str = PYTH_LAZER_SSE_URL,
|
|
25
34
|
):
|
|
26
35
|
"""
|
|
27
36
|
Constructor for the FeedClient class.
|
|
28
37
|
|
|
29
38
|
Args:
|
|
30
|
-
ws_url: Optional - The websocket URL to connect to.
|
|
31
|
-
on_error: Optional callback for handling websocket errors.
|
|
32
|
-
on_close: Optional callback for handling websocket close events.
|
|
39
|
+
ws_url: Optional - The websocket URL to connect to (Pyth Hermes).
|
|
40
|
+
on_error: Optional callback for handling websocket/SSE errors.
|
|
41
|
+
on_close: Optional callback for handling websocket/SSE close events.
|
|
42
|
+
hermes_url: Optional - The Hermes HTTP API URL.
|
|
43
|
+
socket_api: Optional - The Avantis socket API URL.
|
|
44
|
+
pair_fetcher: Optional - Custom pair fetcher function.
|
|
45
|
+
feed_v3_url: Optional - The feed-v3 API URL for price update data.
|
|
46
|
+
lazer_sse_url: Optional - The Pyth Lazer SSE URL for real-time prices.
|
|
33
47
|
"""
|
|
34
48
|
if (
|
|
35
49
|
ws_url is not None
|
|
@@ -40,11 +54,15 @@ class FeedClient:
|
|
|
40
54
|
|
|
41
55
|
self.ws_url = ws_url
|
|
42
56
|
self.hermes_url = hermes_url
|
|
57
|
+
self.feed_v3_url = feed_v3_url
|
|
58
|
+
self.lazer_sse_url = lazer_sse_url
|
|
43
59
|
self.pair_feeds = {}
|
|
44
60
|
self.feed_pairs = {}
|
|
45
61
|
self.price_feed_callbacks = {}
|
|
62
|
+
self.lazer_callbacks = {}
|
|
46
63
|
self._socket = None
|
|
47
64
|
self._connected = False
|
|
65
|
+
self._lazer_connected = False
|
|
48
66
|
self._on_error = on_error
|
|
49
67
|
self._on_close = on_close
|
|
50
68
|
self.socket_api = socket_api
|
|
@@ -267,3 +285,75 @@ class FeedClient:
|
|
|
267
285
|
return PriceFeedUpdatesResponse(**data)
|
|
268
286
|
else:
|
|
269
287
|
response.raise_for_status()
|
|
288
|
+
|
|
289
|
+
async def get_price_update_data(self, pair_index: int) -> FeedV3PriceResponse:
|
|
290
|
+
"""
|
|
291
|
+
Retrieves price update data from the feed-v3 API for a specific pair.
|
|
292
|
+
|
|
293
|
+
This returns both core (Pyth Hermes) and pro (Pyth Lazer) price data,
|
|
294
|
+
including the priceUpdateData bytes needed for contract calls.
|
|
295
|
+
|
|
296
|
+
Args:
|
|
297
|
+
pair_index: The pair index to get price update data for.
|
|
298
|
+
|
|
299
|
+
Returns:
|
|
300
|
+
A FeedV3PriceResponse containing core and pro price data.
|
|
301
|
+
|
|
302
|
+
Raises:
|
|
303
|
+
requests.HTTPError: If the API request fails.
|
|
304
|
+
"""
|
|
305
|
+
url = f"{self.feed_v3_url}/v2/pairs/{pair_index}/price-update-data"
|
|
306
|
+
response = requests.get(url, timeout=10)
|
|
307
|
+
response.raise_for_status()
|
|
308
|
+
data = response.json()
|
|
309
|
+
return FeedV3PriceResponse(**data)
|
|
310
|
+
|
|
311
|
+
async def listen_for_lazer_price_updates(
|
|
312
|
+
self,
|
|
313
|
+
lazer_feed_ids: List[int],
|
|
314
|
+
callback: Callable[[LazerPriceFeedResponse], None],
|
|
315
|
+
):
|
|
316
|
+
"""
|
|
317
|
+
Listens for real-time price updates from the Pyth Lazer SSE stream.
|
|
318
|
+
|
|
319
|
+
This is the Pyth Pro alternative to the WebSocket-based listen_for_price_updates.
|
|
320
|
+
|
|
321
|
+
Args:
|
|
322
|
+
lazer_feed_ids: List of Lazer feed IDs to subscribe to.
|
|
323
|
+
callback: Callback function to handle price updates.
|
|
324
|
+
|
|
325
|
+
Raises:
|
|
326
|
+
Exception: If an error occurs while listening for price updates.
|
|
327
|
+
"""
|
|
328
|
+
params = "&".join([f"price_feed_ids={fid}" for fid in lazer_feed_ids])
|
|
329
|
+
url = f"{self.lazer_sse_url}?{params}"
|
|
330
|
+
|
|
331
|
+
try:
|
|
332
|
+
async with aiohttp.ClientSession() as session:
|
|
333
|
+
async with session.get(url) as response:
|
|
334
|
+
self._lazer_connected = True
|
|
335
|
+
async for line in response.content:
|
|
336
|
+
line = line.decode("utf-8").strip()
|
|
337
|
+
if line.startswith("data:"):
|
|
338
|
+
try:
|
|
339
|
+
data = json.loads(line[5:].strip())
|
|
340
|
+
price_response = LazerPriceFeedResponse(**data)
|
|
341
|
+
callback(price_response)
|
|
342
|
+
except json.JSONDecodeError as e:
|
|
343
|
+
if self._on_error:
|
|
344
|
+
self._on_error(e)
|
|
345
|
+
except ValidationError as e:
|
|
346
|
+
if self._on_error:
|
|
347
|
+
self._on_error(e)
|
|
348
|
+
except aiohttp.ClientError as e:
|
|
349
|
+
self._lazer_connected = False
|
|
350
|
+
if self._on_error:
|
|
351
|
+
self._on_error(e)
|
|
352
|
+
else:
|
|
353
|
+
raise e
|
|
354
|
+
except Exception as e:
|
|
355
|
+
self._lazer_connected = False
|
|
356
|
+
if self._on_close:
|
|
357
|
+
self._on_close(e)
|
|
358
|
+
else:
|
|
359
|
+
raise e
|
|
@@ -187,3 +187,22 @@ class PairsCache:
|
|
|
187
187
|
"""
|
|
188
188
|
pairs_info = await self.get_pairs_info()
|
|
189
189
|
return pairs_info[pair_index].from_ + "/" + pairs_info[pair_index].to
|
|
190
|
+
|
|
191
|
+
async def get_lazer_feed_id(self, pair_index: int) -> int:
|
|
192
|
+
"""
|
|
193
|
+
Retrieves the Pyth Lazer feed ID for a pair.
|
|
194
|
+
|
|
195
|
+
Args:
|
|
196
|
+
pair_index: The pair index.
|
|
197
|
+
|
|
198
|
+
Returns:
|
|
199
|
+
The Lazer feed ID as an integer.
|
|
200
|
+
|
|
201
|
+
Raises:
|
|
202
|
+
ValueError: If the pair does not have a Lazer feed configured.
|
|
203
|
+
"""
|
|
204
|
+
pair_info = await self.get_pair_info_from_socket(pair_index)
|
|
205
|
+
lazer_feed = pair_info.get("lazerFeed")
|
|
206
|
+
if not lazer_feed:
|
|
207
|
+
raise ValueError(f"Pair {pair_index} does not have a Lazer feed configured")
|
|
208
|
+
return lazer_feed.get("feedId")
|
avantis_trader_sdk/rpc/trade.py
CHANGED
|
@@ -8,6 +8,7 @@ from ..types import (
|
|
|
8
8
|
TradeInfo,
|
|
9
9
|
PendingLimitOrderExtendedResponse,
|
|
10
10
|
MarginUpdateType,
|
|
11
|
+
PriceSourcing,
|
|
11
12
|
)
|
|
12
13
|
from typing import Optional, List, Tuple
|
|
13
14
|
import math
|
|
@@ -595,6 +596,7 @@ class TradeRPC:
|
|
|
595
596
|
margin_update_type: MarginUpdateType,
|
|
596
597
|
collateral_change: float,
|
|
597
598
|
trader: Optional[str] = None,
|
|
599
|
+
price_sourcing: PriceSourcing = PriceSourcing.PRO,
|
|
598
600
|
):
|
|
599
601
|
"""
|
|
600
602
|
Builds a transaction to update the margin of a trade.
|
|
@@ -605,6 +607,7 @@ class TradeRPC:
|
|
|
605
607
|
margin_update_type: The margin update type.
|
|
606
608
|
collateral_change: The collateral change.
|
|
607
609
|
trader (optional): The trader's wallet address.
|
|
610
|
+
price_sourcing: The price sourcing to use. Defaults to PriceSourcing.PRO (Pyth Pro/Lazer).
|
|
608
611
|
Returns:
|
|
609
612
|
A transaction object.
|
|
610
613
|
"""
|
|
@@ -615,11 +618,15 @@ class TradeRPC:
|
|
|
615
618
|
|
|
616
619
|
collateral_change = int(collateral_change * 10**6)
|
|
617
620
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
621
|
+
if price_sourcing == PriceSourcing.PRO:
|
|
622
|
+
price_data = await self.feed_client.get_price_update_data(pair_index)
|
|
623
|
+
price_update_data = price_data.pro.price_update_data
|
|
624
|
+
else:
|
|
625
|
+
pair_name = await self.client.pairs_cache.get_pair_name_from_index(
|
|
626
|
+
pair_index
|
|
627
|
+
)
|
|
628
|
+
price_data = await self.feed_client.get_latest_price_updates([pair_name])
|
|
629
|
+
price_update_data = "0x" + price_data.binary.data[0]
|
|
623
630
|
|
|
624
631
|
transaction = await Trading.functions.updateMargin(
|
|
625
632
|
pair_index,
|
|
@@ -627,6 +634,7 @@ class TradeRPC:
|
|
|
627
634
|
margin_update_type.value,
|
|
628
635
|
collateral_change,
|
|
629
636
|
[price_update_data],
|
|
637
|
+
price_sourcing.value,
|
|
630
638
|
).build_transaction(
|
|
631
639
|
{
|
|
632
640
|
"from": trader,
|
|
@@ -645,6 +653,7 @@ class TradeRPC:
|
|
|
645
653
|
margin_update_type: MarginUpdateType,
|
|
646
654
|
collateral_change: float,
|
|
647
655
|
trader: Optional[str] = None,
|
|
656
|
+
price_sourcing: PriceSourcing = PriceSourcing.PRO,
|
|
648
657
|
):
|
|
649
658
|
"""
|
|
650
659
|
Builds a transaction to update the margin of a trade.
|
|
@@ -655,6 +664,7 @@ class TradeRPC:
|
|
|
655
664
|
margin_update_type: The margin update type.
|
|
656
665
|
collateral_change: The collateral change.
|
|
657
666
|
trader (optional): The trader's wallet address.
|
|
667
|
+
price_sourcing: The price sourcing to use. Defaults to PriceSourcing.PRO (Pyth Pro/Lazer).
|
|
658
668
|
Returns:
|
|
659
669
|
A transaction object.
|
|
660
670
|
"""
|
|
@@ -665,11 +675,15 @@ class TradeRPC:
|
|
|
665
675
|
|
|
666
676
|
collateral_change = int(collateral_change * 10**6)
|
|
667
677
|
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
678
|
+
if price_sourcing == PriceSourcing.PRO:
|
|
679
|
+
price_data = await self.feed_client.get_price_update_data(pair_index)
|
|
680
|
+
price_update_data = price_data.pro.price_update_data
|
|
681
|
+
else:
|
|
682
|
+
pair_name = await self.client.pairs_cache.get_pair_name_from_index(
|
|
683
|
+
pair_index
|
|
684
|
+
)
|
|
685
|
+
price_data = await self.feed_client.get_latest_price_updates([pair_name])
|
|
686
|
+
price_update_data = "0x" + price_data.binary.data[0]
|
|
673
687
|
|
|
674
688
|
transaction = await Trading.functions.updateMargin(
|
|
675
689
|
pair_index,
|
|
@@ -677,6 +691,7 @@ class TradeRPC:
|
|
|
677
691
|
margin_update_type.value,
|
|
678
692
|
collateral_change,
|
|
679
693
|
[price_update_data],
|
|
694
|
+
price_sourcing.value,
|
|
680
695
|
).build_transaction(
|
|
681
696
|
{
|
|
682
697
|
"from": trader,
|
|
@@ -708,6 +723,7 @@ class TradeRPC:
|
|
|
708
723
|
take_profit_price: float,
|
|
709
724
|
stop_loss_price: float,
|
|
710
725
|
trader: str = None,
|
|
726
|
+
price_sourcing: PriceSourcing = PriceSourcing.PRO,
|
|
711
727
|
):
|
|
712
728
|
"""
|
|
713
729
|
Builds a transaction to update the stop loss and take profit of a trade.
|
|
@@ -718,6 +734,7 @@ class TradeRPC:
|
|
|
718
734
|
take_profit_price: The take profit price.
|
|
719
735
|
stop_loss_price: The stop loss price. Pass 0 if you want to remove the stop loss.
|
|
720
736
|
trader (optional): The trader's wallet address.
|
|
737
|
+
price_sourcing: The price sourcing to use. Defaults to PriceSourcing.PRO (Pyth Pro/Lazer).
|
|
721
738
|
Returns:
|
|
722
739
|
A transaction object.
|
|
723
740
|
"""
|
|
@@ -729,11 +746,15 @@ class TradeRPC:
|
|
|
729
746
|
if trader is None:
|
|
730
747
|
trader = self.client.get_signer().get_ethereum_address()
|
|
731
748
|
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
749
|
+
if price_sourcing == PriceSourcing.PRO:
|
|
750
|
+
price_data = await self.feed_client.get_price_update_data(pair_index)
|
|
751
|
+
price_update_data = price_data.pro.price_update_data
|
|
752
|
+
else:
|
|
753
|
+
pair_name = await self.client.pairs_cache.get_pair_name_from_index(
|
|
754
|
+
pair_index
|
|
755
|
+
)
|
|
756
|
+
price_data = await self.feed_client.get_latest_price_updates([pair_name])
|
|
757
|
+
price_update_data = "0x" + price_data.binary.data[0]
|
|
737
758
|
|
|
738
759
|
take_profit_price = int(take_profit_price * 10**10)
|
|
739
760
|
stop_loss_price = int(stop_loss_price * 10**10)
|
|
@@ -744,6 +765,7 @@ class TradeRPC:
|
|
|
744
765
|
stop_loss_price,
|
|
745
766
|
take_profit_price,
|
|
746
767
|
[price_update_data],
|
|
768
|
+
price_sourcing.value,
|
|
747
769
|
).build_transaction(
|
|
748
770
|
{
|
|
749
771
|
"from": trader,
|
|
@@ -763,6 +785,7 @@ class TradeRPC:
|
|
|
763
785
|
take_profit_price: float,
|
|
764
786
|
stop_loss_price: float,
|
|
765
787
|
trader: str = None,
|
|
788
|
+
price_sourcing: PriceSourcing = PriceSourcing.PRO,
|
|
766
789
|
):
|
|
767
790
|
"""
|
|
768
791
|
Builds a transaction to update the stop loss and take profit of a trade.
|
|
@@ -773,6 +796,7 @@ class TradeRPC:
|
|
|
773
796
|
take_profit_price: The take profit price.
|
|
774
797
|
stop_loss_price: The stop loss price. Pass 0 if you want to remove the stop loss.
|
|
775
798
|
trader (optional): The trader's wallet address.
|
|
799
|
+
price_sourcing: The price sourcing to use. Defaults to PriceSourcing.PRO (Pyth Pro/Lazer).
|
|
776
800
|
Returns:
|
|
777
801
|
A transaction object.
|
|
778
802
|
"""
|
|
@@ -784,11 +808,15 @@ class TradeRPC:
|
|
|
784
808
|
if trader is None:
|
|
785
809
|
trader = self.client.get_signer().get_ethereum_address()
|
|
786
810
|
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
811
|
+
if price_sourcing == PriceSourcing.PRO:
|
|
812
|
+
price_data = await self.feed_client.get_price_update_data(pair_index)
|
|
813
|
+
price_update_data = price_data.pro.price_update_data
|
|
814
|
+
else:
|
|
815
|
+
pair_name = await self.client.pairs_cache.get_pair_name_from_index(
|
|
816
|
+
pair_index
|
|
817
|
+
)
|
|
818
|
+
price_data = await self.feed_client.get_latest_price_updates([pair_name])
|
|
819
|
+
price_update_data = "0x" + price_data.binary.data[0]
|
|
792
820
|
|
|
793
821
|
take_profit_price = int(take_profit_price * 10**10)
|
|
794
822
|
stop_loss_price = int(stop_loss_price * 10**10)
|
|
@@ -799,6 +827,7 @@ class TradeRPC:
|
|
|
799
827
|
stop_loss_price,
|
|
800
828
|
take_profit_price,
|
|
801
829
|
[price_update_data],
|
|
830
|
+
price_sourcing.value,
|
|
802
831
|
).build_transaction(
|
|
803
832
|
{
|
|
804
833
|
"from": trader,
|
avantis_trader_sdk/types.py
CHANGED
|
@@ -487,6 +487,78 @@ class MarginUpdateType(Enum):
|
|
|
487
487
|
WITHDRAW = 1
|
|
488
488
|
|
|
489
489
|
|
|
490
|
+
class PriceSourcing(Enum):
|
|
491
|
+
"""Price sourcing options for contract calls."""
|
|
492
|
+
|
|
493
|
+
HERMES = 0 # Pyth Hermes (legacy)
|
|
494
|
+
PRO = 1 # Pyth Pro / Lazer
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
class LazerPriceFeed(BaseModel):
|
|
498
|
+
"""Single price feed from Pyth Lazer SSE stream."""
|
|
499
|
+
|
|
500
|
+
price_feed_id: int = Field(..., alias="priceFeedId")
|
|
501
|
+
price: str
|
|
502
|
+
best_bid_price: str = Field(..., alias="bestBidPrice")
|
|
503
|
+
best_ask_price: str = Field(..., alias="bestAskPrice")
|
|
504
|
+
publisher_count: int = Field(..., alias="publisherCount")
|
|
505
|
+
exponent: int
|
|
506
|
+
confidence: int
|
|
507
|
+
|
|
508
|
+
@property
|
|
509
|
+
def converted_price(self) -> float:
|
|
510
|
+
return int(self.price) / 10 ** -self.exponent
|
|
511
|
+
|
|
512
|
+
class Config:
|
|
513
|
+
populate_by_name = True
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
class LazerPriceFeedResponse(BaseModel):
|
|
517
|
+
"""Response from Pyth Lazer SSE stream."""
|
|
518
|
+
|
|
519
|
+
timestamp_us: str = Field(..., alias="timestampUs")
|
|
520
|
+
price_feeds: List[LazerPriceFeed] = Field(..., alias="priceFeeds")
|
|
521
|
+
|
|
522
|
+
@property
|
|
523
|
+
def timestamp_ms(self) -> int:
|
|
524
|
+
return int(self.timestamp_us) // 1000
|
|
525
|
+
|
|
526
|
+
class Config:
|
|
527
|
+
populate_by_name = True
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
class FeedV3CorePriceData(BaseModel):
|
|
531
|
+
"""Core price data from feed-v3 API (Pyth Hermes)."""
|
|
532
|
+
|
|
533
|
+
price_update_data: str = Field(..., alias="priceUpdateData")
|
|
534
|
+
price: float
|
|
535
|
+
publish_timestamp_ms: int = Field(..., alias="publishTimestampMs")
|
|
536
|
+
|
|
537
|
+
class Config:
|
|
538
|
+
populate_by_name = True
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
class FeedV3ProPriceData(BaseModel):
|
|
542
|
+
"""Pro price data from feed-v3 API (Pyth Pro/Lazer)."""
|
|
543
|
+
|
|
544
|
+
price_update_data: str = Field(..., alias="priceUpdateData")
|
|
545
|
+
price: float
|
|
546
|
+
publish_timestamp_ms: int = Field(..., alias="publishTimestampMs")
|
|
547
|
+
|
|
548
|
+
class Config:
|
|
549
|
+
populate_by_name = True
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
class FeedV3PriceResponse(BaseModel):
|
|
553
|
+
"""Response from feed-v3 API containing both core and pro price data."""
|
|
554
|
+
|
|
555
|
+
core: FeedV3CorePriceData
|
|
556
|
+
pro: FeedV3ProPriceData
|
|
557
|
+
|
|
558
|
+
class Config:
|
|
559
|
+
populate_by_name = True
|
|
560
|
+
|
|
561
|
+
|
|
490
562
|
class LossProtectionInfo(BaseModel):
|
|
491
563
|
percentage: float
|
|
492
564
|
amount: float
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
avantis_trader_sdk/__init__.py,sha256=
|
|
1
|
+
avantis_trader_sdk/__init__.py,sha256=piAMiNqSagDn1nQUlJ2y5v_egZfg11Aui8ly04gjbKQ,168
|
|
2
2
|
avantis_trader_sdk/client.py,sha256=M01uwXIdxJjmPEcFr1MsDuoxU9YGddxcGMTPucOOssA,10903
|
|
3
|
-
avantis_trader_sdk/config.py,sha256=
|
|
4
|
-
avantis_trader_sdk/types.py,sha256=
|
|
3
|
+
avantis_trader_sdk/config.py,sha256=sE9y9R1ql1UwpFSs-qTbNfvO5iffRRUdYtx_JVOaWyA,838
|
|
4
|
+
avantis_trader_sdk/types.py,sha256=spp3n7UedgVM-w9JyCzQuqi8JiJmSjm24j4cxg0-gx8,17274
|
|
5
5
|
avantis_trader_sdk/utils.py,sha256=gTYgNVVd5rLZEUf2eyJftjKYxn55wRm09xAXIF_xjXM,2831
|
|
6
6
|
avantis_trader_sdk/abis/AggregatorV3Interface.json,sha256=qUeDGZ55Akgu8zOv_Wzf21sTREEyZXF47K_TdPcliBM,26244
|
|
7
7
|
avantis_trader_sdk/abis/Sanctions.json,sha256=Fsn67jEGW4GdS15icrtxN_sur4e8-06SoijL7K79vAE,3857
|
|
@@ -128,7 +128,7 @@ avantis_trader_sdk/abis/Timelock.t.sol/Timelock.json,sha256=N58EBp-LRYuIUvs5s0ze
|
|
|
128
128
|
avantis_trader_sdk/abis/TimelockBase.t.sol/TimelockBase.json,sha256=Bx-U5If_X5Dd49-GBDQTst3gDp8hG1YptPxoDyw3auw,1111293
|
|
129
129
|
avantis_trader_sdk/abis/TimelockController.sol/TimelockController.json,sha256=k6uk3eErrOFWCIaSBno0aqziOi744NEdxnK8vG-ohrA,333379
|
|
130
130
|
avantis_trader_sdk/abis/TradeBase.t.sol/TradeBase.json,sha256=w3sGtHzPkd45TLRhRxQzlUPmwYfjay7_4rU6CyuFu9M,1328584
|
|
131
|
-
avantis_trader_sdk/abis/Trading.sol/Trading.json,sha256=
|
|
131
|
+
avantis_trader_sdk/abis/Trading.sol/Trading.json,sha256=IM8Uv4SSXq23L8W-eJSzPtmz_h10WaRWao5ks0uiOLo,41789
|
|
132
132
|
avantis_trader_sdk/abis/TradingCallbacks.sol/TradingCallbacks.json,sha256=m_tO-wHtc5hXMky0wbLj6lqFt12SgtjlBQZQnmShECU,199077
|
|
133
133
|
avantis_trader_sdk/abis/TradingStorage.sol/TradingStorage.json,sha256=ImaFCa_a4htBOw99ITGzfuWlUeN3CvIROv0f4KH-hqw,313012
|
|
134
134
|
avantis_trader_sdk/abis/Tranche.sol/Tranche.json,sha256=AZX5KxzyXI6ao93UrZsqQE9FpNZAArOqReJX0OzoT2E,392082
|
|
@@ -195,16 +195,16 @@ avantis_trader_sdk/crypto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
195
195
|
avantis_trader_sdk/crypto/spki.py,sha256=CNy7A8TTwBHiNSzIj7uqiHKAeLcn1Q9MbszW_2mdXgI,3080
|
|
196
196
|
avantis_trader_sdk/feed/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
197
197
|
avantis_trader_sdk/feed/feedIds.json,sha256=T77nww3eRiQt8rqZBDpdxA49USGyfI0dQBPnzo-H1dE,6697
|
|
198
|
-
avantis_trader_sdk/feed/feed_client.py,sha256=
|
|
198
|
+
avantis_trader_sdk/feed/feed_client.py,sha256=sMlf6XaMoAiJ4DSxim-Bd81kPlM2laT0QmLbMfR6P9Q,12989
|
|
199
199
|
avantis_trader_sdk/rpc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
200
200
|
avantis_trader_sdk/rpc/asset_parameters.py,sha256=ESx4eg0K3W9EigsEmN0a7Pym2hL4iJgMWmzhHmmWXyY,19323
|
|
201
201
|
avantis_trader_sdk/rpc/blended.py,sha256=tRWfO7XreY_YahL9ACpss7ylWz5fdk6G3bv4QpLpGms,2441
|
|
202
202
|
avantis_trader_sdk/rpc/category_parameters.py,sha256=ofsKct23E8DThCKqP627ol-_YPIdN5HAn09eLqyf6WM,7965
|
|
203
203
|
avantis_trader_sdk/rpc/fee_parameters.py,sha256=0UCf4FZQp26777o8aA75oOO-b3xFK88c-_glbqQ2-8M,9132
|
|
204
|
-
avantis_trader_sdk/rpc/pairs_cache.py,sha256=
|
|
204
|
+
avantis_trader_sdk/rpc/pairs_cache.py,sha256=wtxkvaemVbJclCSiOcyelbBcQzwJbIOP0JF0rfyE56M,7234
|
|
205
205
|
avantis_trader_sdk/rpc/rpc_helpers.py,sha256=Sywz6BIj4y2gkudkOhPEND2r2ILvtfq502A_pSEUDv8,284
|
|
206
206
|
avantis_trader_sdk/rpc/snapshot.py,sha256=hfLRfCbOqnqcuZncaiTmm0BJ2pgLFOEHgsgQ-92Xlcs,5352
|
|
207
|
-
avantis_trader_sdk/rpc/trade.py,sha256=
|
|
207
|
+
avantis_trader_sdk/rpc/trade.py,sha256=QZCc0wU_7tPzC_Bo32JlSxcDZZF7NK-udqNG54myizM,31940
|
|
208
208
|
avantis_trader_sdk/rpc/trading_parameters.py,sha256=_tpzgyMO_I-XebVWtiWSlmedtbr66elUxCRgegd1aao,4626
|
|
209
209
|
avantis_trader_sdk/signers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
210
210
|
avantis_trader_sdk/signers/base.py,sha256=QaOu0CxFq60oR4LegCp1XwONMQx8ZShXyiLZvfcbCPM,260
|
|
@@ -212,7 +212,7 @@ avantis_trader_sdk/signers/kms_signer.py,sha256=lxK3f9KQsdCDAvOE1SHleKjI8zD_3PTv
|
|
|
212
212
|
avantis_trader_sdk/signers/local_signer.py,sha256=kUx5vExiBfvFGmoMCFR6b7_4cXx2mvYOJNqZQDIEcG8,505
|
|
213
213
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
214
214
|
tests/test_client.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
215
|
-
avantis_trader_sdk-0.8.
|
|
216
|
-
avantis_trader_sdk-0.8.
|
|
217
|
-
avantis_trader_sdk-0.8.
|
|
218
|
-
avantis_trader_sdk-0.8.
|
|
215
|
+
avantis_trader_sdk-0.8.14.dist-info/METADATA,sha256=l4vQYzfNXuKcECXL-Y1xHmDdrwvm5s_eok3AZmAJOwo,5032
|
|
216
|
+
avantis_trader_sdk-0.8.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
217
|
+
avantis_trader_sdk-0.8.14.dist-info/top_level.txt,sha256=XffaQJ68SGT1KUz2HHXSGSEsmNy8-AGjgtO127xhzQA,25
|
|
218
|
+
avantis_trader_sdk-0.8.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|