Endpoints para swaps
Crea un registro de swap.
| Name | Description |
|---|---|
| currency_in | Moneda a enviar (verificar monedas disponibles) |
| network_in | Red para la moneda de entrada (verificar monedas disponibles) |
| amount_in | Monto a enviar |
| currency_out | Moneda a recibir (verificar monedas disponibles) |
| network_out | Red para la moneda de salida (verificar monedas disponibles) |
| type | Tipo de operacion, opciones: swap |
| payment_method_id | Metodo de pago seleccionado |
Content-Type: application/json Authorization: Bearer <token> Host: example.org Cookie:
POST /internal/clients/swap
{"currency_in":"btc","network_in":"bitcoin","amount_in":"100","currency_out":"rbtc","network_out":"rsk","type":"swap","payment_method_id":4}
X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Download-Options: noopen X-Permitted-Cross-Domain-Policies: none Referrer-Policy: strict-origin-when-cross-origin Content-Type: application/json; charset=utf-8 ETag: W/"ddf1b6ff7d97fbc849310913ef9c0350" Cache-Control: max-age=0, private, must-revalidate X-Request-Id: 0ecb0519-f281-4b4f-b22e-9f576a52d344 X-Runtime: 0.151044 Vary: Origin Content-Length: 358
200 OK
{
"data": {
"id": 112,
"status": "wait",
"currency_in": "btc",
"amount_in": 100.0,
"currency_out": "rbtc",
"amount_out": 99.0,
"comment": null,
"tx_hash": null,
"url_voucher_image": null,
"created_at": "2023-04-19T17:15:38.050Z",
"type": "Operations::Swap"
},
"url": {
"url": "https://btcpay.kriptonmarket.com/invoice?id=WUjtVDi7aDcvcTRoNFQBGS",
"external_code": "WUjtVDi7aDcvcTRoNFQBGS"
}
}