https://wurkapi.fun. A swap reserves the source platform balance, queues conversion, and credits the destination platform balance after completion. External wallet payouts use withdrawals. For the complete CLI workflow, see Swap balances.
Send
Content-Type: application/json and a JSON object. Query parameters, arrays, and unknown body fields are rejected. History without pagination uses {}. Successful responses have HTTP 200 and ok: true; create success does not mean settlement. Monetary values in responses are decimal strings, or null where indicated.
Authentication
All three operations accept exactly one of:X-API-Key: the existing account’s active API key, with API-key access enabled.SIGN-IN-WITH-X: a fresh proof from its primary Solana wallet or registered, enabled Base wallet, bound to this exact request.
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp, Ed25519/SIWS) and Base mainnet (eip155:8453, EIP-191). The signing chain does not restrict the asset pair. The endpoint derives the account from the credential; callers cannot supply an accountId or another wallet’s source balance.
A valid unauthenticated request returns HTTP 402, a PAYMENT-REQUIRED header, and an x402 v2 challenge with accepts: [] and a sign-in-with-x extension. This requests free authentication. No x402 payment is required to authenticate the swap.
Verify and sign the advertised origin, exact path, POST method, purpose, and intent statement. The statement includes the SHA-256 hash of the complete canonical JSON body, including the amount and idempotency key for create, selector for status, or pagination for history. Repeat the same request with the proof. Changing between the short path and alias requires a new proof. Proofs are single-use and valid for at most five minutes; obtain a fresh one after a retryable failure. A profile proof does not authorize a swap.
API-key headers are trimmed, must be nonempty, and must not exceed 512 characters before trimming. SIWX headers must be nonempty and at most 12,000 characters. Supplying both headers, including empty values, returns 400 AGENT_AUTH_AMBIGUOUS. See Authentication for account setup.
Create a swap
All unequal pairs are supported. The trimmed amount text must match
digits or digits.digits, with at most 80 characters. Nonzero digits beyond the source asset’s precision are rejected; extra trailing fractional zeros are accepted. Exponents, signs, zero, and all are invalid string amounts. There is no full-balance flag or caller-selected slippage field.
The raw API also accepts finite JSON numbers no greater than Number.MAX_SAFE_INTEGER when their decimal representation satisfies those same amount rules. The CLI and SDK require strings. Keep strings throughout your application to avoid floating-point rounding. The canonical request body must fit within 16,384 UTF-8 bytes.
New SOL → USDC swaps require at least 0.0001 SOL. Zero output after fees is rejected when detected; execution can also safely fail an amount that is too small at execution time.
Fees and estimates
Cross-network routes charge a 0.3% fee on the stablecoin bridge amount, rounded up to0.000001. Small internal Solana conversions charge 1.5%; larger Solana conversions use a 5% slippage setting. A route with both conversion and bridging can incur both costs. Read bridgeFeeAmount when available.
The small-conversion limits are 0.01 SOL, 4000 WURK, 1 USDC, and 50 SKR, inclusive, for the amount entering the Solana conversion. An inbound bridge fee is deducted before evaluating that conversion amount.
expectedAmountOut and expectedAmountOutMin are indicative estimates, not guaranteed or enforced execution minimums. Estimates can be null when pricing is unavailable. There is no separate quote/accept endpoint for swaps. Actual credited output appears as received on status and history after completion.
Create response
The object containsok: true and these fields:
Preserve the key and returned ID. Creation does not return
received; use status for the actual output. An exact retry returns the existing swap’s current state and account balances, which may have changed since its first response. Reusing the key with a different asset pair or amount returns 409 SWAP_IDEMPOTENCY_CONFLICT.
Only one new attempt per account is admitted every 15 seconds. Admitted business failures can consume the window. Stored requests can be replayed without a second reservation, but use status first after an uncertain result. An active or review swap blocks another new swap even when the cooldown has elapsed.
Read one swap
Use exactly one selector:{"swapId":"RETURNED_SWAP_ID"} with a UUID in 8-4-4-4-12 hexadecimal format. idempotencyKey uses the same bounds as create. Do not include both selectors or any create fields. The query is scoped to the authenticated account; a missing or unowned record returns 404 SWAP_NOT_FOUND.
Success is {"ok":true,"swap":{...}}. Each swap record has:
failureReason: "SWAP_AMOUNT_TOO_SMALL" identifies the safe dust-failure path that returned the source amount. A generic failed status or a request timeout alone does not establish a returned balance. Status reads never create, retry, or reverse a swap.
Read swap history
Success includes
ok: true, swaps (records with the status shape above), total, limit, offset, hasMore, nextOffset, and pending. pending is null or {id,status} for an active swap, including bridge_review, regardless of the requested page.
History includes website and AutoSwap activity. Records are newest first, with undated records last. Follow nextOffset, retain the limit, and deduplicate by id if new records shift offset pages. Stop when nextOffset is null; it can be null at the traversal ceiling while hasMore remains true.
The history cooldown is 10 seconds per account, shared across pages, aliases, and credentials. It is separate from the create cooldown. Use individual status to follow a known swap. This history reads recorded activity without moving funds; earnings, withdrawals, and credited job refunds have their own endpoints.
Errors and recovery
Errors normally return{"ok":false,"errorCode":"CODE","message":"..."} with optional details. The free HTTP 402 authentication challenge has the x402 shape described above. Rate limits include a Retry-After header; account cooldown responses also include details.retryAfterSeconds. CLI/SDK errors expose the delay as retryAfterSeconds.
After a lost response, query
/swap/status with the original key. Retain that key and the original terms for any permitted retry. In CLI/SDK integrations, also retain the original state/finance store: FINANCE_INTENT_CONFLICT means a local request key already has different saved terms. Neither a successful HTTP response nor a CLI command’s outer status replaces the financial state of the swap.