Files
cryptoHermes/internal/entity/coinglass.go
dela 1b61541ff5
Some checks failed
ci / build + vet + guard + race (push) Has been cancelled
feat: 接入 CoinGlass 清算热力图隔离链路
2026-05-25 16:57:22 +08:00

55 lines
1.7 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package entity
import "encoding/json"
// CGLiqHeatMap — /api/index/v2/liqHeatMap 一帧。
// RawGrid 承载 CoinGlass 原始 2D 网格spec §5.1JSONB 仅供应商原始网格 / 元信息,
// 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"`
}