Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cryptopiaAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private function apiCall($method, array $req = array()) {
curl_setopt($ch, CURLOPT_URL, $url );
} elseif ( in_array( $method, $private_set ) ) {
$url = "https://www.cryptopia.co.nz/Api/" . $method;
$nonce = explode(' ', microtime())[1];
$nonce = base64_encode(random_bytes(128));
$post_data = json_encode( $req );
$m = md5( $post_data, true );
$requestContentBase64String = base64_encode( $m );
Expand Down
2 changes: 1 addition & 1 deletion exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function getSymbols() {
// note: $exchangeSymbol must be have the base currency first and quote currency second (i.e. eth_btc Not btc_eth). The quote currency is usually BTC, USD, or CNY.
public function makeStandardSymbol($exchangeSymbol) {
// Convert to Uppercase and remove nonletters.
return preg_replace('/[^A-Z]/', '', strtoupper ( $exchangeSymbol ));
return $exchangeSymbol;
}
// @todo not implemented for all exchanges, setSymbols() must create associative array $this->symbols with keys as standard symbols and values as exchange symbols for this function to work.
public function getExchangeSymbol($standardSymbol) {
Expand Down