Lookup

Get Balance from a private key string

The lookup endpoint retrieves the balance associated with a single private key string. It will display the balance for both BSV and/or STAS tokens that are housed in the corresponding address. Users can customize responses using additional header parameters, such as currency type, pagination, protocol type (including variations of BSV and/or STAS), and compact mode.

Body Params

{
 privateKey : "string"
}

POST https://api.relysia.com/v1/lookup

Returns Balance of all assets of Private Key

Headers

Name
Type
Description

type

String

Type refers to the protocol returned such as BSV, STAS-20, STAS-789. Default ALL will be used and return all.

currency

String

Currency type such as USD, CAD, AUD, or any other supported currency type. Default set to USD.

nextPageToken

Number

Will provide the next page of balance determine by starting point number provided. By default, will start at 0.

compact

Boolean

Compact will be set default to true. This refers to STAS tokens specifically will return total balances of each token Id. Compact false will return each UTXO that comprises of all the total balances.

maxResults

Number

Number of result in the array provided. Default set to 19, where the BSV balance make the total of 20 returned.

Request Body

Name
Type
Description

privateKey*

String

Private key string value

{
  "statusCode": 200,
  "data": {
    "status": "success",
    "msg": "operation completed successfully",
    "totalBalance": {
      "currency": "USD",
      "balance": 0.0000030209549035757473
    },
    "coins": [
      {
        "protocol": "BSV",
        "balance": 1e-7
      },
      {
        "protocol": "STAS",
        "tokenId": "8b07511349a2d715abc1777777b4c078241a62e5-TESTTOKEN444",
        "splittable": true,
        "name": "Store Bonus Points",
        "address": "1JpvnEDrLR1rXZrUZNkhWSJd3x9D9ib16i",
        "satsPerToken": 1,
        "symbol": "TESTTOKEN444",
        "redeemAddr": "8b07511349a2d715abc1777777b4c078241a62e5",
        "image": "https://upload.wikimedia.org/wikipedia/en/9/95/Test_image.jpg",
        "amount": 3,
        "supply": 3,
        "decimals": 0,
        "sn": [
          0
        ]
      },
      {
        "protocol": "STAS",
        "tokenId": "8b07511349a2d715abc1777777b4c078241a62e5-TESTNFT444",
        "splittable": true,
        "name": "Store Bonus Points",
        "address": "1JpvnEDrLR1rXZrUZNkhWSJd3x9D9ib16i",
        "satsPerToken": 1,
        "symbol": "TESTNFT444",
        "redeemAddr": "8b07511349a2d715abc1777777b4c078241a62e5",
        "image": "https://upload.wikimedia.org/wikipedia/en/9/95/Test_image.jpg",
        "amount": 3,
        "supply": 3,
        "decimals": 0,
        "sn": [
          0
        ]
      }
    ],
    "meta": {
      "nextPageToken": null
    }
  }

Last updated