CryptoWolf

Client Side

Getting our rates

URL: https://external.cryptowolf.eu/wallet/get-rates.php

Method: GET

Parameters:

from : `Deposit’ coin

to : `Receive’ coin

origin : affiliate tag (contact us for one at [email protected])*

The array is needed for step 2 in a variable named rate.For example in the 0th object in the array: [1877.5862068966,6495.73367642,0.099116469]

• 0 is the rate (SKY/BTC)

• 1 is the monitary value of the `from’ coin (USD/BTC)

• 2 is the additive amount of the `to’ coin, in this case SKY

$ curl https://external.cryptowolf.eu/wallet/get-rates.php\?from=BTC\&to=SKY




[
 [1877.5862068966,6495.73367642,0.099116469],[1873.9961759082,6495.73367642,0.210938576],..,
 [1507.8461538462,6495.73367642,10.699452539]
]

Calculate the receiving amount

Implement the following code to your wallet in order to calculate correctly the receiving amount.


	

Example: javascript to convert from the `from’ (Deposit) coin to the `to’ (Receive)
coin. Adjust to your language and needs.

function calcptsu(sending) { sending = parseFloat(sending); if (sending == 0) { return true; } temprate = gotovolumeptsu(sending); receiving = temprate[1]; temprate = temprate[0]; receivingUSD = sending * temprate[1]; return [Math.floor(receiving * (Math.pow(10, floorfind(secondselection)))) / (Math.pow(10, floorfind(secondselection))),parseFloat(receivingUSD.toFixed(5))] } // this skips to the correct order from the rate, responds correct rate block + receiving `to' coins. function gotovolumeptsu(amount) { indx = 0; loopamount = 0; loopreceiving = 0; rate[-1] = [0,0,0]; while(amount >= rate[indx-1][2]) { if (indx > 0 ) { loopreceiving = ((rate[indx][2] - rate[indx - 1][2]) * rate[indx][0]) + loopreceiving; } else if (indx === 0) { loopreceiving = rate[indx][2] * rate[indx][0]; } indx++; if (typeof rate[indx] == "undefined") { indx = indx - 1; amount = rate[indx][2]; break; } } if (indx == 0) { return [rate[0],amount * rate[0][0]]; } loopamount = rate[indx-1][2] - amount; remaining = loopreceiving - (loopamount * rate[indx-1][0]); return [rate[indx],remaining]; } // floors coins based on our partners function floorfind(coin) { round = {BTC:8, LTC:3, BCH:3, SKY:2, ETH:3, ETC:10}; try { if (typeof round[coin] != "undefined") { return round[coin]; } } catch (err) { return 1; } return 1; } rate = [[0.001184625,4.9116322503252,698.07],[0.00118365,4.90758975464592,1270.69],[0.001182675,4.903547258966641,2150.77],[0.0011817,4.89950476328736,2811.29],[0.001180725,4.89546226760808,3865.16],[0.0011797499999999998,4.8914197719288,4057.42],[0.001178775,4.88737727624952,4218.5],[0.0011778000000000001,4.88333478057024,4663.14],[0.0011768249999999998,4.87929228489096,5292.58],[0.00117585,4.87524978921168,10003.66],[0.001174875,4.871207293532399,10509.89],[0.0011739,4.867164797853119,11202.74],[0.001172925,4.86312230217384,11339.86],[0.00117195,4.8590798064945595,11674.42],[0.001170975,4.85503731081528,12064.05],[0.0011699999999999998,4.850994815136,13027.65],[0.001169025,4.84695231945672,13300.89],[0.0011680500000000001,4.84290982377744,13360.68],[0.0011670749999999998,4.83886732809816,13453.62],[0.0011661,4.83482483241888,13516.140000000001],[0.0011651250000000001,4.8307823367396,13827.77],[0.0011641499999999999,4.82673984106032,13997.75],[0.001163175,4.82269734538104,14073.19],[0.0011622,4.818654849701759,14231.380000000001],[0.0011612249999999999,4.81461235402248,14402.300000000001],[0.00116025,4.8105698583432,15267.28],[0.001159275,4.806527362663919,15288.11],[0.0011583,4.80248486698464,15437.650000000001],[0.0011573249999999998,4.798442371305359,15460.03],[0.00115635,4.7943998756260795,15498.24],[0.0011553750000000002,4.7903573799468,16809.61],[0.0011543999999999999,4.78631488426752,16966.18],[0.001153425,4.78227238858824,16972.97],[0.0011524500000000002,4.778229892908961,17026.99],[0.001151475,4.77418739722968,17115.63],[0.0011505,4.7701449015504,19368.63],[0.001149525,4.76610240587112,19555.48],[0.00114855,4.76205991019184,19557],[0.001147575,4.75801741451256,19585.01],[0.0011466,4.75397491883328,19591.429999999997],[0.001145625,4.749932423154,19968.829999999998],[0.0011446499999999999,4.745889927474719,20079.379999999997],[0.001143675,4.74184743179544,20101.989999999998],[0.0011427,4.73780493611616,20218.079999999998],[0.001141725,4.733762440436879,20223.329999999998],[0.00114075,4.7297199447576,21217.39],[0.0011397749999999998,4.7256774490783195,21218.41],[0.0011388,4.72163495339904,21313.41],[0.001137825,4.7175924577197605,21347.81],[0.00113685,4.71354996204048,21479.43],[0.001135875,4.7095074663612,21833.260000000002],[0.0011349,4.705464970681921,21877.000000000004],[0.001133925,4.70142247500264,21909.960000000003],[0.00113295,4.69737997932336,21910.860000000004]] firstselection = 'ETC'; secondselection = 'BTC' amount = 0.1; result = calcptsu(amount); document.getElementById('result').innerHTML = 'from: '+amount+' (in '+firstselection+')
'+ 'to: '+result[0]+' (in '+secondselection+')
'+ 'calculated in USD: '+result[1];
from: 0.1 (in ETC) to: 0.00011846 (in BTC) calculated in USD: 0.49076

