SW4P Documentation
Browse documentation
API Overview

API Overview

The sw4p API provides direct access to cross-chain transfer functionality.

The generated OpenAPI spec is published at /api-reference/openapi.json in this docs site. A running backend also serves Swagger UI at /docs and the live generated spec at /api-docs/openapi.json.

The checked-in spec is generated from sw4p-backend::SdkApiDoc:

bash
cargo run --manifest-path sw4p-backend/Cargo.toml --bin export_openapi -- docs/api-reference/openapi.json

Base URL

https://api.sw4p.io

Authentication

Published SDK routes require an API key in the header:

bash
curl https://api.sw4p.io/sdk/v1/pairs \
  -H "X-API-Key: sk_555_live_your_api_key"

Wallet-owned app routes use the signed wallet session flow documented in Authentication.

Endpoints

MethodEndpointDescription
POST/sdk/v1/transferExecute cross-chain transfer
POST/sdk/v1/estimateEstimate transfer fees
GET/sdk/v1/status/:idGet transfer status
GET/sdk/v1/pairsGet supported route pairs
GET/sdk/v1/limitsGet transfer limits
POST/sdk/v1/solana/build-txBuild Solana transaction
POST/sdk/v1/solana/submitSubmit signed Solana tx
POST/v1/auth/nonceIssue wallet-login nonce
POST/v1/auth/loginExchange signed nonce for JWT session
GET/v1/auth/sessionGet current wallet session
POST/x402/verifyVerify x402 payment payload
POST/x402/settleSettle x402 payment payload

Response Format

All responses are JSON:

json
{
  "intent_id": "int_abc123",
  "status": "pending",
  "...": "..."
}

Error Responses

json
{
  "error": "ERROR_CODE",
  "message": "Human readable message"
}
StatusError CodeDescription
400INVALID_REQUESTMissing or invalid parameters
401UNAUTHORIZEDInvalid API key
404NOT_FOUNDResource not found
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORServer error

Rate Limits

TierRequests/minTransfers/day
Free6010
Pro300100
EnterpriseUnlimitedUnlimited