Getting A List Of Transactions
Basic Description
This endpoint is used to retrieve a list of Transactions in Taurus-PROTECT.
To understand what is a Transaction please refer to the following page in the Taurus User Guides.
This endpoint would accept a GET request with no required parameters. By default, the request will return all transactions with a default limit of 100. However, it also provides the flexibility to filter transactions based on various parameters, including currency, date, transaction ID, and more. Furthermore, the resulting list can be sorted according to specific criteria.
Prerequisites
Required Roles
Certain API endpoints require that the user has a specific role in order to access them. Roles are used to restrict access to certain functionality within the system and ensure that only authorized users are able to perform specific actions.
Here is the list of required Roles for this particular endpoint:
- TPUser
To find out more about roles, please refer to the following page in the Taurus User Guides.
Required Input Parameters
There are no Required Input Parameters for this endpoint.
Preconditions
It is important to note that if there are no transactions currently within Taurus-PROTECT, the request will return an empty list. Similarly, if the filters added do not match any transactions, the request will return an empty list.
Call Example
You can find a basic example in cURL below.
Please note that you will need to update the BASEURL
and the APITOKEN
for the command to function.
export BASEURL=https://taurus-protect-instance.com
export APIToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiZXh0ZXJuYWxVc2VySUQiOiJ0ZWFtMUV4dGVybmFsVXNlcklEIiwidGVuYW50SUQiOjEsImNhcGl0YWxUZW5hbnRJRCI6MSwiZmlyc3RuYW1lIjoiSm9obiIsImxhc3RuYW1lIjoiRG9lIiwicm9sZXMiOlsidHB1c2VyIl0sImVtYWlsIjoidGVhbTFAYmFuay5jb20iLCJ1c2VybmFtZSI6InRlYW0xIiwiand0X3JlbmV3YWJsZV9hbW91bnQiOjAsImlzX3RvdHBfZW5hYmxlZCI6ZmFsc2UsImF1dGhfc3RhdHVzIjoiU1VDQ0VTUyIsImxhc3RfbG9naW4iOiIyMDIzLTAxLTAxVDAwOjAwOjAwLjE0OTc0NDIzMloiLCJsb2dnZWRfaW5fd2l0aF9zc28iOmZhbHNlLCJrZXkiOiIiLCJleHAiOjE2ODEyMTkyNzYsImlhdCI6MTY4MTIxNzQ3Nn0.K_85arIrigpkN1yHttCydpeT6oVg2c6PyQnuji907Og
curl --location "$BASEURL/api/rest/v1/transactions" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "Authorization: Bearer $APIToken"
This piece of code submits a GET request to https://your-protect-instance.example.com/api/rest/v1/transactions with no parameters.
Call Result
A successful response for the GET call to get the list of transactions might look like this:
{
"result": [
{
"id": "6323495",
"direction": "outgoing",
"currency": "DOT",
"sources": [
{
"address": "13pY7GKXL569NoeN5UtKp9HD1aYUeDojGRwgkBa6j3MYhEJo",
"label": "testgb",
"amount": "10000000000",
"amountMainUnit": "1",
"type": "source",
"internalAddressId": "404569"
}
],
"destinations": [
{
"amount": "10000000000",
"amountMainUnit": "1",
"type": "destination"
}
],
"amount": "10000000000",
"amountMainUnit": "1",
"fee": "133603683",
"feeMainUnit": "0.0133603683",
"hash": "0x7b4d6aab2e69a78a105dda1147a2099f0413440db15b352c59117d3850c42575",
"block": "15443896",
"receptionDate": "2023-05-09T08:32:36Z",
"confirmationDate": "2023-05-09T08:34:03.431548Z",
"uniqueId": "cd42790821f70e9603dd89aa183d943376bfbd236225bda56f519f788d23db36",
"blockchain": "DOT",
"currencyInfo": {
"name": "Polkadot",
"symbol": "DOT",
"coinTypeIndex": "354",
"blockchain": "DOT",
"decimals": "10",
"hasStaking": true,
"isAccountBased": true,
"enabled": true,
"id": "cadc2268107de6d9749ca1d1a2f8df20f7cea5263a5cf3fb852395be08947a13",
"displayName": "Polkadot - DOT",
"type": "native",
"network": "mainnet"
},
"network": "mainnet",
"requestId": "4268723"
},
{
"id": "6323493",
"direction": "outgoing",
"currency": "DOT",
"sources": [
{
"address": "13pY7GKXL569NoeN5UtKp9HD1aYUeDojGRwgkBa6j3MYhEJo",
"label": "testgb",
"amount": "0",
"amountMainUnit": "0",
"type": "source",
"internalAddressId": "404569"
}
],
"destinations": [
{
"amount": "0",
"amountMainUnit": "0",
"type": "destination"
}
],
"amount": "0",
"amountMainUnit": "0",
"fee": "159788218",
"feeMainUnit": "0.0159788218",
"hash": "0x994dd8f16ff59130b65147782383cfd78eea652f8fa97787c3a84d03f8350eb9",
"block": "15443866",
"receptionDate": "2023-05-09T08:29:36Z",
"confirmationDate": "2023-05-09T08:31:04.916319Z",
"uniqueId": "43704fe4074f5a2df4284e95f72a644de03ef2b9007bfb7f02e8caf80c542aa8",
"blockchain": "DOT",
"currencyInfo": {
"name": "Polkadot",
"symbol": "DOT",
"coinTypeIndex": "354",
"blockchain": "DOT",
"decimals": "10",
"hasStaking": true,
"isAccountBased": true,
"enabled": true,
"id": "cadc2268107de6d9749ca1d1a2f8df20f7cea5263a5cf3fb852395be08947a13",
"displayName": "Polkadot - DOT",
"type": "native",
"network": "mainnet"
},
"network": "mainnet",
"requestId": "4268721"
}
],
"totalItems": "2"
}
In this example, Taurus-PROTECT responds with a JSON object containing a list of all the relevant transactions.
Requirements for Future Use
For this endpoint, the storing requirements vary according to the use case.
You can find the Swagger-generated page for this endpoint in the following link.
Updated 22 days ago