Application Program Interface

Through Changer.com API you can build secure, automated digital and crypto currencies exchanges into your software. The API will always be free to use.

This document is intended to assist software developers who want to develop applications using Changer.com API. It fully documents our application programming interface (API) that allows developers to interact with our system.

To use the information provided here, you should first have access to an active Changer.com account. You should also be familiar with:

  • RESTful web services
  • HTTP/1.1
  • JSON (JavaScript Object Notation)

Our Application Program Interface will allow you to automate the process of making exchanges, receiving information about your account, fetching history of exchanges and transactions within your own software.

Since our API is based on REST principles, it's very easy to write and test applications. You can use your browser to access URLs, and you can use pretty much any HTTP client in any programming language to interact with the API.

All responses from Changer.com API are in JSON format.

Changer.com API supports CORS (Cross-origin Resource sharing) to allow access directly from a browser or client side only application.

You can use our API in two ways, public or authenticated mode.

Public mode will allow you to get exchange rates and limits as well as make exchanges and check their status without owning an account at Changer.com, while authenticated mode can be used to track your exchanges within your account and benefits from our Discount System.

If you want to use our API in authenticated mode (remember: this is OPTIONAL), you have to sign in your Changer.com account and create new API keys filling the form that will show up on the top of this page. Our application will generate your Api-Key and Api-Secure keys, which are both needed to properly make authenticated calls to our Application Program Interface.

Name Length Description
Api-Key 36 chars Identifies your Account API in our system.
Api-Secure 64 chars Key to sign your request data when using our API.

API Authentication is based on the Api-Key and Api-Secure keys secrecy. If any of those get compromised, you should immediately disable and revoke (i.e. delete) the API from your account.

Changer.com REST API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported. The Base URL for all the requests is:

https://www.changer.com/api/v2

Each request to our API needs to be authorized using your API-Key, an HMAC (Hash-based Message Authentication Code) signed with your API-Secure key and to avoid relay attacks also a timestamp. The three parameters are bundled in the HTTP Request using additional HTTP Headers, API-Key, Api-Sign and Api-Timestamp.

  • Api-Key: The same as generated by our system when you created the API.
  • Api-Sign: message digest as lowercase hexits, generated using HMAC-SHA256 algorithm. Constructed from the the following concatenated strings: [API Method URL]:[POST Parameters]:[Timestamp].
  • Api-Timestamp: current timestamp in UNIX format.

Here is an example written in PHP on how to generate the API-Sign header.

$apiKey = '{your Api-Key}';
$apiSecure = '{your Api-Secure}';

$apiURL = '/api/v2/rates/pmUSD/bitcoinBTC'; // Replace with the API Method you want to call
$postData = http_build_query($postData); // URL-Encoded query string like: param0=foo&param1=bar (empty on 'method GET' requests)
$timestamp = time(); // Use current time stamp

$apiSign = hash_hmac('sha256', $apiURL.':'.$postData.':'.$timestamp, $apiSecure); // This is your generated API-Sign header
This section describes how to get the current exchange rate of a specific pair.

Resource URI

https://www.changer.com/api/v2/rates/<send>/<receive>

Valid <send> and <receive> parameters are:

  • pm_USD
  • pmvoucher_USD
  • okpay_USD
  • payeer_USD
  • advcash_USD
  • bitcoin_BTC
  • ethereum_ETH
  • dash_DASH
  • monero_XMR
  • litecoin_LTC
  • dogecoin_DOGE
  • zcash_ZEC
  • ethereumclassic_ETC
  • augur_REP
  • golem_GNT
  • gnosis_GNO
  • lisk_LSK
  • bytecoin_BCN
  • peercoin_PPC
  • clams_CLAM
  • namecoin_NMC

Method

GET

GET Query Arguments

Name Type Description
amount String Optional: You can specify the amount of send you want to exchange to get the exact rate that will be applied to your exchange.
Example: https://www.changer.com/api/v2/rates/pm_USD/bitcoin_BTC?amount=100

Response

A successful call will return a JSON object.

{
    pair: {
        send: "pmUSD",
        receive : "bitcoinBTC"
    },
    rate: 0.0045,
    receive_amount: 0.45,
}
Name Type Description
pair Object Returns the pair you've selected.

  • send: The e-currency/cryptocurrency you want to send.
  • receive: The e-currency/cryptocurrency you want to receive.
