Skip to content

Commit 4f968eb

Browse files
Max Grimdmzoneill
authored andcommitted
fix generate signatue
If send data type "e-mail" then binance return: [Signature for this request is not valid.] When using the Binance Corporate API If need to add functions for working with the Binance Corporate API, just tell me how to name the functions correctly =) Now: sub_accounts() - [/sapi/v1/sub-account/list] sub_account_assets() - [...] sub_account_deposit_address - [...] sub_account_deposits [...] sub_account_transfer_universal [...]
1 parent 0958e2e commit 4f968eb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

php-binance-api.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,7 @@ protected function httpRequest(string $url, string $method = "GET", array $param
11211121
}
11221122

11231123
$query = http_build_query($params, '', '&');
1124+
$query = str_replace([ '%40' ], [ '@' ], $query);//if send data type "e-mail" then binance return: [Signature for this request is not valid.]
11241125
$signature = hash_hmac('sha256', $query, $this->api_secret);
11251126
if ($method === "POST") {
11261127
$endpoint = $base . $url;

0 commit comments

Comments
 (0)