API

Start

All requests sent to API Changee must include the parameter key

(API key) available after signing up to our Partnership Program.

API Endpoint https://changee.com/v1/api/

Address Validation

This request checks the validity of the address :

https://changee.com/v1/api/validate-address
# Here is a curl example
curl \
-X GET 'https://changee.com/v1/api/validate-address?key=eee5883795174903acc29bb714366a0d&currency=BTC&address=bc1sMNpUWxf9vWmaWaxvxbh6LWEvZ8QqF9Fyw1jrAG'
Result example :

{
    result: true
}

Parameter

key string eee5883795174903acc29bb714366a0d
currency string BTC
address string bc1sMNpUWxf9vWmaWaxvxbh6LWEvZ8QqF9Fyw1jrAG

Exchange rate for transaction amount

This request gets the current exchange rate. Transaction fee is not included :

https://changee.com/v1/api/rate
# Here is a curl example
curl \
-X GET 'https://changee.com/v1/api/rate?key=eee5883795174903acc29bb714366a0d&from=BTC&to=ETH&amount=1'
Result example :

{
    fix: false,
    minamount: 0,
    maxamount: 0,
    fromNetwork: "Bitcoin",
    toNetwork: "ERC20",
    rate: 0,
    withdrawalFee: "0 ETH",
    result: true
}

Parameter

key string eee5883795174903acc29bb714366a0d
from string BTC
to string ETH
amount float 1
fix int 0 or 1 0

* withdrawalFee - approximate commission for withdrawal. Floating parameter.

* fix: true - fixed rate, false - floating rate

Payment rate for transaction amount

This request allows you to get the current exchange rate and calculate the amount of funds you need to send to receive a payment :

https://changee.com/v1/api/payment/rate
# Here is a curl example
curl \
-X GET 'https://changee.com/v1/api/payment/rate?key=eee5883795174903acc29bb714366a0d&from=BTC&to=ETH&amountTo=5000'
Result example :

{
    minamount: 2561.31,
    maxamount: 2930799,
    rate: 0.19879287,
    result: true
}

Parameter

key string eee5883795174903acc29bb714366a0d
from string BTC
to string ETH
amountTo float 5000

Currency List

This request gets the list of all available currencies :

https://changee.com/v1/api/currencies
# Here is a curl example
curl \
-X GET 'https://changee.com/v1/api/currencies?key=eee5883795174903acc29bb714366a0d'
Result example :

{
  XMR: {
    coinName: "Monero",
    minamount: 12.27,
    maxamount: 15527,
    tagname: "",
    network: "Monero",
    available: true
  },
  ETH: {
    coinName: "Ethereum",
    minamount: 1.33,
    maxamount: 1693,
    tagname: "",
    network: "ERC20",
    available: true
  },
  DAI: {
    coinName: "Dai",
    minamount: 2127.89,
    maxamount: 2746236,
    tagname: "",
    network: "ERC20",
    available: true
  },
  EOS: {
    coinName: "EOS",
    minamount: 2072.91,
    maxamount: 2526315,
    tagname: "MEMO",
    network: "EOS",
    available: true
  },
  ...
}

Parameter

key string eee5883795174903acc29bb714366a0d

Pairs List

This request gets all pairs available for exchange :

https://changee.com/v1/api/pairs
# Here is a curl example
curl \
-X GET 'https://changee.com/v1/api/pairs?key=eee5883795174903acc29bb714366a0d'
Result example :

{
  BTC: [
    "USDT",
    "BUSD",
    "BNB",
    "ETH",
    "PAX",
    "MATIC"
  ],
  USDT: [
    "BTC",
    "XRP",
    "DOGE",
    "ETH"
  ],
  DASH: [
    "XMR",
    "TUSD",
    "ATOM"
  ],
  XTZ: [
    "USDT",
    "BTC"
  ],
  EOS: [
    "ETH",
    "PERL"
  ],
  ADA: [
    "TRX"
  ],
  TUSD: [
    "USDT"
  ],
  ALGO: [
    "BTC"
  ],
  ...
}

Parameter

key string eee5883795174903acc29bb714366a0d

Exchange Initiation

This request creates – initiates - the exchange :

https://changee.com/v1/api/exchange-create
# Here is a curl example
curl \
-X GET 'https://changee.com/v1/api/exchange-create?key=eee5883795174903acc29bb714366a0d&from=BTC&to=ETH&amount=1&fix=0&destinationAddress=0x6fa1d764592156cb4624dbccd2075b17b120dc54&refundAddress=bc1zwkFEJhZJBqKbfjX1PxqSxEgPpxgcjntetFkE1G'
Result example :

