Appearance
API Setup
Welcome to the Spark API hand-guide. The aim of this guide is to provide a complete, plain English description and summary of the API’s functionality. This guide is coding language agnostic, meaning that it should be used as a reference regardless of whether you’re accessing the API using Python, R or any other language.
We would greatly appreciate any feedback on this guide, especially should anything be missing from this guide or if anything isn’t explained clearly enough. All feedback can be directed towards: support@sparkcommodities.com
Spark API - What is it?
Broadly speaking, the Spark API gives customers the ability to access Spark data, import that data to your local system and analyse it using your chosen environment and process. How much data you can access is dependent on your subscription type, as detailed below:
- Premium API Subscription: Access to all Spark data
- Trial Subscription: Access to latest price release, forward curves and two weeks of historical data
- Basic Subscription: No access.
Note
Want access to the complete Spark dataset? Contact us to discuss our Premium plans at commercial@sparkcommodities.com
Please also note that these permissions are also platform subscription dependent: customers with a Premium API Subscription to the Spark Freight platform can’t access all the Spark Cargo API data without the corresponding subscription.
Setting Up
Here are the steps to get you up and running.
1. Register your app
Create an OAuth2 client for each of your applications via the Manage your OAuth2 clients table.
Steps to register:
- Key in your Client-Name: Any names will work but it is advisable to name your application appropriately for easier identification.
- Download the credentials as you will be needing it later.
2. Authenticate
To make sure your system is authorised to communicate with our systems, your system will need to use the credentials you downloaded in Step 1 to authenticate by getting an access token.
If you have lost the credentials file, you can reset by clicking on the reset icon on the client via the Manage your OAuth2 clients table. Then, click on the document icon "Download client credentials" to download the credentials.
To get an access token, refer to our API documentation for more details.
3. Fetch data from Spark API
Once you have the access token, you can start to make requests to our API endpoints with this token.