How to start developing on Cardano using Tangocrypto API
What is Tangocrypto?
We provide a suite of high availability APIs and developer tools for fast and reliable access to the Cardano network that requires only 1 minute to integrate. As a developer starting on Cardano you will face the following problems:
- There’s no way to access the information on a blockchain without using a node or an API provider.
- You will have to start creating the infrastructure instead of focusing on your products and business.
- In-house infrastructure doesn’t scale automatically when user demand increases.
- There is a high learning curve, a broader error surface and an increase in cost when building integrations with several API services from multiple providers.
We provide a unified platform where you’ll be able to:
- Ship products faster and validate business ideas.
- Use one platform to fetch, submit and listen to on-chain information, mint tokens, store files and process payments.
- Grow their user base by relying on an elastic infrastructure capable of handling spikes in consumption without downtime.
- Reduce cost on engineering and infrastructure operations.
Our solution provides the following components:
- REST API
- Notify (Webhooks)
- NFT API
💻 You can create a free account now at https://dashboard.tangocrypto.com/register and start coding your next product.
The HTTP REST API goal is to make development faster and easier. There is no need for syncing with the blockchain and maintaining complicated setups. No more complex and multiple requests to the blockchain from different entry points, the developers can get all the data they need for transactions, token information and debugging, in fewer requests.
We provide the most accessible and reliable Cardano infrastructure, freeing companies and developers from the responsibility to maintain complex infrastructures and focusing instead on building their business logic and providing value to their customers.
- Enterprise-grade infrastructure: Harness the processing power of our globally distributed cloud-hosted node network. Our API alleviates the friction of maintaining your own compute and storage resources, lowering the barrier to entry for developers and enterprises.
- Built for developers: Easy to read documentation and resources to help developers get started quickly.
- Gain app insights: Our dashboard provides direct insights about API usage. Drill down into specific request methods and get response times, most used endpoints, usage by time of the day, IP address, countries and more. These insights are a great way to optimize applications based on user behaviour.
- Standard Interface: Supports Mainnet and Testnet via client-compatible REST API over HTTPS.
- Always Online: Running on the latest network upgrades with a minimum 99.9% uptime guarantee.
Network and App ID
You can choose the mainnet or the testnet for your queries. The API requires a valid
app_id to be included with your request traffic. This identifier should be appended to the request URL.
API Key header
When you sign up on https://www.tangocrypto.com and create an App an
x-api-key is created. You must include the HTTP header
x-api-key in every request in order to authenticate the API calls.
FULL API REFERENCE
Check our API full reference documentation here https://www.tangocrypto.com/api-reference/
Steps to get started with Tangocrypto
1. 🔑 Create an App
To use Tangocrypto’s products, you need an API key to authenticate your requests.
You can create API keys from the dashboard, just click on +Create App, name it and hit create:
Once your app is created just copy your app-id and
x-api-key and start making requests.
2. 🏗️ SMake a Request and start building
With the app-id and the
x-api-key you can make requests. For example, let's make a request to get the latest block number:
curl --location \
--request GET 'https://cardano-testnet.tangocrypto.com/<app-id>/v1/blocks/latest' \
--header 'x-api-key: <your-api-key>'
You should get something like this:
Some API endpoints paginate their responses to make the result set easier to handle. For example, if you request a list of objects that are potentially too large to run efficiently, the endpoint returns the first batch of results along with a cursor to access the next set of results.
The query results are divided into “pages” of 1 MB in size (or less) data. An application can process the first page of results, then the second page, etc. You include the cursor in subsequent requests to the endpoint as a URL query parameter of your request.
To determine whether there are more results and to retrieve them one page at a time, applications should do the following:
- Make a request with the desired
sizeand check the result, if the cursor is not empty, construct a new request with the same parameters as the previous one. However, this time, take the cursor value from the last query and use it as the cursor parameter in the new request.
- If the
cursoris empty in the result it means there are no more items to be retrieved.
Let’s make the following query with size=50
In the response, we see the cursor with a non-empty value (showing only one record for simplicity)
"name": "THE Collection",
"description": "thecollection description",
"copyright": "Tent 2021",
"collection": "The Collection",
To retrieve the next batch of items we use the same query but now insert the obtained cursor from the previous step as the query parameter:
This process can be repeated until the cursor is empty because there are no more items to retrieve.
Join Coinmonks Telegram Channel and Youtube Channel learn about crypto trading and investing