# LedgerRequest | xrpl
Documentation for xrpl

# Interface LedgerRequest

Retrieve information about the public ledger. Expects a response in the form of a LedgerResponse.

#### Example

    const ledger: LedgerRequest = {
     "id": 14,
     "command": "ledger",
     "ledger_index": "validated",
     "full": false,
     "accounts": false,
     "transactions": false,
     "expand": false,
     "owner_funds": false
    }

#### Hierarchy

- BaseRequest
- LookupByLedgerRequest
  - LedgerRequest

- Defined in packages/xrpl/src/models/methods/ledger.ts:28

#####
Index

### Properties

accounts?
api_version?
binary?
command
expand?
full?
id?
ledger_hash?
ledger_index?
owner_funds?
queue?
transactions?
type?

## Properties

### `Optional` accounts

accounts?: boolean

Admin required. If true, return information on accounts in the ledger. Ignored if you did not specify a ledger version. Defaults to false.

- Defined in packages/xrpl/src/models/methods/ledger.ts:39

### `Optional` api_version

api_version?: number

The API version to use. If omitted, use version 1.

Inherited from BaseRequest.api_version

- Defined in packages/xrpl/src/models/methods/baseMethod.ts:16

### `Optional` binary

binary?: boolean

If true, and transactions and expand are both also true, return transaction information in binary format (hexadecimal string) instead of JSON format.

- Defined in packages/xrpl/src/models/methods/ledger.ts:63

### command

command: "ledger"

The name of the API method.

Overrides BaseRequest.command

- Defined in packages/xrpl/src/models/methods/ledger.ts:29

### `Optional` expand

expand?: boolean

Provide full JSON-formatted information for transaction/account information instead of only hashes. Defaults to false. Ignored unless you request transactions, accounts, or both.

- Defined in packages/xrpl/src/models/methods/ledger.ts:51

### `Optional` full

full?: boolean

Admin required If true, return full information on the entire ledger. Ignored if you did not specify a ledger version. Defaults to false.

- Defined in packages/xrpl/src/models/methods/ledger.ts:34

### `Optional` id

id?: string | number

A unique value to identify this request. The response to this request uses the same id field. This way, even if responses arrive out of order, you know which request prompted which response.

Inherited from BaseRequest.id

- Defined in packages/xrpl/src/models/methods/baseMethod.ts:12

### `Optional` ledger_hash

ledger_hash?: string

A 20-byte hex string for the ledger version to use.

Inherited from LookupByLedgerRequest.ledger_hash

- Defined in packages/xrpl/src/models/methods/baseMethod.ts:21

### `Optional` ledger_index

ledger_index?: LedgerIndex

The ledger index of the ledger to use, or a shortcut string.

Inherited from LookupByLedgerRequest.ledger_index

- Defined in packages/xrpl/src/models/methods/baseMethod.ts:23

### `Optional` owner_funds

owner_funds?: boolean

If true, include owner_funds field in the metadata of OfferCreate transactions in the response. Defaults to false. Ignored unless transactions are included and expand is true.

- Defined in packages/xrpl/src/models/methods/ledger.ts:57

### `Optional` queue

queue?: boolean

If true, and the command is requesting the current ledger, includes an array of queued transactions in the results.

- Defined in packages/xrpl/src/models/methods/ledger.ts:68

### `Optional` transactions

transactions?: boolean

If true, return information on transactions in the specified ledger version. Defaults to false. Ignored if you did not specify a ledger version.

- Defined in packages/xrpl/src/models/methods/ledger.ts:45

### `Optional` type

type?: LedgerEntryFilter

If included, filter results to include only this type of ledger object.

- Defined in packages/xrpl/src/models/methods/ledger.ts:72

Generated using TypeDoc