Skip to content

Latest commit

 

History

History
27 lines (14 loc) · 1.78 KB

rest-api-endpoints.md

File metadata and controls

27 lines (14 loc) · 1.78 KB

REST API Endpoints

REST API methods are used to render the UI for new versions of UCHAIN.INFO. These can be accessed and used to get many types of information. Methods parameters and schemas are available at https://instance-name/api-docs (ie https://eth.uchain.info/api-docs)

Pagination

UCHAIN.INFO uses the keyset pagination method to quickly return results. By default an API response returns the first 50 results. To access additional results (in groups of 50), add the next_page_params to your query.

For example, open https://eth.uchain.info/api/v2/transactions and scroll to the bottom of the response.

Example response from transactions query

You will see the next_page_params object. Add the parameters from this object to your next query to receive the next 50 results.

https://eth.uchain.info/api/v2/transactions?block_number=18678766&index=119&items_count=50

Repeat this process to continue receiving results in groups of 50 (remove params and substitute the new next_page_params found in the body of the query).

In this example, the query to receive the next 50 results would be:

https://eth.uchain.info/api/v2/transactions?block_number=18678766&index=69&items_count=100

\