Skip to main content

account_offers RPC Method

Retrieves the list of open offers (also known as orders) placed by an XRP Ledger account

Updated on
Oct 4, 2023

account_offers RPC Method

Parameters

account
string
REQUIRED
The XRP Ledger account for which the offers are to be retrieved
ledger_index
string
The ledger index of the ledger to use
ledger_hash
string
A 20-byte hex string for identifying the ledger version
limit
integer
Limit the number of offers to retrieve
marker
string
The value from a previous paginated response
strict
boolean
If set to true, only a public key or XRP Ledger address is accepted in the account field. Using a secret or passphrase is not recommended. Default is false

Returns

result
object
The method returns a JSON object with the following properties:
account
string
The XRP Ledger account
limit
integer
The maximum number of offers to return
ledger_hash
string
The hash of the ledger containing the offers
ledger_index
integer
The index of the ledger containing the offers
ledger_current_index
integer
(Omitted if ledger_hash or ledger_index provided) The ledger index of the current in-progress ledger version, which was used when retrieving this data
offers
array
A list of open offers placed by the account
flags
integer
The flags associated with the offer
quality
string
The exchange rate i.e the ratio of the original 'taker_pays' divided by the original 'taker_gets'
seq
integer
The sequence number of the transaction that created the entry
taker_gets
string
The amount the account accepting the offer receives
taker_pays
string
The amount the account accepting the offer provides
validated
boolean
A boolean flag indicating if the information is from a validated ledger
status
string
The status of the request
marker
The value from the paginated response
warnings
array
A list of warnings
id
integer
The warning ID
message
string
The warning message
Request
1
curl https://docs-demo.xrp-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{
5
"method": "account_offers",
6
"params": [{
7
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
8
}],"id":1,"jsonrpc":"2.0"}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free