HTTP methods

getAccountInfo

Returns all information associated with the account of provided Pubkey

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getAccountInfo",
    "params": [
      "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
      {
        "encoding": "base58"
      }
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 1
    },
    "value": {
      "data": [
        "11116bv5nS2h3y12kD1yUKeMZvGcKLSjQgX6BeV7u1FrjeJcKfsHRTPuR3oZ1EioKtYGiYxpxMG5vpbZLsbcBYBEmZZcMKaSoGx9JZeAuWf",
        "base58"
      ],
      "executable": false,
      "lamports": 1000000000,
      "owner": "11111111111111111111111111111111",
      "rentEpoch": 2,
      "space": 80
    }
  },
  "id": 1
}

getBalance

Returns the lamport balance of the account of provided Pubkey

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
 {
    "jsonrpc": "2.0", "id": 1,
    "method": "getBalance",
    "params": [
      "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": { "context": { "slot": 1 }, "value": 0 },
  "id": 1
}

getBlock

Returns identity and transaction information about a confirmed block in the ledger

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
    {
    "jsonrpc": "2.0","id":1,
    "method":"getBlock",
    "params": [
      430,
      {
        "encoding": "json",
        "maxSupportedTransactionVersion":0,
        "transactionDetails":"full",
        "rewards":false
      }
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "blockHeight": 428,
    "blockTime": null,
    "blockhash": "3Eq21vXNB5s86c62bVuUfTeaMif1N2kUqRPBmGRJhyTA",
    "parentSlot": 429,
    "previousBlockhash": "mfcyqEXB3DnHXki6KjjmZck6YjmZLvpAByy2fj4nh6B",
    "transactions": [
      {
        "meta": {
          "err": null,
          "fee": 5000,
          "innerInstructions": [],
          "logMessages": [],
          "postBalances": [499998932500, 26858640, 1, 1, 1],
          "postTokenBalances": [],
          "preBalances": [499998937500, 26858640, 1, 1, 1],
          "preTokenBalances": [],
          "rewards": null,
          "status": {
            "Ok": null
          }
        },
        "transaction": {
          "message": {
            "accountKeys": [
              "3UVYmECPPMZSCqWKfENfuoTv51fTDTWicX9xmBD2euKe",
              "AjozzgE83A3x1sHNUR64hfH7zaEBWeMaFuAN9kQgujrc",
              "SysvarS1otHashes111111111111111111111111111",
              "SysvarC1ock11111111111111111111111111111111",
              "Vote111111111111111111111111111111111111111"
            ],
            "header": {
              "numReadonlySignedAccounts": 0,
              "numReadonlyUnsignedAccounts": 3,
              "numRequiredSignatures": 1
            },
            "instructions": [
              {
                "accounts": [1, 2, 3, 0],
                "data": "37u9WtQpcm6ULa3WRQHmj49EPs4if7o9f1jSRVZpm2dvihR9C8jY4NqEwXUbLwx15HBSNcP1",
                "programIdIndex": 4
              }
            ],
            "recentBlockhash": "mfcyqEXB3DnHXki6KjjmZck6YjmZLvpAByy2fj4nh6B"
          },
          "signatures": [
            "2nBhEBYYvfaAe16UMNqRHre4YNSskvuYgx3M6E4JP1oDYvZEJHvoPzyUidNgNX5r9sTyN1J9UxtbCXy2rqYcuyuv"
          ]
        }
      }
    ]
  },
  "id": 1
}

getBlockCommitment

Returns commitment for particular block

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
   {
    "jsonrpc": "2.0", "id": 1,
    "method": "getBlockCommitment",
    "params":[5]
  }
'

Response

{
    "jsonrpc": "2.0",
    "result": {
        "commitment": null,
        "totalStake": 367398357558947688
    },
    "id": 1
}

getBlockHeight

Returns the current block height of the node

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
   {
    "jsonrpc":"2.0","id":1,
    "method":"getBlockHeight"
  }
'

Response

{
    "jsonrpc": "2.0",
    "result": 242321906,
    "id": 1
}

getBlockProduction

Returns recent block production information from the current or previous epoch.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
   {"jsonrpc":"2.0","id":1, "method":"getBlockProduction"}
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 9887
    },
    "value": {
      "byIdentity": {
        "85iYT5RuzRTDgjyRa3cP8SYhM2j21fj7NhfJ3peu1DPr": [9888, 9886]
      },
      "range": {
        "firstSlot": 0,
        "lastSlot": 9887
      }
    }
  },
  "id": 1
}

