Retrieve a Ledger's Payments

This endpoint returns all payment-related operations in a specific ledger. Operation types that can be returned by this endpoint include: create_account, payment, path_payment, and account_merge.

This method will use 20 Compute Units.


Reference: Here

Retrieve a Ledger's Payments

get

This endpoint returns all payment-related operations in a specific ledger. Operation types that can be returned by this endpoint include: create_account, payment, path_payment, and account_merge.

Path parameters
sequenceintegerRequired

The sequence number of a specific ledger.

Example: 0
Query parameters
cursorintegerOptional

A number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.

Example: 6606617478959105
orderstring · enumOptional

A designation of the order in which records should appear. Options include asc (ascending) or desc (descending). If this argument isn’t set, it defaults to asc.

Possible values:
limitintegerOptional

The maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10.

Example: 10
include_failedboolean · enumOptional

Set to true to include failed operations in results. Options include true and false.

Possible values:
joinanyOptional

Set to transactions to include the transactions which created each of the operations in the response.

Responses
200
Success
application/json
Responseall of
get
GET /v1/<YOUR_API_KEY_HERE>/ledgers/{sequence}/payments HTTP/1.1
Host: mainnet.stellar.validationcloud.io
Accept: */*
200

Success

{
  "_links": {
    "self": {
      "href": "https://horizon-testnet.stellar.org/ledgers/27521176/payments?cursor=&limit=1&order=asc"
    },
    "next": {
      "href": "https://horizon-testnet.stellar.org/ledgers/27521176/payments?cursor=118202550867476481&limit=1&order=asc"
    },
    "prev": {
      "href": "https://horizon-testnet.stellar.org/ledgers/27521176/payments?cursor=118202550867476481&limit=1&order=desc"
    }
  },
  "_embedded": {
    "records": [
      {
        "_links": {
          "self": {
            "href": "https://horizon-testnet.stellar.org/operations/118202550867476481"
          },
          "transaction": {
            "href": "https://horizon-testnet.stellar.org/transactions/971454b84a82baa38afa975e9eb4ff2632821b5a3e7f7993a7e20bbd9d7633ea"
          },
          "effects": {
            "href": "https://horizon-testnet.stellar.org/operations/118202550867476481/effects"
          },
          "succeeds": {
            "href": "https://horizon-testnet.stellar.org/effects?order=desc&cursor=118202550867476481"
          },
          "precedes": {
            "href": "https://horizon-testnet.stellar.org/effects?order=asc&cursor=118202550867476481"
          }
        },
        "id": "118202550867476481",
        "paging_token": "118202550867476481",
        "transaction_successful": true,
        "source_account": "GDQWI6FKB72DPOJE4CGYCFQZKRPQQIOYXRMZ5KEVGXMG6UUTGJMBCASH",
        "type": "payment",
        "type_i": 1,
        "created_at": "2019-12-30T22:35:49Z",
        "transaction_hash": "971454b84a82baa38afa975e9eb4ff2632821b5a3e7f7993a7e20bbd9d7633ea",
        "asset_type": "credit_alphanum4",
        "asset_code": "NODL",
        "asset_issuer": "GB2Y3AWXVROM2BHFQKQPTWKIOI3TZEBBD3LTKTVQTKEPXGOBE742NODL",
        "from": "GDQWI6FKB72DPOJE4CGYCFQZKRPQQIOYXRMZ5KEVGXMG6UUTGJMBCASH",
        "to": "GDGJS7AXAUFDZARIRDVZ5V7CFW6XY47WSBE2OVLCCGCDWOE7INKYN3PS",
        "amount": "0.0000017"
      }
    ]
  }
}

Last updated

Was this helpful?