Default server
https://api.qfinr.com/api/user/portfolio/listPortfolios
Copy
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.qfinr.com/api/user/portfolio/listPortfolios',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_USERPWD => ($username . ":" . $password),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
1
import requests
from base64 import b64encode
url = "https://api.qfinr.com/api/user/portfolio/listPortfolios"
payload={}
userAndPass = b64encode(b"username:password").decode("ascii")
headers = {
'Authorization': 'Basic %s' % userAndPass
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
1
Default server
https://api.qfinr.com/api/user/portfolio/details/{portfolio_id}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.qfinr.com/api/user/portfolio/details/{{portfolio_id}}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_USERPWD => ($username . ":" . $password),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
1
import requests
from base64 import b64encode
url = "https://api.qfinr.com/api/user/portfolio/details/{{portfolio_id}}"
payload={}
userAndPass = b64encode(b"username:password").decode("ascii")
headers = { 'Authorization': 'Basic %s' % userAndPass }
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
1
Default server
https://api.qfinr.com/api/user/portfolio/updatePortfolio
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.qfinr.com/api/user/portfolio/updatePortfolio',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'portfolio_name={{portfolio_name}}&transactions={{transactions_json}}',
CURLOPT_USERPWD => ($username . ":" . $password),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
1
import requests
from base64 import b64encode
url = "https://api.qfinr.com/api/user//portfolio/updatePortfolio"
payload='portfolio_name={{portfolio_name}}&transactions={{transactions_json}}'
userAndPass = b64encode(b"username:password").decode("ascii")
headers = { 'Authorization': 'Basic %s' % userAndPass, 'Content-Type': 'application/x-www-form-urlencoded'}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
1
Default server
https://api.qfinr.com/api/user/portfolio/delete
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.qfinr.com/api/user/portfolio/delete',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'portfolio_id={{portfolio_id}}',
CURLOPT_USERPWD => ($username . ":" . $password),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
1
import requests
from base64 import b64encode
url = "https://api.qfinr.com/api/user//portfolio/delete"
payload='portfolio_id={{portfolio_id}}'
userAndPass = b64encode(b"username:password").decode("ascii")
headers = { 'Authorization': 'Basic %s' % userAndPass, 'Content-Type': 'application/x-www-form-urlencoded'}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
1