Skip to content

Commit

Permalink
add trade history endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
kjr217 authored May 7, 2024
1 parent 59fd09c commit f7d8268
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hundred_x/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,15 @@ def get_product(self, product_symbol: str) -> Any:
"""
return requests.get(self.rest_url + f"/v1/products/{product_symbol}").json()

def get_trade_history(self, symbol: str, lookback: int) -> Any:
"""
Get the trade history for a specific product.
"""
return requests.get(
self.rest_url + f"/v1/trade-history",
params={"symbol": symbol, "lookback": lookback},
).json()

def get_server_time(self) -> Any:
"""
Get the server time.
Expand Down

0 comments on commit f7d8268

Please sign in to comment.