Getting Started
Welcome to the Tideform portal and documentation! We’ll guide you through accessing our flexible API, tailored to support all your maritime data needs. This guide provides the essentials for using our GraphQL API, along with links to top resources for exploring GraphQL in various programming languages.
Why Use GraphQL?
GraphQL allows you to request exactly the data you need, reducing the need for multiple requests and simplifying data processing. With a single endpoint, you can access diverse types of data and customize responses to include only the fields that matter to you.
Explore Our GraphQL API
To get started, log into your Tideform account and open the GraphQL tab in the main menu. Our built-in GraphQL UI offers an interactive environment where you can:
- Explore the Schema: See all available types, queries, and fields in our GraphQL schema.
- Test Queries: Write and test queries in real-time.
- Copy Examples: Copy sample queries directly into the UI to quickly retrieve data.
Example: Fetching a Spot Price
To fetch the coordinates and spot price for MGO (Marine Gas Oil) at the Singapore port (port ID: "SGSIN"), you can use the following query in the GraphQL UI:
query spotPrice {
port(id: "SGSIN") {
coordinates {
latitude
longitude
}
fuelPortProfile(fuelGradeId: "MGO") {
spot {
currency
name
latestPrice {
publishedDate
price
}
}
}
}
}
This query will:
- Return the latitude and longitude coordinates for Singapore port.
- Fetch the latest MGO spot price, including the published date and currency.
Authentication
The Tideform API is protected by a security layer that’s managed automatically in the GraphQL UI when you log in. For programmatic access, however, you’ll need to authenticate. The Authentication section explains your options for handling this in code.
Accessing the GraphQL API in Different Programming Languages
GraphQL is versatile and has excellent libraries for popular programming languages. Below are some key resources and libraries to help you integrate our API using the language of your choice:
-
JavaScript (NodeJS)
- Apollo GraphQL Client: Apollo Documentation
- graphql-request: graphql-request Documentation
-
Python
-
C# (.NET)
- GraphQL.Client: GraphQL .NET Client Documentation
-
Java
- Apollo Java: Apollo Android Documentation
- GraphQL Java: GraphQL Java Documentation
-
Go
- graphql-go: GraphQL Go Client Documentation
Each library provides methods for sending queries, handling authentication, and parsing responses. Additionally, they integrate smoothly with modern development workflows and support error handling, type safety, and caching options.
Further Resources
For more in-depth information on GraphQL:
With these tools, resources, and examples, you’re well-equipped to start using the Tideform API. Don’t hesitate to explore the GraphQL UI to tailor queries to your needs. Happy querying!