Get Names from an Address

Get Names from an Address

Code samples


const headers = {
  'Accept':'application/json'
};

fetch('https://tna-btc.com/api/userTapnames?address=bc1xxxxx',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /api/userTapnames

Parameters

Name
In
Type
Required
Description

address

query

string(string)

true

owner address

timeZone

query

integer(int)

false

default -480

page

query

integer(int)

false

default 1

pageSize

query

integer(int)

false

default 20

Example responses

200 Response

{
  "code": 0,
  "message": "string",
  "data": {
    "tapnames": [
      {
        "name": "string",
        "ownTime": "string",
        "txid": "string",
        "assetId": "string"
      }
    ],
    "address": "string",
    "total": 0,
    "page": 0
  }
}

Responses

Status
Meaning
Description
Schema

200

Success

none

Inline

400

Failed

see error message

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» code

integer (int)

false

none

Error code

» message

string (string)

false

none

Error message

» data

object

false

none

Result data

»» tapnames

object

false

none

Object containing tapname information

»»» name

string (string)

false

none

Tapname

»»» ownTime

string (string)

false

none

Ownership timestamp

»»» txid

string (string)

false

none

Transaction ID

»»» assetId

string (string)

false

none

Asset ID associated with tapname

»»» address

string (string)

false

none

Address associated with tapname

»» total

integer (int)

false

none

Total number of tapnames

»» page

integer (int)

false

none

Current page number

Last updated