Intercambia y acepta
cryptomonedas.

Aumenta tu beneficio y sorprende a tus clientes.
Domina el poder de las cryptos con Flyp.me.

Tabla de contenidos

API version: 1.1.3

Introducción

Flyp.me API es la manera rápida, eficiente y confiable para aceptar más de 30 cryptomonedas, en todo momento y lugar. Es muy fácil integrarla en tu sitio, plataforma o servicio existente. Te va a encantar, y a tus clientes también.

Si tienes cualquier petición técnica sobre Flyp.me API, por favor envía un correo a api@flyp.me. Para convertirte en afiliado u otras consultas relacionadas, por favor ponte en contacto escribiendo a business@flyp.me.

1. Crear

Iniciar nueva orden

curl -X POST -d @file.txt https://flyp.me/api/v1/order/new --header "Content-Type:application/json"

file.txt:

{
  "order": {
    "from_currency": "LTC",
    "to_currency": "ZEC",
    "ordered_amount": "0.01"
  }
}

Notas:

En la petición inicial también se puede especificar invoiced_amount en lugar de ordered_amount.

Opcionalmente, puedes especificar destination y refund_address en la petición.

Opcionalmente, puedes especificar referral_code en la petición. Ten en cuenta que necesitarás usar un referral code válido o la orden fallará.

resultado:

{
  "order": {
    "uuid": "eeeeb105-d30d-43f1-bbb8-a9f8a237acf5",
    "destination": null,
    "exchange_rate": "0.4840738172",
    "ordered_amount": "0.01",
    "invoiced_amount": "0.02189749",
    "charged_fee": "0.0006",
    "from_currency": "LTC",
    "to_currency": "ZEC"
  },
  "refund_address": "LajyQBeZaBA1NkZDeY8YT5RYYVRkXMvb2T",
  "expires": 1199
}

Obtén de allí el uuid para continuar el proceso.

2. Actualizar

Actualizar orden

curl -X POST -d @file.txt https://flyp.me/api/v1/order/update --header "Content-Type:application/json"

file.txt:

{
  "order": {
    "uuid": "eeeeb105-d30d-43f1-bbb8-a9f8a237acf5",
    "ordered_amount": "0.02",
    "destination": "t1SBTywpsDMKndjogkXhZZSKdVbhadt3rVt",
    "refund_address": "LajyQBeZaBA1NkZDeY8YT5RYYVRkXMvb2T"
  }
}

Notas:

Tiene los mismos parámetros que create pero from_currency y to_currency ahora son opcionales y se agregó el parámetro adicional obligatorio uuid.

Opcionalmente, puedes especificar referral_code en la petición. Ten en cuenta que necesitarás usar un referral code válido o la orden fallará.

resultado:

{
  "order": {
    "uuid": "eeeeb105-d30d-43f1-bbb8-a9f8a237acf5",
    "destination": "t1SBTywpsDMKndjogkXhZZSKdVbhadt3rVt",
    "exchange_rate": "0.4881512527",
    "ordered_amount": "0.02",
    "invoiced_amount": "0.04220004",
    "charged_fee": "0.0006",
    "from_currency": "LTC",
    "to_currency": "ZEC"
  },
  "refund_address": "LajyQBeZaBA1NkZDeY8YT5RYYVRkXMvb2T",
  "expires": 1199
}

Notas:

El parámetro charged_fee devuelto es la tasa para la red en unidades de to_currency.

3. Aceptar

Aceptar orden

curl -X POST -d @file.txt https://flyp.me/api/v1/order/accept --header "Content-Type:application/json"

file.txt:

{"uuid": "eeeeb105-d30d-43f1-bbb8-a9f8a237acf5"}

resultado:

{
  "order": {
    "uuid": "eeeeb105-d30d-43f1-bbb8-a9f8a237acf5",
    "destination": "t1SBTywpsDMKndjogkXhZZSKdVbhadt3rVt",
    "exchange_rate": "0.4888796682",
    "ordered_amount": "0.02",
    "invoiced_amount": "0.04213716",
    "charged_fee": "0.0006",
    "from_currency": "LTC",
    "to_currency": "ZEC"
  },
  "expires": 1145,
  "deposit_address": "M88aw1wCKvVP7EAmqviV8ggxM5ds8BypvQ",
  "refund_address": "LajyQBeZaBA1NkZDeY8YT5RYYVRkXMvb2T"
}

4. Checkear

Checkear estado de orden por uuid

Los posibles estados son: WAITING_FOR_DEPOSIT, DEPOSIT_RECEIVED, DEPOSIT_CONFIRMED, EXECUTED, NEEDS_REFUND, REFUNDED, CANCELED and EXPIRED

curl -X POST -d @file.txt https://flyp.me/api/v1/order/check --header "Content-Type:application/json"

file.txt:

{"uuid": "9a14a8c2-cc2e-4156-bbdd-96437ef81bf6"}

resultado:

{"status": "WAITING_FOR_DEPOSIT", payment_status: "PENDING"}

El resultado incluirá también 'txid' y 'txurl' cuando la orden esté EXECUTED

El resultado incluirá también 'txid' y 'txurl' cuando la orden esté EXECUTED

{"status": "EXECUTED", "txid": "XXXXX", "txurl": "https://etherscan.io/tx/XXX"}

Possible payment_status are PENDING, UNDERPAY_RECEIVED, UNDERPAY_CONFIRMED, PAYMENT_RECEIVED, PAYMENT_CONFIRMED, OVERPAY_RECEIVED, OVERPAY_CONFIRMED. Orders with underpay or overpay will be refunded by the system.

5. Info

Obtener info completa de una orden

