Documentation
¶
Overview ¶
Package jsontypes holds raw JSON-deserialization structs for the market package. These types use exact API field names with json tags and are not part of the public surface; callers should use the types in the parent market package.
Index ¶
- type AhPremiumIntraday
- type AhPremiumKline
- type AhPremiumKlines
- type AnomalyItem
- type AnomalyResponse
- type BrokerHoldingChanges
- type BrokerHoldingDailyHistory
- type BrokerHoldingDailyItem
- type BrokerHoldingDetail
- type BrokerHoldingDetailItem
- type BrokerHoldingEntry
- type BrokerHoldingTop
- type ConstituentStock
- type IndexConstituents
- type MarketStatusResponse
- type MarketTimeItem
- type TradePriceLevel
- type TradeStatistics
- type TradeStatsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AhPremiumIntraday ¶
type AhPremiumIntraday struct {
Klines []AhPremiumKline `json:"klines"`
}
AhPremiumIntraday is the raw JSON response for GET /v1/quote/ahpremium/timeshares.
type AhPremiumKline ¶
type AhPremiumKline struct {
Aprice string `json:"aprice"`
Apreclose string `json:"apreclose"`
Hprice string `json:"hprice"`
Hpreclose string `json:"hpreclose"`
CurrencyRate string `json:"currency_rate"`
PriceSpread string `json:"price_spread"`
Timestamp int64 `json:"timestamp"`
}
AhPremiumKline is one A/H premium data point.
type AhPremiumKlines ¶
type AhPremiumKlines struct {
Klines []AhPremiumKline `json:"klines"`
}
AhPremiumKlines is the raw JSON response for GET /v1/quote/ahpremium/klines.
type AnomalyItem ¶
type AnomalyItem struct {
CounterID string `json:"counter_id"`
Name string `json:"name"`
AlertName string `json:"alert_name"`
AlertTime int64 `json:"alert_time"`
ChangeValues []string `json:"change_values"`
Emotion int32 `json:"emotion"`
}
AnomalyItem is one market anomaly event.
type AnomalyResponse ¶
type AnomalyResponse struct {
AllOff bool `json:"all_off"`
Changes []AnomalyItem `json:"changes"`
}
AnomalyResponse is the raw JSON response for GET /v1/quote/changes.
type BrokerHoldingChanges ¶
type BrokerHoldingChanges struct {
Value string `json:"value"`
Chg1 string `json:"chg_1"`
Chg5 string `json:"chg_5"`
Chg20 string `json:"chg_20"`
Chg60 string `json:"chg_60"`
}
BrokerHoldingChanges holds the value and period-over-period changes for a holding metric.
type BrokerHoldingDailyHistory ¶
type BrokerHoldingDailyHistory struct {
List []BrokerHoldingDailyItem `json:"list"`
}
BrokerHoldingDailyHistory is the raw JSON response for GET /v1/quote/broker-holding/daily.
type BrokerHoldingDailyItem ¶
type BrokerHoldingDailyItem struct {
Date string `json:"date"`
Holding string `json:"holding"`
Ratio string `json:"ratio"`
Chg string `json:"chg"`
}
BrokerHoldingDailyItem is one day's broker holding record.
type BrokerHoldingDetail ¶
type BrokerHoldingDetail struct {
List []BrokerHoldingDetailItem `json:"list"`
UpdatedAt string `json:"updated_at"`
}
BrokerHoldingDetail is the raw JSON response for GET /v1/quote/broker-holding/detail.
type BrokerHoldingDetailItem ¶
type BrokerHoldingDetailItem struct {
Name string `json:"name"`
PartiNumber string `json:"parti_number"`
Ratio BrokerHoldingChanges `json:"ratio"`
Strong bool `json:"strong"`
}
BrokerHoldingDetailItem is one broker's full holding detail.
type BrokerHoldingEntry ¶
type BrokerHoldingEntry struct {
Name string `json:"name"`
PartiNumber string `json:"parti_number"`
Chg string `json:"chg"`
Strong bool `json:"strong"`
}
BrokerHoldingEntry is one broker entry in the top-holding list.
type BrokerHoldingTop ¶
type BrokerHoldingTop struct {
Buy []BrokerHoldingEntry `json:"buy"`
Sell []BrokerHoldingEntry `json:"sell"`
UpdatedAt string `json:"updated_at"`
}
BrokerHoldingTop is the raw JSON response for GET /v1/quote/broker-holding.
type ConstituentStock ¶
type ConstituentStock struct {
CounterID string `json:"counter_id"`
Name string `json:"name"`
LastDone string `json:"last_done"`
PrevClose string `json:"prev_close"`
Inflow string `json:"inflow"`
Balance string `json:"balance"`
Amount string `json:"amount"`
Tags []string `json:"tags"`
Intro string `json:"intro"`
Market string `json:"market"`
Delay bool `json:"delay"`
Chg string `json:"chg"`
TradeStatus int32 `json:"trade_status"`
}
ConstituentStock is one constituent stock of an index.
type IndexConstituents ¶
type IndexConstituents struct {
FallNum int32 `json:"fall_num"`
FlatNum int32 `json:"flat_num"`
RiseNum int32 `json:"rise_num"`
Stocks []ConstituentStock `json:"stocks"`
}
IndexConstituents is the raw JSON response for GET /v1/quote/index-constituents.
type MarketStatusResponse ¶
type MarketStatusResponse struct {
MarketTime []MarketTimeItem `json:"market_time"`
}
MarketStatusResponse is the raw JSON response for GET /v1/quote/market-status.
type MarketTimeItem ¶
type MarketTimeItem struct {
Market string `json:"market"`
TradeStatus int32 `json:"trade_status"`
Timestamp string `json:"timestamp"`
DelayTradeStatus int32 `json:"delay_trade_status"`
DelayTimestamp string `json:"delay_timestamp"`
SubStatus int32 `json:"sub_status"`
DelaySubStatus int32 `json:"delay_sub_status"`
}
MarketTimeItem is the raw JSON representation of one market's trading status.
type TradePriceLevel ¶
type TradePriceLevel struct {
BuyAmount string `json:"buy_amount"`
NeutralAmount string `json:"neutral_amount"`
Price string `json:"price"`
SellAmount string `json:"sell_amount"`
}
TradePriceLevel is trade volume at one price level.
type TradeStatistics ¶
type TradeStatistics struct {
Avgprice string `json:"avgprice"`
Buy string `json:"buy"`
Neutral string `json:"neutral"`
Preclose string `json:"preclose"`
Sell string `json:"sell"`
Timestamp string `json:"timestamp"`
TotalAmount string `json:"total_amount"`
TradeDate []string `json:"trade_date"`
TradesCount string `json:"trades_count"`
}
TradeStatistics holds summary buy/sell/neutral statistics.
type TradeStatsResponse ¶
type TradeStatsResponse struct {
Statistics TradeStatistics `json:"statistics"`
Trades []TradePriceLevel `json:"trades"`
}
TradeStatsResponse is the raw JSON response for GET /v1/quote/trades-statistics.