Getting started

Run in Postman

We are using CURL commands in below examples, but if you prefer Postman, then you can import the entire collection from the link below:

Run in Postman

Let’s Get started with the step by step guide designed to help your development journey.

STEP 1: Register and create application

First register at OFX Developer and follow the steps.

Once registered, login into your account and go to My Apps (You will need to be logged in) to create an application.

Please note, you need to choose Rates API Product from the list.


You will be able to get your API keys (id and secret) after your application approval. Please note, it may take several business days to get your application approved.

Step 2: Get an access token

Get the Access token following OAuth 2.0 client credentials flow.

Please note you need to specify “ofxrates” as the scope.

curl -X POST \
  https://sandbox.api.ofx.com/v1/oauth/token \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'grant_type=client_credentials&client_id=your_client_id&client_secret=your_client_secret&scope=ofxrates'
{
  "access_token": "gAAAAH_x6f2fywNe0MyI2XTh9EMj-ijVbBGQHScMPp0HWMI17kvi-jfkj348zXx3DT6c0drdDnLgMLCBsGLKUP2fDUMhIWOhK9aHfOOaRhwQsNEdAiDJRzlrBWijPhyL5prCbKqE_b-Lq9mrpHopN8TDmaUqAoY_fOmT6BcQpiOW8hAEAAIAAAACmxkA0jiLSNR4M2ko2ETrF-oG_L20KdvnQEXF9wDbR2LPPC70UqGJhQEf-K1Zw27W-M2D67-6GfwsJdzMGa9dtzSrsLl0LSLfcY_ccbFRLmPTMWA5RTq42yYKhD1U6PTyL3PQwDuStvfY3gU2_RrwQOhjlJEbFcGQCmCxHtgMj3iMegsF50PyEGbWNaxbIvO8PoNAaItrnVBNP3U-JHnrU9Eg6QB",
  "expires_in": 3599,
  "token_type": "Bearer"
}

See Authentication section for details.

Step 3: Get a rate

Once you have received an Access Token, it is time to get a rate.

curl -X GET \
  https://sandbox.api.ofx.com/v1/ofxrates/USD/AUD/1000 \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json'

Example response:

{
  "ofxRate": 0.768333,
  "inverseOfxRate": 1.297313,
  "convertedAmount": 768.3
}

Congratulations

We’ve just received OFX Rates.

What is next ? Go to the Authentication section to learn more about OFX APIs.