XRP Ledger

XRP Ledger (XRPL) is a decentralized, open-source blockchain launched in 2012. Unlike Bitcoin or Ethereum, XRPL uses a unique Federated Consensus mechanism that enables fast, low-cost transactions without mining. The network processes over 1,500 transactions per second with settlement times of 3-5 seconds, making it ideal for payments, tokenization, and DeFi applications.

Key Features

  • Federated Consensus Protocol: Unique consensus mechanism using trusted validators (Unique Node Lists) instead of Proof of Work or Proof of Stake
  • Fast Settlement: Transactions finalize in 3-5 seconds
  • High Throughput: Supports 1,500+ transactions per second
  • Low Transaction Fees: Fees are typically less than $0.01 per transaction
  • Native DEX: Built-in decentralized exchange for trading any issued tokens
  • Energy Efficient: Minimal energy consumption compared to PoW blockchains
  • XRP Native Token: Used for transaction fees, bridging currencies, and as a store of value
  • Token Issuance: Native support for issuing custom tokens and stablecoins
  • NFT Support: XLS-20 standard for minting, trading, and burning NFTs
  • No Smart Contracts by Default: Purpose-built for payments; EVM sidechain available for smart contract functionality

TECHNICAL DISCLAIMER
The canonical specification for XRP Ledger API methods is maintained in the official XRPL documentation at xrpl.org.

Network Configuration

PropertyValue
Network NameXRP Ledger
Native TokenXRP
Decimals6 (1 XRP = 1,000,000 drops)
Ledger Close Time~3-5 seconds
Account Reserve10 XRP base reserve
Block Explorerhttps://xrpscan.com

Base URL

https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

Supported Networks

NetworkChain IDJSON-RPCWSS
Mainnet1600✅✅

Quickstart

In this section, you will learn how to make your first call with either:

  • Axios (JavaScript/Node.js)
  • Python (Requests library)

Before you begin, you must have already installed npm or yarn on your local machine (for the Axios example) or Python and pip (for the Python example).

