Skip to main content

v0/endpoints/{id}/method-rate-limits REST API Endpoint

Creates a method rate limit.

Updated on
Sep 27, 2024

v0/endpoints/{id}/method-rate-limits REST API Endpoint

Path Parameters

id
string
REQUIRED
The unique identifier for the specific endpoint

Body Parameters

interval
string
REQUIRED
Specifies the time interval for the rate limit; valid values include second, minute or hour
methods
array
REQUIRED
An array of method names to which the rate limiter applies
rate
integer
REQUIRED
Specifies the maximum number of requests allowed for the specified methods within the defined interval

Returns

data
object
The data object which contains the following fields:
id
string
A unique identifier for the rate limiter
interval
string
The time interval for the rate limit
methods
array
A list of methods the rate limiter applies to
rate
integer
The maximum number of requests allowed within the specified interval
status
string
The current status of the rate limiter
created
string
The timestamp when the rate limiter was created in second
error
string
A field containing an error message if any issue occurs
Request
1
curl -X 'POST' \
2
'https://api.quicknode.com/v0/endpoints/{id}/method-rate-limits' \
3
-H 'accept: application/json' \
4
-H 'x-api-key: YOUR_API_KEY' \
5
-H 'Content-Type: application/json' \
6
-d '{
7
"interval": "second",
8
"methods": [
9
"eth_getLogs"
10
],
11
"rate": 10
12
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free