Jump to content
Sign in to follow this  
NetScr1be

Transaction Query: Filter by destination tag fails (not implemented?)

Recommended Posts

Or, I'm doing it wrong.

 

The documentation says

Quote

Get Account Payments

Retrieve a payments for a specified account

Request Format

REST

GET /v2/accounts/{address}/payments

This method requires the following URL parameters:

  • Field  |  Value  |  Description
    • address  |  String  |  XRP Ledger address to query.

Optionally, you can provide the following query parameters:

  • Field  |  Value  |  Description
    • start  |  String - Timestamp  |  Filter results to this time and later.
    • end  |  String - Timestamp  |  Filter results to this time and earlier.
    • type  |  String  |  Type of payment - sent or received.
    • currency  |  String - Currency Code  |  Filter results to specified currency.
    • issuer  |  String - Address  |  Filter results to specified issuer.
    • source_tag  |  Integer  |  Filter results to specified source tag.
    • destination_tag  |  Integer  |  Filter results to specified destination tag.
    • limit  |  Integer  |  Maximum results per page. The default is 200. Cannot be more than 1,000.
    • marker  |  String  |  Pagination key from previously returned response.
    • format  |  String  |  Format of returned results: csv or json. The default is json.

Response Format

A successful response uses the HTTP code 200 OK and has a JSON body with the following:

  • Field  |  Value  |  Description
    • result  |  String  |  The value success indicates that this is a successful response.
    • count  |  Integer  |  The number of objects contained in the payments field.
    • marker  |  String  |  May be omitted) Pagination marker.
    • payments  |  Array of payment objects  |  All payments matching the request, sorted with oldest first

 

So, while it doesn't (seem to) return the destination tags, it is implied that we can filter by destination tag.

Querying an address without a filter is successful. I know the address has destination tags of the value I want to filter because they be seen using 'GET /v2/accounts/{address}/transactions'.

Specifying the destination_tag=<integer> 'succeeds' with;

Quote

{"result":"success","count":0,"payments":[]}

Has anyone tried this and/or got it to work?

Share this post


Link to post
Share on other sites
Posted (edited)

@NetScr1be

Maybe I misunderstood your issue, but this works for me:

https://data.ripple.com/v2/accounts/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B/payments?destination_tag=98501806

Just a quick lookup of Jeds sales / how much he cashed out recently at Bitstamp.

The documentation also states the following:

Quote

Payment Objects

In the Data API, a Payment Object represents an event where one account sent value to another account. This mostly lines up with XRP Ledger transactions of the Payment transaction type, except that the Data API does not consider a transaction to be a payment if the sending Account and the Destination account are the same, or if the transaction failed.

Maybe your source and destination address are the same and therefore the api does not display the payments?

Edited by DavyJones
Added info about payment objects

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...