getBlockTime

Returns the estimated production time of a block.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
{
    "jsonrpc":"2.0", "id":1,
    "method": "getBlockTime",
    "params":[5]
  }
'

Response

When a block time is available:

{
  "jsonrpc": "2.0",
  "result": 1574721591,
  "id": 1
}

When a block time is not available:

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32004,
    "message": "Block not available for slot 150"
  },
  "id": 1
}

getBlocks

Returns a list of confirmed blocks between two slots

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
{
    "jsonrpc": "2.0", "id": 1,
    "method": "getBlocks",
    "params": [
      5, 10
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": [5, 6, 7, 8, 9, 10],
  "id": 1
}

getBlocksWithLimit

Returns a list of confirmed blocks starting at the given slot

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
{
    "jsonrpc": "2.0",
    "id":1,
    "method":"getBlocksWithLimit",
    "params":[5, 3]
  }
'

Response

{
    "jsonrpc": "2.0",
    "result": [
        262056807,
        262056808,
        262056809
    ],
    "id": 1
}

getClusterNodes

Returns information about all the nodes participating in the cluster

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc": "2.0", "id": 1,
    "method": "getClusterNodes"
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": [
    {
      "gossip": "10.239.6.48:8001",
      "pubkey": "9QzsJf7LPLj8GkXbYT3LFDKqsj2hHG7TA3xinJHu8epQ",
      "rpc": "10.239.6.48:8899",
      "tpu": "10.239.6.48:8856",
      "version": "1.0.0 c375ce1f"
    }
  ],
  "id": 1
}

getEpochInfo

Returns information about the current epoch

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
   {"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}
'

Response

{
    "jsonrpc": "2.0",
    "result": {
        "absoluteSlot": 262314659,
        "blockHeight": 242323056,
        "epoch": 607,
        "slotIndex": 90659,
        "slotsInEpoch": 432000,
        "transactionCount": 285440987602
    },
    "id": 1
}

getEpochSchedule

Returns the epoch schedule information from this cluster's genesis config

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc":"2.0","id":1,
    "method":"getEpochSchedule"
  }
'

Response

{
    "jsonrpc": "2.0",
    "result": {
        "firstNormalEpoch": 0,
        "firstNormalSlot": 0,
        "leaderScheduleSlotOffset": 432000,
        "slotsPerEpoch": 432000,
        "warmup": false
    },
    "id": 1
}

getFeeForMessage

Get the fee the network will charge for a particular Message

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
  "id":1,
  "jsonrpc":"2.0",
  "method":"getFeeForMessage",
  "params":[
    "AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA",
    {
      "commitment":"processed"
    }
  ]
}
'

Response

{
  "jsonrpc": "2.0",
  "result": { "context": { "slot": 5068 }, "value": 5000 },
  "id": 1
}

getFirstAvailableBlock

Returns the slot of the lowest confirmed block that has not been purged from the ledger

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc":"2.0","id":1,
    "method":"getFirstAvailableBlock"
  }
'

Response

{
    "jsonrpc": "2.0",
    "result": 262028025,
    "id": 1
}

getGenesisHash

Returns the genesis hash

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {"jsonrpc":"2.0","id":1, "method":"getGenesisHash"}
'

Response

{
    "jsonrpc": "2.0",
    "result": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d",
    "id": 1
}

