I can not understand how to make requests where there is a signature. Here is the main function that sends requests:
protected function query($method, $v, $m, $params = []){ $url = "https://api.binance.com/api/v".$v; $url .= '/' . $method; if (!empty($params)) { $url .= "?" . http_build_query($params); } $client = new Client([ 'base_uri' => $url ]); $result = $client ->request($m); return json_decode($result->getBody()); } Here is a link to their documentation https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md
and there is an example:
First action
[linux]$ echo -n "symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559" | openssl dgst -sha256 -hmac "NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j" (stdin)= c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71 The second
(HMAC SHA256) [linux]$ curl -H "X-MBX-APIKEY: vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A" -X POST 'https://api.binance.com/api/v3/order?symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559&signature=c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71' I do not understand how it turns out stdin and where to pass on the example of my function