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:
wqqqqqq
2025-12-20 01:12:50 +08:00
committed by GitHub
parent e2d702c662
commit 7baa07738a
5 changed files with 460 additions and 1 deletions

View File

@@ -0,0 +1,85 @@
package coinank_enum
type InstrumentAggSortBy string
const (
OpenInterest InstrumentAggSortBy = "openInterest"
Price InstrumentAggSortBy = "price"
PriceChangeM5 InstrumentAggSortBy = "priceChangeM5"
PriceChangeM15 InstrumentAggSortBy = "priceChangeM15"
PriceChangeM30 InstrumentAggSortBy = "priceChangeM30"
PriceChangeH4 InstrumentAggSortBy = "priceChangeH4"
PriceChangeH24 InstrumentAggSortBy = "priceChangeH24"
PriceChangeH1 InstrumentAggSortBy = "priceChangeH1"
PriceChangeH6 InstrumentAggSortBy = "priceChangeH6"
PriceChangeH12 InstrumentAggSortBy = "priceChangeH12"
OpenInterestChM15 InstrumentAggSortBy = "openInterestChM15"
OpenInterestChM5 InstrumentAggSortBy = "openInterestChM5"
OpenInterestChM30 InstrumentAggSortBy = "openInterestChM30"
OpenInterestCh1 InstrumentAggSortBy = "openInterestCh1"
OpenInterestCh4 InstrumentAggSortBy = "openInterestCh4"
OpenInterestCh24 InstrumentAggSortBy = "openInterestCh24"
OpenInterestCh2D InstrumentAggSortBy = "openInterestCh2D"
OpenInterestCh3D InstrumentAggSortBy = "openInterestCh3D"
OpenInterestCh7D InstrumentAggSortBy = "openInterestCh7D"
LiquidationH1 InstrumentAggSortBy = "liquidationH1"
LiquidationH1Long InstrumentAggSortBy = "liquidationH1Long"
LiquidationH1Short InstrumentAggSortBy = "liquidationH1Short"
LiquidationH4Long InstrumentAggSortBy = "liquidationH4Long"
LiquidationH4Short InstrumentAggSortBy = "liquidationH4Short"
LiquidationH24Short InstrumentAggSortBy = "liquidationH24Short"
LiquidationH24Long InstrumentAggSortBy = "liquidationH24Long"
LiquidationH4 InstrumentAggSortBy = "liquidationH4"
FundingRate InstrumentAggSortBy = "fundingRate"
LiquidationH12 InstrumentAggSortBy = "liquidationH12"
LiquidationH12Long InstrumentAggSortBy = "liquidationH12Long"
LiquidationH12Short InstrumentAggSortBy = "liquidationH12Short"
LiquidationH24 InstrumentAggSortBy = "liquidationH24"
Turnover24h InstrumentAggSortBy = "turnover24h"
TurnoverChg24h InstrumentAggSortBy = "turnoverChg24h"
LongShortAccount InstrumentAggSortBy = "longShortAccount"
LsPersonChg5m InstrumentAggSortBy = "lsPersonChg5m"
LsPersonChg15m InstrumentAggSortBy = "lsPersonChg15m"
LsPersonChg30m InstrumentAggSortBy = "lsPersonChg30m"
LsPersonChg1h InstrumentAggSortBy = "lsPersonChg1h"
LsPersonChg4h InstrumentAggSortBy = "lsPersonChg4h"
LongShortPerson InstrumentAggSortBy = "longShortPerson"
LongShortPosition InstrumentAggSortBy = "longShortPosition"
LongShortRatio InstrumentAggSortBy = "longShortRatio"
MarketCap InstrumentAggSortBy = "marketCap"
MarketCapChange24H InstrumentAggSortBy = "marketCapChange24H"
MarketCapChangeValue24H InstrumentAggSortBy = "marketCapChangeValue24H"
TotalSupply InstrumentAggSortBy = "totalSupply"
MaxSupply InstrumentAggSortBy = "maxSupply"
CirculatingSupply InstrumentAggSortBy = "circulatingSupply"
Buy5m InstrumentAggSortBy = "buy5m"
Sell5m InstrumentAggSortBy = "sell5m"
Buy15m InstrumentAggSortBy = "buy15m"
Sell15m InstrumentAggSortBy = "sell15m"
Buy30m InstrumentAggSortBy = "buy30m"
Sell30m InstrumentAggSortBy = "sell30m"
Buy1h InstrumentAggSortBy = "buy1h"
Sell1h InstrumentAggSortBy = "sell1h"
Buy2h InstrumentAggSortBy = "buy2h"
Sell2h InstrumentAggSortBy = "sell2h"
Buy4h InstrumentAggSortBy = "buy4h"
Sell4h InstrumentAggSortBy = "sell4h"
Buy6h InstrumentAggSortBy = "buy6h"
Sell6h InstrumentAggSortBy = "sell6h"
Buy8h InstrumentAggSortBy = "buy8h"
Sell8h InstrumentAggSortBy = "sell8h"
Buy12h InstrumentAggSortBy = "buy12h"
Sell12h InstrumentAggSortBy = "sell12h"
Buy24h InstrumentAggSortBy = "buy24h"
Sell24h InstrumentAggSortBy = "sell24h"
TurnoverChg15m InstrumentAggSortBy = "turnoverChg15m"
TurnoverChg30m InstrumentAggSortBy = "turnoverChg30m"
TurnoverChg1h InstrumentAggSortBy = "turnoverChg1h"
TurnoverChg4h InstrumentAggSortBy = "turnoverChg4h"
VolatilityM5 InstrumentAggSortBy = "volatilityM5"
VolatilityM15 InstrumentAggSortBy = "volatilityM15"
VolatilityH1 InstrumentAggSortBy = "volatilityH1"
OiVsMar InstrumentAggSortBy = "oiVsMar"
OiVsVol InstrumentAggSortBy = "oiVsVol"
VolVsMar InstrumentAggSortBy = "volVsMar"
)

View File

@@ -0,0 +1,8 @@
package coinank_enum
type SortType string
const (
Asc SortType = "asc"
Desc SortType = "desc"
)