Overview
- Skill Key
- datadrivenconstruction/price-api
- Author
- datadrivenconstruction
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/datadrivenconstruction/price-api
- Latest Commit SHA
- 9eee8f94d93b66869854fd8bfa856c0781072d2a
Fetch construction material prices from open APIs. Track price trends, regional variations, and update cost databases.
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 price-api 技能。 若已安装,则直接安装 price-api 技能。
# Price API for Construction Materials
## Overview
Material prices fluctuate constantly. This skill fetches prices from open sources, tracks trends, and updates cost databases with current market data.
## Python Implementation
```python
import requests
import pandas as pd
from typing import Dict, Any, List, Optional
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from enum import Enum
import json
class MaterialCategory(Enum):
"""Construction material categories."""
CONCRETE = "concrete"
STEEL = "steel"
LUMBER = "lumber"
COPPER = "copper"
ALUMINUM = "aluminum"
CEMENT = "cement"
AGGREGATES = "aggregates"
ASPHALT = "asphalt"
@dataclass
class MaterialPrice:
"""Material price point."""
material: str
price: float
unit: str
currency: str
source: str
date: datetime
region: str = ""
@dataclass
class PriceTrend:
"""Price trend analysis."""
material: str
current_price: float
week_change: float
month_change: float
year_change: float
trend_direction: str # 'up', 'down', 'stable'
class OpenPriceAPI:
"""Client for open material price APIs."""
# Commodity price sources
FRED_BASE = "https://api.stlouisfed.org/fred/series/observations"
# FRED Series IDs for construction commodities
FRED_SERIES = {
'steel': 'WPU101',
'lumber': 'WPS0811',
'concrete': 'WPU133',
'copper': 'PCOPPUSDM',
'aluminum': 'PALUMUSDM'
}
def __init__(self, fred_api_key: Optional[str] = None):
self.fred_api_key = fred_api_key
def get_fred_prices(self, material: str,
start_date: str = None,
end_date: str = None) -> List[MaterialPrice]:
"""Get prices from FRED API."""
if material.lower() not in self.FRED_SERIES:
return []
series_id = s...
capt-marbles
Task Router
capncoconut
Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay, check marketplace stats, or manage agent credentials. Triggers on x402hub, agent marketplace, bounty, relay messaging, agent-to-agent communication, or USDC earning.
capevace
Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.
captchasco
OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.
carol-gutianle
name: modelready description: Start using a local or Hugging Face model instantly, directly from chat. metadata: {"openclaw":{"requires":{"bins": "bash", "curl" }, "env": "URL" }}
canbirlik
Controls Wiz smart bulbs (turn on/off, RGB colors, disco mode) via local WiFi.