SDKs
Official clients for Node, Go and Python: the data API and the Astra oracle, one package per language.
Each package holds two clients: the data API (/api/v1) at its root and the Astra oracle
in astra. No key is needed. Every operation is a typed method; input is checked before it is sent,
GETs retry and honour Retry-After, and an unknown field or enum value decodes as it is, so an
additive API change never breaks a client that has not upgraded.
| Language | Package | Astra | Source |
|---|---|---|---|
| Node / TypeScript | @avee_tech/sdk | @avee_tech/sdk/astra | avee-node |
| Go | github.com/aveetechapp/avee-go | …/avee-go/astra | avee-go |
| Python | avee | avee.astra | avee-python |
Install
npm install @avee_tech/sdkFirst request
import { AveeClient } from '@avee_tech/sdk';
const client = new AveeClient({ baseUrl: 'https://api.preview.avee.tech/api/v1' });
const page = await client.pairs({ chains: ['base'], sort: 'liquidity', limit: 10 });
console.log(page.items[0]?.pair_address);Lists come with iterators (iterPairs, IterPairs, iter_pairs) that follow next_cursor for you.
A failed call raises a typed error that carries the problem code and the request_id.
Astra
import { AstraClient } from '@avee_tech/sdk/astra';
const [btc] = await new AstraClient({ baseUrl: 'https://astra.preview.avee.tech' }).latestPrices([
'0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43',
]);
console.log(btc.price.toDecimalString());SSE and WebSocket streams are covered in each repository's ASTRA.md.
Versions
Semantic versioning. Inside a major version a release only adds, and a deprecated name keeps working
for twelve months. Each repository's CHANGELOG.md lists what changed.
Another language? Any OpenAPI generator builds a client from https://api.preview.avee.tech/api/v1/openapi.yml.