Refer to:

  1. Setup project

    Create and initialize a new project:

    bashmkdir xrpl-api-quickstart
    cd xrpl-api-quickstart
    npm init --yes
  2. Install Axios

    bashnpm install axios
  3. Create file

    Create a new file named index.js. This is where you will make your first call.

  4. Set ES module type

    Set the ES module "type": "module" in your package.json.

  5. Add code

    Add the following code to index.js:

    index.js

    javascriptimport axios from 'axios';
    
    const data = JSON.stringify({
        "jsonrpc": "2.0",
        "method": "server_info",
        "params": [{}],
        "id": "getblock.io"
    });
    
    const config = {
        method: 'post',
        url: 'https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>',
        headers: {
            'Content-Type': 'application/json'
        },
        data: data
    };
    
    axios(config)
        .then(response => console.log(JSON.stringify(response.data, null, 2)))
        .catch(error => console.log(error));

    Replace <ACCESS-TOKEN> with your actual access token from GetBlock.

  6. Run the script

    bashnode index.js

    Expected output (example):

    json{
        "result": {
            "info": {
                "build_version": "3.1.0",
                "complete_ledgers": "100807399-101925334",
                "hostid": "OVA",
                "initial_sync_duration_us": "714094236",
                "io_latency_ms": 1,
                "jq_trans_overflow": "0",
                "last_close": {
                    "converge_time_s": 3.002,
                    "proposers": 34
                },
                "load_factor": 1,
                "network_id": 0,
                "peer_disconnects": "5975",
                "peer_disconnects_resources": "0",
                "peers": 131,
                "ports": [
                    {
                        "port": "5005",
                        "protocol": [
                            "http"
                        ]
                    },
                    {
                        "port": "80",
                        "protocol": [
                            "ws"
                        ]
                    },
                    {
                        "port": "2459",
                        "protocol": [
                            "peer"
                        ]
                    },
                    {
                        "port": "50051",
                        "protocol": [
                            "grpc"
                        ]
                    }
                ],
                "pubkey_node": "n9437mTpq2oNhbBqDPpibuPz11yaTAS76iQNqVTXHF13qDgXgcPB",
                "server_state": "full",
                "server_state_duration_us": "166954693311",
                "state_accounting": {
                    "connected": {
                        "duration_us": "708821254",
                        "transitions": "2"
                    },
                    "disconnected": {
                        "duration_us": "1087525",
                        "transitions": "2"
                    },
                    "full": {
                        "duration_us": "166954693311",
                        "transitions": "1"
                    },
                    "syncing": {
                        "duration_us": "4185421",
                        "transitions": "1"
                    },
                    "tracking": {
                        "duration_us": "33",
                        "transitions": "1"
                    }
                },
                "time": "2026-Jan-31 05:36:36.646370 UTC",
                "uptime": 167668,
                "validated_ledger": {
                    "age": 4,
                    "base_fee_xrp": 1e-05,
                    "hash": "2AAEF99EFEDD15D293F8A1023AA873F2D7675FD6A55F5C19BC07C192EEC946B4",
                    "reserve_base_xrp": 1,
                    "reserve_inc_xrp": 0.2,
                    "seq": 101925334
                },
                "validation_quorum": 28
            },
            "status": "success"
        }
    }
  1. Setup the project directory

    bashmkdir xrpl-api-quickstart
    cd xrpl-api-quickstart
  2. Create and activate a virtual environment

    bashpython -m venv venv
    source venv/bin/activate
    
    # On Windows, use venv\Scripts\activate
  3. Install requests

    bashpip install requests
  4. Create script

    Create a file called main.py with the following content:

    main.py

    pythonimport requests
    import json
    
    url = "https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>"
    
    payload = json.dumps({
      "jsonrpc": "2.0",
      "method": "server_info",
      "params": [
        {}
      ],
      "id": "getblock.io"
    })
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json'
    }
    
    response = requests.request("POST", url, headers=headers, data=payload)
    
    print(response.text)
    

    Replace <ACCESS-TOKEN> with your actual access token from GetBlock.

  5. Run the script

    bashpython main.py

Supported Methods

Account Methods

MethodDescription
account_infoGet account information and XRP balance
account_channelsGet payment channels where account is source
account_currenciesGet currencies an account can send/receive
account_linesGet trust lines for an account
account_objectsGet raw ledger objects owned by account
account_offersGet outstanding offers by account
account_txGet transactions for an account

Ledger Methods

MethodDescription
ledgerGet ledger information
ledger_closedGet most recently closed ledger
ledger_currentGet current working ledger
ledger_dataGet contents of specified ledger
ledger_entryGet specific ledger entry

Transaction Methods

MethodDescription
txGet transaction by hash
submitSubmit a signed transaction
submit_multisignedSubmit a multi-signed transaction
transaction_entryGet transaction from specific ledger
tx_historyGet recent transactions (deprecated)

Path & Order Book Methods

MethodDescription
book_offersGet offers to exchange currencies
deposit_authorizedCheck if deposit is authorized
path_findFind payment paths
ripple_path_findFind ripple payment paths

Payment Channel Methods

MethodDescription
channel_authorizeAuthorize payment channel claim
channel_verifyVerify payment channel claim signature

Subscription Methods

MethodDescription
subscribeSubscribe to events
unsubscribeUnsubscribe from events

Server Methods

MethodDescription
feeGet current transaction fee
server_infoGet server information
server_stateGet server state
manifestGet validator manifest
pingPing the server
randomGenerate random number

Utility Methods

MethodDescription
jsonProxy for other commands

Signing Methods (Admin)

MethodDescription
signSign a transaction
sign_forSign for multi-signature

Special Methods

MethodDescription
gateway_balancesGet gateway balances
noripple_checkCheck NoRipple flag status

Support

For technical support and questions:

See Also