Scambia e accetta
criptovalute.

Aumenta i tuoi benefici e sorprendi i tuoi clienti.
Domina il potere delle criptomonete con Flyp.me.

Tabella dei contenuti

API version: 1.1.3

Introduzione

Flyp.me API è il modo veloce, efficiente e affidabile per accettare più di 30 criptomonete, ovunque e in qualsiasi momento. E' molto facile integrarla nel tuo sito, piattaforma o servizio esistente. Stupirà a te e ai tuoi clienti.

Se hai qualsiasi richiesta tecnica su la Flyp.me API, invia una mail a api@flyp.me. Per convertirti in affiliato o altre richieste relazionate, per favore mettiti in contatto scrivendo a business@flyp.me.

1. Crea

Iniziare un nuovo ordine

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

Note:

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 referral_code on the request. Nota: sarà necessario utilizzare un codice di riferimento convalidato o l'ordine avrà esito negativo.

risultato:

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

Take from there the uuid to continue the process.

2. Update

Aggiornare ordine

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

Note:

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 referral_code on the request. Nota: sarà necessario utilizzare un codice di riferimento convalidato o l'ordine avrà esito negativo.

risultato:

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

Note:

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

3. Accept

Accettare ordine

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

risultato:

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

Controllare stato dell'ordine per uuid

I possibili stati sono: 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"}

risultato:

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

Result will also include 'txid' and 'txurl' when the order is EXECUTED.

Il risultato includerà anche 'confirmations' quando il pagamento è in qualche stato XXX_RECEIVED.

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

Ottenere info complete di un ordine

Questo comando ha límiti e non devi utilizzarlo per la monitorizzazione costante di un ordine, usa 'check' per quello

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

Result will also include 'txid' and 'txurl' when the order is EXECUTED.

Il risultato includerà anche 'confirmations' quando il pagamento è in qualche stato XXX_RECEIVED.

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

6. Cancellare Ordine

Cancellare un ordine in attesa

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. Aggiungere un indirizzo di rimborso ad un ordine

Aggiungere un indirizzo di rimborso per ordini che non ne hanno uno.

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

risultato:

{"result":"ok"}
              

8. Consultare Tassi

Ottenere tassi di scambio

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

risultato:

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

Note:

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

9. Consultare criptomonete attive

Ottenere informazioni delle criptomonete disponibili

curl https://flyp.me/api/v1/currencies
A currency needs to have both exchange and send set to true to be enabled for the accountless exchange. Confirmation time is the expected time in minutes (approximate). Other parameters are self explanatory.

risultato:

{"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. Consultare límiti

Ottiene limiti max e min in {to_currency}.

Nota: Per calcolare i limiti di {from_currency} dovrai calcolarlo usando i tassi di scambio.

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

risultato:

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

Per convertirti in affiliato o per qualsiasi altra
richiesta, mettiti in contatto.

Contattaci