Does anyone know why Cosmos Network keeps changing how their endpoints work?
I have been working on a portfolio/wallet tracking application, I have changed the Cosmos implementation multiple times over the past 2 years, but this time I’ve noticed that REST API documentation has also been updated and it is impossible to find whatever I am looking for. I am using GET /tx/v1beta1/txs
endpoint to list transactions for recipient or sender addresses using the event parameter as following events=transfer.recipient={cosmos_address}
or events=transfer.sender={cosmos_address}
.
After the changes with v0.50, I noticed that it no longer works how I set up my requests, and events
parameter has been deprecated since v0.47 - however, events are required to be set through query
parameter, which doesn’t contain any example in the documentation (as I couldn’t find past 2 days).
After trying to figure out how query
parameter works and accepts a list of events
, I have managed to get the following error using the following request:
Query
/cosmos/tx/v1beta1/txs
?limit=50
&orderBy=ORDER_BY_ASC
&query=events=transfer.recipient={cosmos_address}
Request
{
"code": 13,
"message": "failed to search for txs: offset 7: got tag, wanted number, timestamp, datestamp or string",
"details": [ ]
}
I don’t understand why it asks for any timestamp or date when the parameters required for the endpoint I am using doesn’t even have a timestamp/date field.
How can I properly setup my request to fetch transactions for a given cosmos wallet? Will the endpoints continue changing? Should I not rely on the cosmos.network and use a third-party blockchain service to fetch transactions?
I’d appreciate any help or suggestions. Thanks in advance.