financial-api 0.4.1

Rust client for the official Tonghuashun Financial Data REST API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::Deserialize;

use crate::{AssetType, Exchange, Thscode};

use super::TimestampedItems;

/// 一条规范化标的代码记录。
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
pub struct TickerItem {
    pub thscode: Thscode,
    pub ticker: String,
    pub name: String,
    pub exchange: Option<Exchange>,
    pub asset_type: AssetType,
    pub currency: String,
}

pub type TickerData = TimestampedItems<TickerItem>;