Quickstart
Install the SDK, set a key and make a first routed request.
Install
$ npm install @orbapi/sdk
$ export ORBAPI_API_KEY=sk-orbapi-test-...
$ npx orbapi whoami
key 9fK2aQ (test)
balance $10.00
markets search, scrape, browser, rpc, voice, sandbox
First request
Every market is a method on the same client. The same request works over plain HTTPS.
import { OrbAPI } from "@orbapi/sdk";
const orbapi = new OrbAPI({ apiKey: process.env.ORBAPI_API_KEY });
// Routed to the cheapest listed capacity that meets your constraints.
const results = await orbapi.search({
query: "HBM4 supply news",
maxPrice: 0.006, // USD per call, optional
});
console.log(results.route);
// { provider: "exa", price: 0.0021, list: 0.005, saved: 0.58 }Read the route
Each response carries the provider's result and a route object. Log it. It is how you see what you paid and what list price would have been.
response.route
{
"provider": "exa",
"listing": "lst_7Qm2",
"price": 0.0021,
"list": 0.005,
"saved": 0.58,
"unit": "call",
"units": 1
}Set a ceiling
Spot prices move. Pass maxPrice to cap what a single unit may cost. If nothing on the book is under your ceiling, the request fails with no_capacity and you are not charged.