CoinReform is designed to be used as an API service.
CoinReform is offering API service via REST. To use our API via JSON, please add ".json" at the end of URL.
We do not support API calls over HTTP, in the interest of security reasons. All requests are only available via HTTPS.
Is there is problem within any of the api call the error message will appear in the result, like:

{ error: "Error message" }

Rate

This is current rate at the moment. Exchange rates can change quickly depending on market conditions. The miner fee, which is taken for each transaction is not included in this rate.
url: www.coinreform.com/api/rate/[pair]
method: GET
 
[pair] is any valid coin pair such as BTC_LTC or LTC_BTC
 
Success Output:
    {
        "pair" : "BTC_LTC",
        "rate" : "120.30769897"
    }

Deposit Limit

Current deposit limit at the moment. Amounts deposited over this limit will be sent to the return address if it was specified, otherwise the user will need to contact support to retrieve coins.
url: www.coinreform.com/api/limit/[pair]
method: GET

[pair] is any valid coin pair such as BTC_LTC or LTC_BTC

Success Output:
    {
        "pair" : "BTC_LTC",
        "limit" : "120.44709963"
    }

Market Info

This call contains all market information for specified pair such as rate, limit, minimum limit, miner fee.
url: www.coinreform.com/api/marketinfo/[pair]
method: GET
 
[pair] (OPTIONAL) is any valid coin pair such as BTC_LTC or LTC_BTC.
The pair is not required and if not specified will return an array of all market infos.
 
Success Output:
    {
        "pair"     : "BTC_LTC",
        "rate"     : 130.12345678,
        "limit"    : 1.2345,
        "min"      : 0.02621232,
        "minerFee" : 0.0001
    }

Recent Transaction List

Latest transactions completed on CoinReform.
url: www.coinreform.com/api/recenttx/[max]
method: GET
 
[max] is an optional maximum number of transactions to return.
If [max] is not specified this will return 5 transactions.
Also, [max] must be a number between 1 and 50 (inclusive).
 
Success Output:
    [
        {
        deposit : [currency input],
        withdrawal: [currency output],
        amount: [amount],
        timestamp: [timestamp]     //in seconds
        },
        ...
    ]

Status Of Exchange

Status of the latest deposit to the specified address.
url: www.coinreform.com/api/txstat/[key]
method: GET
 
[key] is the secret key generated for each transaction
 
Success Output:  (various depending on status)

Status: Expired
{
    deposit: [coin name],
    withdrawal: [coin name],
    status: 'expired',
    deposit_address: [address], // generated address for deposit
    withdrawal_address: [address], // receive address
    refund_address: [address], // address for refund
    received_amount: [double], // total received amount
    deposit_amount: [double], // amount received on deposit address, used for exchange (if received amount exceeds limit, than deposit_amount will be equal to limit, over-limit will be refunded)
    withdrawal_amount: [double], // amount to sent
    key: [key], // secret key for transaction
}

Status: Paid (we see a new deposit but have not finished processing it)
{
    status: "paid",
    deposit: [coin name],
    withdrawal: [coin name],
    address: [address], // same as submitted address
    confirmations: [int], // current confirmations on blockchain, i.e 1
    confirmations_need: [int], // total confirmations to complete the transaction
    deposit_address: [address], // generated address for deposit
    withdrawal_address: [address], // receive address
    refund_address: [address], // address for refund
    received_amount: [double], // total received amount
    deposit_amount: [double], // amount received on deposit address, used for exchange (if received amount exceeds limit, than deposit_amount will be equal to limit, over-limit will be refunded)
    withdrawal_amount: [double], // amount to sent
    key: [key], // secret key for transaction
}

Status: Completed
{
    deposit: [coin name],
    withdrawal: [coin name],
    status: 'completed',
    deposit_address: [address], // generated address for deposit
    withdrawal_address: [address], // receive address
    refund_address: [address], // address for refund
    received_amount: [double], // total received amount
    deposit_amount: [double], // amount received on deposit address, used for exchange (if received amount exceeds limit, than deposit_amount will be equal to limit, over-limit will be refunded)
    withdrawal_amount: [double], // amount to sent
    key: [key], // secret key for transaction
    dest_tx: [txid], // withdrawal blockchain txid
}

Status: below_min
{
    deposit: [coin name],
    withdrawal: [coin name],
    status: 'below_min',
    deposit_address: [address], // generated address for deposit
    withdrawal_address: [address], // receive address
    refund_address: [address], // address for refund
    received_amount: [double], // total received amount
    deposit_amount: [double], // amount received on deposit address, used for exchange (if received amount exceeds limit, than deposit_amount will be equal to limit, over-limit will be refunded)
    withdrawal_amount: [double], // amount to sent
    key: [key], // secret key for transaction
    refund_amount: [double], // amount to refund
    refund_status: [status], // the result of attempt to refund, see FAQ - Statuses
}

