binance-standard-sdk 0.1.1

Binance SDK, A wrapper for the Binance API.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub mod time {
    use std::time::{SystemTime, UNIX_EPOCH};

    /// get timestamp
    pub fn get_timestamp() -> Result<u64, String> {
        match SystemTime::now().duration_since(UNIX_EPOCH) {
            Ok(d) => {
                return Ok(d.as_millis() as u64);
            }
            Err(e) => {
                return Err(format!("get timestamp error:{:?}", e));
            }
        }
    }
}