Documentation

API Reference

Programmatic access to your RIN holdings, trade history, and action queue. Built for traders who need automation beyond the dashboard.

Base URL: https://rindesk.com/api/v1

Authentication

All API requests require a Bearer token in the Authorization header.

Generate a token in Settings → API Tokens. Treat tokens as secrets.

curl https://rindesk.com/api/v1/holdings \
  -H "Authorization: Bearer YOUR_TOKEN"

GET /api/v1/holdings

Latest deduplicated RIN holdings — one row per (d_code, year, assignment, qap_service_type).

Response:

{
  "holdings": [
    {
      "d_code": "D6",
      "rin_year": 2026,
      "assignment": "Separated",
      "qap_service_type": "Unverified (30)",
      "available": 500426,
      "pending": 0,
      "reserved": 0,
      "total": 500426,
      "snapshot_at": "2026-05-05T19:00:00Z"
    }
  ],
  "count": 8
}

GET /api/v1/trades

Accepted trade history with filters and aggregates.

Query params (all optional):

  • from — YYYY-MM-DD
  • to — YYYY-MM-DD
  • d_code — D3, D4, D5, D6, or D7
  • partner — substring match on counterparty name
  • limit — max 5000, default 500
{
  "trades": [...],
  "count": 47,
  "aggregates": {
    "total_quantity": 142000,
    "total_value": 308760.00,
    "avg_price_per_gallon": 2.1744
  }
}

GET /api/v1/queue

Returns the current pending-action queue (separates, retires, sells).

POST /api/v1/queue

Queue a new action. The next ⚡ run on EMTS will execute it.

curl -X POST https://rindesk.com/api/v1/queue \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "action_type": "separate",
    "payload": {
      "fuelCode": "D=6",
      "rinYear": 2026,
      "batchVolume": 5000,
      "qapServiceType": "30"
    }
  }'

Valid action_type: separate, retire, sell.

GET /api/export/audit

Compliance audit trail as CSV — every transaction in the date range.

Query params: from, to, format=csv|json

Rate limits

None currently enforced. Be reasonable — under 60 requests/min recommended.

Webhooks

Coming soon — subscribe to trade.accepted, separate.completed, holdings.changed.

Built something with our API?

Email hello@rindesk.com. We'll feature your integration.