Este comando tiene límites y no debes utilizarlo para monitoreo constante de una orden, usa 'check' para ello

curl -X POST -d @file.txt https://flyp.me/api/v1/order/info --header "Content-Type:application/json"

file.txt:

{"uuid": "9a14a8c2-cc2e-4156-bbdd-96437ef81bf6"}

result.txt:

{
  "order": {
    "uuid": "eeeeb105-d30d-43f1-bbb8-a9f8a237acf5",
    "destination": "t1SBTywpsDMKndjogkXhZZSKdVbhadt3rVt",
    "exchange_rate": "0.4888796682",
    "ordered_amount": "0.02",
    "invoiced_amount": "0.04213716",
    "charged_fee": "0.0006",
    "from_currency": "LTC",
    "to_currency": "ZEC"
  },
  "expires": 746,
  "status": "WAITING_FOR_DEPOSIT",
  "payment_status": "PENDING",
  "deposit_address": "M88aw1wCKvVP7EAmqviV8ggxM5ds8BypvQ",
  "refund_address": "LajyQBeZaBA1NkZDeY8YT5RYYVRkXMvb2T"
}

El resultado incluirá también 'txid' y 'txurl' cuando la orden esté EXECUTED

El resultado incluirá también 'txid' y 'txurl' cuando la orden esté EXECUTED

{
  "order": {
    "uuid": "eeeeb105-d30d-43f1-bbb8-a9f8a237acf5",
    (...)
    },
    (...)
    "deposit_address": "M88aw1wCKvVP7EAmqviV8ggxM5ds8BypvQ",
    "txid": "XXXXX",
    "txurl": "https://etherscan.io/tx/..."
}

6. Cancelar Orden

Cancelar una orden pendiente

curl -X POST -d @file.txt https://flyp.me/api/v1/order/cancel --header "Content-Type:application/json"

file.txt:

{"uuid": "9a14a8c2-cc2e-4156-bbdd-96437ef81bf6"}

result.txt:

{"result":"ok"}

7. Agregar reembolso a una orden

Agregar dirección de reembolso a órdenes que no la tengan.

curl -X POST -d @file.txt https://flyp.me/api/v1/order/addrefund --header "Content-Type:application/json"

file.txt:

{"uuid": "9a14a8c2-cc2e-4156-bbdd-96437ef81bf6", "address": "LajyQBeZaBA1NkZDeY8YT5RYYVRkXMvb2T"}
              

resultado:

{"result":"ok"}
              

8. Consultar Tasas

Obtener tasas de intercambio

curl https://flyp.me/api/v1/data/exchange_rates

resultado:

{"LTC-BTC":"0.0156975877",
 "BTC-LTC":"60.5139402396",
 "PPC-BTC":"0.0004053465",
 (...)
 "PPC-LTC":"0.024900034",
 "BTC-PPC":"2338.8025331034"}

Notas:

You can optionally add referral_code parameter to get rates for a specific referral.

9. Consultar monedas activas

Obtener información de monedas disponibles

curl https://flyp.me/api/v1/currencies
La moneda necesita tener tanto exchange como send seteadas a true para ser activada para intercambio sin registro. El tiempo de confirmación es el tiempo esperado en minutos (aproximado). Otros parámetros sonautoexplicativos.

resultado:

{"BTC": {"code":"BTC", "precision":8, "display_precision":4, "created_at":"2014-02-04T02:28:37.000Z", "updated_at":"2017-10-20T14:02:11.000Z", "name":"Bitcoin", "website":"https://bitcoin.org/", "confirmation_time":20, "default":false, "charged_fee":"0.0006", "currency_type":"CRYPTO", "exchange":true, "send":true},
 (...)
 "CREA": {"code":"CREA", "precision":8, "display_precision":4, "created_at":"2017-10-24T09:36:39.000Z", "updated_at":"2017-10-24T13:05:29.000Z", "name":"Creativecoin", "website":"https://www.creativechain.org", "confirmation_time":5, "default":false, "charged_fee":"0.01", "currency_type":"CRYPTO", "exchange":false, "send":false}}

10. Consultar límites

Obtener límites max y min para {to_currency}

Nota: para calcular los límites en {from_currency} tendrás que calcularlo usando la tasa de intercambio.

GET - /api/v1/order/limits/{from_currency}/{to_currency}
curl -X GET https://flyp.me/api/v1/order/limits/BTC/LTC

resultado:

{"min":"0.015","max":"52.11198655"}

11. Changelog

1.1.3: 2018/11/19 - Add NEEDS_REFUND status for orders.
                  - Add refund_address in order results.
                  - Add /order/addrefund api call to add a refund address.
                  - Add payment_status inside order/info and order/check.
                  - Add referral_code parameter to data/exchange_rates.
1.1.2: 2018/05/19 - Add txurl to order/info and order/check results.
1.1.1: 2018/03/12 - Add referral code parameter to create order.
1.1.0: 2017/12/13 - Introduce new limits and order creation api.
                  - Introduce new order/new, order/update and GET order/limits methods.
                  - order/create *deprecated* in favour of order/new and order/update pair.
                    - This allows presenting the exact rate to the user before he accepts.
                  - POST order/limits *deprecated* in favour of GET order/limits.
                    - The new api gives more exact limits since it accepts limits between two
                      currencies instead of limits for just one currency.
                  - Add txid to order/info and order/check results.
1.0.0: 2017/11/21 - First api version on flyp.me release.

NOTE about deprecated methods: We prefer api implementors will not be using these, so we removed
documentation about them. Still the methods are not removed for backwards compatibility for now.

Para convertirte en afiliado o cualquier otra
consulta, ponte en contacto.

Contáctanos