To figure out how to implement this API, you need to evaluate what you need to do. There are two types of methods, unauthenticated GET methods and authenticated POST methods. None of the GET methods need any query parameters. The POST methods take query parameters (only key and sign), and some POST parameters. The easiest way to do this would then seem to be to make two functions, one for GET methods and the other for POST methods.
1. The GET function simply needs to take the URL, and then use cURL to download it. You may need to substitute the pair yourself for those methods which need it. You then need to decode the JSON request into an array.
2. The POST functions need to take the URL and an array of POST parameters. You also need a way of providing your public and private key, which depends on your implementation. First, you need to set the nonce if not set in the parameter array. Then you need to encode the parameters in URL query string format (probably with
http_build_query). This is your post data. Now you need to generate the HMAC sign. Make sure you use SHA-512 for your hash function, use your private key for the key, and post data for the message. Then use the HMAC algorithm to get the hexadecimal digest.
$sign = hash_hmac("sha512", $post_data, $PRIVATE_KEY, false);
Now, build your query string as "key=$PUBLIC_KEY&sign=$sign", and append it to the end of the url with a ?, e.g. "
https://www.coins-e.com/api/v2/market/WDC_BTC/?key=547189fad79e08&sign=709ed89b0ac". Finally, use cURL to post post_data to the URL you just constructed and decode the JSON request into an array again.
Hopefully this should make it relatively straightforward and give you some pointers to start. I haven't programmed in PHP for a while but if you need some help on a specific part I could look into it for you.