jaggedsoft/php-binance-api

dude: Get Response Headers

marcoas opened this issue · 2 comments

(Translated by Google)

Hello.
How to access HTTP headers from API response?

@marcoas

$candles = $api->candlesticks("BTCUSDT", "1h");
print_r($api->lastRequest['header']);
print_r($api->xMbxUsedWeight);

After you run any command (like get candlesticks) you could ask for the 'lastRequest' and from that array take the 'header' subarray.
If you just want the used Weight so far, you could also check xMbxUsedWeight

Hope this helps.

Excellent