Logo

Get transection all form provider

Request Header

Data

Type

Description

Example

TokenStringprivate-keyJWT Format
MerchantStringMerchant Id1234
Content-TypeString-application/json

Request Body

Data

Type

Require

Description

Example

data.limitNumbertruelimit data for pagination10
data.pageNumbertruepage number for pagination1
data.sortNumberfalse

1 is sort by asc
-1 is sort by desc

-1
data.sort_optionStringfalse

Sort by user select option


ex.

      _id
      amount
      createdAt
      updatedAt
_id
data.date_startStringfalsefor filter by date range2023-07-12T06:48:51.147+00:00
data.date_endStringfalsefor filter by date range2024-08-18T06:48:51.147+00:00
data.typeStringfalse

ex.

      _id
      amount
      createdAt
      updatedAt
_id

Request Example

curl --location 'http://mainnet-api.nakawallet.com/api/transaction/get-transaction-all' \
--header 'token: ac20eb6f41a92b63456332ff8e1ff5a09d6d1a202bc33568691f5c188c2fe511' \
--header 'merchant: 6694a18330e7a74b1c335304' \
--header 'Content-Type: application/json' \
--data '{
    "limit": 10,
    "page": 1,
    "sort": -1,
    "sort_option" : "_id",
    "date_start" : "2023-07-12T06:48:51.147+00:00",
    "date_end" : "2024-08-18T06:48:51.147+00:00",
    "type" : "all",
    "token_id" : "all"
}'

Ex. response json body

Case: HTTP status 200 OK body status: true in a case successfully.

