current version: 1.1.3 (changelog)

Create

Initiate a new order

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

Notes:

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. Note you will need to use a validated referral code or the order will fail.

result:

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

Update

Update an order

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

Notes:

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. Note you will need to use a validated referral code or the order will fail.

result:

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

Notes:

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

Accept

Accept an order

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

result:

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

Check

Check order status by uuid

Possible statuses are: 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"}

result:

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

Result will also include 'txid' and 'txurl' when the order is 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.

Info

Get order full info

This command is rate limited so you should not use this for continuous monitoring of an order, use 'check' instead

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:

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

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

Cancel order

Cancel a pending order

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:


{"result":"ok"}

Add a refund address 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"}

result:


{"result":"ok"}

Query Rates

Get exchange rates

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

result:


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

Notes:

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

Query Active Currencies

Get available currencies information

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.

result:


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

Query Limits

Get max and min limits in {to_currency}. 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

result:

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

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.