Loading...

API

Coinchanger API Documentation

 

About Coinchanger API

coinchanger is primarily intended to be used as an API. All coinchanger API partners are required to implement oAuth and support coinchanger memberships.

 

Integrating with Coinchanger

INTEGRATORS

There is a quick two-step process that will allow you to begin developing ASAP.

 

Please sign up for a Coinchanger membership account.

Once your membership has been verified and approved, please then open a ticket with our support team with the name of your project and email associated with your membership. Coinchanger will then generate all of the required information and keys needed to begin developing your integration!

PARTNERS

To learn more about partnership integration please visit our partner authorization integration guide

 

For problems with any of the API calls

The error message will be returned as the following JSON:

 

{

  "error" : "Error message"

}

Coin Pairs

Many of the requests require a ‘coin pair’. A coin pair is of the format deposit_withdrawal. Example: ‘btc_ltc’. Valid pairs are any combination of the coins available on Coinchangeronline.com. To find out what coins are available, hit the available coins endpoint for info about every coin or the onlinecoins endpoint for online coins. Documentation of these endpoints is available below.

 

Offline Coins

If a particular coin goes offline, any pairs using it will return a message stating that that pair is temporarily unavailable. To find out what coins are currently offline, go to the offlinecoins endpoints.

 

Secure Requests

All requests are only available via HTTPS. In the interest of security best practices we do not support API calls over HTTP.

 

Language

cURL

POST Authorization

http://coinchangeronline.com*

Authorization is a a required header field for theCoinchange API endpoints. This is required on any POST endpoints, it can be used on any of the Coinchange endpoints and may change the behavior of the endpoint to return Membership related information.

 

To find your Authorization Token you can visit our hosted documentation.

 

HEADERS

Content-Type

application/x-www-form-urlencoded

Authorization

Bearer {userToken}

 

 

Example Request

Authorization

curl --location --request POST "https://Coinchangeronline.com/*" \

  --header "Content-Type: application/x-www-form-urlencoded" \

  --header "Authorization: Bearer {userToken}"

POST Normal Transaction (quick)

https://coinchangeronline,com/shift

This is the primary data input into Coinchange. This is referred to a "quick" transaction in the Coinchange UI.

 

Request Fields

withdrawal the address for resulting coin to be sent to

pair what coins are being exchanged in the form [input coin]_[output coin] ie BTC_LTC

returnAddress (Optional) address to return deposit to if anything goes wrong with exchange

destTag (Optional) Destination tag that you want appended to a Ripple payment to you

rsAddress (Optional) For new NXT accounts to be funded, you must supply this param

Response Fields

orderId the ID of the conduit (the order) that was created with Coinchange. The order identifies the combination of input/output coins and the addresses provided by customers.

deposit the deposit address provided by Coinchange in the input coin

depositType the type of coin being deposited

withdrawal the withdrawal address provided by the customer, where Coinchanger will send funds

withdrawalType the type of coin being withdrawn

public this is a legacy field that is returned

apiPubKey this is a legacy field that is returned

userId the ID of the user who created the conduit for themselves

returnAddress the address for funds to be returned to, if something goes wrong. This is in the input coin.

returnAddressType the type of coin for the return (this is ALWAYS the input coin)

HEADERS

Content-Type

application/json

Authorization

Bearer {userToken}

BODY

{

    "withdrawal": "0x5041F19dC1659E33848cc0f77cbF7447de562917",

    "returnAddress": "1N17uHdvY6fNwtutM1G5EAZFPLC43B59rB",

    "pair": "BTC_ETH",

    "destTag": 1234,

    "rsAddress": "RFE1TaAaAaaA1AAaAA1wzxe1Qv11E2WR1J"

}

 

 

Example Request

Normal Transaction (quick)

curl --location --request POST "https://Coinchangeronline.com/shift" \

  --header "Content-Type: application/json" \

  --header "Authorization: Bearer {userToken}" \

  --data "{

    \"withdrawal\": \"0x5041F19dC1659E33848cc0f77cbF7447de562917\",

    \"returnAddress\": \"1N17uHdvY6fNwtutM1G5EAZFPLC43B59rB\",

    \"pair\": \"BTC_ETH\"

}"

Example Response

{

  "orderId": "11111b11-000a-111a-a11a-11a1a11a1a11",

  "deposit": "34qvKdkfSh85Kkct6tmCxLfLjJff73Sim4",

  "depositType": "BTC",

  "withdrawal": "0x133459264443e3c56ef7d4e227c26822880b2744",

  "withdrawalType": "ETH",

  "public": null,

  "apiPubKey": "Coinchanger",

  "userId": "111111a-b1e1-11af-11111-1111111d1b11",

  "returnAddress": "18N3RDhjBMf8q13clR4yen3XKaMC8G7no3",

  "returnAddressType": "BTC"

POST Fixed Amount Transaction / Quote Send Exact Price

https://coinchangeronline.com/sendamount

This call allows you to request a fixed amount to be sent to the withdrawal address. You provide a withdrawal address and the amount you want sent to it. We return the amount to deposit and the address to deposit to. This allows you to use Coinchange as a payment mechanism. This call also allows you to request a quoted price on the amount of a transaction without a withdrawal address.

 

Request Fields

withdrawal the address for coin to be sent to

pair what coins are being exchanged in the form [input coin]_[output coin] ie LTC_BTC

returnAddress (Optional) address to return deposit to if anything goes wrong with exchange

destTag (Optional) Destination tag that you want appended to a Ripple payment to you

rsAddress (Optional) For new NXT accounts to be funded, you must supply this param

One of these is Required:

 

withdrawalAmount the amount to be sent to the withdrawal address. Coinchanger will calculate the depositAmount to send to Coinchanger for you.

depositAmount the amount to be sent to the deposit address. Coinchange will calculate the withdrawalAmount that will be sent to you, once this deposit is received and confirmed.

Response Fields

success this is a top level element to indicate the status of the conduit creation process. If this key exists, you have a conduit. If there is an error key, then you have not been successful.

orderId the ID of the conduit (the order) that was created with Coinchanger. The order identifies the combination of input/output coins and the addresses provided by customers.

pair what coins are being exchanged in the form [input coin]_[output coin] ie btc_eth

withdrawal the withdrawal address provided by the customer, where Coinchanger will send funds

withdrawalAmount the amount to be sent to the withdrawal address. Coinchanger will calculate the depositAmount to send to Coinchanger for you.

deposit the deposit address provided by Coinchanger in the input coin

depositAmount the amount to be sent to the deposit address. Coinchanger will calculate the withdrawalAmount that will be sent to you, once this deposit is received and confirmed.

expiration the timestamp, in Unixtime, when this conduit will expire. Funds received at an expired conduit will typically be returned to the user.

quotedRate the rate of the trade between the input coin and the output coin that was used to calculate either the depositAmount or the withdrawalAmount depending on what was sent in the request.

maxLimit the maximum amount that could be sent for this pair - this is indicative for creating another conduit, you should only ever send the depositAmount.

returnAddress the address for funds to be returned to, if something goes wrong. This is in the input coin.

apiPubKey this is a legacy field that is returned

minerFee the fees that are charged for this conduit, for the customer's records. This amount is already included in the depositAmount

headers these are the HTTP request headers that Coinchanger received at the time when the conduit creation request was received. This is mostly used by partners to double check their integrations.

userId the ID of the user who created the conduit for themselves

HEADERS

Authorization

Bearer {clientToken}

Content-Type

application/json

BODY

{

    "amount": 1,

    "withdrawal": "0x5041F19dC1659E33848cc0f77cbF7447de562917",

    "returnAddress": "1N17uHdvY6fNwtutM1G5EAZFPLC43B59rB",

    "pair": "BTC_ETH"

}

 

 

Example Request

Fixed Amount Transaction / Quote Send Exact Price

curl --location --request POST "https://Coinchangeronline.com/sendamount" \

  --header "Authorization: Bearer {clientToken}" \

  --header "Content-Type: application/json" \

  --data "{

    \"amount\": 1,

    \"withdrawal\": \"0x5041F19dC1659E33848cc0f77cbF7447de562917\",

    \"returnAddress\": \"1N17uHdvY6fNwtutM1G5EAZFPLC43B59rB\",

    \"pair\": \"BTC_ETH\"

}"

