Make requests

StarkNet supports API requests using HTTP and a subset of Ethereum JSON-RPC methods.
WebSocket calls are not supported.

Call a JSON-RPC method

Use HTTPS to call a JSON-RPC method. In this example we use curl to make the HTTPS request.
Replace <YOUR-API-KEY> with an API key from your Infura dashboard.
curl<YOUR-API-KEY> \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"starknet_blockNumber","params":[],"id":1}'
Example output: