MCPcopy Create free account
hub / github.com/NoFxAiOS/nofx / FetchNetFlowRankingData

Method FetchNetFlowRankingData

kernel/engine.go:1425–1458  ·  view source on GitHub ↗

FetchNetFlowRankingData fetches market-wide NetFlow ranking data

()

Source from the content-addressed store, hash-verified

1423
1424// FetchNetFlowRankingData fetches market-wide NetFlow ranking data
1425func (e *StrategyEngine) FetchNetFlowRankingData() *nofxos.NetFlowRankingData {
1426 indicators := e.config.Indicators
1427 if !indicators.EnableNetFlowRanking {
1428 return nil
1429 }
1430 if e.usesHyperliquidNativeUniverse() {
1431 logger.Infof("⏭️ Skipping NofxOS netflow ranking for Hyperliquid strategy; native Hyperliquid universe is the source of truth")
1432 return nil
1433 }
1434
1435 duration := indicators.NetFlowRankingDuration
1436 if duration == "" {
1437 duration = "1h"
1438 }
1439
1440 limit := indicators.NetFlowRankingLimit
1441 if limit <= 0 {
1442 limit = 10
1443 }
1444
1445 logger.Infof("💰 Fetching NetFlow ranking data (duration: %s, limit: %d)", duration, limit)
1446
1447 data, err := e.nofxosClient.GetNetFlowRanking(duration, limit)
1448 if err != nil {
1449 logger.Warnf("⚠️ Failed to fetch NetFlow ranking data: %v", err)
1450 return nil
1451 }
1452
1453 logger.Infof("✓ NetFlow ranking data ready: inst_in=%d, inst_out=%d, retail_in=%d, retail_out=%d",
1454 len(data.InstitutionFutureTop), len(data.InstitutionFutureLow),
1455 len(data.PersonalFutureTop), len(data.PersonalFutureLow))
1456
1457 return data
1458}
1459
1460// FetchPriceRankingData fetches market-wide price ranking data (gainers/losers)
1461func (e *StrategyEngine) FetchPriceRankingData() *nofxos.PriceRankingData {

Callers 2

handleStrategyTestRunMethod · 0.95
buildTradingContextMethod · 0.80

Calls 4

InfofFunction · 0.92
WarnfFunction · 0.92
GetNetFlowRankingMethod · 0.80

Tested by

no test coverage detected