API Documentation

FLUX provides a comprehensive API for developers to integrate with the protocol.

Base URL

https://api.aquaflux.tech

Endpoints

Get FLUX Price

GET /api/v1/price

Returns the current FLUX price and 24-hour change.

Response:

{
  "success": true,
  "data": {
    "price_usd": 0.18,
    "price_change_24h": 2.5,
    "last_updated": "2024-01-15T12:00:00Z"
  }
}

Get Portfolio Data

Returns current portfolio composition and performance.

Response:

Get Complete Data

Returns comprehensive protocol data in one call.

Response:

Get Market Sentiment

Returns Fear & Greed Index data and portfolio strategy.

Response:

Get Performance Metrics

Returns detailed performance and APR calculations.

Query Parameters:

  • detailed (boolean) - Include projections and suggestions

Response:

Integration Endpoints

CoinGecko Compatible

Returns token information in CoinGecko format.

Returns price data in Chainlink format.

Rate Limits

  • 100 requests per minute per IP

  • 1000 requests per hour per IP

Response Headers

All API responses include:

  • X-API-Version - Current API version

  • X-RateLimit-Limit - Rate limit ceiling

  • X-RateLimit-Remaining - Remaining requests

  • Cache-Control - Caching directives

WebSocket Events

Connect to real-time updates:

Events:

  • price_update - FLUX price changes

  • portfolio_update - Portfolio rebalancing

  • mint - New FLUX minted

  • burn - FLUX redeemed

Example Usage

JavaScript/TypeScript

Python

cURL

Error Handling

Errors return appropriate HTTP status codes:

Status Codes:

  • 200 - Success

  • 400 - Bad Request

  • 429 - Rate Limited

  • 500 - Server Error

Support

For API support or questions:

Last updated