Examples
Here are some examples of how to use high-rate XRPL APIs available on the Dhali marketplace. You can access these powerful XRP APIs with simple nano-payments, providing a seamless pay-as-you-go experience.
Using APIs that earn XRP
These examples have configured their earning currency to be XRP. We can create a new XRP-based API key using Dhali's pay terminal:
-
To access the XRPL Cluster API:
PAYMENT_CLAIM=<USE THE PAYMENT TERMINAL> ENDPOINT='https://run.api.dhali.io/199fd80b-1776-4708-b1a1-4b2bb386435d/' curl -H "Payment-Claim: $PAYMENT_CLAIM" \ -vv -X POST -d '{"method":"account_info","params":[{"account":"rL6rwNe6puyoN5X1BUy8pEQb6Un23m2f1m"}]}' \ $ENDPOINT
-
To access the XRPL Services API:
PAYMENT_CLAIM=<USE THE PAYMENT TERMINAL> ENDPOINT='https://run.api.dhali.io/d72283974-3929-4ed9-81f2-c837fd1e6cc5/xls20-nfts/all/issuers' curl -H "Payment-Claim: $PAYMENT_CLAIM" $ENDPOINT
- To access Bithomp's API :
PAYMENT_CLAIM=<USE THE PAYMENT TERMINAL> ENDPOINT='https://run.api.dhali.io/d995db530-7e57-46d1-ac8a-76324794e0c9/nft-count/xpunks?list=owners' curl -H "Payment-Claim: $PAYMENT_CLAIM" $ENDPOINT
- To access XRPScan's API :
PAYMENT_CLAIM=<USE THE PAYMENT TERMINAL> ENDPOINT='https://run.api.dhali.io/ee519808-97b7-4288-abb8-17d4a8513ea5/ledger/93957385' curl -H "Payment-Claim: $PAYMENT_CLAIM" $ENDPOINT
- To access threexrp.dev's API :
PAYMENT_CLAIM=<USE THE PAYMENT TERMINAL> ENDPOINT='https://run.api.dhali.io/d74e99cb-166d-416b-b171-4d313e0f079d/' curl -H "Payment-Claim: $PAYMENT_CLAIM" $ENDPOINT
- To access INFTF XRPL Data API :
PAYMENT_CLAIM=<USE THE PAYMENT TERMINAL> ENDPOINT='https://run.api.dhali.io/f849abda-0e6b-4a56-ab76-41aa4267e495/' curl -H "Payment-Claim: $PAYMENT_CLAIM" $ENDPOINT
Customize the Payment Terminal
The payment terminal can be customized with parameters. This allows you to:
- Provide users with clear instructions tailored to your API.
- Control which payment networks (e.g., XRPL, Xahau, etc) users can use for payments based on your Dhali APIs (UUIDs).
Usage Examples
Description | URL | Behavior |
---|---|---|
Basic Usage | https://pay.dhali.io |
- Defaults to XRPL.MAINNET .- Shows default instructions for XRPL.MAINNET . |
Specify UUIDs | https://pay.dhali.io?uuids=uuid1,uuid2 |
- Displays payment networks for APIs uuid1 and uuid2 .- Shows custom instructions for each payment option, using a the API's base endpoint URL. |