<p>You're right, the reverse parameter was added recently and the example in API docs were not updated.</p>

<p><a href="https://bcoin.io/api-docs/#get-tx-by-address" rel="nofollow noreferrer">https://bcoin.io/api-docs/#get-tx-by-address</a></p>

<p>The method now accepts a second parameter which is an "options" object. The line in the example should look like this now:</p>

<pre><code>const result = await client.getTXByAddress(address, {reverse: true});
</code></pre>

<p>If you want to ask more specific bcoin questions you can find the developers on IRC #bcoin or on slack: <a href="https://bcoin.io/slack-signup.html" rel="nofollow noreferrer">https://bcoin.io/slack-signup.html</a></p>

<p>EDIT: Actually after a second look at the client code, the new options may not be available in the JS method. So thanks for asking! I'll open a PR for this ;-)</p>

CC BY-SA 4.0
2020-04-27T03:48:22.807Z
Thanks! I ve already solved the problem the cURL way :-)
Mario Mazzola
CC BY-SA 4.0
2020-04-26T21:53:35.930Z
2020-04-26T22:21:58.580Z
2020-04-26T22:21:58.580Z
pinhead
<p>I am using bcoin for a project. </p>

<p>I would like to retrive TXs in reverse order.</p>

<p>In the documentation I read that I can do that through the "reverse" query string parameter. </p>

<p>Anyway, the documentation doesnt provide any example of how I can pass this paramenter to the javascript API in the getTXByAddress(address) method.</p>

<p>If that's not an option, also the cURL way is fine.</p>

<p>Any suggestions?</p>

<p>Thanks a lot</p>

<bcoin>
bcoin.io: Get TXs in reverse order
Mario Mazzola
# bcoin.io: Get TXs in reverse order

(Asked by: username_0 on 2020-04-26)

I am using bcoin for a project.

I would like to retrive TXs in reverse order.

In the documentation I read that I can do that through the "reverse" query string parameter.

Anyway, the documentation doesnt provide any example of how I can pass this paramenter to the javascript API in the getTXByAddress(address) method.

If that's not an option, also the cURL way is fine.

Any suggestions?

Thanks a lot

**Tags:** bcoin


---

## 1 answers

### Answer by username_1 on 2020-04-26. Score: 2 | Accepted answer

You're right, the reverse parameter was added recently and the example in API docs were not updated.

<https://bcoin.io/api-docs/#get-tx-by-address>

The method now accepts a second parameter which is an "options" object. The line in the example should look like this now:

```
const result = await client.getTXByAddress(address, {reverse: true});

```

If you want to ask more specific bcoin questions you can find the developers on IRC #bcoin or on slack: <https://bcoin.io/slack-signup.html>

EDIT: Actually after a second look at the client code, the new options may not be available in the JS method. So thanks for asking! I'll open a PR for this ;-)

> **Comments:**
> **username_0**: Thanks! I ve already solved the problem the cURL way :-)  

---

