User Operations
This section describes all user related API
Investfly API is a REST based web service that provides access to all of the services provided by investfly.com.
For using Investfly API, you'll need to have Investfly account and special Investfly app token.
You need to provide "investfly-app-token" in headers everytime you make API request.
You can generate your Investfly app token here :
Your Investfly app token :
Your current plan doesn't support this feature. Please Upgrade to use this feature.
GET https://api.investfly.com/stockmarket/quote?symbol=AAPL&market=US&securityType=STOCK&realtime=true
Headers:
"Accept":"application/json"
"Content-Type":"application/json"
"investfly-app-token":"YOUR-TOKEN-HERE"
Response
{
"assetClass": "EQUITY",
"symbol": "AAPL",
"market": "US",
"exchange": "US",
"date": 1467057600000,
"lastPrice": 92.04
}
You can download investfly SDK from here.
Download SDKPlease see API Tutorials to learn more about Investfly SDK.
This document describes all API calls, their request methods and response structures. Investfly API can consume data in JSON format only. The examples below show JSON request and response.
This section describes all user related API
Investfly supports HTTP BASIC Authentication scheme. Once you are authenticated, Investfly will return your
Let us assume your username is demouser and password is demopass.
RequestPOST https://api.investfly.com/user/login
Headers:
"Accept":"application/json"
"Content-Type":"application/json"
"Authorization" = "Basic ZGVtb3VzZXI6ZGVtb3Bhc3M="
Note: Authorization used above is a sample for demo username and password given above. You can generate authorization for your own username and password using following methods:
>>> import base64
>>> base64.b64encode("your_username:your_password")
HTTP/1.1 200 OK
{
"clientId": "username-ku2p868f",
"clientToken": "3a81f9e6-ce5c-4824-af4b-bd33716a2553",
"expirationTime": "Sun Dec 29 09:32:13 EST 2013",
"username": "username"
}
Logout and end your current session.
RequestPOST "https://api.investfly.com/user/logout"
Headers:
"Accept":"application/json"
"Content-Type":"application/json"
"investfly-client-id": user1-j307ajgm
"investfly-client-token": 69d0952c-b156-4758-9ee6-fc095122ec67
Response
HTTP/1.1 200 OK
{
"message": "You are now logged out",
"type": "INFO"
}
{{api.description}}
{{method.verb[0]}} https://api.investfly.com{{method.path[0]}}?{{queryparam.name}}=[{{queryparam.name}}]&Headers:
"Accept":"application/json" "Content-Type":"application/json" "investfly-client-id": user1-j307ajgm "investfly-client-token": 69d0952c-b156-4758-9ee6-fc095122ec67Request Body:
{{getRequest('Investfly_API',api.name,method.summary,method.path[0],method.verb[0]) | json }}
{{getResponse('Investfly_API',api.name,method.summary,method.path[0],method.verb[0]) | json}}
{{stockmethod.description}}
Request{{stockmethod.verb[0]}} https://api.investfly.com/stockmarket{{stockmethod.path[0]}}?{{queryparam.name}}=[{{queryparam.name}}]&Headers:
"Accept":"application/json" "Content-Type":"application/json" "investfly-client-id": user1-j307ajgm "investfly-client-token": 69d0952c-b156-4758-9ee6-fc095122ec67Request body:
{{getRequest('StockMarket_API',stockapi.name,stockmethod.summary,stockmethod.path[0],stockmethod.verb[0]) | json}}
{{getResponse('StockMarket_API',stockapi.name,stockmethod.summary,stockmethod.path[0],stockmethod.verb[0]) | json}}
Copyright © Investfly LLC. All Rights Reserved.