BRC-20 API
The request return parameters:
Parameter | Type | Description |
---|---|---|
code | string | 0 - success |
msg | string | |
data | string | |
{
"code":0,
"msg":"ok",
"data":{
"total":1200,
"page":1,
"limit":1,
"list":[
{
"token":"ordi",
"tokenType":"brc20",
"totalSupply":"21000000",
"limit":"1000",
"decimals":18,
"minted":"21000000",
"holders":10671
}
]
}
}
GET /v1/btc/inscriptionList
Parameter | Type | Required? | Description |
---|---|---|---|
address | string | No | |
page | number | No | request page number |
size | number | No | request page size |
Parameter | Type | Description |
---|---|---|
total | number | total amount |
page | number | page number |
limit | number | returned amount |
list | array | inscription list |
Inscription:
Parameter | Type | Description |
---|---|---|
inscriptionNumber | number | |
inscriptionId | string | |
owner | string | |
output | string | |
Request:
curl '127.0.0.1:8181/v1/btc/inscriptionList?address=bc1pf8hsn52rvag59hysdw4jn9hsk4vex4r6e2d3jeec4tkxj9wmwlmq9ztm4w&page=1&size=20'
Response:
{
"code": 2000,
"msg": "Success",
"data": {
"list": [
{
"owner": "bc1pf8hsn52rvag59hysdw4jn9hsk4vex4r6e2d3jeec4tkxj9wmwlmq9ztm4w",
"output": "ba78518b8bb4185bbb8e7236bab4f915f2c4e34dffc7cb6d1e88eb056fb00fd6:0",
"inscriptionId": "d95c0fb86bc0f0dce6a732c5ab77d47e33ed24099bdb01133f768cef75a47724i0",
"inscriptionNumber": 8
}
],
"page": 1,
"limit": 1,
"total": 1
}
}
GET /v1/btc/inscription
Parameter | Type | Required? | Description |
---|---|---|---|
inscriptionId | string | No | |
inscriptionNumber | string | No | |
Parameter | Type | Description |
---|---|---|
inscriptionNumber | string | |
inscriptionId | string | |
txid | string | |
holder | string | |
creator | string | |
deployHeight | string | |
deployTime | string | |
output | string | |
GET /v1/btc/inscriptionHistory
Parameter | Type | Required? | Description |
---|---|---|---|
inscriptionId | string | Yes | |
start | string | No | request start index |
limit | string | No | request limit |
Parameter | Type | Description |
---|---|---|
inscriptionId | string | |
inscriptionNumber | string | |
total | string | total amount |
start | string | start index |
limit | string | returned amount |
transactionList | array | inscription transaction list |
Inscription Transaction:
Parameter | Type | Description |
---|---|---|
txid | string | tx Id |
block | string | block height |
txType | string | transaction type: inscribe, transfer |
from | string | from address |
to | string | to address |
time | string | |
GET /v1/btc/tokenList
Parameter | Type | Required? | Description |
---|---|---|---|
page | number | No | request page number |
size | number | No | request page size |
status | number | No | token status (0: all status, 1: minting, 2: complate) |
Parameter | Type | Description |
---|---|---|
total | number | total token amount |
page | number | start page number |
limit | number | returned amount |
list | array | token list |
Token:
Parameter | Type | Description |
---|---|---|
tokenType | string | token type: brc20 |
token | string | total tick |
totalSupply | number | total supply |
limit | number | mint limit |
decimals | number | |
minted | number | minted amount |
creator | string | |
deployTime | string | |
deployHeight | string | |
holders | string | holder amount |
Request:
curl '127.0.0.1:8181/v1/btc/tokenList?status=1&page=1&size=20'
Response:
{
"code": 2000,
"msg": "Success",
"data": {
"list": [
{
"tokenType": "brc20",
"token": "abcd",
"totalSupply": 21000,
"limit": 1,
"decimals": 18,
"minted": 2,
"creator": "bc1paxv6lr52gfxn7sk5l6g3zr3xt5q4506em4z9mxmelgmke3yx7x5s2k8qle",
"deployTime": 1685418579,
"deployHeight": 7958021,
"holders": 2
}
],
"page": 1,
"limit": 1,
"total": 1
}
}
GET /v1/btc/token
Parameter | Type | Required? | Description |
---|---|---|---|
token | string | Yes | token tick |
Parameter | Type | Description |
---|---|---|
tokenType | string | token type: brc20 |
token | string | total tick |
totalSupply | number | total supply |
limit | number | mint limit |
minted | number | minted amount |
decimals | number | |
txid | string | deploy tx id |
creator | string | |
deployHeight | number | |
deployTime | number | |
inscriptionNumberStart | string | |
inscriptionNumberEnd | string | |
Request:
curl '127.0.0.1:8181/v1/btc/token?token=abcd'
Response:
{
"code": 2000,
"msg": "Success",
"data": {
"tokenType": "brc20",
"token": "abcd",
"totalSupply": 21000,
"limit": 1,
"decimals": 18,
"minted": 2,
"creator": "bc1paxv6lr52gfxn7sk5l6g3zr3xt5q4506em4z9mxmelgmke3yx7x5s2k8qle",
"deployTime": 1685418579,
"deployHeight": 7958021,
"txid": "16f3c32468e3e52ac20dc8fc633c686f0e31c5f34407413d12ad764ba5ad5f3b",
"inscriptionNumberStart": 0,
"inscriptionNumberEnd": 0
}
}
GET /v1/btc/tokenHolders
Parameter | Type | Required? | Description |
---|---|---|---|
token | string | Yes | token tick |
start | string | No | |
limit | string | No | |
Parameter | Type | Description |
---|---|---|
total | string | total holder amount |
start | string | start index |
limit | string | returned amount |
holderList | Array | holder list |
Holder:
Parameter | Type | Description |
---|---|---|
address | string | |
amount | string | token amount |
GET /v1/btc/tokenHistory
Parameter | Type | Required? | Description |
---|---|---|---|
token | string | Yes | token tick |
type | string | No | transaction type: all, deploy, mint, transfer, inscribeTransfer |
start | string | No | start index |
limit | string | No | |
from | string | No | from address |
to | string | No | to address |
Parameter | Type | Description |
---|---|---|
token | string | token tick |
total | string | total amount |
start | string | start index |
limit | string | returned amount |
txList | array | transaction list |
Transaction:
Parameter | Type | Description |
---|---|---|
txid | string | tx Id |
block | string | block height |
tokenType | string | token type: brc20 |
token | string | token tick |
txType | string | transaction type: all, deploy, mint, transfer, inscribeTransfer |
from | string | from address |
to | string | to address |
amount | string | transaction amount |
inscriptionNumber | string | inscription number |
inscriptionId | string | inscription Id |
time | string | |
GET /v1/btc/addressTokenBalance
Parameter | Type | Required? | Description |
---|---|---|---|
address | string | Yes | |
token | string | No | token tick |
start | string | No | |
limit | string | No | |
Parameter | Type | Description |
---|---|---|
address | string | |
total | string | total amount |
start | string | start index |
limit | string | returned amount |
tokenList | array | token list |
TokenBalance:
Parameter | Type | Description |
---|---|---|
tokenType | string | token type: brc20 |
token | string | total token count |
balance | string | |
transferableBalance | string | |
avaliableBalance | string | |
GET /v1/btc/addressTransferList
Parameter | Type | Required? | Description |
---|---|---|---|
address | string | Yes | |
token | string | No | token tick |
start | string | No | |
limit | string | No | |
Parameter | Type | Description |
---|---|---|
address | string | |
total | string | total amount |
start | string | start index |
limit | string | returned amount |
transferList | array | inscribe-transfer list |
Inscribe-transfer:
Parameter | Type | Description |
---|---|---|
tokenType | string | token type: brc20 |
token | string | total token count |
amount | string | inscribe-transfer amount |
inscriptionId | string | |
inscriptionNumber | string | |
GET /v1/btc/addressHistory
Parameter | Type | Required? | Description |
---|---|---|---|
address | string | Yes | |
token | string | Yes | token tick |
type | string | No | transaction type: all, deploy, mint, transfer, inscribeTransfer |
start | string | No | |
limit | string | No | |
Parameter | Type | Description |
---|---|---|
total | string | total amount |
start | string | start index |
limit | string | returned amount |
txList | array | transaction list |
Transaction:
Parameter | Type | Description |
---|---|---|
txid | string | tx Id |
block | string | block height |
tokenType | string | token type: brc20 |
token | string |