Skip to content
This repository was archived by the owner on Nov 14, 2022. It is now read-only.
This repository was archived by the owner on Nov 14, 2022. It is now read-only.

bid & ask in Ticker subscription can be null #123

@dovahcrow

Description

@dovahcrow

e.g. this is the payload: {"channel":"ticker","market":"SRN-PERP","type":"update","data":{"bid":null,"ask":null,"bidSize":null,"askSize":null,"last":0.00385,"time":1656893927.97223}}
Change Ticker to

pub struct Ticker {
    pub bid: Option<Decimal>,
    pub ask: Option<Decimal>,
    pub bid_size: Option<Decimal>,
    pub ask_size: Option<Decimal>,
    pub last: Decimal,
    #[serde_as(as = "TimestampSecondsWithFrac<f64>")]
    pub time: DateTime<Utc>,
}

in src/ws/model.rs should work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions