Cubes
Getting Started with Cube-Based Queries
The Ortege API provides multiple ways to query blockchain data depending on your development environment. Whether you’re making raw HTTP requests in any language or building applications with JavaScript/TypeScript in the frontend, here’s how to access and interact with our data effectively.
Choosing Your Query Method
Raw Requests to Endpoints: Ideal for backend developers or those working in languages other than JavaScript/TypeScript.
Front-End Developers: Tailored for React or JavaScript/TypeScript environments using Cube’s npm packages and client library.
Raw Requests: Accessing Data Directly
If you're developing in any language other than JavaScript/TypeScript or need direct HTTP access, you can interact with the Ortege API using raw requests. Here are two popular ways to get started:
1. Using cURL
cURL offers a quick, straightforward way to test and integrate with the Ortege API.
REST API Request:
2. Using Postman
Postman allows you to visually interact with the Ortege API and save configurations for future use.
Import the Ortege Postman collection.
Set up your
Authorization
header with your JWT token.Customize your requests using Postman’s interface, and save them for quick access to frequently used queries.
Front-End Developers: Using Cube Client for JavaScript/TypeScript
If you’re building applications with React, JavaScript, or TypeScript, Cube’s npm packages provide a smooth way to integrate with Ortege’s API. Cube offers both a JavaScript client library and React components that make accessing blockchain data intuitive and efficient.
1. Setting Up the Cube Client Library
The Cube client library provides the foundational methods for querying data from our API. Here’s how to get started:
Install the Cube client:
Initialize and Query the Client:
2. Integrating with React Components
Cube’s React components allow you to easily integrate Ortege data into your frontend React application. Follow these steps:
Install Cube’s React components:
Using Cube in a React Component:
Last updated