mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-18 18:04:32 +08:00
feat: implement coinank openapi rank interface (#1250)
- implement VisualScreener Rank - implement More Instrument Agg Rank - rank interface can help user to choose a coin
This commit is contained in:
@@ -18,13 +18,23 @@ type CoinankClient struct {
|
||||
Apikey string
|
||||
}
|
||||
|
||||
// CoinankResponse coinank openapi common respones
|
||||
// CoinankResponse coinank openapi common response
|
||||
type CoinankResponse[T any] struct {
|
||||
Success bool `json:"success"`
|
||||
Code string `json:"code"`
|
||||
Data T `json:"data"`
|
||||
}
|
||||
|
||||
// PageData coinank openapi pageData in response
|
||||
type PageData[T any] struct {
|
||||
List []T `json:"list"`
|
||||
Pagination struct {
|
||||
Current int `json:"current"`
|
||||
Total int `json:"total"`
|
||||
PageSize int `json:"pageSize"`
|
||||
} `json:"pagination"`
|
||||
}
|
||||
|
||||
var HttpError error = errors.New("http client error")
|
||||
|
||||
// NewCoinankClient new coinank http client for coinank openapi
|
||||
|
||||
Reference in New Issue
Block a user