Integre swaps de DePiX/USDT Liquid para 20+ tokens em 8+ blockchains no seu app com uma API REST simples e segura.
The BrSwap Partner API allows you to create crypto swap orders programmatically. Your users deposit DePiX or USDT on the Liquid Network and receive tokens on their destination chain.
BrSwap accepts DePiX or USDT Liquid as input and converts to tokens on the following chains:
| Asset | Network | Fee |
|---|---|---|
depix | Liquid Network | 2% |
usdt_liquid | Liquid Network | 1% |
| Chain | Code | Tokens |
|---|---|---|
| Polygon | pol | USDT (direct), USDC |
| Ethereum | eth | ETH, USDT, USDC, WBTC |
| Base | base | ETH, USDC |
| Arbitrum | arb | ETH, USDT, USDC |
| BSC | bsc | BNB, USDT, USDC |
| Solana | sol | SOL, USDT, USDC |
| Tron | tron | TRX, USDT |
| Bitcoin | btc | BTC |
Use the /tokens endpoint to get the full list of asset_id values needed for quotes and orders. The fastest route is direct:pol:usdt (Polygon USDT) with ~15 second delivery.
All requests require an API key sent via the X-API-Key header.
To get your API key, contact us at admin@brswap.me
The typical integration follows 4 steps:
After creating an order, the user deposits to the provided Liquid address. BrSwap detects the deposit automatically and sends the output token to the recipient address.
Returns all available destination tokens and supported source assets.
Get a real-time quote for a swap. Quotes are valid for ~30 seconds.
| Param | Type | Description |
|---|---|---|
amount required | float | Amount in source asset (e.g. 100 DePiX) |
source_asset | string | depix or usdt_liquid. Default: depix |
destination_asset required | string | Token asset_id from /tokens |
destination_chain required | string | Chain code (e.g. pol, eth, sol) |
Create a new swap order. Returns a Liquid deposit address. The order expires in 30 minutes.
| Field | Type | Description |
|---|---|---|
amount required | float | Amount in source asset |
source_asset | string | depix or usdt_liquid. Default: depix |
recipient_address required | string | Destination wallet address |
destination_chain required | string | Chain code |
destination_asset required | string | Token asset_id from /tokens |
destination_symbol optional | string | Token symbol (auto-resolved) |
refund_address optional | string | Liquid address for refund if the swap fails. Formats: lq1..., VJL..., Q... |
ref_id optional | string | Your internal reference ID |
Check the status of an existing order. Poll this endpoint to track progress.
| Status | Description |
|---|---|
waiting_deposit | Waiting for deposit on the Liquid address |
partial_deposit | Partial deposit received, waiting for the rest |
processing | Deposit confirmed, swap in progress |
completed | Swap completed, output sent to recipient |
expired | Order expired (no deposit within 30 min) |
cancelled | Order was cancelled |
failed | Swap failed (contact support) |
refund | Refund in progress — will be sent to refund_address on Liquid. Check refund_txid field for the TX once sent. |
| Code | Meaning |
|---|---|
| 400 | Invalid request (missing or invalid parameters) |
| 401 | Invalid or missing API key |
| 403 | API key disabled, IP not whitelisted, or limit exceeded |
| 404 | Order not found |
| 429 | Rate limit exceeded |
| 500 | Internal error (retry) |
| 503 | Service unavailable (maintenance or insufficient liquidity) |
Rate limits are per API key. Current limits are returned in response headers:
When rate limited, the API returns 429 with a Retry-After: 60 header.
Contact us at admin@brswap.me to request a custom plan.
Add the BrSwap swap widget to your website with a single line of code. No API key needed. Your users can swap directly from your site.
ref param for partner tracking