getHealth

Returns the current health of the node. A healthy node is one that is within HEALTH_CHECK_SLOT_DISTANCE slots of the latest cluster confirmed slot.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {"jsonrpc":"2.0","id":1, "method":"getHealth"}
'

Response

Healthy Result:

{ "jsonrpc": "2.0", "result": "ok", "id": 1 }

Unhealthy Result (generic):

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32005,
    "message": "Node is unhealthy",
    "data": {}
  },
  "id": 1
}

Unhealthy Result (if additional information is available)

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32005,
    "message": "Node is behind by 42 slots",
    "data": {
      "numSlotsBehind": 42
    }
  },
  "id": 1
}

getHighestSnapshotSlot

Returns the highest slot information that the node has snapshots for.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {"jsonrpc":"2.0","id":1,"method":"getHighestSnapshotSlot"}
'

Response

{
    "jsonrpc": "2.0",
    "result": {
        "full": 262289426,
        "incremental": 262315455
    },
    "id": 1
}

getIdentity

Returns the identity pubkey for the current node

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {"jsonrpc":"2.0","id":1, "method":"getIdentity"}
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "identity": "2r1F4iWqVcb8M1DbAjQuFpebkQHY9hcVU4WuW2DJBppN"
  },
  "id": 1
}

getInflationGovernor

Returns the current inflation governor

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {"jsonrpc":"2.0","id":1, "method":"getInflationGovernor"}
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "foundation": 0.05,
    "foundationTerm": 7,
    "initial": 0.15,
    "taper": 0.15,
    "terminal": 0.015
  },
  "id": 1
}

getInflationRate

Returns the specific inflation values for the current epoch

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {"jsonrpc":"2.0","id":1, "method":"getInflationRate"}
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "epoch": 100,
    "foundation": 0.001,
    "total": 0.149,
    "validator": 0.148
  },
  "id": 1
}

getInflationReward

Returns the inflation / staking reward for a list of addresses for an epoch

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getInflationReward",
    "params": [
      [
        "6dmNQ5jwLeLk5REvio1JcMshcbvkYMwy26sJ8pbkvStu",
        "BGsqMegLpV6n6Ve146sSX2dTjUMj3M92HnU8BbNRMhF2"
      ],
      {"epoch": 2}
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": [
    {
      "amount": 2500,
      "effectiveSlot": 224,
      "epoch": 2,
      "postBalance": 499999442500
    },
    null
  ],
  "id": 1
}

getLargestAccounts

Returns the 20 largest accounts, by lamport balance (results may be cached up to two hours)

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {"jsonrpc":"2.0","id":1, "method":"getLargestAccounts"}
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 54
    },
    "value": [
      {
        "lamports": 999974,
        "address": "99P8ZgtJYe1buSK8JXkvpLh8xPsCFuLYhz9hQFNw93WJ"
      },
      {
        "lamports": 42,
        "address": "uPwWLo16MVehpyWqsLkK3Ka8nLowWvAHbBChqv2FZeL"
      },
      {
        "lamports": 42,
        "address": "aYJCgU7REfu3XF8b3QhkqgqQvLizx8zxuLBHA25PzDS"
      },
      {
        "lamports": 42,
        "address": "CTvHVtQ4gd4gUcw3bdVgZJJqApXE9nCbbbP4VTS5wE1D"
      },
      {
        "lamports": 20,
        "address": "4fq3xJ6kfrh9RkJQsmVd5gNMvJbuSHfErywvEjNQDPxu"
      },
      {
        "lamports": 4,
        "address": "AXJADheGVp9cruP8WYu46oNkRbeASngN5fPCMVGQqNHa"
      },
      {
        "lamports": 2,
        "address": "8NT8yS6LiwNprgW4yM1jPPow7CwRUotddBVkrkWgYp24"
      },
      {
        "lamports": 1,
        "address": "SysvarEpochSchedu1e111111111111111111111111"
      },
      {
        "lamports": 1,
        "address": "11111111111111111111111111111111"
      },
      {
        "lamports": 1,
        "address": "Stake11111111111111111111111111111111111111"
      },
      {
        "lamports": 1,
        "address": "SysvarC1ock11111111111111111111111111111111"
      },
      {
        "lamports": 1,
        "address": "StakeConfig11111111111111111111111111111111"
      },
      {
        "lamports": 1,
        "address": "SysvarRent111111111111111111111111111111111"
      },
      {
        "lamports": 1,
        "address": "Config1111111111111111111111111111111111111"
      },
      {
        "lamports": 1,
        "address": "SysvarStakeHistory1111111111111111111111111"
      },
      {
        "lamports": 1,
        "address": "SysvarRecentB1ockHashes11111111111111111111"
      },
      {
        "lamports": 1,
        "address": "SysvarFees111111111111111111111111111111111"
      },
      {
        "lamports": 1,
        "address": "Vote111111111111111111111111111111111111111"
      }
    ]
  },
  "id": 1
}

