I have PHP code that retrieves orders, but when I send a request, it returns a 502 Bad Gateway. This is the code:
$apiCall = 'api/v3/allOrders';
$timestamp = now()->timestamp * 1000;
$apiParams = [
'symbol' => 'STRAXUSDT',
'timestamp' => $timestamp,
];
$signature = hash_hmac('sha256', http_build_query($apiParams), $this->apiSecret);
$apiParams['signature'] = $signature;
$response = Http::withHeaders([
'X-MBX-APIKEY' => $this->apiKey,
])
->get(https://testnet.binance.vision/ . $apiCall, $apiParams);
return $response;
This code was working yesterday, but today it is returning a 502 Bad Gateway.