Solana
Solana
Solana
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
getSlot is a Solana JSON-RPC method that returns the current slot the node is processing on the chain that secures SOL. Solana advances roughly one slot every ~400ms, so this u64 is the live cursor of network time. You can pass an optional config object with a commitment (processed, confirmed, or finalized) and minContextSlot to control which view you get. Send it as a JSON-RPC 2.0 POST with positional params to https://solana.therpc.io/YOUR_API_KEY.
minContextSlot on later calls so they only run against a node that is at least this caught up.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | config | object | لا | Options: commitment, minContextSlot. |
| النوع | الوصف |
|---|---|
| integer | u64 current slot. |
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | A param is missing, of the wrong type, or malformed (e.g. a non-base58 pubkey or a bad config field). |
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |
commitment: processed advances fastest but is least settled and can be rolled back, while finalized is the most settled. Choose the level that matches your tolerance.