Skip to content

docs: regroup API reference under "Sprinter API" tab (Credit / Liquidity / Swaps)#212

Merged
mpetrunic merged 7 commits into
mainfrom
docs/api-tab-grouping
Jun 12, 2026
Merged

docs: regroup API reference under "Sprinter API" tab (Credit / Liquidity / Swaps)#212
mpetrunic merged 7 commits into
mainfrom
docs/api-tab-grouping

Conversation

@alexmmueller

Copy link
Copy Markdown
Contributor

Restructures the API reference into a single Sprinter API tab grouped by Credit / Liquidity / Swaps, and syncs the Liquidity endpoints to the live api.sprinter.tech spec. Worked from current main (not the larger restructure draft).

Navigation

  • Renamed the second tab Sprinter Credit (V2) APISprinter API; broadened its url to api-reference so all specs nest under it.
  • Grouped by Credit / Liquidity / Swaps, each with an Overview page and collapsible subgroups.
  • Subgroups have unique names (Credit Info/Actions/Advanced, Liquidity Info/Actions, Swap Actions) — this fixes a collapse bug where same-named groups toggled together.
  • Stripped leading "Get" from API sidebar labels; short sidebarTitle, long descriptive page titles.

Liquidity (synced to live spec)

  • Fixed the events endpoint: /liquidity/protocol/{protocol}/events (was the non-existent /liquidity/pools/events).
  • Removed the V1 unlock call (/liquidity/v1/.../unlock).
  • Verified every documented endpoint maps 1:1 to a live api.sprinter.tech endpoint.
  • Overview reframed around Sprinter Intent Liquidity (accessed via a supported intent protocol — Across, LiFi Intents) + a zero-collateral / escrow-secured note.

Swaps

  • Restored GET /v2/route (getRouteV2) from the original Blanc spec — X-API-Key auth, snake_case params, RouteResponseV2. Lives on swaps.sprinter.tech (separate from api.sprinter.tech).

Reviewer notes

  • Verified locally with mintlify dev — all pages render.
  • Miso (cards) and Signing APIs intentionally left out of nav for now.

🤖 Generated with Claude Code

alexmmueller and others added 2 commits June 10, 2026 17:34
…ity / Swaps)

- Rename the second top tab "Sprinter Credit (V2) API" -> "Sprinter API" and
  broaden its url to api-reference so all API specs nest under it.
- Group endpoints by Credit / Liquidity / Swaps, each with Info/Actions
  subgroups (collapsible) and an Overview landing page.
- Liquidity: publish the full sprinter/liquidity endpoint set (previously
  unwired) + solver-address + health; short sidebar labels, long page titles.
- Swaps: restore GET /v2/route (getRouteV2) from the original Blanc spec
  (X-API-Key auth, snake_case params, RouteResponseV2); drop the stale /v1/route.
- Strip leading "Get" from API sidebar labels for consistency.
- Add Overview pages for Liquidity and Swaps; rename Credit overview to "Overview".
- Register solve/openapi.yaml; drop the redundant stash spec from nav.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nav groups

- Sync Liquidity endpoints to the live api.sprinter.tech spec: fix the events
  endpoint (/liquidity/protocol/{protocol}/events with a protocol path param;
  was the non-existent /liquidity/pools/events).
- Remove the V1 unlock call (/liquidity/v1/.../unlock) from spec, page, and nav.
- Reframe the Liquidity overview around Sprinter Intent Liquidity (accessed via
  a supported intent protocol) + add a zero-collateral / escrow-secured note.
- Give every API subgroup a unique name (Credit/Liquidity/Swap + Info/Actions)
  to fix the shared collapse-state bug where same-named groups toggled together.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mintlify

mintlify Bot commented Jun 11, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
sprinter-1ab1fed0 🟢 Ready View Preview Jun 11, 2026, 1:47 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@alexmmueller

Copy link
Copy Markdown
Contributor Author

@mpetrunic Tried to make the API docs a bit easier to graps and bring back the Swap API. Can you give it some eyes pls?

Comment thread api-reference/solve/openapi.yaml Outdated
description: Mainnet Swap API
- url: https://swaps.sprinter.tech/base
description: Base Swap API
- ApiKeyAuth: []

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from what ralph sent me, it uses basic auth, not api key auth

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Comment thread api-reference/solve/openapi.yaml Outdated
Comment thread api-reference/solve/openapi.yaml Outdated
- in: query
name: slippageBps
description: The slippage tolerance in basis points (e.g., 50 for 0.5%)
name: slippage

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ralph sent me example where param is slippageBps

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

…e, /v1/route)

Replace the fabricated /v2/route spec with the authoritative spec from
sprintertech/ass/swap/openapi.yml. Addresses review feedback:
- Basic auth instead of X-API-Key
- camelCase params; slippageBps (basis points) instead of slippage float
- real endpoint GET /v1/route with RouteV1Response fields

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Populates amountIn/tokenIn/tokenOut so Mintlify generates complete,
runnable request snippets (curl, Python, JS, etc.) on the Route page
instead of only slippageBps. Uses canonical mainnet USDC -> WETH to
match the default mainnet server.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Parameter-level example values were ignored by Mintlify's code-sample
generator; move them into the schema so amountIn/tokenIn/tokenOut appear
in the generated request examples.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alexmmueller

Copy link
Copy Markdown
Contributor Author

@mpetrunic & @wesraph I think the APIs are documented properly now, can you pls review!

@alexmmueller alexmmueller linked an issue Jun 12, 2026 that may be closed by this pull request
3 tasks
Liquidity endpoints require an API key in the X-Auth-Token header.

- openapi.json: add ApiKeyAuth (apiKey, X-Auth-Token, header) security
  scheme and apply it to all six liquidity operations (tokens, pools,
  events, fees, quote, signature).
- liquidity/overview.mdx: add an Authentication section with a sample
  request and how to request credentials (support@sprinter.tech),
  mirroring the Swap API overview.
- Add the X-Auth-Token header to every RequestExample (curl/Python/JS/Go)
  on the six liquidity endpoint pages; convert Go GET/POST helpers to
  http.NewRequest so the header can be set.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alexmmueller

Copy link
Copy Markdown
Contributor Author

@mpetrunic I think now all should be fixed, also added the auth for Liquidity API. Can you do last check pls?

@mpetrunic mpetrunic merged commit 93cb57d into main Jun 12, 2026
1 check passed
@mpetrunic mpetrunic deleted the docs/api-tab-grouping branch June 12, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API Documentation Update

2 participants