Should I use the SDK or the REST API?
Should I use the SDK or the REST API?
Use the TypeScript SDK. It handles key management, state tracking, error recovery, and gasless claiming out of the box. The REST API is available but not recommended for production use - it may change without notice. See API & SDK for details.
Which platforms does the SDK support?
Which platforms does the SDK support?
The SDK is pure TypeScript with zero native dependencies. It works in:
- Browsers (any modern browser)
- React Native (with custom storage adapters, see React Native setup)
- Node.js (server-side integrations)
Do I need an API key?
Do I need an API key?
No authentication is required to use Satora Swaps. You can optionally pass an API key for swap attribution and custom fee markup, but it is not required for creating or completing swaps. Sign up at developer.satora.io to get one — see API Keys for how to configure it.
How do I handle errors and failed swaps?
How do I handle errors and failed swaps?
The SDK has built-in error handling. For common error codes and recovery strategies, see Error Codes. For refunding stuck swaps, see:
What happens if a swap gets stuck?
What happens if a swap gets stuck?
Swaps have built-in timeouts. If a swap isn’t completed within the timelock period (typically 24 hours for the client side), funds are automatically refundable. The SDK can detect stuck swaps and initiate refunds. You can also recover swaps using your mnemonic seed phrase.
Can I integrate Satora Swaps into my backend and manage swaps for my users?
Can I integrate Satora Swaps into my backend and manage swaps for my users?
Yes, but there are trust tradeoffs to consider. When your backend holds keys and manages swaps on behalf of users, your users are trusting you with custody. We can help you design a setup that minimizes or eliminates these tradeoffs - but it requires us to understand your architecture first. Reach out to us and we’ll work with you on a solution.