Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
9 changes: 6 additions & 3 deletions src/bluefin_v2_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
21 changes: 21 additions & 0 deletions src/bluefin_v2_client/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading