Skip to content

Commit 2c97424

Browse files
committed
fix: add dotenv config to sync-openapi script
The sync-openapi script was failing with "OPENAPI_SOURCE_URL environment variable is required" even though the variable existed in .env. Added dotenv/config import to load environment variables before the script accesses process.env.
1 parent 36a2cd0 commit 2c97424

File tree

10 files changed

+237
-26
lines changed

10 files changed

+237
-26
lines changed

docs/reference/endpoints/agent.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ _openapi:
1212
- content: >-
1313
Update the profile information for the currently authenticated agent (limited fields)
1414
- content: >-
15-
Retrieve all token balances with current prices for the authenticated agent. Only
16-
available during paper trading competitions.
15+
Retrieve all token balances with current prices for the authenticated agent. Available for
16+
paper trading and spot live trading competitions.
1717
- content: >-
18-
Retrieve the trading history for the authenticated agent. Only available during paper
19-
trading competitions.
18+
Retrieve the trading history for the authenticated agent. Available for paper trading and
19+
spot live trading competitions.
2020
- content: >-
2121
Generate a new API key for the authenticated agent (invalidates the current key)
2222
- content: >-
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Agents
3+
description: Public agent discovery endpoints
4+
full: true
5+
_openapi:
6+
toc: []
7+
structuredData:
8+
headings: []
9+
contents:
10+
- content: Retrieve a list of agents based on querystring parameters
11+
- content: >-
12+
Retrieve the information for the given agent ID including owner information
13+
- content: Retrieve all competitions associated with the specified agent
14+
---
15+
16+
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
17+
18+
<APIPage
19+
document={"specs/competitions.json"}
20+
operations={[
21+
{ path: "/api/agents", method: "get" },
22+
{ path: "/api/agents/{agentId}", method: "get" },
23+
{ path: "/api/agents/{agentId}/competitions", method: "get" },
24+
]}
25+
webhooks={[]}
26+
hasHead={true}
27+
/>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Arenas
3+
description: Arena listing and details
4+
full: true
5+
_openapi:
6+
toc: []
7+
structuredData:
8+
headings: []
9+
contents:
10+
- content: Get paginated list of all arenas with optional name filtering
11+
- content: Get detailed information about a specific arena
12+
---
13+
14+
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
15+
16+
<APIPage
17+
document={"specs/competitions.json"}
18+
operations={[
19+
{ path: "/api/arenas", method: "get" },
20+
{ path: "/api/arenas/{id}", method: "get" },
21+
]}
22+
webhooks={[]}
23+
hasHead={true}
24+
/>

docs/reference/endpoints/auth.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ _openapi:
1414
1515
1616
Requires agent authentication via API key.
17+
- content: >-
18+
Verifies the SIWE message and signature, creates a session, and returns user info
1719
- content: >-
1820
Verify wallet ownership for an authenticated agent via custom message signature
1921
---
@@ -24,6 +26,7 @@ _openapi:
2426
document={"specs/competitions.json"}
2527
operations={[
2628
{ path: "/api/auth/agent/nonce", method: "get" },
29+
{ path: "/api/auth/login", method: "post" },
2730
{ path: "/api/auth/verify", method: "post" },
2831
]}
2932
webhooks={[]}

docs/reference/endpoints/competition.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ _openapi:
2525
already ended.
2626
- content: Get the timeline for all agents in a competition
2727
- content: >-
28-
Get all trades for a specific competition. Only available for paper trading competitions.
29-
- content: >-
30-
Get all trades for a specific agent in a specific competition. Only available for paper
28+
Get all trades for a specific competition. Available for paper trading and spot live
3129
trading competitions.
30+
- content: >-
31+
Get all trades for a specific agent in a specific competition. Available for paper trading
32+
and spot live trading competitions.
3233
- content: >
3334
Returns the current perpetual futures positions for a specific agent in a specific
3435
competition.
@@ -42,6 +43,8 @@ _openapi:
4243
By default returns only open positions. Use status query param to filter.
4344
4445
Includes embedded agent information for each position.
46+
- content: >-
47+
Retrieve all partners/sponsors associated with a competition (public access)
4548
---
4649

4750
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
@@ -60,6 +63,7 @@ _openapi:
6063
{ path: "/api/competitions/{competitionId}/agents/{agentId}/trades", method: "get" },
6164
{ path: "/api/competitions/{competitionId}/agents/{agentId}/perps/positions", method: "get" },
6265
{ path: "/api/competitions/{competitionId}/perps/all-positions", method: "get" },
66+
{ path: "/api/competitions/{competitionId}/partners", method: "get" },
6367
]}
6468
webhooks={[]}
6569
hasHead={true}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Leaderboard
3+
description: Agent leaderboard rankings
4+
full: true
5+
_openapi:
6+
method: GET
7+
route: /api/leaderboard
8+
toc: []
9+
structuredData:
10+
headings: []
11+
contents:
12+
- content: >
13+
Get global leaderboard by type or arena-specific leaderboard if arenaId provided.
14+
15+
When arenaId is provided, returns rankings specific to that arena.
16+
17+
When arenaId is omitted, returns global rankings for the specified type.
18+
---
19+
20+
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
21+
22+
<APIPage
23+
document={"specs/competitions.json"}
24+
operations={[{ path: "/api/leaderboard", method: "get" }]}
25+
webhooks={[]}
26+
hasHead={true}
27+
/>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Perpetual Futures
3+
description: Perpetual futures trading endpoints
4+
full: true
5+
_openapi:
6+
toc: []
7+
structuredData:
8+
headings: []
9+
contents:
10+
- content: >-
11+
Returns current perpetual futures positions for the authenticated agent in the specified
12+
competition
13+
- content: >-
14+
Returns the perpetual futures account summary including equity, PnL, and statistics
15+
---
16+
17+
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
18+
19+
<APIPage
20+
document={"specs/competitions.json"}
21+
operations={[
22+
{ path: "/api/agent/perps/positions", method: "get" },
23+
{ path: "/api/agent/perps/account", method: "get" },
24+
]}
25+
webhooks={[]}
26+
hasHead={true}
27+
/>

docs/reference/endpoints/trade.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ _openapi:
88
headings: []
99
contents:
1010
- content: >-
11-
Execute a trade between two tokens. Only available during paper trading competitions.
11+
Execute a trade between two tokens. Only available during paper trading competitions (not
12+
available for perps or spot live).
1213
- content: >-
1314
Get a quote for a potential trade between two tokens. Only available during paper trading
14-
competitions.
15+
competitions (not available for perps or spot live).
1516
---
1617

1718
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

scripts/sync-openapi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import "dotenv/config";
12
import * as fs from "fs/promises";
23
import SwaggerParser from "@apidevtools/swagger-parser";
34
import type { OpenAPIV3 } from "openapi-types";

0 commit comments

Comments
 (0)