Quick start

Create a wallet and verify that your server can read it back. This path gives you a master API key, one idempotent write, and one authenticated read.

Get a master key

  1. Sign in to StarSwap and complete email verification.
  2. Open API keys and create a master key.
  3. Store the key as a server-side environment variable.
Terminal
export STARSWAP_API_KEY='ss_live_<id>_<secret>'

Master keys can authorize custody actions. Keep them out of browsers, client bundles, logs, and analytics. See Authentication for key handling and retry guidance.

Create a wallet

Send your first request from the server. An Idempotency-Key lets you safely retry the write if the network drops before you receive a response.

Terminal
curl https://starswap.cc/api/v1/wallets \
  -X POST \
  -H "Authorization: Bearer $STARSWAP_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: wallet-$(uuidgen)" \
  -d '{"name":"Treasury"}'

The response includes the wallet id. Keep it with the account or customer record that owns the wallet. Every balance, transfer, quote, and settlement action is scoped to that wallet.

Verify access

List wallets with the same key to confirm the credential and API base URL are configured correctly.

Terminal
curl 'https://starswap.cc/api/v1/wallets?limit=50' \
  -H "Authorization: Bearer $STARSWAP_API_KEY"

The wallet you created appears in items. If the request fails, check the base URL and authentication requirements before retrying.

Continue from the wallet

Use the wallet id to inspect balances and settings, move funds with internal transfers, execute a market trade, or issue a settlement ticket.