To use the platform.getRewardUtxOs method on the P-Chain, ensure that the end of your URL includes ext/bc/P.
Parameters
txID
string
Loading...
encoding
string
Loading...
Returns
numFetched
integer
Loading...
utxos
array
Loading...
encoding
string
Loading...
Request
1curl -X POST "https://docs-demo.flare-mainnet.quiknode.pro/ext/bc/C/rpc/" \2-H "Content-Type: application/json" \3-d '{4"jsonrpc": "2.0",5"method": "platform.getRewardUTXOs",6"params": {7"txID": "2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy2Y4",8"encoding": "hex"9},10"id": 111}'
1curl -X POST "https://docs-demo.flare-mainnet.quiknode.pro/ext/bc/C/rpc/" \2-H "Content-Type: application/json" \3-d '{4"jsonrpc": "2.0",5"method": "platform.getRewardUTXOs",6"params": {7"txID": "2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy2Y4",8"encoding": "hex"9},10"id": 111}'
1const body = {2jsonrpc: '2.0',3method: 'platform.getRewardUTXOs',4params: {"txID":"2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy2Y4","encoding":"hex"},5id: 16}78async function main() {9const response = await fetch('https://docs-demo.flare-mainnet.quiknode.pro/ext/bc/C/rpc/', {10method: 'POST',11headers: {'Content-Type': 'application/json'},12body: JSON.stringify(body)13})14const data = await response.json()15console.log(data)16}1718main()
1const body = {2jsonrpc: '2.0',3method: 'platform.getRewardUTXOs',4params: {"txID":"2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy2Y4","encoding":"hex"},5id: 16}78async function main() {9const response = await fetch('https://docs-demo.flare-mainnet.quiknode.pro/ext/bc/C/rpc/', {10method: 'POST',11headers: {'Content-Type': 'application/json'},12body: JSON.stringify(body)13})14const data = await response.json()15console.log(data)16}1718main()
1import requests2import json34url = "https://docs-demo.flare-mainnet.quiknode.pro/ext/bc/C/rpc/"56payload = json.dumps({7"jsonrpc": "2.0",8"method": "platform.getRewardUTXOs",9"params": {10"txID": "2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy2Y4",11"encoding": "hex"12},13"id": 114})15headers = {16'Content-Type': 'application/json'17}1819response = requests.request("POST", url, headers=headers, data=payload)2021print(response.text)
1import requests2import json34url = "https://docs-demo.flare-mainnet.quiknode.pro/ext/bc/C/rpc/"56payload = json.dumps({7"jsonrpc": "2.0",8"method": "platform.getRewardUTXOs",9"params": {10"txID": "2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy2Y4",11"encoding": "hex"12},13"id": 114})15headers = {16'Content-Type': 'application/json'17}1819response = requests.request("POST", url, headers=headers, data=payload)2021print(response.text)
1require "uri"2require "json"3require "net/http"45uri = URI("https://docs-demo.flare-mainnet.quiknode.pro/ext/bc/C/rpc/")67payload = {8jsonrpc: "2.0",9id: 1,10method: "platform.getRewardUTXOs",11params: {"txID":"2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy2Y4","encoding":"hex"}12}1314request = Net::HTTP::Post.new(uri)15request["Content-Type"] = "application/json"16request.body = JSON.generate(payload)1718response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|19http.request(request)20end2122puts response.body
1require "uri"2require "json"3require "net/http"45uri = URI("https://docs-demo.flare-mainnet.quiknode.pro/ext/bc/C/rpc/")67payload = {8jsonrpc: "2.0",9id: 1,10method: "platform.getRewardUTXOs",11params: {"txID":"2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy2Y4","encoding":"hex"}12}1314request = Net::HTTP::Post.new(uri)15request["Content-Type"] = "application/json"16request.body = JSON.generate(payload)1718response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|19http.request(request)20end2122puts response.body
Response
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"numFetched": "0",6"utxos": [],7"encoding": "hex"8}9}
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"numFetched": "0",6"utxos": [],7"encoding": "hex"8}9}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free