Skip to main content

Overview

The Swaps API provides endpoints for authenticating, creating orders, and managing your prediction market positions.
All API endpoints require an API key for authentication. Only two endpoints (Create Order and Create Withdraw Intent) additionally require JWT authentication. See the Authentication section to get started.

Base URL

https://swap-api.flux.fun

Authentication

API Key Authentication (Required for All Endpoints)

All API endpoints require an API key in the x-api-key header:
x-api-key: <your-api-key>

JWT Authentication (Required for Create Order & Withdraw)

Only the following endpoints require both API key and JWT authentication: For these endpoints, include both headers:
x-api-key: <your-api-key>
Authorization: Bearer <your-jwt-token>
Get your JWT token by following the authentication flow.