getLatestBlockhash

Returns the latest blockhash

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
{
    "id":1,
    "jsonrpc":"2.0",
    "method":"getLatestBlockhash",
    "params":[
      {
        "commitment":"processed"
      }
    ]
  }
'

Response

{
    "jsonrpc": "2.0",
    "result": {
        "context": {
            "apiVersion": "1.17.31",
            "slot": 262319394
        },
        "value": {
            "blockhash": "DyUj9F9NvkU4qeB72c3UiGnPno8Njt4M9YPWJ9LMjmqX",
            "lastValidBlockHeight": 242327698
        }
    },
    "id": 1
}

getLeaderSchedule

Returns the leader schedule for an epoch

getLatestBlockhash

Returns the latest blockhash

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getLeaderSchedule",
    "params": [
      null,
      {
        "identity": "4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F"
      }
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F": [
      0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
      21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
      39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
      57, 58, 59, 60, 61, 62, 63
    ]
  },
  "id": 1
}

getMaxRetransmitSlot

Get the max slot seen from retransmit stage.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
   {"jsonrpc":"2.0","id":1, "method":"getMaxRetransmitSlot"}
'

Response

{
    "jsonrpc": "2.0",
    "result": 262321651,
    "id": 1
}

getMaxShredInsertSlot

Get the max slot seen from after shred insert.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
    {"jsonrpc":"2.0","id":1, "method":"getMaxShredInsertSlot"}
'

Response

{
    "jsonrpc": "2.0",
    "result": 262321848,
    "id": 1
}

getMinimumBalanceForRentExemption

Returns minimum balance required to make account rent exempt.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
 {
    "jsonrpc": "2.0", "id": 1,
    "method": "getMinimumBalanceForRentExemption",
    "params": [50]
  }
'

Response

{
    "jsonrpc": "2.0",
    "result": 1238880,
    "id": 1
}

getMultipleAccounts

Returns the account information for a list of Pubkeys.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getMultipleAccounts",
    "params": [
      [
        "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
        "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA"
      ],
      {
        "encoding": "base58"
      }
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 1
    },
    "value": [
      {
        "data": ["", "base64"],
        "executable": false,
        "lamports": 1000000000,
        "owner": "11111111111111111111111111111111",
        "rentEpoch": 2,
        "space": 16
      },
      {
        "data": ["", "base64"],
        "executable": false,
        "lamports": 5000000000,
        "owner": "11111111111111111111111111111111",
        "rentEpoch": 2,
        "space": 0
      }
    ]
  },
  "id": 1
}

getProgramAccounts