Example Response

{

  "success": {

    "orderId": "11111b11-000a-111a-a11a-11a1a11a1a11",

    "pair": "btc_eth",

    "withdrawal": "0x133459264443e3c56ef7d4e227c26822880b2744",

    "withdrawalAmount": "0.01",

    "deposit": "34qvKdkfSh85Kkct6tmCxLfLjJff73Sim4",

    "depositAmount": "0.00007641",

    "expiration": 1544463034153,

    "quotedRate": "140.69217998",

    "maxLimit": 2.83270872,

GET Online Coins

Coinchangeronline.com/onlinecoins

This endpoint will return the ticker of all available coins.

 

 

 

Example Request

Online Coins

curl --location --request GET "Coinchangeronline.com/onlinecoins" \

  --data ""

Example Response

[

  "XYZ",

  "ANT",

  "BAT",

  "BCH",

  "BLK",

  "BNB",

  "BNT",

  "BTC",

  "BTG",

  "CVC",

GET Offline Coins

Coinchangeronline.com/offlinecoins

This endpoint will return the symbol for all unavailable coins previously listed on Coinchanger.

 

 

 

Example Request

Offline Coins

curl --location --request GET "Coinchangeronline.com/offlinecoins" \

  --data ""

Example Response

[

  "1ST",

  "BCY"

]

GET Current Coins List

Coinchangeronline.com/getcoins

This endpoint allows anyone to get a list of all the digital assets that Coinchanger currently supports at any given time. The list will include the name, symbol, availability status, and an icon link for each.

 

Response Fields

A dictionary of coin tickers as keys. Each coin will have a dictionary that describes the coin itself.

 

symbol is the 3-5 digit symbol for the coin listed.

name is the full name of coin listed.

image is a URL to an image of the icon for the coin listed.

imageSmall is a URL to an image of the smaller icon for the coin listed

status will read available or unavailable depending on if the coin is currentlt online on Coinchanger.

minerFee is an estimation of the proper miner fee to send this con successfully.

 

 

Example Request

Current Coins List

curl --location --request GET "Coinchangeronline.com/getcoins" \

  --data ""

Example Response

{

  "BTC": {

    "symbol": "BTC",

    "name": "Bitcoin",

    "image": "https://Coinchangeronline.com/images/coins/bitcoin.png",

    "imageSmall": "https://Coinchangeronline.com/images/coins-sm/bitcoin.png",

    "status": "available",

    "minerFee": 0.00025

  },

  "ETH": {

    "symbol": "ETH",

GET Market Info

Coinchangeronline.com/marketinfo/[pair]

This endpoint gets the market info on a spicific coin pair.

 

Request Fields

pair is any valid coin pair such as btc_ltc or ltc_btc

Response Fields

pair is any valid coin pair such as btc_ltc or ltc_btc

rate is the conversion rate from input coin to output coin

minerFee is an estimation of the proper miner fee to send this con successfully.

limit is the highest amount of this coin you can send to Coinchanger

minimum is the lowest amount of the input coin you can shift with Coinchanger

maxLimit is the highest amount of the input coin you can shift with Coinchanger

 

 

Example Request

Market Info

curl --location --request GET "Coinchangeronline.com/marketinfo/%5Bpair%5D" \

  --data ""

Example Response

{

  "pair": "BTC_ETH",

  "rate": 30.24076948,

  "minerFee": 0.0022,

  "limit": 0.78994557,

  "minimum": 0.00015794,

  "maxLimit": 0.78972099

}

GET Rate

https://www.Coinchangeronline.com/limit/[pair]

This gets the current rate offered by Coinchanger. This is an estimate because the rate can occasionally change rapidly depending on the markets. The rate is also a usable rate rather than a direct market rate. This means that multiplying your input coin amount times the rate should give you a close approximation of what will be sent out. This rate does not include the transaction (miner) fee taken off of every transaction.

 

Request Fields

pair is any valid coin pair such as btc_ltc or ltc_btc

Response Fields

pair is any valid coin pair such as btc_ltc or ltc_btc

limit is the highest amount of this coin you can send to Coinchanger

min is the lowest amount of this coin you can shift with Coinchanger

 

 

Example Request

Rate

curl --location --request GET "https://www.Coinchangeronline.com/limit/%5Bpair%5D" \

  --data ""

Example Response

{

  "pair": "btc_eth",

  "limit": "0.78949654",

  "min": "0.00015788"

}

GET Valid Pairs

Coinchangeronline.com/validpairs

This endpoint will return all valid coin pairs available on Coinchanger.

 

 

 

Example Request

Valid Pairs

curl --location --request GET "Coinchangeronline.com/validpairs" \

  --data ""

Example Response

[

  "BCH_DASH",

  "DASH_BCH",

  "BCH_LTC",

  "LTC_BCH",

  "BCH_XMR",

  "XMR_BCH",

  "BCH_XRP",

  "XRP_BCH",

  "BCH_SC",

  "SC_BCH",

GET Validate an address, given a currency symbol and address

Coinchangeronline.com/validateAddress/[address]/[symbol]

GET Validate an address, given a currency symbol and addressCoinchangeronline.com/validateAddress/[address]/[symbol]

 

This allows the user to verify that their receiving address is a valid address according to a given wallet daemon. If isValid returns true, this address is valid according to the coin daemon indicated by the currency symbol.

 

Request Fields

address the address that the user wishes to validate

coinSymbol the currency symbol of the coin

Response Fields

isvalid mean the presented address is valid.

 

 

Example Request

Validate an address, given a currency symbol and address

curl --location --request GET "Coinchangeronline.com/validateAddress/%5Baddress%5D/%5Bsymbol%5D" \

  --data ""

Example Response

{

  "isvalid": true

}

GET List TX by API Key

Coinchangeronline.com/txbyapikey/[apiKey]

GET List TX by API KeyCoinchangeronline.com/txbyapikey/[apiKey]

 

Note: As of Nov 1, 2018 you can use /client/transactions with a Client Token. Your client ID and secret are linked to your previous API Key, so you will be able to get all previous transactions with the new client ID.

 

This allows vendors to get a list of all transactions that have ever been done using a specific API key (or client token). Transactions prior to Nov 1, 2018 were created using with a partner PUBLIC KEY. This endpoint allows partners to look them up using the linked PRIVATE KEY, to protect the privacy of our partners' account details.

 

Request Fields

apiKey is ignored. You can send the apikey if you would like.

page the page of data you are looking at

limit the number of items on the page - max: 500, default: 50

sort the direction to sort ‘ASC’ or ‘DESC’

Response Fields

ssTXID the Coinchanger transaction ID for the transaction

inputTXID the transaction ID on the input coin blockchain

inputAddress the input coin address where funds were received

inputCurrency the currency of the input coin

inputAmount the amount of the input coin

outputTXID the transaction ID on the output coin blockchain for the output coin being sent

outputAddress the output coin address Coinchanger will send to

outputCurrency the currency of the output coin

outputAmount the amount of the output coin Coinchanger sent

status the status of the transaction. This will be one of: [complete, received, returned, contact_support, failed]

timestamp the Unixtime when the input coin was received by Coinchanger

hasConfirmations whether Coinchanger has seen confirmations on the blockchain for the input coin

foxBack the amount of FOX token received for this transaction

Authorization

{clientToken} - User tokens will NOT be accepted. Information about how to create a clientToken.

Authorization - Bearer {clientToken}

Returns

Array of TX records

 

 

 

Example Request

List TX by API Key

curl --location --request GET "Coinchangeronline.com/txbyapikey/%5BapiKey%5D" \

  --data ""

Example Response

[

  {

    "ssTXID": "53fd20859b86dea67d3bab6a",

    "inputTXID": "e79c51b25b5sdf29b860f07576b1afbe0aca7201cf6811864bbafd67f60ff993",

    "inputAddress": "16pYaLVr7gBZwk6NxC4FxjP5fxz8YS2xX4",

    "inputCurrency": "BTC",

    "inputAmount": 0.001,

    "outputAddress": "",

    "status": "completed",

    "timestamp": 1401470774,

    "hasConfirmations": true,

GET Get List of Transactions with a Specific Output Address

Coinchangeronline.com/txbyaddress/[address]/[apiKey]

Note: As of Nov 1, 2018 you can use /client/transactions with a Client Token. Your client ID and secret are linked to your previous API Key, so you will be able to get all previous transactions with the new client ID.

 

Allows partners to get a list of all transactions that have ever been sent to one of their addresses. The partner’s PRIVATE KEY must be provided, and will only return transactions that were sent to output address AND were created using the linked PUBLIC KEY. Please note that if the address is a ripple address and it includes the “?dt=destTagNUM” appended on the end, you will need to use the URIEncodeComponent() function on the address before sending it in as a param, to get a successful response.

 

Request Fields

address is required, so that we can filter by address.

apiKey is ignored. You can send the apikey if you would like.

page the page of data you are looking at

limit the number of items on the page - max: 500, default: 50

sort the direction to sort ‘ASC’ or ‘DESC’

Response Fields

ssTXID the Coinchanger transaction ID for the transaction

inputTXID the transaction ID on the input coin blockchain

inputAddress the input coin address where funds were received

inputCurrency the currency of the input coin

inputAmount the amount of the input coin

outputTXID the transaction ID on the output coin blockchain for the output coin being sent

outputAddress the output coin address Coinchanger will send to

outputCurrency the currency of the output coin

outputAmount the amount of the output coin Coinchanger sent

status the status of the transaction. This will be one of: [complete, received, returned, contact_support, failed]

timestamp the Unixtime when the input coin was received by Coinchanger

hasConfirmations whether Coinchanger has seen confirmations on the blockchain for the input coin

foxBack the amount of FOX token received for this transaction

Authorization

{clientToken} - User tokens will NOT be accepted. Information about how to create a clientToken.

Authorization - Bearer {clientToken}

Returns

Array of TX records that include the address specified

 

 

 

Example Request

Get List of Transactions with a Specific Output Address

t.iocurl --location --request GET "Coinchangeronline.com/txbyaddress/%5Baddress%5D/%5BapiKey%5D" \

  --data ""

Example Response

[

  {

    "ssTXID": "53fd20859b86dea67d3bab6a",

    "inputTXID": "e79c51b25b5sdf29b860f07576b1afbe0aca7201cf6811864bbafd67f60ff993",

    "inputAddress": "16pYaLVr7gBZwk6NxC4FxjP5fxz8YS2xX4",

    "inputCurrency": "BTC",

    "inputAmount": 0.001,

    "outputAddress": "",

    "status": "completed",

    "timestamp": 1401470774,

    "hasConfirmations": true,

GET Recent Transaction List

Coinchangeronline.com/recenttx/[max]

Get a list of the most recent transactions from the Coinchanger API

 

Request Fields

[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 500 (inclusive).

Response Fields

curIn is the input currency for the listed exchange.

curOut is the output currency for the listed exchange.

timestamp the Unixtime for when the input coin was received by Coinchanger

amount is the amount of the input coin sent to Coinchanger for exchange.

txid the ID of the transaction

 

 

Example Request

Recent Transaction List

curl --location --request GET "Coinchangeronline.com/recenttx/%5Bmax%5D" \

  --data ""

Example Response

[

  {

    "curIn": "BTC",

    "curOut": "BCH",

    "timestamp": 1540321980.271,

    "amount": 0.03195119,

    "txid": 336787

  },

  {

    "curIn": "ETH",

    "curOut": "BTC",

GET Status of deposit to address

Coinchangeronline.com/txstat/[address]

This endpoint returns the status of the most recent deposit transaction to the address.

 

URL params

[address] is the deposit address to look up.

Response Fields

status will read [error], [no_deposits], or [complete] depending on the address and order type.

address is the Coinchanger deposit address for this exchange

error means this is not a valid Coinchanger deposit address.

withdraw is the address the output coin for this exchange will be sent to.

incomingCoin is the amount of the input coin recieved by Coinchanger at our deposit address.

incomingType is the symbol of the input coin sent to Coinchanger.

transaction is the transaction ID hash from when the exchanged coins were sent from Coinchanger to the user.

transactionURL is a link URL to the transaction ID hash from when the exchanged coins were sent from Coinchanger to the user on block explorer.

 

 

Example Request

Complete

curl --location --request GET "Coinchangeronline.com/txstat/123456" \

  --header "Content-Type: application/json" \

  --data ""

Example Response

{

  "status": "complete",

  "address": "0xb80469d01912bd3c58673faeee4310c07550828e",

  "withdraw": "19Eek1mnffFF7ecmWHxp2pDcrALmR4Nkon",

  "incomingCoin": 0.08937546,

  "incomingType": "ETH",

  "outgoingCoin": "0.00251506",

  "outgoingType": "BTC",

  "transaction": "e760822a528a181dc78bae3fca47a37a4f098d2397d68c4a6279799520fbb99a",

  "transactionURL": "https://blockchain.info/tx/e760822a528a181dc78bae3fca47a37a4f098d2397d68c4a6279799520fbb99a"

}

GET Time Remaining on Fixed Amount Transaction

Coinchangeronline.com/timeremaining/[address]

When a transaction is created with a fixed amount requested, there is a 10-minute window for the deposit. If the deposit has not been received after the 10-minute window, the transaction expires and a new one must be created. This API call returns how many seconds are left before the transaction expires.

 

Please note that if the address is a Ripple address, it will include the “?dt=destTagNUM” appended on the end, and you will need to use the URIEncodeComponent() function on the address before sending it in as a param. This will offer a successful response.

 

URL Params

[address] is the deposit address to look up.

 

Response Fields

status is the current availablity status of the exchange.

seconds_remaining is the number of seconds remaining.

 

 

Example Request

Time Remaining on Fixed Amount Transaction

curl --location --request GET "Coinchangeronline.com/timeremaining/%5Baddress%5D" \

  --data ""

Example Response

{

  "status": "pending",

  "seconds_remaining": "1"

}

GET All Order Information

Coinchangeronline.com/orderInfo/[order_id]

This endpoint will return information related to the Order ID in question, including status, withdraw address, deposit addresses, incoming coin, outgoing coin, all transaction hashes, all URLs, and time-based information.

 

URL Params

[order_id] the SS order ID you would like information about

 

Response Fields

status is the current availablity status of the exchange.

orderId is the ID of the conduit that was created. For Precise there will only ever be one transaction associated to an order. For quick there can be many transactions for a single order.

userId is the ID of the user who owns the transaction.

withdraw is the address the output coin for this exchange will be sent to.

deposit is the Coinchanger deposit address

rate this is the conversion rate that is/was used for this conduit

 

 

Example Request

All Order Information

curl --location --request GET "Coinchangeronline.com/orderInfo/%5Border_id%5D" \

  --data ""

Example Response

{

  "status": "complete",

  "orderId": "d7a0eb1c-5aec-4a0d-bb91-b9b8fdad43d1",

  "userId": "aab5a277-999d-46b0-9262-4e164494a25a",

  "withdraw": "DAJqJvTiN7UxTj1qEJiQuaUVquWHb67Udr",

  "deposit": "3LcsrsCm2XGNngSzww4gHdF4fjd9zShRAg",

  "rate": "1397183.09859154",

  "type": 1,

  "incomingCoin": 0.0005,

  "incomingCoinInfo": {

    "symbol": "BTC",

POST Request Email Receipt

Coinchangeronline.com/mail

This call requests a receipt for a transaction. The email address will be added to the conduit associated with that transaction as well. Soon, it will also send receipts to subsequent transactions on that conduit.

 

Request Fields

email is the address for receipt email to be sent to

txid is the transaction id of the transaction TO the user (ie the txid for the withdrawal NOT the deposit)

 

 

Example Request

Request Email Receipt

curl --location --request POST "Coinchangeronline.com/mail" \

  --data ""

GET Request Client Transactions

https://Coinchangeronline.com/client/transactions

GET https://Coinchangeronline.com/client/transactions

 

Query params

page the page of data you are looking at

limit the number of items on the page - max: 500, default: 50

sort the direction to sort ‘ASC’ or ‘DESC’

address will allow the transactions to be filtered to a specific address

Authorization

{clientToken} - User tokens will NOT be accepted. Information about how to create a clientToken.

Authorization - Bearer {clientToken}

Returns:

Array of TX records

 

HEADERS

Authorization

Bearer {{ClientToken}}

Error
500

Whoops, something went wrong on our servers.