You’ll find API endpoints and key usage notes below. If you ever need help you can reach out to us.

Authentication, Rate Limits, and Error Handling

Authentication

See How to Send a Request below for service URLs and important info, as well as our Authentication and API Keys guide for how to create and edit API keys.

Rate Limits

When you surpass the QPS limit for a key, we return a JSON-RPC error code -32010. We recommend implementing retries with a backoff to handle any rate limits errors that arise. If you haven’t assigned all the QPS you have for a network, or one key has more than it needs, you can adjust the rate limits of your keys to better balance your QPS allotment across your keys. You may also be able to reduce requests by using methods like sui_multiGetObjects instead of multiple calls to sui_getObject.
Notes:Depending on your plan, you may also be subject to overall daily request limits. Hitting this limit will result result in a -32012, and you should not retry until the next day UTC. You can see your Node Service request totals in the Node Service Metrics section of your Shinami Dashboard. You can see your account limits on the “Sui Node Service” tab of the Billing page of your Shinami dashboard, where you can also upgrade your plan if needed.

Error Handling

See our Error Reference guide.

How to Send a Request

When sending a request to our Node Service:
  1. Use the URL of the region you wish you send your requests to (see table below).
  2. Send your access key in one of these two ways (done automatically by our TypeScript SDK):
    1. A header (recommended for reduced visibility in logs, etc): "X-Api-Key: YOUR_ACCESS_KEY"
    2. In the URL: e.g. https://api.us1.shinami.com/sui/node/v1/ACCESS_KEY
  3. Use an access key from the same region as the URL you’re using. 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.
  4. Use an access key tied to the region and Sui 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. Note: Testnet is currently not offered in Tokyo, as shown in the table below.
Region table
Region nameLocationNetworks offeredService URL (same URL for all networks offered)Only works with API keys made in
US East - us1Eastern United StatesTestnet, Mainnethttps://api.us1.shinami.com/sui/node/v1US East - us1
Tokyo - apac1Tokyo, JapanMainnethttps://api.apac1.shinami.com/sui/node/v1Tokyo - apac1
Sending toTokyo - apac1 with our SDK When using our TypeScript SDK, just construct it with an API key from Tokyo - apac1 and we’ll set the Tokyo - apac1 URL automatically! Since the region is encoded in the API key name (e.g. apac1_sui_mainnet_59...) we know what URL to set. For those with older API keys from US East - us1 that don’t have the region encoded in the name, the SDK will handle this as well by defaulting to the US East - us1 URL.

Sample Request

Here is a quick sample request you can make using cURL, the Shinami Clients TypeScript SDK, the Mysten Rust SDK, or the Mysten TypeScript SDK. It’s asking for the current reference price for gas on Testnet. We also show how to use Shinami with the Sui CLI for a different operation, in case you use that. Because Testnet is currently only offered in our US East - us1 region, the sample code uses the service URL associated with that region: https://api.us1.shinami.com/sui/node/v1/. To send to Mainnet in our Tokyo - apac1 region, you would use an API key from that region and send to https://api.apac1.shinami.com/sui/node/v1/. This is set by our SDK automatically when you use an APAC API key (since the region is encoded in the api key name, we know what URL to set). Example Request Template The TypeScript example uses the Shinami Clients SDK, which you can install with:
Shell
npm install @shinami/clients
Replace all instances of{{name}} with the actual value for that name
curl https://api.us1.shinami.com/sui/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeTestnetAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{
        "jsonrpc":"2.0",
        "method":"suix_getReferenceGasPrice",
        "params":[],
        "id":1
    }'
Example Response
{
    "jsonrpc":"2.0",
    "result":"750",
    "id":1
}

// The reference gas price is 750 MIST, which is 0.00000075 SUI
For a detailed look at how Sui charges for transactions, see here. You can use Shinami’s Gas Station to increase user engagement by sponsoring your users’ transactions so they don’t have to think about all those calculations.