Skip to content

Commit 823e5af

Browse files
authored
Merge pull request #979 from hirosystems/develop
api pricing tier updates
2 parents d227f6a + 0192758 commit 823e5af

File tree

5 files changed

+54
-22
lines changed

5 files changed

+54
-22
lines changed

app/layout.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ export default function RootLayout({
4040
<body className="flex min-h-screen flex-col">
4141
<Provider>
4242
<Banner
43-
id="hacks"
44-
cta="Start hacking"
45-
url="/stacks/hacks/build-with-sbtc"
46-
startDate="2025-03-26"
47-
endDate="2025-04-01"
48-
mobileText="Compete for a scholarship to Bitcoin 2025 in Las Vegas."
43+
id="api-tiers"
44+
cta="Meet Hiro’s new account tiers"
45+
url="https://platform.hiro.so/pricing"
46+
startDate="2025-04-09"
47+
endDate="2025-04-16"
48+
mobileText="Increase your API rate limits"
4949
>
50-
Compete for a dev scholarship to Bitcoin 2025.
50+
Increased API rate limits, dedicated support channels.
5151
</Banner>
5252
{children}
5353
<Footer />

content/docs/bitcoin/rate-limiting.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Rate limiting
3-
description: Understand the rate limits for Hiro APIs and the STX Faucet.
3+
description: Understand the rate limits for Hiro APIs and testnet faucets.
44
---
55

66
import RateLimitingContent from '@/snippets/rate-limiting.mdx';

content/docs/stacks/rate-limiting.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Rate limiting
3-
description: Understand the rate limits for Hiro APIs and the STX Faucet.
3+
description: Understand the rate limits for Hiro APIs and testnet faucets.
44
---
55

66
import RateLimitingContent from '@/snippets/rate-limiting.mdx';

snippets/api-keys.mdx

+23-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Developers have open access to Hiro's APIs without the use of an API key, but ar
33
<Callout title='Where can I get an API key?'>
44
If you're interested in obtaining an API key, you can generate one for free in the [Hiro Platform](https://platform.hiro.so) by creating an account.
55

6-
If your app needs more than 500 RPM, please [contact us](mailto:[email protected]).
6+
All API keys are set by default to the free "starter" account tier, which comes with a 900RPM rate limit. For builders who need access to higher API rate limits, dedicated support channels, and reliability guarantees through SLAs, you can upgrade your account tier through the Hiro Platform.
77
</Callout>
88

99
## Usage with cURL
@@ -30,6 +30,28 @@ async function makeApiRequest(apiKey: string) {
3030
}
3131
```
3232

33+
## Usage with Stacks.js
34+
35+
```ts client.ts
36+
import { createApiKeyMiddleware, createFetchFn } from "@stacks/common";
37+
import { makeContractCall } from '@stacks/transactions';
38+
39+
const apiMiddleware = createApiKeyMiddleware({
40+
apiKey: "<your-middleware>",
41+
});
42+
43+
const customFetchFn = createFetchFn(apiMiddleware);
44+
45+
const txOptions = {
46+
// ... standard transaction options
47+
client: {
48+
fetch: customFetchFn,
49+
},
50+
};
51+
52+
const transaction = await makeContractCall(txOptions);
53+
```
54+
3355
<Callout title="Caution" type="warn">
3456
The API key is passed in the header of your HTTP API request and is used only for private use, like in server-side applications.
3557

snippets/rate-limiting.mdx

+22-12
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,40 @@
11
## API rate limits
22

3-
The following rate-limits (in requests per minute, or RPM) are applicable for all Hiro APIs as of [November 2023](https://www.hiro.so/blog/updated-rate-limits-for-hiro-apis):
3+
You can access all of Hiro's API services without an API key, but you are subject to rate limits of 25 RPM, per client IP. To build with higher rate limits, you can generate a free API key in the Hiro Platform that is set to the free "starter" plan as a default, and you can upgrade your account to a [higher tier](https://www.hiro.so/pricing) as needed:
44

5-
| API key | Rate Limit |
6-
|:--------|:----------------------------------|
7-
| No | 50 requests per minute (RPM) per client IP, for unauthenticated traffic |
8-
| Yes | 500 requests per minute (RPM), regardless of origin IP, with an authenticated API key |
5+
| Tiers | API RPM | Stacks L2 requests / month | Bitcoin L1 requests / month |
6+
|:---------------|:--------|:---------------------------|:----------------------------|
7+
| No API key | 25 | n/a | n/a |
8+
| Free / Starter | 900 | 150K | 50K |
9+
| $99 / Build | 3K | 15M | 500K |
10+
| $599 / Scale | 7K | 75M | 5M |
11+
| Enterprise | Custom | Custom | Custom |
12+
13+
With a single API key, you gain access to Hiro's suite of API services that span Bitcoin and Stacks:
14+
15+
**Bitcoin L1 API services**
16+
17+
- [Ordinals API](/bitcoin/ordinals/api) (includes BRC-20 support)
18+
- [Runes API](/bitcoin/runes/api)
19+
20+
**Stacks L2 API services**
921

10-
These rate-limits apply to the entirety of API traffic, regardless of whether it's from one or all of these APIs:
1122
- [Stacks Blockchain API](/stacks/api)
1223
- [Token Metadata API](/stacks/token-metadata-api)
13-
- [Ordinals API](/bitcoin/ordinals/api)
14-
- [Runes API](/bitcoin/runes/api)
1524

1625
These new rate limits help us ensure fair usage of Hiro APIs and provide the best possible service as our community of developers and applications grow.
1726

1827
<Callout title='Need an API key?'>
1928
You can create one for free in the [Hiro Platform](https://platform.hiro.so) by creating an account.
2029
</Callout>
2130

22-
## STX Faucet rate limits
23-
24-
Note: this faucet is for Stacks testnet and provides testnet STX, which has no monetary value.
31+
## STX / sBTC testnet faucet rate limits
2532

33+
Note: these faucets are for Stacks and sBTC testnet tokens, which have no monetary value.
2634

2735
| Type | Rate Limit |
2836
|:-----------------------------|:-----------------------------|
2937
| Stacking requests | 1 request per 2 days |
30-
| Regular STX requests | 1 request per minute (RPM) |
38+
| Regular STX / sBTC requests | 1 request per minute (RPM) |
39+
40+
To use the faucets, visit the [Hiro Platform Faucet](https://platform.hiro.so/faucet).

0 commit comments

Comments
 (0)