Submit the order

Send the customer’s details.

URL: https://external.cryptowolf.eu/wallet/mail.php

Method: POST

It accepts these options and returns the order id (even if captcha fail, to prevent bruteforce attacks).

Parameters:

from : `Deposit’ coin

to : `Receive’ coin

amount : amount in `Deposit’ coin

receivingamount : for debugging your client side calculation (optional)

usd : 1 for debugging your client side calculation (optional)

receivingid : client’s receiving address

refundid : client’s refund address

emailaddress : client’s email (optional)

origin : affiliate tag (contact us for one at [email protected]) *

captcha : a normal captcha v2(invisible) challenge response (our pub key 6Lcatm8UAAAAABbCBiTLWV3lRlk2hq6vUYoPvmGW)

where

status is either fail or the order id

address is our deposit address

*Omitting origin will fallback to our main exchange supporting the same coins as our main page.

curl -F "from=BTC" -F "to=SKY" -F "amount=1" -F "receivingid=2MTXpswcQMuoXZTmZXEnht7ZFn16aT52edR" -F "refundid=1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX" https://external.cryptowolf.eu/wallet/mail.php


	{
"status": "#2844235955",
"address": "3DtooFQXNaDoChKJjTBcUzPsFmUEKyvb1Z"
}

Getting transaction confirmation

URL: https://external.cryptowolf.eu/wallet/rtxid.php

Method: Get

Parameters:

daddr : Deposit address in which the customer sent the funds

curl https://external.cryptowolf.eu/wallet/rtxid.php?daddr=MMYsj1i5VAjdFMXeT3X2UeoW5CSpreNaWU

73c50996b24ca186e53086de2492e25b93830f07e6fde8c5f21bf84189f06c93


Getting our pairs

URL: https://external.cryptowolf.eu/wallet/get-pairs.php

Method: Get



{"BTC":["AION","ARN","IOTA","CIR","BTT","RPD","ADS","SIB","BURST","COF","AE","POA","XTZ","LOKI","MNP","CLOAK","BQX","BTC","CMPCO","XSD","IQ","LCC","DASH","DGB","DGD","DNT","MONK","XDNA","MUE","XST","EDO","ELF","EOS","ETC","ETH","FUEL","GAS","GRS","GVT","ICX","INXT","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","ECOM","OMG","POE","POWR","PPT","QTUM","XRH","SALT","SKY","SNT","STORJ","STRAT","TRX","VET","VIBE","XEM","XLM","XRP","RUPX","XPX","UFR","ZEC","ZEN","ZRX","PHR"],"ETH":["AION","ARN","IOTA","CIR","BTT","RPD","ADS","SIB","BURST","COF","AE","POA","XTZ","LOKI","MNP","CLOAK","BQX","BTC","CMPCO","XSD","IQ","LCC","DASH","DGB","DGD","DNT","MONK","XDNA","MUE","XST","EDO","ELF","EOS","ETC","ETH","FUEL","GAS","GRS","GVT","ICX","INXT","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","ECOM","OMG","POE","POWR","PPT","QTUM","XRH","SALT","SKY","SNT","STORJ","STRAT","TRX","VET","VIBE","XEM","XLM","XRP","RUPX","XPX","UFR","ZEC","ZEN","ZRX","PHR"],"ETC":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"BCH":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"BCHSV":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"LTC":["AION","ARN","IOTA","CIR","BTT","RPD","ADS","SIB","BURST","COF","AE","POA","XTZ","LOKI","MNP","CLOAK","BQX","BTC","CMPCO","XSD","IQ","LCC","DASH","DGB","DGD","DNT","MONK","XDNA","MUE","XST","EDO","ELF","EOS","ETC","ETH","FUEL","GAS","GRS","GVT","ICX","INXT","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","ECOM","OMG","POE","POWR","PPT","QTUM","XRH","SALT","SKY","SNT","STORJ","STRAT","TRX","VET","VIBE","XEM","XLM","XRP","RUPX","XPX","UFR","ZEC","ZEN","ZRX","PHR"],"GRS":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"XRP":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"USD":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"GBP":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"AUD":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"RUB":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"]}

Server Side

Getting the quote

URL: https://external.cryptowolf.eu/wallet/send-amount.php

Method: GET

Parameters:

from : `Deposit’ coin

to : `Receive’ coin

amount : amount in `Deposit’ coin

origin : affiliate tag (contact us for one at [email protected])*

$ curl curl 'https://external.cryptowolf.eu/wallet/send-amount.php?from=BTC&to=SKY&amount=0.1'




172.15040439647

Submit the order

Send the customer’s details.

URL: https://external.cryptowolf.eu/wallet/mail.php

Method: POST

It accepts these options and returns the order id (even if captcha fail, to prevent bruteforce attacks).

Parameters:

from : `Deposit’ coin

to : `Receive’ coin

amount : amount in `Deposit’ coin

receivingamount : for debugging your client side calculation (optional)

usd : 1 for debugging your client side calculation (optional)

receivingid : client’s receiving address

refundid : client’s refund address

emailaddress : client’s email (optional)

origin : affiliate tag (contact us for one at [email protected]) *

captcha : a normal captcha v2(invisible) challenge response (our pub key 6Lcatm8UAAAAABbCBiTLWV3lRlk2hq6vUYoPvmGW)

where

status is either fail or the order id

address is our deposit address

*Omitting origin will fallback to our main exchange supporting the same coins as our main page.

curl -F "from=BTC" -F "to=SKY" -F "amount=1" -F "receivingid=2MTXpswcQMuoXZTmZXEnht7ZFn16aT52edR" -F "refundid=1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX" https://external.cryptowolf.eu/wallet/mail.php


	{
"status": "#2844235955",
"address": "3DtooFQXNaDoChKJjTBcUzPsFmUEKyvb1Z"
}

Getting the pairs

URL: https://external.cryptowolf.eu/wallet/get-pairs.php

Method: Get



{"BTC":["AION","ARN","IOTA","CIR","BTT","RPD","ADS","SIB","BURST","COF","AE","POA","XTZ","LOKI","MNP","CLOAK","BQX","BTC","CMPCO","XSD","IQ","LCC","DASH","DGB","DGD","DNT","MONK","XDNA","MUE","XST","EDO","ELF","EOS","ETC","ETH","FUEL","GAS","GRS","GVT","ICX","INXT","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","ECOM","OMG","POE","POWR","PPT","QTUM","XRH","SALT","SKY","SNT","STORJ","STRAT","TRX","VET","VIBE","XEM","XLM","XRP","RUPX","XPX","UFR","ZEC","ZEN","ZRX","PHR"],"ETH":["AION","ARN","IOTA","CIR","BTT","RPD","ADS","SIB","BURST","COF","AE","POA","XTZ","LOKI","MNP","CLOAK","BQX","BTC","CMPCO","XSD","IQ","LCC","DASH","DGB","DGD","DNT","MONK","XDNA","MUE","XST","EDO","ELF","EOS","ETC","ETH","FUEL","GAS","GRS","GVT","ICX","INXT","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","ECOM","OMG","POE","POWR","PPT","QTUM","XRH","SALT","SKY","SNT","STORJ","STRAT","TRX","VET","VIBE","XEM","XLM","XRP","RUPX","XPX","UFR","ZEC","ZEN","ZRX","PHR"],"ETC":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"BCH":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"BCHSV":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"LTC":["AION","ARN","IOTA","CIR","BTT","RPD","ADS","SIB","BURST","COF","AE","POA","XTZ","LOKI","MNP","CLOAK","BQX","BTC","CMPCO","XSD","IQ","LCC","DASH","DGB","DGD","DNT","MONK","XDNA","MUE","XST","EDO","ELF","EOS","ETC","ETH","FUEL","GAS","GRS","GVT","ICX","INXT","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","ECOM","OMG","POE","POWR","PPT","QTUM","XRH","SALT","SKY","SNT","STORJ","STRAT","TRX","VET","VIBE","XEM","XLM","XRP","RUPX","XPX","UFR","ZEC","ZEN","ZRX","PHR"],"GRS":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"XRP":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"USD":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"GBP":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"AUD":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"],"RUB":["AION","ARN","IOTA","CIR","COF","MNP","BQX","BTC","DASH","DGD","DNT","EDO","ELF","EOS","ETH","FUEL","GAS","GVT","ICX","KMD","LEND","LSK","LTC","NAV","NEBL","NEO","OMG","POE","POWR","PPT","QTUM","SALT","SNT","STORJ","STRAT","TRX","VET","VIBE","XLM","XRP","ZEC","ZRX"]}