Returns all accounts owned by the provided program Pubkey

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getProgramAccounts",
    "params": [
      "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
      {
        "filters": [
          {
            "dataSize": 17
          },
          {
            "memcmp": {
              "offset": 4,
              "bytes": "3Mc6vR"
            }
          }
        ]
      }
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": [
    {
      "account": {
        "data": "2R9jLfiAQ9bgdcw6h8s44439",
        "executable": false,
        "lamports": 15298080,
        "owner": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
        "rentEpoch": 28,
        "space": 42
      },
      "pubkey": "CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY"
    }
  ],
  "id": 1
}

getRecentPerformanceSamples

Returns a list of recent performance samples, in reverse slot order. Performance samples are taken every 60 seconds and include the number of transactions and slots that occur in a given time window.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
   {
    "jsonrpc":"2.0", "id":1,
    "method": "getRecentPerformanceSamples",
    "params": [4]
    }
'

Response

{
  "jsonrpc": "2.0",
  "result": [
    {
      "numSlots": 126,
      "numTransactions": 126,
      "numNonVoteTransaction": 1,
      "samplePeriodSecs": 60,
      "slot": 348125
    },
    {
      "numSlots": 126,
      "numTransactions": 126,
      "numNonVoteTransaction": 1,
      "samplePeriodSecs": 60,
      "slot": 347999
    },
    {
      "numSlots": 125,
      "numTransactions": 125,
      "numNonVoteTransaction": 0,
      "samplePeriodSecs": 60,
      "slot": 347873
    },
    {
      "numSlots": 125,
      "numTransactions": 125,
      "numNonVoteTransaction": 0,
      "samplePeriodSecs": 60,
      "slot": 347748
    }
  ],
  "id": 1
}

getRecentPrioritizationFees

Returns a list of prioritization fees from recent blocks.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc":"2.0", "id":1,
    "method": "getRecentPrioritizationFees",
    "params": [
      ["CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY"]
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": [
    {
      "slot": 348125,
      "prioritizationFee": 0
    },
    {
      "slot": 348126,
      "prioritizationFee": 1000
    },
    {
      "slot": 348127,
      "prioritizationFee": 500
    },
    {
      "slot": 348128,
      "prioritizationFee": 0
    },
    {
      "slot": 348129,
      "prioritizationFee": 1234
    }
  ],
  "id": 1
}

getSignatureStatuses

Returns the statuses of a list of signatures. Each signature must be a txid, the first signature of a transaction.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
   {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getSignatureStatuses",
    "params": [
      [
        "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW"
      ],
      {
        "searchTransactionHistory": true
      }
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 82
    },
    "value": [
      {
        "slot": 48,
        "confirmations": null,
        "err": null,
        "status": {
          "Ok": null
        },
        "confirmationStatus": "finalized"
      },
      null
    ]
  },
  "id": 1
}

getSignaturesForAddress

Returns signatures for confirmed transactions that include the given address in their accountKeys list. Returns signatures backwards in time from the provided signature or most recent confirmed block

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getSignaturesForAddress",
    "params": [
      "Vote111111111111111111111111111111111111111",
      {
        "limit": 1
      }
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": [
    {
      "err": null,
      "memo": null,
      "signature": "5h6xBEauJ3PK6SWCZ1PGjBvj8vDdWG3KpwATGy1ARAXFSDwt8GFXM7W5Ncn16wmqokgpiKRLuS83KUxyZyv2sUYv",
      "slot": 114,
      "blockTime": null
    }
  ],
  "id": 1
}

getSlot

Returns the slot that has reached the given or default commitment level

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
    {"jsonrpc":"2.0","id":1, "method":"getSlot"}
'

Response

{
    "jsonrpc": "2.0",
    "result": 262323494,
    "id": 1
}

getSlotLeader

Returns the current slot leader

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {"jsonrpc":"2.0","id":1, "method":"getSlotLeader"}
'

Response

{
    "jsonrpc": "2.0",
    "result": "A4hyMd3FyvUJSRafDUSwtLLaQcxRP4r1BRC9w2AJ1to2",
    "id": 1
}

getSlotLeaders

