Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update futures trade model #244

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Adjust Trade slightly to mirror aggTrade
  • Loading branch information
stefaj committed Jun 22, 2024
commit 36ed9976f05cbe5500cc29ca0491d7aa04e98bd5
12 changes: 3 additions & 9 deletions src/futures/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,25 +112,19 @@ pub enum Trades {
#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Trade {
#[serde(rename = "e")]
pub event_type: String,

#[serde(rename = "E")]
pub event_time: u64,

#[serde(rename = "T")]
pub transaction_time: u64,
pub time: u64,

#[serde(rename = "s")]
pub symbol: String,

#[serde(rename = "t")]
pub transaction_id: i64,

#[serde(rename = "p")]
#[serde(rename = "p", with = "string_or_float")]
pub price: f64,

#[serde(rename = "q")]
#[serde(rename = "q", with = "string_or_float")]
pub quantity: f64,

#[serde(rename = "X")]
Expand Down