This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |