Developers Getting Started Guide for the OrionApi.
- API Overview
- Test Orion Credentials
- Sample Applications
- Endpoint Documentation
- API Tester Page
- .NET SDK
The OrionApi is a fully functional api for the Orion Portfolio Accounting System. The API provides functionality for:
- Portfolio – Retrieve, Update, and Create Portfolio records, and associated data. This includes Households, Registrations, Financial Account Records, Assets, transactions as well as Documents, Notes, Suitability, and all the other related portfolio information.
- Trading – Retrieve, Update, and Create Models, assign models to accounts. Use this domain to generate trades using all the Orion trading applications such as rebalance, trade to target percent, quick trade, excel uploads, global ticker swap and more. The trade orders can be retrieved, and submitted through custodial files, or real time FIX trade connections.
- Billing – Retrieve, Update, and Create Billing information such as Fee schedules, payout schedules, adjustments, account billing instructions, related billing households. Also get generated bill information such as Receivables, payables, and invoices.
- Reporting – Ability to run Orion’s standard reports, as well as reports that have been created using Report Builder. These reports can be run to PDF, and downloaded, saved to Orions report inbox, or saved to Cloud Storage such as DropBox, and BOX.NET. Report data can also be queried such as tax cost basis, performance, Values, and Activity.
- OrionConnect – Orion Connect allows a calling application to launch the Orion UI. For example, if you want to launch the Orion Household Overview for a specific household from your own application, this can be done by using the Api Token. You can also embed Orion Connect UI components within IFrames in web applications.
Test Orion Credentials
Orion credentials are required for accessing the Orion API. These credentials are available upon request at email@example.com.
Orion is committed to providing quick response to questions. Please post questions to the Orion forum at forum.riadevelopers.com.
OrionApi Sample Applications
We have two sample applications that can be used to help developers get acquainted with the Orion API quickly.
The .NET sample application is a .net windows forms application that uses the orion sdk to access common api endpoints, and demonstrates their uses.
.NET Sample Application Can be downloaded from github at https://github.com/orionadvisor/WebApiSdkSample.
The Orion Client Portal is the actual production ready website portal Orion uses for End Investors to see their account balances and performance. This application is a great way to see the use of the Orion Api in a real world practical way.
Orion’s Client Portal written on AngularJS can be downloaded from github. This is a private repository, so request access by going to http://www.orionadvisor.com/github-request-form/.
TEST API PAGE
The Test API Page is used to quickly run Commands and explore the Orion API. This page runs against the Orion Database, and test credentials can be provided to connect to a sample or sandbox database.
HELP API PAGE
The api help page has documentation for all the endpoints, and is helpful for discovering parameters the endpoints take, and the descriptions of those parameters. It also shows examples of the Http Request and Response Messages.
BASE API Endpoints
Base api endpoint is the base url required to make all api calls. These base urls is what should be stored in a configuration file or table so they can be easily changed between test and production environments, or if a new version of the api is deployed (v2).
There is a .NET SDK dll that can be used from .NET projects. The SDK wraps the RESTful orion api service into a .net library that can be extremely helpful to speed up development.
This SDK dll is named OrionApiSdk.dll, and is used in the .net sample application available through github (referenced above).
The dll can be used in two different ways.
1. Method 1, NuGet –
a. From visual studio Package manager window, run
PM> Install-Package OrionApiSdk
Or Search for Orion in the Nuget Package Explorer in Visual Studio.
This is the easiest way to reference the sdk dll, and makes it very to get updates (simply update the nugget package in visual studio.) The down side is this not updated as quickly as the OrionApi. So new API calls may not be available for a while. You can request functionality so we can prioritize based on your requests, but if the api functionality has not been added to the SDK yet, you must either wait, or download the source code, and add the function yourself (method 2.)
2. Method 2, Download Source Code
a. Download the source code from the sample application in GitHub. This allows you to modify the code as needed, and compile the dll on your own.
Here is an example call using the SDK to Authenticate, and get a list of accounts.
OrionApi.Authenticate( login.UserName, login.Password, OrionEnvironment.Test );
grdAccounts.DataSource = OrionApi.Portfolio.Accounts();
This is an example of launching the Orion Connect Household Overview page in a browser.
string url = OrionApi.OrionConnectLinks.HouseholdOverview( Entity.Client, clientId );
This is an example for creating a new client (household) record.
// fill out the client verbose properties, and save changes.
_clientVerbose.portfolio.representativeId = (int)cboRep.SelectedValue;
_clientVerbose.portfolio.firstName = txtCientFName.Text;
_clientVerbose.portfolio.lastName = txtClientLName.Text;
_clientVerbose.portfolio.name = txtClientFullName.Text;
_clientVerbose.portfolio.address1 = txtClientAddr1.Text;
_clientVerbose.portfolio.address2 = txtClientAddr2.Text;
_clientVerbose.portfolio.city = txtClientCity.Text;
_clientVerbose.portfolio.state = txtClientState.Text;
_clientVerbose.portfolio.zip = txtClientZip.Text;
_clientVerbose = OrionApi.Portfolio.ClientSave( _clientVerbose );