Phillip Capital Public API (1.0.0)

Download OpenAPI specification:

Base URL: https://api.phillipcapital.com.au:8080

Authentication: OAuth 2.0 Client Credentials

Welcome to the Phillip Capital Public API documentation.

Our APIs provide secure, scalable, and reliable access to the data and services provided by Phillip Capital. Built with modern infrastructure and industry standards in mind, these APIs are designed for fast, efficient integration with your systems. Key features include:

  • Scalability to support high-volume transactions and data processing

  • Security via OAuth 2.0 authentication and TLS encryption

  • Flexibility to support diverse integration use cases

  • Reliability backed by Phillip Capitals’s proven financial systems expertise

This documentation provides detailed information on authentication, usage, versioning, and available endpoints. For more information or to request access to the API, please contact your Phillip Capital representative.

We're always looking to improve our APIs and services. If you have any feedback or suggestions, please let us know.

Introduction

A REST API (or Representational State Transfer API) is a method for two systems to communicate and share data over the internet, adhering to a standardized set of rules. In simpler terms, it’s a way for applications to talk to each other, allowing them to exchange information in a consistent and reliable manner. A REST API is an API that communicates using the HTTP protocol, where different resources (such as data or services) are accessible via specific web addresses (URLs). Each URL represents a resource, which could be anything from ledger data to contract note copies. By leveraging REST APIs, systems can efficiently expose data and functionality, ensuring a seamless, reliable exchange of information across distributed platforms.

Authentication

We utilise the OAuth 2.0 "Client Credentials" flow to ensure secure access to our APIs. This industry-standard authentication protocol allows systems to authenticate and communicate securely without involving user interaction, making it ideal for server-to-server integrations.

How It Works

In the Client Credentials flow, an application (the client) requests an access token directly from the authentication server (Identity Provider, or IdP) using its own credentials. This access token is then used to authorise API requests. Here’s a step-by-step overview:

  1. Client Authentication:

The client authenticates with the Identity Provider using a unique client ID and secret. These credentials are issued by the Phillip Capital authentication system when your application is registered.

  1. Access Token Request:

Once authenticated, the client requests an access token by calling the token endpoint of the IdP. This request includes the client ID, client secret, and a grant type of client_credentials.

  1. Access Token Issuance:

If the client is successfully authenticated, the Identity Provider returns an access token. This token is a time-limited key that the client can use to make authorised API calls.

  1. Authorised API Requests:

The client then includes the access token in the header of subsequent API requests, typically in the form of a Bearer token. The API verifies the token before processing the request, ensuring that the client is authorised to access the requested resource.

Example

Obtaining an access token and using it to make a secure API call is a two-step process.

1). Requesting an Access Token

 curl -X POST https://oauth.phillipcapital.com.au/oauth2/token  
 -u client_id:client_secret  
 -d 'grant_type=client_credentials&scope=DataApiServer/data_read_scope' 

This request sends the client ID, client secret, and grant type to the token endpoint. If the credentials are valid, the Identity Provider responds with an access token:

 {"access_token":"9zjf....90823kjns", "token_type":"bearer","expires_in":3600} 

2). Making an Authorised API Call

Once you receive the access token, include it in the Authorisation header of your API requests:

 curl -k -X GET https://api.phillipcapital.com.au:8080/api/v1/ledgers?accountNumber=123456   
 --header 'Accept: application/json'   
 --header 'Authorization: Bearer k9fk32......9238kmsq2'   
 --header 'Content-Type: application/json'  

All communication between your application and Phillip Capital must be encrypted using TLS to protect sensitive data like the client secrets. Access tokens are short-lived to minimise the risk of token misuse in the event of a security breach. By using OAuth 2.0, Phillip Capital ensures that your application can interact with our APIs in a secure, scalable, and standardised way, without exposing unnecessary risk to either party.

Back Office

Retrieve ledger entries

Fetches the ledger entries, with optional account number, currency and date range filters.

If you provide an account number, you must have permissions to that account. If not, you will receive an empty array in the response.

You can apply any combination of the date filters to narrow down the results. If no date filters are provided, the API will return all contract notes for the account. For accounts with large numbers of contract notes, it is recommended to use the date filters to reduce the response size or responses may be slower than expected.

Authorizations:
OAuth2ClientCredentials
query Parameters
accountNumber
string
Example: accountNumber=acct_123
currency
string
Example: currency=AUD
transactionDate
string
Example: transactionDate=2024-03-01

Trade date in YYYY-MM-DD format. If not provided, defaults to the current date.

settlementDate
string
Example: settlementDate=2024-03-30

Settlement date in YYYY-MM-DD format. If not provided, defaults to the current date.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Retrieve holdings

Fetches all holdings for the accounts to which you have access. It may be filtered for a specific account number.

If you filter by account number, you must provide an account number to which you have permissions to view. If not, you will receive an empty array in the response.

Authorizations:
OAuth2ClientCredentials
query Parameters
accountNumber
string
Example: accountNumber=acct_123

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Retrieve contract notes

Fetches the contract notes for the accounts to which you have access, with optional account number, currency and date range filters.

You can apply any combination of the date filters to narrow down the results. If no date filters are provided, the API will return all contract notes for the account. For accounts with large numbers of contract notes, it is recommended to use the date filters to reduce the response size or responses may be slower than expected.

Note that 'grossValue' is the value of the price x quantity, and 'netValue' is the gross value plus brokerage and GST.

Authorizations:
OAuth2ClientCredentials
query Parameters
accountNumber
string
Example: accountNumber=acct_123
currency
string
Example: currency=AUD
tradeDate
string
Example: tradeDate=2024-03-01

Trade date in YYYY-MM-DD format. If not provided, defaults to the current date.

settlementDate
string
Example: settlementDate=2024-03-25

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve balances

Fetches the balances for the accounts to which you have access. You may filter by account number and currency.
Unless filtered by currency, balances in all currencies will be returned. If filtering by account number then you must provide an account number to which you have permissions to view. If not, you will receive an empty array in the response.

Authorizations:
OAuth2ClientCredentials
query Parameters
accountNumber
string
Example: accountNumber=acct_123
currency
string
Example: currency=AUD

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]