Returns the slot leaders for a given slot range

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc":"2.0", "id": 1,
    "method": "getSlotLeaders",
    "params": [100, 10]
  }
'

Response

The first leader returned is the leader for slot #100:

{
  "jsonrpc": "2.0",
  "result": [
    "ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n",
    "ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n",
    "ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n",
    "ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n",
    "Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM",
    "Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM",
    "Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM",
    "Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM",
    "DWvDTSh3qfn88UoQTEKRV2JnLt5jtJAVoiCo3ivtMwXP",
    "DWvDTSh3qfn88UoQTEKRV2JnLt5jtJAVoiCo3ivtMwXP"
  ],
  "id": 1
}

getStakeActivation

Returns epoch activation information for a stake account

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getStakeActivation",
    "params": [
      "CYRJWqiSjLitBAcRxPvWpgX3s5TvmN2SuRY3eEYypFvT",
      {
        "epoch": 4
      }
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "active": 124429280,
    "inactive": 73287840,
    "state": "activating"
  },
  "id": 1
}

getSupply

Returns information about the current supply.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
   {"jsonrpc":"2.0", "id":1, "method":"getSupply"}
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 1114
    },
    "value": {
      "circulating": 16000,
      "nonCirculating": 1000000,
      "nonCirculatingAccounts": [
        "FEy8pTbP5fEoqMV1GdTz83byuA8EKByqYat1PKDgVAq5",
        "9huDUZfxoJ7wGMTffUE7vh1xePqef7gyrLJu9NApncqA",
        "3mi1GmwEE3zo2jmfDuzvjSX9ovRXsDUKHvsntpkhuLJ9",
        "BYxEJTDerkaRWBem3XgnVcdhppktBXa2HbkHPKj2Ui4Z"
      ],
      "total": 1016000
    }
  },
  "id": 1
}

getTokenAccountBalance

Returns the token balance of an SPL Token account.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
{
    "jsonrpc": "2.0", "id": 1,
    "method": "getTokenAccountBalance",
    "params": [
      "7fUAJdStEuGbc3sM84cKRL6yYaaSstyLSU4ve5oovLS7"
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 1114
    },
    "value": {
      "amount": "9864",
      "decimals": 2,
      "uiAmount": 98.64,
      "uiAmountString": "98.64"
    },
    "id": 1
  }
}

getTokenAccountsByDelegate

Returns all SPL Token accounts by approved Delegate.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getTokenAccountsByDelegate",
    "params": [
      "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
      {
        "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
      },
      {
        "encoding": "jsonParsed"
      }
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 1114
    },
    "value": [
      {
        "account": {
          "data": {
            "program": "spl-token",
            "parsed": {
              "info": {
                "tokenAmount": {
                  "amount": "1",
                  "decimals": 1,
                  "uiAmount": 0.1,
                  "uiAmountString": "0.1"
                },
                "delegate": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
                "delegatedAmount": {
                  "amount": "1",
                  "decimals": 1,
                  "uiAmount": 0.1,
                  "uiAmountString": "0.1"
                },
                "state": "initialized",
                "isNative": false,
                "mint": "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E",
                "owner": "CnPoSPKXu7wJqxe59Fs72tkBeALovhsCxYeFwPCQH9TD"
              },
              "type": "account"
            },
            "space": 165
          },
          "executable": false,
          "lamports": 1726080,
          "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
          "rentEpoch": 4,
          "space": 165
        },
        "pubkey": "28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp"
      }
    ]
  },
  "id": 1
}

getTokenAccountsByOwner

