Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getMetricSpikeExplanations API #4431

Merged
merged 3 commits into from
Oct 17, 2024
Merged

Add getMetricSpikeExplanations API #4431

merged 3 commits into from
Oct 17, 2024

Conversation

IvanIvanoff
Copy link
Member

@IvanIvanoff IvanIvanoff commented Oct 17, 2024

Changes

  • Allow running locally and connect to stage DB
  • Add getMetricSpikeExplanations API
    • The API provides explanations why some spikes in metrics have occurred.
    • All spike that fully or partially fall into the from-to range are returned.
{
  getMetricSpikeExplanations(
    metric: "social_dominance_total_1h_moving_average"    
    slug: "ethereum"
    from: "utc_now-30d"
    to: "utc_now-25d"
  ){
    spikeStartDatetime
    spikeEndDatetime
    explanation
  }
}
{
  "data": {
    "getMetricSpikeExplanations": [
      {
        "explanation": "The increase in discussions around cryptocurrencies, particularly Bitcoin (BTC) and Ethereum (ETH), can be attributed to several factors, including breaking news about market trends and significant price movements. The mention of \"DYOR\" (Do Your Own Research) indicates a heightened interest in individual analysis and investment strategies, while references to BTC and ETH price fluctuations suggest that traders are reacting to market volatility and potential trading opportunities. Additionally, the discussions around airdrops and trading signals further amplify engagement as traders seek to capitalize on emerging trends.",
        "spikeEndDatetime": "2024-09-17T21:00:00Z",
        "spikeStartDatetime": "2024-09-17T19:00:00Z"
      },
      {
        "explanation": "The increase in discussions is primarily driven by the significant price movements and performance of various cryptocurrencies, particularly $Doggo, which has shown substantial gains since the VAULTBOY V2 call. This has sparked interest and excitement among traders and investors, leading to a surge in social media activity. Additionally, the use of hashtags like #DYOR (Do Your Own Research) indicates a growing emphasis on individual research and investment strategies, further fueling discussions in the crypto community.",
        "spikeEndDatetime": "2024-09-21T00:00:00Z",
        "spikeStartDatetime": "2024-09-20T22:00:00Z"
      },
      {
        "explanation": "The increase in discussions is primarily driven by significant price movements and trading activity in cryptocurrencies, particularly Ethereum (ETH) and other altcoins. The mention of substantial gains (e.g., \"did 157x since VAULTBOY V2 call\") and the sale of NFTs for notable amounts in USD (e.g., \"sold for 0.04 ETH ($101.94 USD)\") indicates a heightened interest in trading and investment opportunities. Additionally, the reference to market trends and potential price impacts from external factors, such as interest rate changes and institutional updates (e.g., BlackRock), further fuels the conversation.",
        "spikeEndDatetime": "2024-09-21T05:00:00Z",
        "spikeStartDatetime": "2024-09-21T03:00:00Z"
      },
      {
        "explanation": "The increase in discussions is primarily driven by significant liquidations in the cryptocurrency market, particularly involving Bitcoin (BTC) and Ethereum (ETH). The recent data showing $55 million in total liquidations, with a notable split between long and short positions, has sparked interest and concern among traders. Additionally, the fluctuating ETH/BTC ratio and ongoing debates about the future of Ethereum in relation to Bitcoin have further fueled conversations, as investors assess market trends and potential risks.",
        "spikeEndDatetime": "2024-09-22T02:00:00Z",
        "spikeStartDatetime": "2024-09-22T00:00:00Z"
      }
    ]
  }
}

Ticket

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have tried to find clearer solution before commenting hard-to-understand parts of code
  • I have added tests that prove my fix is effective or that my feature works

@IvanIvanoff IvanIvanoff merged commit 2f37800 into master Oct 17, 2024
2 checks passed
@IvanIvanoff IvanIvanoff deleted the spikes-table-api branch October 17, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants