Skip to content

Instantly share code, notes, and snippets.

View igponce's full-sized avatar
🤣
Yo me río de janeiro

Iñigo igponce

🤣
Yo me río de janeiro
View GitHub Profile
<?php
function api_query($http_method, $method, array $req = array()) {
$key = '';
$secret = '';
$post_data = $http_method == 'POST' ? json_encode($req) : '';
$sign = hash_hmac('sha512', $post_data, $secret);
$headers = array(
'Content-type: application/json',
CoinEx API
# All timestamps are in UTC
# All currency amounts and exchange rates are multiplied by 10^8 to get rid of floating point numbers
# All API requests should contain HTTP header 'Content-type: application/json'
# Private API methods should have API-Key and API-Sign headers
# API-Key header should contain your API access key which can be generated
# at your account settings page
# API-Sign header should contain request's POST data signed by your account's