{
  "status": true,
  "data": {
    "data": [
      {
        "_id": "66bc7cc208c7e28e9f25991d",
        "fee": 1,
        "address": null,
        "from_address": "TEDArb5hoqTWcxaNX712kT2FUPdYgqff46",
        "to_address": "TGT4XKfSYV5pmYp6ch96xr77NWPW7o4KVa",
        "ref_id": "6694a18330e7a74b1c3353041723628735564000795",
        "status": "success",
        "note": "test test",
        "transaction_history": [
          {
            "_id": "66bc7cc208c7e28e9f25991e",
            "message": "Create transaction deposit",
            "hash": null,
            "status": "createTransaction",
            "date": "2024-08-14T09:45:38.502Z"
          },
          {
            "_id": "66bc7d2908c7e28e9f259962",
            "message": "Check Amount Token transfer Tron chain Transaction Done prepare to increase smart contract",
            "hash": "e694a088514a29525ff7007a28d4f4be14ee560f3f87d957b4516ea14eec3c5b",
            "status": "transferBalanceToOwnerAddress",
            "date": "2024-08-14T09:47:21.653Z"
          },
          {
            "_id": "66bc7d3608c7e28e9f259977",
            "message": "Increase balance to smartcontract",
            "hash": "0x21bcd29b1c635b59bfb853541345611237fd566525c8f9e32d06085a48479716",
            "status": "success",
            "date": "2024-08-14T09:47:34.817Z"
          }
        ],
        "expire_time": "2024-08-14T09:55:38.501Z",
        "createdAt": "2024-08-14T09:45:38.501Z",
        "updatedAt": "2024-08-14T09:47:34.839Z",
        "base_amount": 10,
        "amount": 10,
        "receive_amount": 9,
        "from": "provider",
        "type_coin": "crypto",
        "token_info": {
          "_id": "6582b197419cd75cb4929e22",
          "name": "USDT",
          "token_address": "TXLAQ63Xg1NAzckPwKHvzw7CSEmLMEqcdj",
          "image": "https://naka-wallet.s3.eu-central-1.amazonaws.com/token-info/USDT/image/d7543041b43adff13e1c8d164fdad248.Tether-USDT-icon-1.png",
          "chain": "tron",
          "chain_name": "Tron Network",
          "decimal": 6,
          "rate_current": {
            "coin_to_usd": 1.0002,
            "usd_to_coin": 0.9998000399920016,
            "base": "THB",
            "base_convert": 34.95597819768
          },
          "symbol": "USDT",
          "is_native_token": false,
          "smartcontract_id": 7
        },
        "ref_provider_id": "66bc7cbf08c7e28e9f25990f",
        "type": "deposit",
        "meta_data": {},
        "currency": "THB",
        "amount_fiat": 349.55978197679997
      },
      {
        "_id": "66bc7bcc08c7e28e9f25985d",
        "fee": 0.010000000000000002,
        "address": null,
        "from_address": "",
        "to_address": "kQCP1NoqDKT2xz726CyN1yJHvIFgpfx5SpphrubaRZ62NoFB",
        "ref_id": "6694a18330e7a74b1c3353041723628491362834532",
        "status": "success",
        "note": "test test",
        "transaction_history": [
          {
            "_id": "66bc7bcc08c7e28e9f25985e",
            "message": "Create transaction deposit",
            "hash": null,
            "status": "createTransaction",
            "date": "2024-08-14T09:41:32.665Z"
          },
          {
            "_id": "66bc7bfc08c7e28e9f25987e",
            "message": "Check Amount Native Token transfer Ton chain Transaction Done prepare to increase smart contract",
            "hash": "my+H+s6A+/xtBxTNh44HUlGxfFX2UVlCwShX8vN/9Y8=",
            "status": "transferBalanceToOwnerAddress",
            "date": "2024-08-14T09:42:20.329Z"
          },
          {
            "_id": "66bc7c0a08c7e28e9f259897",
            "message": "Increase balance to smartcontract",
            "hash": "0x8643fdfa04a3f09034b255effb1ed68410592231c04a9b986a99be40bb64fae2",
            "status": "success",
            "date": "2024-08-14T09:42:34.888Z"
          }
        ],
        "expire_time": "2024-08-14T09:51:32.661Z",
        "createdAt": "2024-08-14T09:41:32.661Z",
        "updatedAt": "2024-08-14T09:42:34.905Z",
        "base_amount": 0.1,
        "amount": 0.1,
        "receive_amount": 0.09,
        "from": "provider",
        "type_coin": "crypto",
        "token_info": {
          "_id": "6541fabd1aeb8a1e0e945540",
          "name": "TON",
          "token_address": "0x0000000000000000000000000000000000000001",
          "image": "https://naka-wallet.s3.eu-central-1.amazonaws.com/token-info/TON/image/f0b83ba287a4cac4805492874078e182.11419.png",
          "chain": "ton",
          "chain_name": "TON",
          "decimal": 18,
          "rate_current": {
            "coin_to_usd": 7.0415,
            "usd_to_coin": 0.14201519562593198,
            "base": "THB",
            "base_convert": 246.11795199765
          },
          "symbol": "TON",
          "is_native_token": true,
          "smartcontract_id": 2
        },
        "ref_provider_id": "66bc7bcb08c7e28e9f25984f",
        "type": "deposit",
        "meta_data": {},
        "currency": "THB",
        "amount_fiat": 24.611795199765
      }
    ],
    "info": {
      "limit": 2,
      "pages": 1,
      "totalCount": 32,
      "currentCount": 2,
      "nextPage": 2,
      "prevPage": null,
      "totalPages": 16,
      "hasPrevPage": false,
      "hasNextPage": true,
      "pagingCounter": 1,
      "meta": {}
    }
  },
  "message": "get transaction success."
}

Case: HTTP status 401 Unauthorized status: false in case unauthorized.

Headers:
{
  "content-length": "26",
  "content-type": "application/json; charset=utf-8"
}
URL:
Data:
{
  "message": "Unauthorized"
}

Headers:
Headers:
{
  "content-length": "23",
  "content-type": "application/json; charset=utf-8"
}
URL:
Data:
{
  "message": "Key wrong"
}

Case: HTTP status 500 Unauthorized status: false in case Internal Server Error.

Headers:
{
  "content-length": "70",
  "content-type": "application/json; charset=utf-8"
}
URL:
Data:
{
  "message": "Error: Can not create transaction(ref_id already exists)"
}