Operacion API

Endpoints para swaps

Crear un registro de swap

POST /hooks/clients/:client_id/swap

Crea un registro de swap.

Parameters

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

Request

Headers

Content-Type: application/json
Authorization: <integration-token>
Host: example.org
Cookie: 

Route

POST /hooks/clients/100/swap

Body

{"currency_in":"btc","network_in":"bitcoin","amount_in":"100","currency_out":"rbtc","network_out":"RSK","type":"swap","payment_method_id":9}

Response

Headers

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/"2c1e884a498be4f6c2e174ed44c953ac"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 4131f086-4654-49c5-b173-93335df1d1f8
X-Runtime: 0.168648
Vary: Origin
Content-Length: 358

Status

200 OK

Body

{
  "data": {
    "id": 127,
    "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-28T21:44:53.338Z",
    "type": "Operations::Swap"
  },
  "url": {
    "url": "https://btcpay.kriptonmarket.com/invoice?id=WUjtVDi7aDcvcTRoNFQBGS",
    "external_code": "WUjtVDi7aDcvcTRoNFQBGS"
  }
}