npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

elizaos-plugin-reya

v0.1.12

Published

ElizaOS plugin for Reya Network DEX - provides real-time market data, price information, and asset details

Readme

elizaos-plugin-reya

npm version License: MIT

A comprehensive ElizaOS plugin for integrating with Reya Network DEX, providing AI-powered market analysis, real-time price data, and intelligent trading insights.

🚀 Key Features

🤖 AI-Powered Symbol Recognition

  • Universal Token Detection: Extracts any cryptocurrency symbol from natural language queries
  • Multi-Language Support: Handles English and Russian queries seamlessly
  • Fuzzy Matching: Finds tokens even with partial or inexact names
  • Smart Context Understanding: Differentiates between price, volume, and market data requests

📊 Comprehensive Market Data

  • Real-time Prices: Mark, oracle, and pool prices with 24h change indicators
  • Trading Volumes: 24-hour volume data with detailed market statistics
  • Advanced Analytics: Funding rates, open interest, and long/short bias analysis
  • Market Intelligence: Automatic market condition assessment (balanced/biased)

💡 Intelligent Features

  • Natural Language Processing: Handles queries like "what's BTC price?" or "объем торгов SOL"
  • Dynamic Price Formatting: Correctly displays both large prices ($50,000) and small tokens ($0.0001)
  • Contextual Responses: Provides different levels of detail based on user intent
  • Error Recovery: Graceful fallbacks with helpful suggestions when tokens aren't found

📦 Installation

npm install elizaos-plugin-reya

Or with yarn:

yarn add elizaos-plugin-reya

Configuration

The plugin can be configured using environment variables:

export REYA_API_BASE_URL="https://api.reya.xyz"  # Optional, defaults to official API

Usage

In ElizaOS Agent

import { reyaPlugin } from "elizaos-plugin-reya";

// Add to your character configuration
export const character: Character = {
    name: "YourAgent",
    plugins: [
        "@elizaos/plugin-bootstrap",
        "@elizaos/plugin-sql", 
        // Add Reya Network plugin
        reyaPlugin,
        // ... other plugins
    ],
    // ... rest of character config
};

Direct Import

import { reyaPlugin, ReyaMarketService, ReyaPriceService } from "elizaos-plugin-reya";

// Use services directly
const marketService = new ReyaMarketService("https://api.reya.xyz");
const markets = await marketService.getMarkets();

🎯 Example Interactions

💰 Price Queries

User: "What's the current BTC price?"
Agent: Current BTC price on Reya Network:
        **BTC-rUSD**
        • Mark Price: $43,250.00
        • Oracle Price: $43,251.12
        • Pool Price: $43,249.87
        📈 **24h Change**: +2.15%
        • Last Update: 3:45:22 PM

📊 Volume & Market Data

User: "ETH volume today"
Agent: **ETH-rUSD - 24h Trading Volume:**
        💰 **Volume**: $12,345,678
        📈 **24h Change**: +1.87%
        📊 **Open Interest**: 1,234.56
        🔵 **Funding Rate**: 0.0125%

🔍 Advanced Market Analysis

User: "SOL market data"
Agent: **SOL-rUSD - Detailed Market Data:**
        💰 **24h Volume**: $8,765,432
        📈 **24h Price Change**: +3.42%
        📊 **Open Interest**: 987.65 (Long: 60%, Short: 40%)
        🔵 **Funding Rate**: 0.0087% (paying longs)
        🎯 **Max Leverage**: 25x
        
        **Market Activity Analysis:**
        • Long-biased market
        • Low funding rate shows balanced market

🌐 Multi-Language Support

User: "цена HYPE на рейе"
Agent: Current HYPE price on Reya Network: [detailed price data]

User: "объем торгов за сутки BNB"  
Agent: **BNB-rUSD - 24h Trading Volume:** [volume statistics]

🛠️ Available Actions

1. GET_REYA_PRICES - Universal Price Lookup

  • Triggers: "price", "cost", "worth", "цена", "стоимость"
  • Capabilities:
    • AI-powered symbol extraction from any query
    • Real-time price data with 24h changes
    • Oracle, mark, and pool price comparison
    • Support for any cryptocurrency on Reya DEX

2. GET_REYA_MARKETS - Volume & Market Intelligence

  • Triggers: "volume", "trading", "market", "объем", "торги"
  • Capabilities:
    • 24-hour trading volume analysis
    • Funding rate monitoring
    • Open interest and long/short bias tracking
    • Market condition assessment
    • Top volume markets overview

3. GET_REYA_ASSETS - Asset Information

  • Triggers: "asset", "token", "contract"
  • Capabilities:
    • Complete asset specifications
    • Contract address lookup
    • Asset search functionality

Available Providers

  1. Market Provider (reyaMarketProvider)

    • Real-time market data and statistics
    • Detailed market analysis with funding rates
    • Advanced open interest tracking
  2. Price Provider (reyaPriceProvider)

    • Multi-source price data (mark, oracle, pool)
    • Smart price formatting for any token size
    • 24-hour price change tracking
  3. Asset Provider (reyaAssetProvider)

    • Comprehensive asset information
    • Contract address resolution
    • Asset search capabilities

Testing

Run the comprehensive test suite to verify plugin functionality:

npm test

The test suite includes:

  • API connectivity verification
  • Market data retrieval tests
  • Price service functionality tests
  • Asset service tests
  • Caching mechanism tests

🔗 API Endpoints Used

  • GET /api/trading/markets - Market listings and basic information
  • GET /api/trading/markets/data - Aggregated market data and statistics
  • GET /api/trading/market/:id/data - Detailed individual market data
  • GET /api/trading/prices - Real-time price information
  • GET /api/trading/assets - Asset information and specifications

⚡ Optimized Caching Strategy

  • Markets: 30 seconds TTL (fast new token detection)
  • Market Data: 30 seconds TTL (real-time trading data)
  • Assets: 30 seconds TTL (dynamic asset discovery)
  • Prices: 10 seconds TTL (near real-time pricing)
  • Fee Parameters: 1 hour TTL (stable configuration data)

Smart Caching Benefits:

  • Reduced API calls while maintaining data freshness
  • Fast response times for frequently requested data
  • Automatic cache invalidation for optimal performance

Error Handling

The plugin includes comprehensive error handling:

  • Network connectivity issues
  • API response validation
  • Cache fallback mechanisms
  • Detailed error logging

Development

Build

npm run build

Project Structure

src/
├── constants/       # API endpoints and cache configuration
├── types/          # TypeScript interfaces
├── providers/      # Data providers (market, price, asset)
├── templates/      # Response templates
├── tests/         # Test suite
├── environment.ts # Configuration management
└── index.ts       # Main plugin export

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

📄 License

This project is MIT licensed.

🙏 Acknowledgments

  • Built for the ElizaOS ecosystem
  • Powered by Reya Network API
  • Created with ❤️ by the ElizaOS community

Made with ❤️ for the ElizaOS community