Skip to main content
This page covers the conventions shared across all Portfolio Wallet API endpoints.

Base path

Wallet resources use the /v2/wallets path prefix. Supporting APIs use their own /v2/* prefixes, including /v2/activity, /v2/accounting, /v2/webhooks, /v2/address-book, /v2/turnkey, and /v2/system.

Authentication

All requests require a Bearer token in the Authorization header. If the token is missing or invalid, the API returns 401.

Environments

Sandbox processes test funds; production processes live funds. Choose the base URL for your environment. Sandbox supports a subset of networks and yield sources. Sandbox chain keys identify the test network:
  • ethereum_sepolia — Ethereum Sepolia testnet
  • solana_devnet — Solana devnet
  • stellar_testnet — Stellar testnet
  • tron_shasta — TRON Shasta testnet
Production uses chain names such as ethereum, solana, and stellar. See Supported Chains for network keys and supported assets.

Pagination

List endpoints use cursor-based pagination with limit and cursor parameters.
The response includes a nextCursor field. Pass it as cursor to fetch the next page:
When nextCursor is null, you have reached the end of the result set. Endpoint-specific filters, sort options, limits, and status semantics vary by endpoint. Treat each API reference page’s parameter table as authoritative for that endpoint.

Idempotency

Create and withdrawal endpoints accept a requestId (UUID v4). These endpoints return 200 OK for both the initial request and an idempotent replay with the same requestId — the existing resource state is returned on replay. Persist the requestId and payload before submitting each logical wallet creation or withdrawal. Reuse them unchanged after a timeout; reusing the ID with a different payload returns 409 request_id_conflict.
For example, changing the allocations while reusing the same requestId returns:
When you receive 409 request_id_conflict, recover the original wallet through GET /v2/wallets?requestId=... or read the original withdrawal by its saved ID. If the withdrawal ID was lost, replay the original persisted payload with its original requestId. Correct the local operation mapping before deciding whether to begin a separate request.

Rate limiting

Each API key can make up to 300 authenticated requests per minute across the API. Every request counts toward this overall limit. Endpoints with a lower limit must also stay within their listed limit. Rate limits use two limit types:
  • Per API key — one allowance is shared by all calls to that endpoint using the API key.
  • Per API key, per wallet — each wallet gets its own allowance under the API key. For example, you can update Wallet A five times and Wallet B five times in the same minute. Both wallets’ calls still count toward the API key’s overall 300-request limit.
If you exceed a limit, the API returns 429 Too Many Requests. The Retry-After header tells you how many seconds to wait. Wait at least that long, add a small random delay, and then try again.

Error handling

Business API errors are returned as JSON with a human-readable error string and a machine-readable code field.
Business API errors include both error and code fields. Authentication middleware can return { "error": "...", "message": "..." } before the request reaches a business handler. Use code for programmatic branching when it is present, and use the error string for logging and debugging.