rate Float Will return the exchange rate for the selected pair with your account's discount level applied, if you are using the authenticated mode.
receive_amount Float Optional: If you specified the amount argument, this returns the amount you will receive.

This section describes how to retrieve the minimum and the maximum exchange limits of a specific pair.

Resource URI

https://www.changer.com/api/v2/limits/<send>/<receive>

Valid <send> and <receive> parameters are:

  • pm_USD
  • pmvoucher_USD
  • okpay_USD
  • payeer_USD
  • advcash_USD
  • bitcoin_BTC
  • ethereum_ETH
  • dash_DASH
  • monero_XMR
  • litecoin_LTC
  • dogecoin_DOGE
  • zcash_ZEC
  • ethereumclassic_ETC
  • augur_REP
  • golem_GNT
  • gnosis_GNO
  • lisk_LSK
  • bytecoin_BCN
  • peercoin_PPC
  • clams_CLAM
  • namecoin_NMC

Method

GET

GET Query Arguments

Null

Response

A successful call will return a JSON object.

{
    pair: {
        send: "pmUSD",
        receive : "bitcoinBTC"
    },
    limits: {
        min_amount: 1,
        max_amount: 9986.44
    }
}
Name Type Description
pair Object Returns the pair you've selected.

  • send: The e-currency/cryptocurrency you want to send.
  • receive: The e-currency/cryptocurrency you want to receive.
limits Object Contains the exchange limits for the exchange pair you've selected:

  • min_amount: Minimum amount of send you can exchange. Lower amounts will not be processed and will be refunded to the payer address/account.
  • max_amount: Maximum amount of send you can exchange. Higher amounts will not be processed and will be refunded to the payer address/account.

This section describes how to initiate and process an exchange.

Resource URI

https://www.changer.com/api/v2/exchange

Method

POST

POST Data

Name Type Description
email String Public mode: If you are using our API in public mode, we will need your email address to keep you updated with your exchange status. If you are authenticated, this field is not required.
refid String Optional: You can specify your Referrer ID (only numerical value accepted). If you are using our API in your website, you can use this parameter to earn referral commissions on your users' exchanges.
send String One of the following:

  • pm_USD
  • pmvoucher_USD
  • okpay_USD
  • payeer_USD
  • advcash_USD
  • bitcoin_BTC
  • ethereum_ETH
  • dash_DASH
  • monero_XMR
  • litecoin_LTC
  • dogecoin_DOGE
  • zcash_ZEC
  • ethereumclassic_ETC
  • augur_REP
  • golem_GNT
  • gnosis_GNO
  • lisk_LSK
  • bytecoin_BCN
  • peercoin_PPC
  • clams_CLAM
  • namecoin_NMC
receive String One of the following:

  • pm_USD
  • pmvoucher_USD
  • okpay_USD
  • payeer_USD
  • advcash_USD
  • bitcoin_BTC
  • ethereum_ETH
  • dash_DASH
  • monero_XMR
  • litecoin_LTC
  • dogecoin_DOGE
  • zcash_ZEC
  • ethereumclassic_ETC
  • augur_REP
  • golem_GNT
  • gnosis_GNO
  • lisk_LSK
  • bytecoin_BCN
  • peercoin_PPC
  • clams_CLAM
  • namecoin_NMC
amount Float Amount of send or receive (check the amountOf parameter) you want to exchange
amountOf String Optional: Can be either send if you want to specify the amount to be sent or receive if you want to specify the amount to be received. By default send is chosen.
receiver_id String receive account/address the funds will be sent to
out_additional String Optional: Additional parameter for payment:
  • Monero: Payment ID
  • Bytecoin: Payment ID
html Integer Optional: If you want to return the HTML code for user payment form, this parameter must be set to 1. (experimental)

Response

A successful call will return a JSON object.

{
    pair: {
        send: "pmUSD",
        receive : "bitcoinBTC"
    },
    limits: {
        min_amount: 1,
        max_amount: 9986.44
    },
    exchange_id: "6ccd780c-baba-1026-9564-0040f4311e29",
    send_amount: 100,
    rate: 224.7191,
    receive_amount: 0.4450,
    receiver_id : "1XXXXxxXXx1XXx2xxX3XX456xXx",
    payee: "U1407474",
    batch_required : true|false,
    expiration: 1430756486
}
Name Type Description
pair Object Returns the pair you've selected.

  • send: The e-currency/cryptocurrency you want to send.
  • receive: The e-currency/cryptocurrency you want to receive.
