PATH DOCUMENTATION
TypeScript SDK
A typed Fetch client generated from the same OpenAPI schemas as the backend.
Package availability
The SDK is currently a local, unpublished package in the Path repository. There is no public npm installation step. External integrations can use HTTP and download the OpenAPI schema to generate their own client.
Use the local package
// Within the Path repository; resolve this relative import for your file.
import { PathClient } from './sdk/index';
const path = new PathClient({
baseUrl: 'https://api.pathagg.xyz',
timeoutMs: 10000
});
const config = await path.getConfig();
const quote = await path.quote({
chainId: 999,
tokenIn: config.nativeToken,
tokenOut: '0xb88339cb7199b77e23db6e890353e22632ba630f',
amountIn: '100000000000000000',
slippageBps: 50
});
console.log(quote.minimumReceived, quote.warnings);The client uses Fetch and supports an optional AbortSignal on its methods. PathApiError exposes status, code, requestId and retryAfterSeconds. It does not sign, broadcast or automatically retry transactions. Cancellation stops client transport; server work may already have started.
Client methods
| Area | Methods |
|---|---|
| Discovery | getConfig, getSources, getTokens, searchTokens |
| Wallet display | getPortfolio, discoverHoldings, getTokenBalances |
| Trading | quote, buildSwap, getTransaction, getActivity |
| Orders | getOrderCapabilities, getOrderPrice, previewOrder, buildOrder, cancelOrder |
| Order reads | getOrders, getOpenOrders, getOrderEvents |