{
    id               : "rwf31231f399a658",
    depositAddress   : "bc1sMNpUWxf9vWmaWaxvxbh6LWEvZ8QqF9Fyw1jrAG",
    depositTag       : "",
    expectedAmountTo : "0",
    result           : true
}

Parameter

key string eee5883795174903acc29bb714366a0d
destinationAddress string 0x6fa1d764592156cb4624dbccd2075b17b120dc54
destinationTag string (optional)
refundAddress string bc1zwkFEJhZJBqKbfjX1PxqSxEgPpxgcjntetFkE1G
refundTag string (optional)
from string BTC
to string ETH
amount float 1
fix int 0 or 1 0

Payment Initiation

This request creates – initiates - a payment: an exchange with a fixed amount to be received in the to currency :

https://changee.com/v1/api/payment/exchange-create
# Here is a curl example
curl \
-X GET 'https://changee.com/v1/api/payment/exchange-create?key=eee5883795174903acc29bb714366a0d&from=BTC&to=ETH&amountTo=5000&destinationAddress=0x6fa1d764592156cb4624dbccd2075b17b120dc54&refundAddress=bc1zwkFEJhZJBqKbfjX1PxqSxEgPpxgcjntetFkE1G'
Result example :

{
    id               : "rwf31231f399a658",
    depositAddress   : "bc1sMNpUWxf9vWmaWaxvxbh6LWEvZ8QqF9Fyw1jrAG",
    depositTag       : "",
    expectedAmountTo : "5000",
    result           : true
}

Parameter

key string eee5883795174903acc29bb714366a0d
destinationAddress string 0x6fa1d764592156cb4624dbccd2075b17b120dc54
destinationTag string (optional)
refundAddress string bc1zwkFEJhZJBqKbfjX1PxqSxEgPpxgcjntetFkE1G
refundTag string (optional)
from string BTC
to string ETH
amountTo float 5000

* amountTo - the amount the recipient must get in the to currency. The amount to be sent in the from currency is returned by the payment/rate request (field rate); the rate is fixed at the moment the payment is created.

* refundAddress - optional, but recommended: funds are returned to it if the payment cannot be completed.

* on failure the response is { error: "reason", result: false }. Typical reasons: payment exchanges are disabled, impossible to create fixed exchange for pair BTC/ETH, destination address is invalid, refund address is invalid.

Getting exchange status

Getting information about the current exchange status :

https://changee.com/v1/api/exchange-status
# Here is a curl example
curl \
-X GET 'https://changee.com/v1/api/exchange-status?key=eee5883795174903acc29bb714366a0d&id=rwf31231f399a658'
Result example :

{
    status             : "deposit_received",
    from               : "BTC",
    to                 : "ETH",
    depositAddress     : "bc1sMNpUWxf9vWmaWaxvxbh6LWEvZ8QqF9Fyw1jrAG",
    depositTag         : "",
    depositTxId        : "86e66391ecf40a51fa6dfe5da91d6f8077fdffa8a900d26e1a5c14369d17bc75",
    destinationAddress : "0x6fa1d764592156cb4624dbccd2075b17b120dc54",
    destinationTag     : "",
    refundAddress      : "bc1zwkFEJhZJBqKbfjX1PxqSxEgPpxgcjntetFkE1G",
    refundTag          : "",
    expectedAmountFrom : "1",
    expectedAmountTo   : "0",
    amountFrom         : "1",
    date               : "13-02-2023 12:31:21",
    txId               : null,
    amountTo           : null,
    emergency          : {status: EXPIRED},
    result             : true
}

Parameter

key string eee5883795174903acc29bb714366a0d
id string rwf31231f399a658

List of used statuses:

waiting_deposit - waiting for the deposit
deposit_received - deposit is received
exchanging - in the process of exchange
sending - in the process of sending
success - exchange completed successfully
time_expired - the waiting time for funds has expired
failed - the exchange ended with an error
sending_failed - sending attempt failed
reverted - the funds were returned to the client
payment_halted - funds have arrived but an exchange is on hold

The list of statuses of suspended orders:

EXPIRED - the transaction was received after the expiration of the order
LESS - a transaction was sent with an amount less than in the order