Quick Start
Get started with TONAPI in minutes
Quick Start
Get up and running with TONAPI in just a few minutes. This guide will walk you through the essential steps to start building on TON blockchain.
Prerequisites
Before you begin, you'll need:
- Basic understanding of REST APIs
- An API key (optional for basic usage, required for higher limits)
- Your preferred programming language and HTTP client
Your First API Call
Let's make your first request to TONAPI. We'll fetch information about a TON account:
curl https://tonapi.io/v2/accounts/EQD0vdSA_NedR9uvbgN9EikRX-suesDxGeFg69XQMavfLqIwThis will return detailed information about the account, including balance, status, and more.
Get Your API Key
For production use and higher rate limits, you'll need an API key:
- Visit TON Console
- Sign up or log in to your account
- Navigate to API Keys section
- Create a new API key for your project
Once you have your key, include it in your requests:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://tonapi.io/v2/accounts/EQD0vdSA_NedR9uvbgN9EikRX-suesDxGeFg69XQMavfLqIwUse SDK for Your Language
TONAPI provides SDKs for popular programming languages:
JavaScript/TypeScript
npm install @ton-api/clientimport { TonApiClient } from '@ton-api/client';
const client = new TonApiClient({
apiKey: 'YOUR_API_KEY'
});
const account = await client.accounts.getAccount(
'EQD0vdSA_NedR9uvbgN9EikRX-suesDxGeFg69XQMavfLqIw'
);Python
pip install tonapifrom tonapi import TonApi
client = TonApi(api_key='YOUR_API_KEY')
account = client.accounts.get_account(
'EQD0vdSA_NedR9uvbgN9EikRX-suesDxGeFg69XQMavfLqIw'
)Next Steps
Now that you've made your first API call, explore more features:
- What is TONAPI - Learn about TONAPI capabilities
- REST API Reference - Explore all available endpoints
- SDK Guide - Deep dive into SDK features
- Cookbook - Real-world examples and recipes
Need Help?
- Join our Telegram community
- Check out API documentation
- Contact support at support@tonkeeper.com
How is this guide?