diff --git a/pyproject.toml b/pyproject.toml index b9e8631..dd26db5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "bluefin_v2_client_sui" -version = "1.1.9" +version = "1.1.10" description = "Library to interact with Bluefin exchange protocol including its off-chain api-gateway and on-chain contracts" readme = "README.md" requires-python = ">=3.8" diff --git a/src/bluefin_v2_client/client.py b/src/bluefin_v2_client/client.py index 58b3395..abf17f2 100644 --- a/src/bluefin_v2_client/client.py +++ b/src/bluefin_v2_client/client.py @@ -1067,18 +1067,21 @@ async def get_user_trades(self, params: GetUserTradesRequest): Inputs: params(GetUserTradesRequest): params to query trades (e.g. symbol) Returns: - list: a list of positions + list: a list of trade """ params = extract_enums(params, ["symbol", "type"]) return await self.apis.get(SERVICE_URLS["USER"]["USER_TRADES"], params, True) async def get_user_trades_history(self, params: GetUserTradesHistoryRequest): """ - Returns a list of user trades history. + Returns a list of the user trades history records, a boolean indicating if there is/are more page(s), and the next page number. Inputs: params(GetUserTradesHistoryRequest): params to query trades (e.g. symbol) Returns: - list: a list of positions + GetUserTradesHistoryResponse: + isMoreDataAvailable: boolean indicating if there is/are more page(s) + nextCursor: the next page number + data: a list of the user trades history record """ params = extract_enums(params, ["symbol", "type"]) return await self.apis.get( diff --git a/src/bluefin_v2_client/interfaces.py b/src/bluefin_v2_client/interfaces.py index e7c5185..e23e1fa 100644 --- a/src/bluefin_v2_client/interfaces.py +++ b/src/bluefin_v2_client/interfaces.py @@ -268,6 +268,27 @@ class GetUserTransferHistoryResponse(TypedDict): nextCursor: int # next page number data: List[UserTransferHistoryResponse] +class UserTradeHistoryResponse(TypedDict): + id: int + symbol: str + commission: str + commissionAsset: str + maker: bool + orderHash: str + side: str + price: str + quantity: str + quoteQty: str + realizedPnl: str + time: int + clientId: str + orderId: int + tradeType: str + +class GetUserTradeHistoryResponse(TypedDict): + isMoreDataAvailable: bool # boolean indicating if there is more data available + nextCursor: int # next page number + data: List[UserTradeHistoryResponse] class CountDown(TypedDict): symbol: str