Skip to content

Commit 1e4f4df

Browse files
committed
fix: fix trade detail deser (bitfinex doc is incorrect )
1 parent 348af16 commit 1e4f4df

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/account.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ pub struct TradeDetail {
1919
pub order_id: i64,
2020
pub order_id_oppo: i64,
2121
pub trade_price: String,
22-
pub trade_amount: f64,
22+
pub trade_amount: String,
2323
pub order_cid: i64,
24-
pub order_gid: i64,
24+
pub order_gid: Option<i64>,
2525
}
2626

2727
#[derive(Serialize, Deserialize)]
@@ -91,8 +91,9 @@ impl Account {
9191

9292
pub fn get_wallets(&self) -> Result<Vec<Wallet>> {
9393
let payload: String = format!("{}", "{}");
94+
println!("Fetching wallet");
9495
let data = self.client.post_signed("r/wallets".into(), payload)?;
95-
96+
println!("{}", data.as_str());
9697
let wallets: Vec<Wallet> = from_str(data.as_str())?;
9798

9899
Ok(wallets)

0 commit comments

Comments
 (0)