GetPositions are resulting empty data in response output php

I am working with API, to retrieve current positions in PHP Below is the function, on my account today i had 3 positions out of 1 is running, remaining2 are squared off: It throws response 3 objects with emty data with all values

function postionsget($api_version,$config,$access_token)
{

$url = 'https://api.upstox.com/v2/portfolio/short-term-positions';

$headers = [
‘Accept: application/json’,
'Authorization: Bearer '.$access_token,
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);

if (curl_errno($ch)) {
echo 'Curl error: ’ . curl_error($ch);
}

curl_close($ch);

echo $response;
}

Output Response is as below:

Upstox\Client\Model\GetPositionResponse Object ( [container:protected] => Array ( [status] => success [data] => Array ( [0] => Upstox\Client\Model\PositionData Object ( [container:protected] => Array ( [exchange] => NFO [multiplier] => 0 [value] => 0 [pnl] => 0 [product] => D [instrument_token] => [average_price] => 0 [buy_value] => 0 [overnight_quantity] => 0 [day_buy_value] => 1237.5 [day_buy_price] => 0 [overnight_buy_amount] => 0 [overnight_buy_quantity] => 0 [day_buy_quantity] => 0 [day_sell_value] => 1068.75 [day_sell_price] => 0 [overnight_sell_amount] => 0 [overnight_sell_quantity] => 0 [day_sell_quantity] => 0 [quantity] => 0 [last_price] => 0 [unrealised] => 0 [realised] => 0 [sell_value] => 0 [tradingsymbol] => [trading_symbol] => [close_price] => 0 [buy_price] => 0 [sell_price] => 0 ) ) [1] => Upstox\Client\Model\PositionData Object ( [container:protected] => Array ( [exchange] => NFO [multiplier] => 0 [value] => 0 [pnl] => 0 [product] => D [instrument_token] => [average_price] => 0 [buy_value] => 0 [overnight_quantity] => 0 [day_buy_value] => 2152.5 [day_buy_price] => 0 [overnight_buy_amount] => 0 [overnight_buy_quantity] => 0 [day_buy_quantity] => 0 [day_sell_value] => 2250 [day_sell_price] => 0 [overnight_sell_amount] => 0 [overnight_sell_quantity] => 0 [day_sell_quantity] => 0 [quantity] => 0 [last_price] => 0 [unrealised] => 0 [realised] => 0 [sell_value] => 0 [tradingsymbol] => [trading_symbol] => [close_price] => 0 [buy_price] => 0 [sell_price] => 0 ) ) [2] => Upstox\Client\Model\PositionData Object ( [container:protected] => Array ( [exchange] => NFO [multiplier] => 0 [value] => 0 [pnl] => 0 [product] => D [instrument_token] => [average_price] => 0 [buy_value] => 0 [overnight_quantity] => 0 [day_buy_value] => 2006.25 [day_buy_price] => 0 [overnight_buy_amount] => 0 [overnight_buy_quantity] => 0 [day_buy_quantity] => 0 [day_sell_value] => 2512.5 [day_sell_price] => 0 [overnight_sell_amount] => 0 [overnight_sell_quantity] => 0 [day_sell_quantity] => 0 [quantity] => 0 [last_price] => 0 [unrealised] => 0 [realised] => 0 [sell_value] => 0 [tradingsymbol] => [trading_symbol] => [close_price] => 0 [buy_price] => 0 [sell_price] => 0 ) ) ) ) )

So data is empty even through positions are in place on my account, How to fix it. If this is the issue from developer API. Please fix this as soon as possible

i see other post, yet to resolve the same issue complained by other one:

1 Like

This issue has been resolved. Let me know if you’re still experiencing any problems.