exchange_id String UUID of your exchange request, required later for payment confirmation and status checking.
min_amount Float Will return the minimum amount of send you can exchange. Lower amounts will not be processed and will be refunded to the payer address/account.
max_amount Float Will return the maximum amount of send you can exchange. Higher amounts will not be processed and will be refunded to the payer address/account.
send_amount Float The amount you should send in order to receive the amount shown in the returned receive_amount.
rate Float Will return the exchange rate with your account's discount level applied, if you are using the authenticated mode. Locked for 10 minutes, as explained in the expiration.
receive_amount Float The amount you will receive if the amount you send is exactly what is returned in the send_amount.
receiver_id String The account/address the exchange will be processed to. Make sure it belongs to you: transactions are irreversible.
payee String The account/address the payment must be sent to.
payment_id String Returned for Monero exchanges: will output the Payment ID that must be used when sending the payment.
batch_required Boolean When this value is true, you will need to follow the instructions below.
expiration Integer UNIX timestamp of your exchange order's expiration. If a payment is received after the expiration, it will be processed at the current exchange rate.
For digital e-currencies like OKPay and Perfect Money, we will need your payment Batch no. (i.e. Transaction ID) in order to recognize your payment associated with the exchange. You need to follow the instructions below only if batch_required is true.

Resource URI

https://www.changer.com/api/v2/exchange/<exchange_id>

You must replace <exchange_id> with the UUID returned in the previous call.

Method

POST

POST Data

Name Type Description
batch String Batch no. (i.e. Transaction ID) of your payment

  • OKPay: ID of your payment's TxnInfo
  • Perfect Money: PAYMENT_BATCH_NUM of your payment
  • BTC-e: USD redeemable code
  • Payeer: historyId of your payment
  • AdvCash: return of your payment's sendMoneyResponse

Response

A successful call will return a JSON object.

{
    success: "true",
    exchange_id: "6ccd780c-baba-1026-9564-0040f4311e29",
    send_amount: 100,
    rate: 224.7191,
    receive_amount: 0.4450,
    receiver_id: "1XXXXxxXXx1XXx2xxX3XX456xXx"
}

In case of a failure, an error name/key pair will be returned.

Name Type Description
success Boolen Returns true if successful or false otherwise.
exchange_id String UUID of your exchange.
send_amount Float The amount you've sent.
rate Float The exchange rate applied to your exchange.
receive_amount Float The exact amount that will be sent to your receiver_id account/address.
receiver_id String The account/address whom the exchange will be sent to.
This section describes how to check the status of an exchange.

Resource URI

https://www.changer.com/api/v2/exchange/<exchange_id>

You must replace <exchange_id> with the UUID of the exchange you want to check the status of.

Method

GET

GET Query Arguments

Null

Response

A successful call will return a JSON object.

{
    pair: {
        send: "pmUSD",
        receive : "bitcoinBTC"
    },
    exchange_id: "6ccd780c-baba-1026-9564-0040f4311e29",
    send_amount: 100,
    rate: 224.7191,
    receive_amount: 0.4450,
    receiver_id : "1XXXXxxXXx1XXx2xxX3XX456xXx",
    status: "processing",
    exchange_time: 1430756126,
    processed_time: null,
    batch_out: null,
}
Name Type Description
pair Object Returns your exchange's pair.

  • send: The e-currency/cryptocurrency you sent.
  • receive: The e-currency/cryptocurrency you will receive.
exchange_id String UUID of your exchange request.
send_amount Float The amount you've sent.
rate Float The exchange rate applied to your exchange.
receive_amount Float The exact amount that will be sent to your receiver_id account/address.
receiver_id String The account/address whom the exchange will be sent to.
status String Your exchange status, it can be any of these:

  • new: We haven't received a payment yet.
  • processing: Your exchange is in our processing queue.
  • processed: Your exchange has been succesfully processed.
  • denied: Your exchange has been denied and refunded to your payer account/address.
exchange_time Integer UNIX timestamp representation of the moment we've received your exchange request.
processed_time Null or Integer
  • null if your exchange hasn't been processed yet.
  • Integer: UNIX timestamp of the moment your exchange has been processed
batch_out Null or String
  • null if your exchange hasn't been processed yet.
  • String: Transaction hash or batch no. of the outgoing payment sent to your receiver_id.

Here you can download ready-made modules in different programming languages to make integration with your software fast and hassle-free.

PHP Implementation of Changer.com Application Program Interface (v0.2 - 2.3KB)

More coming soon...