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

1.1. 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:

On the initial request invoiced_amount can also be specified instead of ordered_amount.

You can optionally specify destination and refund_address on the request.

You can optionally specify destination and refund_address on the request. Note you will need to use a validated referral code or the order will fail.

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"
  },
  "expires": 1199
}

Take from there the uuid to continue the process.

1.2 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:

Has the same parameters as create order but from_currency and to_currency are now optional and an additional obligatory parameter uuid is added.

You can optionally specify destination and refund_address on the request. Note you will need to use a validated referral code or the order will fail.

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"
  },
  "expires": 1199
}

Notas:

The charged_fee return parameter is the charged fee for the network in to_currency units.

1.3 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"
}

2. Checkear

Checkear estado de orden por uuid

Los posibles estados son: WAITING_FOR_DEPOSIT, DEPOSIT_RECEIVED, DEPOSIT_CONFIRMED, EXECUTED, 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

Result will also include 'confirmations' when the payment is in some XXX_RECEIVED status.

{"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.

3. 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",
  "deposit_address": "M88aw1wCKvVP7EAmqviV8ggxM5ds8BypvQ"
}

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

Result will also include 'confirmations' when the payment is in some XXX_RECEIVED status.

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

4. 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"}

5. 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 specify destination and refund_address on the request. Note you will need to use a validated referral code or the order will fail.

6. Add a refund to an order

Add a refund address for orders not having one.

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:

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

7. 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}}

8. Consultar límites

Get max and min limits in {to_currency}.

Note: to get the limits in {from_currency} you must calculate it using the exchange rate.

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"}

9. 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 convertirne en afiliado o cualquier otra
consulta, ponte en contacto.

Contáctanos