Skip to content
Open
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
7 changes: 7 additions & 0 deletions src/clob/types/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,11 @@ pub struct TradeResponse {
pub market: B256,
pub asset_id: U256,
pub side: Side,
#[serde(deserialize_with = "empty_string_as_zero")]
pub size: Decimal,
#[serde(deserialize_with = "empty_string_as_zero")]
pub fee_rate_bps: Decimal,
#[serde(deserialize_with = "empty_string_as_zero")]
pub price: Decimal,
pub status: TradeStatusType,
#[serde_as(as = "TimestampSeconds<String>")]
Expand All @@ -403,6 +406,7 @@ pub struct TradeResponse {
#[serde_as(deserialize_as = "DefaultOnNull")]
pub maker_orders: Vec<MakerOrder>,
/// On-chain transaction hash.
#[serde(default)]
pub transaction_hash: B256,
pub trader_side: TraderSide,
#[serde(default)]
Expand Down Expand Up @@ -516,8 +520,11 @@ pub struct MakerOrder {
pub order_id: String,
pub owner: ApiKey,
pub maker_address: Address,
#[serde(deserialize_with = "empty_string_as_zero")]
pub matched_amount: Decimal,
#[serde(deserialize_with = "empty_string_as_zero")]
pub price: Decimal,
#[serde(deserialize_with = "empty_string_as_zero")]
pub fee_rate_bps: Decimal,
pub asset_id: U256,
pub outcome: String,
Expand Down