# About \< getTrades \> api

**URL:** <https://talk.jelurida.com/t/about-gettrades-api/617>\
**Category:** Developers\
**Created:** [3 December 2021 13:12 UTC](https://talk.jelurida.com/t/about-gettrades-api/617 "2021-12-03T13:12:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![reba](https://talk.jelurida.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@reba](https://talk.jelurida.com/u/reba)\
**Post date:** [3 December 2021 13:12 UTC](https://talk.jelurida.com/t/about-gettrades-api/617/1 "2021-12-03T13:12:35Z")

</div>

![a3](https://talk.jelurida.com/uploads/default/original/1X/3ecb821e57e7d66ebb10c99c478e866e54452d67.png)

If i use `getTrades` api and returned jsons are too long , are they trim the result or send back all of the result?

---

<div class="post-metadata">

**Author:** ![MrV](https://talk.jelurida.com/letter_avatar_proxy/v4/letter/m/848f3c/32.png) [@MrV](https://talk.jelurida.com/u/MrV)\
**Post date:** [6 December 2021 15:00 UTC](https://talk.jelurida.com/t/about-gettrades-api/617/2 "2021-12-06T15:00:24Z")

</div>

It limits to 100 items returned. If you want more then you need a loop with adjusting **firstIndex** and **lastIndex** or provide the **adminPassword** to that node

---

<div class="post-metadata">

**Author:** ![reba](https://talk.jelurida.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@reba](https://talk.jelurida.com/u/reba)\
**Post date:** [7 December 2021 02:26 UTC](https://talk.jelurida.com/t/about-gettrades-api/617/3 "2021-12-07T02:26:21Z")

</div>

How can i use it? ( I know there is option to use index , but i don't know details )  
And when i use localhost, also need adminPassword?

---

<div class="post-metadata">

**Author:** ![MrV](https://talk.jelurida.com/letter_avatar_proxy/v4/letter/m/848f3c/32.png) [@MrV](https://talk.jelurida.com/u/MrV)\
**Post date:** [7 December 2021 02:30 UTC](https://talk.jelurida.com/t/about-gettrades-api/617/4 "2021-12-07T02:30:51Z")

</div>

I don't think localhost needs the adminPassword, but am not 100% sure.  
The default api call would have the parameters:

```auto
firstIndex: 0
lastIndex: 99

```

So if you wanted the next 100, you would do the API call with

```auto
firstIndex: 100
lastIndex: 199

```

and etc to get the rest

---

<div class="post-metadata">

**Author:** ![sergi](https://talk.jelurida.com/user_avatar/talk.jelurida.com/sergi/32/21_2.png) [@sergi](https://talk.jelurida.com/u/sergi)\
**Post date:** [13 December 2021 08:07 UTC](https://talk.jelurida.com/t/about-gettrades-api/617/5 "2021-12-13T08:07:18Z")

</div>

Actually you only need the `firstIndex` parameter, then you will get up to 100 records from that index. If you got 100 then you can repeat the call with the `firstIndex` increased with 100 to fetch the next records. Repeat until you get less than 100 records.

---

<div class="post-metadata">

**Author:** ![reba](https://talk.jelurida.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@reba](https://talk.jelurida.com/u/reba)\
**Post date:** [13 December 2021 20:30 UTC](https://talk.jelurida.com/t/about-gettrades-api/617/6 "2021-12-13T20:30:19Z")

</div>

When I set nxt.properties file to `nxt.maxAPIRecords=1000` , it can receive 1000 records on there node?

---

<div class="post-metadata">

**Author:** ![sergi](https://talk.jelurida.com/user_avatar/talk.jelurida.com/sergi/32/21_2.png) [@sergi](https://talk.jelurida.com/u/sergi)\
**Post date:** [14 December 2021 06:40 UTC](https://talk.jelurida.com/t/about-gettrades-api/617/7 "2021-12-14T06:40:25Z")

</div>

Yes, that setting controls the maximum (default if not specified) number of records returned on a single request.
