Descripción General
API Documentation
Integre las potentes capacidades de intercambio nativo entre cadenas de MakeSwap directamente en su aplicación. Nuestra API proporciona acceso al protocolo subyacente, permitiendo intercambios seguros y sin custodia entre las principales blockchains como Bitcoin, Ethereum, Polkadot y más.
Seguro y Sin Custodia
Todos los intercambios se ejecutan a través de validadores MPC. Nunca retenemos fondos de los usuarios.
Ejecución Rápida
Enrutamiento optimizado a través de proveedores de liquidez JIT.
Activos Soportados
Utilice el identificador de activo correcto al interactuar con el endpoint de Cotización. Los identificadores siguen el formato Cadena.Ticker.
Lista de Activos Soportados
Formato de Identificador de Activo
Los activos se identifican por un formato de cadena: CHAIN.TICKER o CHAIN.TICKER-CONTRACT
Supported Asset List is intentionally curated to major assets only. Long-tail and scam-token candidates are excluded.
- Activos Nativos: e.g., ETH.ETH (Ethereum), BTC.BTC (Bitcoin)
- Activos Token: e.g., ETH.USDC-0xA0b8... (USDC on Ethereum)
GETObtener Tokens
Obtenga la lista completa de activos soportados programáticamente.
curl -X GET "https://makeswap.io/api/v1/tokens"
POSTObtener Cotización
Obtenga rutas de intercambio disponibles y cotizaciones para un par dado. Este endpoint está optimizado para devolver rutas válidas para los activos nativos soportados a través del proveedor Chainflip.
curl -X POST "https://makeswap.io/api/v1/quote" \
-H "Content-Type: application/json" \
-d '{"sellAsset":"BTC.BTC", "buyAsset":"ETH.ETH", "sellAmount":"0.1"}'
Patio de Recreo Interactivo - Obtener Cotización
Parámetros
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
| sellAsset | string | Yes | Identificador de activo (ej. 'BTC.BTC') |
| buyAsset | string | Yes | Identificador de activo (ej. 'ETH.ETH') |
| sellAmount | string | Yes | Cantidad a intercambiar en unidades nativas |
POSTSwap
Create swap transaction details from a previously selected route. This endpoint proxies SwapKit v3 /v3/swap.
curl -X POST "https://makeswap.io/api/v1/swap" \
-H "Content-Type: application/json" \
-d '{ "routeId": "uuid", "sourceAddress": "bc1...", "destinationAddress": "0x123..." }'
{
"routeId": "uuid",
"targetAddress": "bc1...",
"tx": "base64_or_hex",
"swapId": "uuid"
}POSTRastrear Intercambio
Track swap status using hash + chainId, depositChannelId, or depositAddress.
curl -X POST "https://makeswap.io/api/v1/track" \
-H "Content-Type: application/json" \
-d '{ "hash": "0x...", "chainId": "1" }'
{
"id": "12345",
"status": "deposit_received", // waiting_deposit, sending, complete
"depositAddress": "...",
"txHash": null,
"outAmount": null
}POSTIntegration Token
Issue short-lived tokens for iframe, SDK, or wallet integrations. You can authenticate with partner credentials or an internal signed request.
curl -X POST "https://makeswap.io/api/v1/integrations/token" \
-H "Content-Type: application/json" \
-d '{ \"origin\": \"https://partner.example\", \"affiliateFeeBps\": 100 }'
Partner mode headers
- x-makeswap-key-id
- x-makeswap-key-secret
Internal wallet mode headers
- x-makeswap-internal-key-id
- x-makeswap-internal-timestamp (unix seconds)
- x-makeswap-internal-signature (HMAC-SHA256 hex of METHOD\\nPATH\\nTIMESTAMP\\nSHA256(BODY))
- x-makeswap-internal-body-sha256 (optional integrity check)
Embed quickstart
<iframe src="https://makeswap.io/embed?token=INTEGRATION_TOKEN" style="width:100%;min-height:640px;border:0" title="MakeSwap Widget" />
No-SDK partner onboarding
<iframe src="https://makeswap.io/embed/PARTNER_ID?sellAsset=BTC.BTC&buyAsset=ETH.ETH" style="width:100%;height:760px;border:0" title="MakeSwap Widget" />
The partner route validates parent website origin against allowed origins configured in admin.