Authentication, Rate Limits, and Error Handling
Authentication
Our service URL ishttps://api.us1.shinami.com/aptos/node/v1
. You authenticate via an access key passed in a header ("X-Api-Key: ACCESS_KEY"
or "Authorization: Bearer ACCESS_KEY"
). These steps are done automatically by our TypeScript SDK. For more information, including how to set up API access keys, see our Authentication and API Keys guide. Region URLs - us1
above - only work with API keys created in the same region. So, to use this API, you’ll make Node Service API keys in our US East - us1
region.
Rate Limits
When you surpass the QPS limit for a key, we return a HTTP 429. We recommend implementing retries with a backoff to handle any rate limits errors that arise. You can also adjust the rate limits of your keys to better balance your QPS allotment across your keys.Error Handling
See our Error Reference guide.How to Send a Request
When sending a request to our Node Service, make sure to do the following things (the first two are done automatically by our TypeScript SDK).1
Set the base URL to
https://api.us1.shinami.com/aptos/node/v1
(https://api.us1.shinami.com
is the base URL for services in our US East - us1
region where our Aptos Node service resides). Region URLs only work with API keys created in the same region. So, to use this API, you’ll make Node Service API keys in our US East - us1
region. To learn more about regions see here.2
Use an access key tied to the network you want to interact with. When you create an API access key in your Shinami dashboard, you give it rights to exactly one network. We route to Mainnet or Testnet based on the API access key you send in the request.
3
Send your access key in one of these two headers:
"Authorization: Bearer YOUR_ACCESS_KEY"
"X-Api-Key: YOUR_ACCESS_KEY"
Sample Request
Example Request Template The TypeScript example uses the Shinami Clients SDK, which you can install with:{{name}}
with the actual value for that name.