Returns all SPL Token accounts by token owner.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getTokenAccountsByOwner",
    "params": [
      "4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F",
      {
        "mint": "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E"
      },
      {
        "encoding": "jsonParsed"
      }
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 1114
    },
    "value": [
      {
        "account": {
          "data": {
            "program": "spl-token",
            "parsed": {
              "accountType": "account",
              "info": {
                "tokenAmount": {
                  "amount": "1",
                  "decimals": 1,
                  "uiAmount": 0.1,
                  "uiAmountString": "0.1"
                },
                "delegate": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
                "delegatedAmount": {
                  "amount": "1",
                  "decimals": 1,
                  "uiAmount": 0.1,
                  "uiAmountString": "0.1"
                },
                "state": "initialized",
                "isNative": false,
                "mint": "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E",
                "owner": "4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F"
              },
              "type": "account"
            },
            "space": 165
          },
          "executable": false,
          "lamports": 1726080,
          "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
          "rentEpoch": 4,
          "space": 165
        },
        "pubkey": "C2gJg6tKpQs41PRS1nC8aw3ZKNZK3HQQZGVrDFDup5nx"
      }
    ]
  },
  "id": 1
}

getTokenLargestAccounts

Returns the 20 largest accounts of a particular SPL Token type.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc": "2.0", "id": 1,
    "method": "getTokenLargestAccounts",
    "params": [
      "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E"
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 1114
    },
    "value": [
      {
        "address": "FYjHNoFtSQ5uijKrZFyYAxvEr87hsKXkXcxkcmkBAf4r",
        "amount": "771",
        "decimals": 2,
        "uiAmount": 7.71,
        "uiAmountString": "7.71"
      },
      {
        "address": "BnsywxTcaYeNUtzrPxQUvzAWxfzZe3ZLUJ4wMMuLESnu",
        "amount": "229",
        "decimals": 2,
        "uiAmount": 2.29,
        "uiAmountString": "2.29"
      }
    ]
  },
  "id": 1
}

getTransaction

Returns the 20 largest accounts of a particular SPL Token type.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
 {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getTransaction",
    "params": [
      "2nBhEBYYvfaAe16UMNqRHre4YNSskvuYgx3M6E4JP1oDYvZEJHvoPzyUidNgNX5r9sTyN1J9UxtbCXy2rqYcuyuv",
      "json"
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "meta": {
      "err": null,
      "fee": 5000,
      "innerInstructions": [],
      "postBalances": [499998932500, 26858640, 1, 1, 1],
      "postTokenBalances": [],
      "preBalances": [499998937500, 26858640, 1, 1, 1],
      "preTokenBalances": [],
      "rewards": [],
      "status": {
        "Ok": null
      }
    },
    "slot": 430,
    "transaction": {
      "message": {
        "accountKeys": [
          "3UVYmECPPMZSCqWKfENfuoTv51fTDTWicX9xmBD2euKe",
          "AjozzgE83A3x1sHNUR64hfH7zaEBWeMaFuAN9kQgujrc",
          "SysvarS1otHashes111111111111111111111111111",
          "SysvarC1ock11111111111111111111111111111111",
          "Vote111111111111111111111111111111111111111"
        ],
        "header": {
          "numReadonlySignedAccounts": 0,
          "numReadonlyUnsignedAccounts": 3,
          "numRequiredSignatures": 1
        },
        "instructions": [
          {
            "accounts": [1, 2, 3, 0],
            "data": "37u9WtQpcm6ULa3WRQHmj49EPs4if7o9f1jSRVZpm2dvihR9C8jY4NqEwXUbLwx15HBSNcP1",
            "programIdIndex": 4
          }
        ],
        "recentBlockhash": "mfcyqEXB3DnHXki6KjjmZck6YjmZLvpAByy2fj4nh6B"
      },
      "signatures": [
        "2nBhEBYYvfaAe16UMNqRHre4YNSskvuYgx3M6E4JP1oDYvZEJHvoPzyUidNgNX5r9sTyN1J9UxtbCXy2rqYcuyuv"
      ]
    }
  },
  "blockTime": null,
  "id": 1
}

getTransactionCount

Returns the current Transaction count from the ledger

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}
'

Response

{ "jsonrpc": "2.0", "result": 268, "id": 1 }

getVersion

