You have 3 methods you can use.
1. ticker
GET https://coinnector.com/API/ticker/
returns JSON with timestamp and all pairs of cryptocurrencies. Example: "BTC_DOGE":["1883333.205499558",1] means you get 1883333.205499558 DOGE for 1 BTC. Number "1" after rate means, that value is higher (has raised) than minute ago. If there is "-1" - means it is lower than before.
2. create
POST https://coinnector.com/API/create/
Parameters:
from_curr [an abbreviation of one of the working currencies like BTC, LTC, DRK,....]
to_curr [an abbreviation of one of the working currencies like BTC, LTC, DRK,....]
address [valid address of to_curr, this is YOUR address, and converted amount of crypto will be sent there]
email [not obligatory, you can omit]
returns JSON with all info about a newly created channel:
token: [a unique string to recognize your channel]
from_curr: [the abbreviation of currency you want to convert, like: BTC, LTC, ...]
to_curr: [the abbreviation of a desired currency, like: BTC, DOGE, ...]
input_address: [our address, you will sent your crypto here]
output_address: [your address, you will get your crypto there]
created: [the date and time of creation]
email: [option]
history: [will be empty at that moment]
3. channel
POST https://coinnector.com/API/channel/
Parameters:
token: [a unique string you have got during channel creation]
returns JSON with all info about a channel:
token: [a unique string to recognize your channel]
from_curr: [the abbreviation of currency you want to convert, like: BTC, LTC, ...]
to_curr: the abbreviation of desired currency, like: BTC, DOGE, ...]
input_address: [our address, you will sent your crypto here]
output_address: [your address, you will get your crypto there]
created: [the date and time of creation]
email: [option]
history: [an array with last 100 transactions you have done through this channel]
php simple example:
function coinnector_api($method, $params = array()){
$post = http_build_query($params, "", "&");
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_URL, "https://coinnector.com/API/".$method."/");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
$ret = curl_exec($curl);
return ($ret);
}
$rates=file_get_contents('https://coinnector.com/API/ticker/');
$new_channel=coinnector_api('create',array=('from_curr'=>'BTC', 'to_curr'=>'LTC', 'address'=>'LKhn3jqqYm1gtuo8jN5rg6WUnWKkvJJawv', 'email'=>'[email protected]'));
$check_channel=coinnector_api('channel',array('token'=>'03e55269-2aed-1090-c154-49eb800d2e8f'));
REMEMBER: you can create 1 channel per minute. If you want to use Coinnector for any professional integration and it is not enough for you - send us an email [email protected] and we will whitelist your IP.