Status: Failed
{
    status : "failed",
    error: "Invalid transaction"
}
Please note, that there is two statuses, one for the transaction and one for refund. Refund happens when the transaction are below minimum, or over-limit.

Time Left On TX

When a transaction is created with a fixed amount requested there is a 10 minute window for the deposit. After the 10 minute window if the deposit has not been received the transaction expires and a new one must be created. This api call returns how many seconds are left before the transaction expires.
url: www.coinreform.com/api/timeremaining/[key]
method: GET
 
[address] is the deposit address to look up.
 
Success Output:
 
    {
        status:"new",
        seconds_remaining: 600
    }
 
The status can be either "new" or "expired".
If the status is expired then seconds_remaining will show 0.

Available Coins

Anyone can get the list of all the coins supported by CoinReform. List contains name, symbol and availability status for each coin.
url: www.coinreform.com/api/getcoins
method: GET
 
Success Output:
 
    {
        "NAME1" :
            {
                symbol: <"CURRENCY1">,
                title: ["Coin Name"],
                status: [true / false],
                deposit: [true / false], // Enabled for deposit or not
                withdrawal: [true / false] // Enabled for withdrawal or not

            }
        (one listing per supported currency)
    }
 
The status can be either available (true) or unavailable (false). Sometimes coins become temporarily unavailable during updates or unexpected service issues.

Validate Address

Allows user to verify that their receiving address is a valid address according to a given wallet daemon. If valid returns true, this address is valid according to the coin daemon indicated by the currency symbol.
url: www.coinreform.com/api/validateaddress/[address]/[currency]
method: GET
 
[address] the address that the user wishes to validate
[currency] the currency symbol of the coin, i.e. LTC
 
Success Output:
 
{
     valid: true, // Or integer equivalent as 1 
}
     
 Error Output:
 
{
    valid: false,
    error: "Address not valid"
}
 
"valid" will either be true or false. If "valid" returns false, an error parameter will be present and will contain a descriptive error message.

New Pair

Create deposit address for your withdrawal address and pair
url: www.coinreform.com/api/newpair
method: POST

Data required:

withdrawal          = the address for resulting coin to be sent to
pair                     = what coins are being exchanged in the form [source coin]_[dest coin], i.e. BTC_LTC
refund_address  = (Optional) address to return deposit to if anything goes wrong with exchange
ref_id  = (Optional) Your Referral ID for receiving profit (Register to obtain Referral ID)


example data: {"withdrawal":"Lk3LTCXXXX", "pair":"BTC_LTC", refund_address:"1BTC31337YYYY", ref_id: "2f78ab92"}
 
 

Success Output:
{
    deposit: [Deposit Address],
    deposit_currency: [Deposit currency],
    withdrawal: [Withdrawal Address], // Same as submitted address in POST
    withdrawal_currency: [Withdrawal currency],
    key: [key], // key used to access the transaction data, for txstat call
}  

Fixed Amount TX

This call allows you to request a fixed amount to be sent to the withdrawal address. To do this you need to provide a withdrawal address and the amount you want to sent to it. This allows you to use CoinReform as a payment system.
url: www.coinreform.com/api/sendamount
method: POST
 
Data required:
 
amount                = the amount to be sent to the withdrawal address
withdrawal           = the address for coin to be sent to
pair                      = what coins are being exchanged in the form [input coin]_[output coin], i.e. LTC_BTC
refund_address   = (Optional) address to return deposit to if anything goes wrong with exchange
ref_id  = (Optional) Your Referral ID for receiving profit (Register to obtain Referral ID)
 
example data {"amount":0.123456, "withdrawal":"Lk3LTCXXXX", "pair":"BTC_LTC", refund_address:"1BTC1234567YYYY", "key": "719ded6c22e9224ed7e0e844fc5c1778", ref_id: "2f78ab92"}
 
 
Success Output: 
{
    "rate": "119.37034530", // Saved rate for 10 minutes
    "deposit_amount": "0.00030410",
    "withdrawal_amount": "0.03620056",
    "deposit": [Deposit Address],
    "deposit_currency": [Deposit Coin currency],
    "withdrawal": [Withdrawal Address], // Same as submitted address in POST
    "withdrawal_currency": [Withdrawal coin currency],
    "key": [key], // key used to access the transaction data, for txstat call

}
  

Cancel TX

This call allows you to cancel new transaction using order key.
url: www.coinreform.com/api/cancel/[key]
method: GET
 
[address] The deposit address associated with the new transaction

Success Output:
 
{
     success: "New transaction canceled"
}

Error Output:

{
    error: "Transaction not found"
}