jaggedsoft / php-binance-api

PHP Binance API is an asynchronous PHP library for the Binance API designed to be easy to use. https://github.com/binance-exchange/php-binance-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dude: Get Response Headers

marcoas opened this issue · 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