Skip to content

Commit

Permalink
Minswap default price source in API #28
Browse files Browse the repository at this point in the history
  • Loading branch information
4TT1L4 committed Apr 18, 2024
1 parent 3eecaff commit 141fd13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 141fd13

Please sign in to comment.