Returns the current Solana version running on the node

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {"jsonrpc":"2.0","id":1, "method":"getVersion"}
'

Response

{
    "jsonrpc": "2.0",
    "result": {
        "feature-set": 3746964731,
        "solana-core": "1.17.31"
    },
    "id": 1
}

getVoteAccounts

Returns the account info and associated stake for all the voting accounts in the current bank.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getVoteAccounts",
    "params": [
      {
        "votePubkey": "3ZT31jkAGhUaw8jsy4bTknwBMP8i4Eueh52By4zXcsVw"
      }
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "current": [
      {
        "commission": 0,
        "epochVoteAccount": true,
        "epochCredits": [
          [1, 64, 0],
          [2, 192, 64]
        ],
        "nodePubkey": "B97CCUW3AEZFGy6uUg6zUdnNYvnVq5VG8PUtb2HayTDD",
        "lastVote": 147,
        "activatedStake": 42,
        "votePubkey": "3ZT31jkAGhUaw8jsy4bTknwBMP8i4Eueh52By4zXcsVw"
      }
    ],
    "delinquent": []
  },
  "id": 1
}

isBlockhashValid

Returns whether a blockhash is still valid or not

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
 {
    "id":45,
    "jsonrpc":"2.0",
    "method":"isBlockhashValid",
    "params":[
      "J7rBdM6AecPDEZp8aPq5iPSNKVkU5Q76F3oAV4eW5wsW",
      {"commitment":"processed"}
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 2483
    },
    "value": false
  },
  "id": 1
}

minimumLedgerSlot

Returns the lowest slot that the node has information about in its ledger.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
   {"jsonrpc":"2.0","id":1, "method":"minimumLedgerSlot"}
'

Response

{ "jsonrpc": "2.0", "result": 1234, "id": 1 }

requestAirdrop

Requests an airdrop of lamports to a Pubkey

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
 {
    "jsonrpc": "2.0", "id": 1,
    "method": "requestAirdrop",
    "params": [
      "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
      1000000000
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
  "id": 1
}

sendTransaction

Submits a signed transaction to the cluster for processing.

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
 {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sendTransaction",
    "params": [
      "4hXTCkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWWPSAZBZSHptvWRL3BjCvzUXRdKvHL2b7yGrRQcWyaqsaBCncVG7BFggS8w9snUts67BSh3EqKpXLUm5UMHfD7ZBe9GhARjbNQMLJ1QD3Spr6oMTBU6EhdB4RD8CP2xUxr2u3d6fos36PD98XS6oX8TQjLpsMwncs5DAMiD4nNnR8NBfyghGCWvCVifVwvA8B8TJxE1aiyiv2L429BCWfyzAme5sZW8rDb14NeCQHhZbtNqfXhcp2tAnaAT"
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": "2id3YC2jK9G5Wo2phDx4gJVAew8DcY5NAojnVuao8rkxwPYPe8cSwE5GzhEgJA2y8fVjDEo6iR6ykBvDxrTQrtpb",
  "id": 1
}

simulateTransaction

Simulate sending a transaction

Code sample

curl --location 'https://sol.nownodes.io' \
--header 'Content-Type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '
   {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "simulateTransaction",
    "params": [
      "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCp20C7Wj2aiuk5TReAXo+VTVg8QTHjs0UjNMMKCvpzZ+ABAgEBARU=",
      {
        "encoding":"base64",
      }
    ]
  }
'

Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 218
    },
    "value": {
      "err": null,
      "accounts": null,
      "logs": [
        "Program 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri invoke [1]",
        "Program 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri consumed 2366 of 1400000 compute units",
        "Program return: 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri KgAAAAAAAAA=",
        "Program 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri success"
      ],
      "returnData": {
        "data": ["Kg==", "base64"],
        "programId": "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri"
      },
      "unitsConsumed": 2366
    }
  },
  "id": 1
}

Last updated