Перейти к содержимому

Integration

Это содержимое пока не доступно на вашем языке.

You can integrate Tegro Finance data and trading into your own product.

The fastest path is the official TypeScript SDK — @tegroton/tegro-finance. It wraps the endpoints below with full types, BigInt-exact amount math, and a TON Connect adapter, and can build transactions either via the API or fully client-side.

Terminal window
npm install @tegroton/tegro-finance

See the TypeScript SDK page for quick-start examples. Prefer raw HTTP? The endpoints are documented below.

Use the API to pull pools, assets and quotes. Always treat the live API and on-chain state as the source of truth for addresses and reserves.

Trading actions (swap, add/remove liquidity, stake) are signed by the user’s wallet via TON Connect. The backend returns a prepared message payload; your client passes it to the wallet to sign. Do not hardcode contract addresses — read current ones from the API.

  • Resolve token metadata from /api/v1/assets; handle tokens with missing metadata gracefully.
  • Show fees and price impact before the user confirms.
  • Verify token addresses; warn on look-alike symbols.