REST & WebSocket APIs

OptiBid Energy API Documentation

Integrate OptiBid Energy into your applications with our comprehensive REST and WebSocket APIs. Build powerful energy trading automation with real-time data and intelligent recommendations.

Quick Start

Base URL

https://api.optibid-energy.com/v1

Authentication

Use API keys for authentication. Include in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Rate Limits

  • Standard: 1000 requests/hour
  • Professional: 5000 requests/hour
  • Enterprise: Custom limits

Response Format

Content-Type: application/json

API Endpoints

Portfolio Management

Manage your energy assets and trading positions

GET/portfolio

Get your complete portfolio overview

Response:

{
  "portfolio_id": "port_12345",
  "total_value": 2500000,
  "energy_assets": [
    {
      "asset_id": "solar_001",
      "type": "solar",
      "capacity_mw": 50,
      "location": "California",
      "current_output_mw": 45.2,
      "status": "active"
    }
  ],
  "trading_positions": [
    {
      "position_id": "pos_67890",
      "commodity": "electricity",
      "quantity": 100,
      "price": 45.50,
      "timestamp": "2025-12-02T00:30:00Z"
    }
  ]
}

Market Data

Real-time and historical energy market data

GET/market/prices

Get current energy prices

region=californiacommodity=electricity
WS/market/stream

WebSocket stream for real-time price updates

// Connection
wss://api.optibid-energy.com/v1/market/stream?api_key=YOUR_KEY

// Sample message
{
  "type": "price_update",
  "region": "california",
  "commodity": "electricity",
  "price": 45.67,
  "timestamp": "2025-12-02T00:30:14Z",
  "change": +0.23
}

AI Analytics

Machine learning insights and optimization recommendations

GET/analytics/forecast

Get AI-powered energy demand and price forecasts

Parameters:

  • region - Geographic region code
  • hours_ahead - Forecast horizon (1-168)
  • granularity - Time interval (15m, 1h, 1d)

Automated Trading

Execute trades and manage automated strategies

POST/trading/execute

Execute a trade order

{
  "action": "buy",
  "commodity": "electricity",
  "quantity": 100,
  "region": "california",
  "order_type": "limit",
  "price_limit": 45.50,
  "valid_until": "2025-12-02T01:30:00Z"
}

Official SDKs & Libraries

Python SDK

Full-featured Python client with async support

pip install optibid-energy

JavaScript SDK

Browser and Node.js compatible client

npm install @optibid/js-sdk

REST Client

Generate API clients from OpenAPI spec

Download OpenAPI Spec →

Security Best Practices

  • • Store API keys securely using environment variables
  • • Use HTTPS for all API communications
  • • Implement proper error handling and retry logic
  • • Monitor API usage and set up alerts
  • • Rotate API keys regularly

Rate Limits & Quotas

Standard Plan

1,000 requests/hour

Professional Plan

5,000 requests/hour

Enterprise Plan

Custom limits and dedicated support

Need API Support?

Our developer team is here to help you integrate successfully with OptiBid Energy APIs.