feat: 接入 CoinGlass 清算热力图隔离链路
Some checks failed
ci / build + vet + guard + race (push) Has been cancelled
Some checks failed
ci / build + vet + guard + race (push) Has been cancelled
This commit is contained in:
54
internal/entity/coinglass.go
Normal file
54
internal/entity/coinglass.go
Normal file
@@ -0,0 +1,54 @@
|
||||
package entity
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// CGLiqHeatMap — /api/index/v2/liqHeatMap 一帧。
|
||||
// RawGrid 承载 CoinGlass 原始 2D 网格(spec §5.1:JSONB 仅供应商原始网格 / 元信息,
|
||||
// usecase 层禁止直接解析任意 JSON 结构,需要稳定字段时由 mapper 展开成 entity 字段)。
|
||||
type CGLiqHeatMap struct {
|
||||
Symbol string `json:"symbol"`
|
||||
Interval string `json:"interval"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
PriceMin string `json:"priceMin"`
|
||||
PriceMax string `json:"priceMax"`
|
||||
RawGrid json.RawMessage `json:"rawGrid"`
|
||||
}
|
||||
|
||||
type CGOpenInterestChart struct {
|
||||
Symbol string `json:"symbol"`
|
||||
Interval string `json:"interval"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Exchanges []CGExchangeOIPoint `json:"exchanges"`
|
||||
}
|
||||
|
||||
type CGExchangeOIPoint struct {
|
||||
Exchange string `json:"exchange"`
|
||||
OI string `json:"oi"`
|
||||
}
|
||||
|
||||
type CGLongShortRate struct {
|
||||
Symbol string `json:"symbol"`
|
||||
Interval string `json:"interval"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Exchanges []CGExchangeLongShortPoint `json:"exchanges"`
|
||||
}
|
||||
|
||||
type CGExchangeLongShortPoint struct {
|
||||
Exchange string `json:"exchange"`
|
||||
LongRate string `json:"longRate"`
|
||||
ShortRate string `json:"shortRate"`
|
||||
Ratio string `json:"ratio"`
|
||||
}
|
||||
|
||||
type CGFundingHome struct {
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Items []CGFundingHomeItem `json:"items"`
|
||||
}
|
||||
|
||||
type CGFundingHomeItem struct {
|
||||
Symbol string `json:"symbol"`
|
||||
Exchange string `json:"exchange"`
|
||||
FundingRate string `json:"fundingRate"`
|
||||
NextFundingTs int64 `json:"nextFundingTs"`
|
||||
Interval string `json:"interval"`
|
||||
}
|
||||
Reference in New Issue
Block a user