Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    How to get holding in php

    General Discussion
    1
    1
    19
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Ved last edited by

      I want get holding details using php. I try but output given blank. Please help for right code.
      My code is

      <?php
      $keyapi = 'API_KEY:SECRET_KEY';
      $chbal = curl_init('https://apiconnect.angelbroking.com/
      rest/secure/angelbroking/portfolio/
      v1/getHolding');
      curl_setopt($chbal, CURLOPT_USERPWD, $keyapi); // API KEY and secret key
      curl_setopt($chbal, CURLOPT_RETURNTRANSFER,0);
      curl_setopt($chbal, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
      curl_setopt($chbal, CURLOPT_HTTPHEADER, array('accept: application/json'));
      $return = curl_exec($chbal);
      curl_close($chbal);
      print_r($return);
      ?>

      1 Reply Last reply Reply Quote 0
      • First post
        Last post