应用程序界面

Introduction

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.

Authentication

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.

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.