Realtime stream ingestion

From aifinlab/FinClaw · View interactive version

Realtime stream ingestion is an AI agent skill from the GitHub repository aifinlab/FinClaw. 用于行情/交易/事件流的实时流数据接入原子 skill,适用于通用行业数据接入场景。

How to use this skill

Skill file

实时流数据接入 Skill

数据来源

本 Skill 支持多种实时流数据输入格式,核心数据来源包括:

1. 实时流类型

2. 数据源类型

3. 数据格式要求

4. 实时流特征

说明:本 Skill 不包含数据源配置功能,需要用户提供实时流连接信息。建议实时流稳定可靠,以便进行准确的实时数据接入。


功能

本 Skill 提供全面的实时流数据接入能力,涵盖多种接入功能:

1. 实时流连接

2. 数据订阅

3. 实时接收

4. 数据解析

5. 数据处理

6. 高级处理功能


使用示例

输出示例

{
  "source_info": {
    "source_type": "websocket",
    "source_name": "market_data_stream",
    "endpoint": "ws://market.example.com/stream",
    "data_type": "stock_quotes"
  },
  "ingestion_config": {
    "subscription_mode": "subscribe",
    "symbols": ["000001", "000002", "600519"],
    "update_frequency": "real_time",
    "buffer_size": 1000
  },
  "ingestion_results": {
    "total_messages": 100000,
    "processed_messages": 99500,
    "failed_messages": 500,
    "ingestion_start_time": "2024-03-15T10:00:00",
    "ingestion_end_time": "2024-03-15T11:00:00",
    "duration": "3600s"
  },
  "data_samples": [
    {
      "message_id": "MSG001",
      "timestamp": "2024-03-15T10:00:00.123",
      "symbol": "000001",
      "data": {
        "price": 10.50,
        "volume": 1000000,
        "bid": 10.49,
        "ask": 10.51
      },
      "processed": true
    }
  ],
  "statistics": {
    "messages_received": 100000,
    "messages_processed": 99500,
    "messages_stored": 99500,
    "processing_rate": "27.6 messages/s",
    "success_rate": 0.995,
    "average_latency": "50ms"
  }
}

注意事项与限制

1. 实时流要求

2. 实时处理性能

3. 数据质量

4. 数据延迟

5. 使用限制


参考资料

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.