Admin API REST API: V0 Endpoints Id Method Rate Limits Post | Quicknode
v0/endpoints/{id}/method-rate-limits REST API Endpoint
Creates a method rate limit.
Updated on
Jun 26, 2026
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
- id
Request
Curl
curl -X 'POST' \
'https://api.quicknode.com/v0/endpoints/{id}/method-rate-limits' \
-H 'accept: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{\n "interval": "second",\n "methods": [\n "eth_getLogs"\n ],\n "rate": 10\n}'
JavaScript
const myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("x-api-key", "YOUR_API_KEY");
myHeaders.append("Content-Type", "application/json");
const raw = JSON.stringify({
"interval": "second",
"methods": [
"eth_getLogs"
],
"rate": 10
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://api.quicknode.com/v0/endpoints/{id}/method-rate-limits", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
Python
import requests
import json
url = "https://api.quicknode.com/v0/endpoints/{id}/method-rate-limits"
payload = json.dumps({
"interval": "second",
"methods": [
"eth_getLogs"
],
"rate": 10
})
headers = {
'accept': 'application/json',
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.quicknode.com/v0/endpoints/{id}/method-rate-limits")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["x-api-key"] = "YOUR_API_KEY"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"interval": "second",
"methods": [
"eth_getLogs"
],
"rate": 10
})
response = https.request(request)
puts response.read_body
Additional Example
qn endpoint rate-limit method-create {endpoint_id} \
--method eth_call \
--interval second \
--rate 25 \
-o json
import { QuicknodeSdk } from "@quicknode/sdk"
const qn = new QuicknodeSdk({ apiKey: "YOUR_API_KEY" })
const response = await qn.admin.createMethodRateLimit("ENDPOINT_ID", { interval: "second", methods: ["eth_blockNumber"], rate: 100 })
console.log(response)
import asyncio
from quicknode_sdk import QuicknodeSdk, SdkFullConfig
async def main():
qn = QuicknodeSdk(SdkFullConfig(api_key="YOUR_API_KEY"))
response = await qn.admin.create_method_rate_limit("ENDPOINT_ID", interval="second", methods=["eth_blockNumber"], rate=100)
print(response)
asyncio.run(main())
use quicknode_sdk::{QuicknodeSdk, SdkFullConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let qn = QuicknodeSdk::new(&SdkFullConfig::builder().api_key("YOUR_API_KEY").build())?;
let response = qn.admin.create_method_rate_limit("ENDPOINT_ID", &Default::default()).await?;
println!("{:?}", response);
Ok(())
}