From 141fd1330325a918308151eaa679c796ceea29a3 Mon Sep 17 00:00:00 2001 From: 4TT1L4 <2914096+4TT1L4@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:45:05 +0200 Subject: [PATCH] Minswap default price source in API #28 --- api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api.py b/api.py index eee4342..2fdf132 100644 --- a/api.py +++ b/api.py @@ -60,12 +60,12 @@ def get_own_orders(self, market_id : str): response: Response[ErrorResponse | OrderBookInfo] = get_order_books_market_id.sync_detailed(client=self.client, market_id=market_id, address=self.own_address) return cast(OrderBookInfo, self.process_response(response)) - def get_price_history(self, market_id : str, resolution : str, from_date : str | Unset = UNSET, until_date: Unset | str = UNSET, sort="asc", limit=1000): - response: Response[ErrorResponse | List[MarketOHLC]] = get_historical_prices_maestro_market_dex.sync_detailed(client=self.client, market=market_id, dex="genius-yield", resolution=resolution, from_=from_date, to=until_date, sort=sort, limit=limit) + def get_price_history(self, market_id : str, resolution : str, from_date : str | Unset = UNSET, until_date: Unset | str = UNSET, sort="asc", limit=100, dex="minswap"): + response: Response[ErrorResponse | List[MarketOHLC]] = get_historical_prices_maestro_market_dex.sync_detailed(client=self.client, market=market_id, dex=dex, resolution=resolution, from_=from_date, to=until_date, sort=sort, limit=limit) return cast(List[MarketOHLC], self.process_response(response)) def get_market_price(self, market_id : str): - response: Response[ErrorResponse | List[MarketOHLC]] = get_historical_prices_maestro_market_dex.sync_detailed(client=self.client, market=market_id, dex="genius-yield", resolution="1m", sort="desc", limit=1) + response: Response[ErrorResponse | List[MarketOHLC]] = get_historical_prices_maestro_market_dex.sync_detailed(client=self.client, market=market_id, dex="minswap", resolution="1m", sort="desc", limit=1) return cast(List[MarketOHLC], self.process_response(response)) def place_order(self, offered_amount : str, offered_token : str, price_token : str, price_amount : str):