# 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](/app/api-keys) and create a master key.
3. Store the key as a server-side environment variable.

~~~bash 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](/docs/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.

~~~bash 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.

~~~bash 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](/docs/base-url) and [authentication requirements](/docs/authentication) before retrying.

## Continue from the wallet

Use the wallet `id` to [inspect balances and settings](/docs/wallets), move funds with [internal transfers](/docs/transfers), execute a [market trade](/docs/trades), or issue a [settlement ticket](/docs/tickets).
