Application for API Key
OkLink provides institutional customers, developers, and researchers with a powerful API product that covers multi-chain real-time data, on-chain transactions, and address analysis, eliminating the cost of self-built nodes, synchronized blocks, and operational maintenance.
If you need to apply for use or higher frequency, please provide the following information to email: [email protected]
- Name
- Phone number
- Telegram
- Description
Introduction
Thank you for using our Developer's Documentation. OKLink provides a simple yet strong RestAPI access port service. You may choose the required access ports from the numerous API ports to build your applications. Our services are highly suitable for academic research, centralized exchange, public chain development, digital wallet, financial institutes, and media within the industry.
If you wish to use our API services or adjust the request frequency of API ports, please provide the following information via email to our customer service center: [email protected] We will reach out to you as soon as possible.
- Name
- Phone number
- Usage scenario
Usage Process
Request APIkey via email
Our staff will provide you with your personal APIkey
Access RestAPI port with your APIKey
Usage Mode
API request address URL:
- https://www.oklink.com/
How to use APIkey:
- For each API request, your personal APIkey (x-apiKey) needs to be filled out at the HTTP Request Headers
For example:
- Request Headers
x-apiKey: 47e6bc5d-8e78-xxxxxxx4f3e86a3466
Speed Limit Rules
To ensure the quality of our API data services, all RestAPI ports have frequency restrictions for visits. If your request frequency reaches our limit, the API request will be rejected. Therefore, estimating the frequency of port visits is essential when you apply for APIkey.
Community version API
- 60/min
Standard version API
- 300/min
Professional version API
- 1200/min
Enterprise version API
- Customizable services and adjustable API request frequencies supported
Overview
You can access data with the following functional modules through our API:
- Basic information of public chains
- Block information
- On-chain exchange information
- Address balance
- DeFi data
- Statistical data of ChainHub
If you have special requirements, please don't hesitate to contact us for customized API services。
REST API
Common Interface
Token Ambiguity Matching Interface
The token is fuzzily matched according to the input content.
Rate Limit: 10 requests per 2 seconds
HTTP Requests
GET /api/explorer/v1/{chain}/matchTokens
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/matchTokens
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
QueryString | q | String | Yes | Ambiguous search for tokens, token names, contract addresses |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"total":50,
"hits":[
{
"symbol":"BNB",
"coinName":"BNB",
"tokenContractAddress":"aadfsdfafdaffasdafs",
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
symbol | String | Symbol |
coinName | String | Coin name |
tokenContractAddress | String | Contract address |
Common Query Interface of Main Chain
根The type of query is returned based on the input height / transaction Hash/ address and other data.
HTTP Request
GET /api/explorer/v1/{chain}/search
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/search
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
QueryString | q | String/Long | Yes | Height / transaction hash/ address to be inquired |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"dataType":"BLOCK",
"chain":"BTC"
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
dataType | String | Data type,include block / transaction / address |
chain | String | Chain |
Inquire About the Details of Chain
Query the detailed information of a blockchain.
HTTP Request
GET /api/explorer/v1/{chain}/info
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/info
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"id": 1,
"coinType": "chain",
"name": "bitcoin",
"symbol": "BTC",
"coinName": "Bitcoin",
"fullName": "Bitcoin (BTC)",
"websiteSlug": "bitcoin",
"iconPath": "https://oss.bafang.com/blockchain/icon/eth/BTC.jpg",
"rank": 1,
"mineable": true,
"algorithm": "SHA-256",
"proofType": "PoW",
"fullyPremined": false,
"preMinedValue": null,
"netHashesPerSecond": 91054733765.6216,
"blockReward": 12.5,
"blockPeriodTime": 600,
"circulatingSupply": 18018812.5,
"totalSupply": 18018812.5,
"maxSupply": 21000000,
"tokenAddress": null,
"firstBlockTime": null,
"firstBlockHeight": null,
"firstHistoricalData": null,
"lastHistoricalData": 1573747209390,
"lastSyncTime": 1573747209390,
"createTime": 1570691307644,
"updateTime": 1573747209390,
"icoPrice": null,
"market": {
"symbol": "BTC",
"marketSymbol": "CNY",
"price": 64922,
"volume24h": 190837349081.5128,
"percentChange1h": 0,
"percentChange24h": 0.5698582219203002,
"percentChange7d": 0,
"marketCap": 1170673140208.1343,
"timestamp": 1572872407
},
"address": {
"validAddressCount": 1102795,
"newAddressCount24h": 0
},
"block": {
"height": 603841,
"firstExchangeHistoricalTime": 0,
"firstBlockTime": 0,
"firstBlockHeight": 0,
"avgBlockInterval": 627,
"avgBlockSize24h": 0,
"avgBlockSize24hPercent": 0,
"mediaBlockSize": 0,
"halveTime": 0
}
"fee": {
"bestFeePerKbyte": 23332
"bestFeePerKwu": 0,
"bestFeePerKvbyte": 0,
"bestGasPrice": null
},
"globalDifficulty": {
"currentDiffculty": "12.72T",
"currentDiffcultyPercentChange": -0.07095469361664279,
"currentDiffcultyChangeTime": 1573169436000,
"currentDiffcultyChangeHeight": 602784,
"nextDiffculty": "12.45T",
"nextDiffcultyChangeTime": 1574373589000,
"nextDiffcultyChangeHeight": 0,
"nextDiffcultyPercentChange": -0.02153946011009916,
"nextDifficultyChangeBlock": 0
},
"hashes": {
"globalHashes": "92.89EH",
"globalHashesPercentChange24h": -3.2471268000960922
},
"mine": {
"avgMineReward24h": 0,
"minerIncomePerUnit": 1.1923362838585598,
"minerIncomePerUnitCoin": 0.00001836567394501956
},
"reduceReward": {
"nextReduceRewardTime": 1589821189000
"nextReduceRewardHeight": 630000
},
"transaction": {
"pendingTransactionCount": 3566
"transactionValue24h": 0,
"totalTransactionCount": 3815326,
"tranRate": 3.56,
"avgTransactionCount24h": 0,
"avgTransactionCount24hPercent": 0
},
"okchain": null,
"usdt": {
"fee": 23332,
"omiUsdtTotalSupply": 18018812.5,
"trxUsdtTotalSupply": 0,
"ethUsdtTotalSupply": 0,
"weekAddCoin": 0,
"weekDestoryCoin": 0
},
"trxUsdtTotalSupply": 0,
"ethUsdtTotalSupply": 0,
"coreAlgorithm": null,
"platformId": null,
"platform": null
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
id | Long | Id,unique identification |
coinType | String | Coin type |
name | String | Coin name |
symbol | String | Symbol |
coinName | String | Coin name |
fullName | String | Full Name of coin |
websiteSlug | String | Internet name of coin |
iconPath | String | Icon links |
rank | Integer | rank |
mineable | Boolean | Mining or not |
algorithm | String | Mining algorithm |
netHashesPerSecond | BigDecimal | Difficulty of next mining |
blockReward | Double | Block Award |
blockPeriodTime | BigDecimal | Block period time |
circulatingSupply | Double | Circulation |
maxSupply | Double | Maximum supply |
tokenAddress | String | Contract address |
firstBlockTime | Long | First block time |
firstBlockHeight | Long | First block height |
firstHistoricalData | Long | Earliest transaction time |
lastHistoricalData | Long | Latest transaction time |
lastSyncTime | Long | Last synchronization time |
createTime | Long | Creation time |
updateTime | Long | Update time |
icoPrice | String | ICO price |
market | Market Information | |
symbol | String | Symbol |
marketSymbol | String | Symbol of fiat |
price | Double | Price |
volume24h | Double | 24 hour trading volume |
percentChange1h | Double | Price rise in 1 hour |
percentChange24h | Double | Price rise in 24 hour |
percentChange7d | Double | Price rise in 7 days |
marketCap | Double | Market cap |
timestamp | Long | Time stamp |
address | Address information | |
validAddressCount | Integer | Number of addresses |
newAddressCount24h | Integer | Number of new addresses in 24 hours |
block | Block information | |
height | Integer | Height |
firstExchangeHistoricalTime | Long | First transaction time |
firstBlockTime | Long | First block time |
firstBlockHeight | Long | First block height |
avgBlockInterval | Long | Average block time |
avgBlockSize24h | Double | 24-hour average block size |
avgBlockSize24hPercent | Double | Average block size increase over 24 hours |
mediaBlockSize | Double | Median block size in one week |
halveTime | Long | In half the time |
fee | Long | Fee, unit satoshi |
bestFeePerKbyte | BigInteger | Best handling charge per kByte |
bestFeePerKwu | BigDecimal | Best handling charge per kilogram |
bestFeePerKvbyte | BigDecimal | Best service charge per K virtual bytes |
bestGasPrice | BigInteger | Best gas price |
globalDifficulty | Difficulty of the whole network | |
currentDiffculty | String | Current difficulty |
currentDiffcultyPercentChange | Double | Last difficulty adjustment percentage |
currentDiffcultyChangeTime | Long | Last difficulty adjustment time |
currentDiffcultyChangeHeight | Long | Last difficulty adjustment height |
nextDiffculty | String | Forecast the difficulty of next time |
nextDiffcultyChangeTime | Long | Forecast the next difficulty adjustment time |
nextDiffcultyChangeHeight | Long | Forecast the next difficulty and adjust the height |
nextDiffcultyPercentChange | Double | Forecast next difficulty adjustment percentage |
nextDifficultyChangeBlock | Long | Prediction of the next difficulty adjustment block |
hashes | Hashrate | |
globalHashes | String | Hashrate in the whole network |
globalHashesPercentChange24h | Double | 24-hour change of hashrate in the whole network |
mine | mining | |
avgMineReward24h | Double | 24-hour average mining reward |
minerIncomePerUnit | Double | Income per unit hashrate |
minerIncomePerUnitCoin | Double | Coin of income per unit hashrate |
reduceReward | Half reward | |
nextReduceRewardTime | Long | Predict when the next production will be halved |
nextReduceRewardHeight | Long | Forecast the height of the next production cut by half |
transaction | Transaction information | |
pendingTransactionCount | Integer | Number of unconfirmed transactions |
transactionValue24h | BigDecimal | 24-hour trading volume on the chain |
totalTransactionCount | Integer | Number of transactions on the chain |
tranRate | BigDecimal | 50 blocks average TPS |
avgTransactionCount24h | Double | Average number of transactions in 24 hours |
avgTransactionCount24hPercent | Double | 24-hour average trading volume increase |
pendingTransactionSize | Double | Pending transaction size |
Basic Statistics of Query Chain
Query the summary information of supported blockchains.
HTTP Requests
GET /api/explorer/v1/info/summary
Request Example
GET https://www.oklink.com/api/explorer/v1/info/summary
Request Parameters
无
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":[
{
"symbol":"BTC",
"price":72657,
"lastBlockTimeU0":1566991498,
"totalTransacationCount":449445678,
"totalSupply":17900250,
"totalSupplyPercent":0.8523928571428572,
"pendingTransactionCount":9890,
"runTime":1567001611630,
"pricePercentChange24h":-0.007104239350452387,
"height":592119
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
symbol | String | Symbol |
price | Double | Price |
lastBlockTimeU0 | Long | Last block time |
totalTransacationCount | Long | Total transacation count |
totalSupply | Double | Circulation |
totalSupplyPercent | Double | Circulation ratio |
pendingTransactionCount | Integer | Total number of unconfirmed |
runTime | Long | Run Time |
pricePercentChange24h | Double | 24-hour price change |
height | Integer | Height |
Statistical Interface
Inquire About Basic Statistics of Query Chain
Query the basic statistical information of a blockchain.
HTTP Requests
GET /api/explorer/v1/{chain}/statistic/common
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/statistic/common
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
QueryString | Limit | Integer | No | Return the number of items, the number of items required by the default home page chart |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":[
{
"day":1567000800000,
"activeAddressCount":10,
"validAddressCount":10,
"newAddressCount":10,
"transactionCount":10,
"transactionValue":"12.12",
"transactionValuePercent":"-1.0000",
"activeAddressPercent":"-1.0000",
"validAddressPercent":"0.23",
"newAddressPercent":"0.23",
"transactionCountPercent":"-1.0000",
"pricePercent":"-0.0099",
"market":{
"symbol":"USDT",
"marketSymbol":"CNY",
"price":2193.58,
"volume24h":10047275360.93245,
"percentChange1h":0,
"percentChange24h":-0.8763967208936047,
"percentChange7d":0,
"marketCap":39484526848.115005,
"timestamp":1567000761
},
"price":"2193.5800"
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
day | Long | time |
activeAddressCount | String | Number of active addresses |
validAddressCount | String | Number of addresses with balance |
newAddressCount | Integer | Number of new addresses |
transactionCount | Integer | Number of transactions |
transactionValue | Double | Number of currencies traded |
transactionValuePercent | Double | The proportion of the number of coins traded in 24 hours |
activeAddressPercent | Double | The proportion of active addresses in 24 hours |
validAddressPercent | Double | The proportion of addresses with balance in 24 hours |
newAddressPercent | Double | The proportion of new addresses in 24 hours |
transactionCountPercent | Double | The proportion of transactions in 24 hours |
pricePercent | Double | Proportion of price in 24 hours |
market | Market information | |
symbol | String | Symbol |
marketSymbol | String | Symbol of fiat |
price | Double | Price |
volume24h | Double | 24-hour trading volume |
percentChange1h | Double | Price increase in 1-hour |
percentChange24h | Double | Price increase in 24-hour |
percentChange7d | Double | Price rise in 7 days |
marketCap | Double | Market cap |
timestamp | Long | Time stamp |
price | Double | Price |
Query the Large Transaction
Query the 24-hour large amount transfer information of a blockchain.
HTTP Requests
GET /api/explorer/v1/{chain}/statistic/large/transfer/lastest
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/statistic/large/transfer/lastest
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data": [
{
"datetime": 1572505723,
"transferRangeFrom": 2000,
"transferRangeTo": 0,
"transferCount": 0,
"transferValue": 0.0,
"transferAddressCount": 0,
"market": {
"symbol": "BTC",
"marketSymbol": "CNY",
"price": 64922.0,
"volume24h": 1.908373490815128E11,
"percentChange1h": 0.0,
"percentChange24h": 0.5698582219203002,
"percentChange7d": 0.0,
"marketCap": 1.1706731402081343E12,
"timestamp": 1572872407
}
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
datetime | Long | Time |
transferRangeFrom | Integer | Transfer starting point |
transferRangeTo | Integer | Transfer end point |
transferCount | Integer | Number of transfers |
transferValue | Double | Total amount of coin transferred |
transferAddressCount | Integer | Number of transfer addresses |
market | Market information | |
symbol | String | Symbol |
marketSymbol | String | Symbol of fiat |
price | Double | Price |
volume24h | Double | 24-hour trading volume |
percentChange1h | Double | Price increase in 1-hour |
percentChange24h | Double | Price increase in 24-hour |
percentChange7d | Double | Price rise in 7 days |
marketCap | Double | Market cap |
timestamp | Long | Time stamp |
Query the Balance Distribution
Query the balance distribution statistics of the main chain currency or token of a blockchain.
HTTP Request
GET /api/explorer/v1/{chain}/statistic/richers/stat
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/statistic/richers/stat
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
queryString | tokenId | String | No | The token ID of the statistics, which is null by default, is used to count the currency of the main chain |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data": [
{
"holderRangeFrom": 1,
"holderRangeTo": 100,
"addressCount": 100,
"holdersValue": 2604892.0049283006,
"percentRate": 0.1456
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
holderRangeTo | Integer | The end of the ranking |
addressCount | Integer | Total address |
holdersValue | Double | Total holding currency |
percentRate | Double | Proportion |
Block Interface
Query Block List
Query the block list of a blockchain, and the priority of blocks is the reverse of block height by default.
HTTP Request
GET /api/explorer/v1/{chain}/blocks
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/blocks
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
queryString | offset | Integer | No | Start position, default 0 |
queryString | limit | Integer | No | Return the number of items, the default is 20 |
queryString | Sort | String | No | Sort by field:desc/asc;The sorting fields supported are height and timestamp;Default height in reverse order |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"total":14727352,
"hits":[
{
"hash":"0x26eef60d6b3c9e9aa1c2197f2d389c1ad40efbb0d66160c743e154e7d5895d4e",
"height":14727351,
"transactionCount":69,
"previousBlockHash":"0xf76a9fed746296e8ebaed4cda80be6999cb5d607584b0e65d61cc2daae22268a",
"blocktime":1651892446,
"legalRate":2686.97,
"totalTransactionCount":1564295173,
"valueTotal":62.15543476484758,
"minerHash":"0xea674fdde714fd979de3edf0f56aa9716b898ec8",
"guessedMiner":"ethermine",
"size":28916,
"nonce":"303c173d53c758e3",
"sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"logsBloom":"0x6130210010280001808200c08001a000200000002400000080010400111000120404e802041800402000c108002001004206008028404001140000001821245000804000400200080800008e00000466001060480041000418001842800440208200009002241048140100a4442108100148003001000c401200241000000122042001600000000088cc000000800000844000c10b4840290040204000120842420a80010b02a83140004090008258204000420404020000890000cb18200150400004120000010000000041088098100040040a04c8801808040166010160848790322840040040003414a000000840045c00a323108040000409c11228a029",
"transactionsRoot":"0x89714c4351136575cd6d7db2800320da889a981c73fba60fbf7cab6071b2cbea",
"stateRoot":"0xc693d6950a16f79398109b3a982e9d6426d16f955e4f05f2c6229367af7cbd80",
"receiptsRoot":"0x53931eeecf92c246e2a34348ed25d71be4ecdaf55c2b3d7ce16c20451d38b954",
"mixHash":"0xf6324b5154301de65c568b763946b3dcd1bdf7fbda653689e0c36b5424c793b9",
"extraData":"asia-east2-7",
"extraDataHex":"0x617369612d65617374322d37",
"gasLimit":30029295,
"gasUsed":3781955,
"avgGasPrice":33448114388.15479,
"difficulty":"13805140443274576",
"totalDifficulty":"48289899294991253504404",
"reward":2,
"fee":0.12649926345085394,
"blockReward":2.007880231317462,
"uncleReward":0,
"tokenTransferCount":33,
"unclesCount":0,
"internalTranCount":26,
"internalValueTotal":22.010360176489694,
"hashRate":"0",
"tokenValueTotal":21590.386177401222,
"totalInternalTxCount":553174279,
"baseFeePreGas":31364474758,
"burntFee":0.1186190321333919,
"highestTip":0.000280144,
"totalTip":0.004436876185078048,
"confirm":1,
"minepoolName":"ethermine",
"minepoolCode":"ethermine",
"minepoolUrl":"",
"minepoolLogoUrl":"https://static.oklink.com/cdn/explorer/icon/pool/Ethermine.png"
}
]
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Block hash |
height | Integer | Height |
size | Integer | size |
timestamp | Long | Time to block |
guessedMiner | String | Pool identification |
guessedMinerName | String | Pool name |
reward | Long | Mining reward, unit Satoshi |
fee | Long | Cost, unit Satoshi |
feePerKbyte | Long | Cost per kByte in Satoshi |
feePerKwu | Long | Unit cost per K weight, unit Satoshi |
blockReward | Long | Total reward, unit Satoshi |
transactionCount | Integer | Number of transactions |
wintnessCount | Integer | Number of isolated witness transactions |
inputsCount | Integer | Number of VIN |
outputsCount | Integer | Number of VOUTS |
inputsValueSat | Long | Total input,unit Satoshi |
inputsValue | Double | Total input |
outputsValueSat | Long | Total output,unit satoshi |
outputsValue | Double | Total output |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
legalRate | Double | Exchange rate against fiat |
sizeLevel | Integer | The level of block volume, from small to large, takes 256K as the base. Every increase of 256K means an increase of level, a total of 6 levels, 0-5. The front end can use this level to display color |
minerName | String | Pool name |
minerCode | String | Mine pool URL |
minerLogoUrl | String | The address of the pool icon |
Query Block Details
Query the block details of a blockchain.
HTTP Request
GET /api/explorer/v1/{chain}/blocks/{heightHash|lastest}
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/blocks/{heightHash|lastest}
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
Path | height hash lastest | Integer | No | Block height or block hash, which is the latest block |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data": {
"hash": "0000000000000000001b406f5ebabb45bb9d6d62d6992b343335188ce4c4ffc1",
"height": 580640,
"transactionCount": 2292,
"previousBlockHash": "0000000000000000001f00b6c00780b8d3bbef6106e9c2f3781c747317abc8f2",
"nextBlockHash": "00000000000000000010784a6225f02f82a9e14b5e4087a37cc2fe7a7e1cb41b",
"blocktime": 1560494759,
"legalRate": 56874.531124,
"size": 1149545,
"version": 536870912,
"merkleRoot": "2731759ff86e9083cad7ea872178c3ab4c9e0836b123d4df1ab58c5537ef8435",
"inputsCount": 6146,
"outputsCount": 5486,
"inputsValue": 3438.6456265,
"outputsValue": 3451.1456265,
"nonce": "0xb17d5e36",
"minerHash": "18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX",
"reward": 1250000000,
"fee": 28423704,
"feePerKbyte": 24733,
"blockReward": 1278423704,
"aux": true,
"bits": "0x1725fd03",
"difficulty": 7409399249090.253,
"mineDifficulty": 10328557357853.107,
"chainwork": "000000000000000000000000000000000000000006abc18bcec54323d3aab079",
"coinbaseDataHex": "0320dc08082f5669614254432f2cfabe6d6deda0cc7684dc7256d1f6797cad93768a da2eb953a3807c61826fdfa38906e4ef1000000000000000100459071037049bba43 377e3e3d280300",
"inputsValueSat": 343864562650,
"outputsValueSat": 345114562650,
"coindaysDestroyed": 2455583199983,
"medianTime": 1560493002,
"feePerKwu": 7120,
"witnessCount": 1829,
"weight": 3992777,
"strippedSize": 947744,
"btcDifficulty": "7.41T",
"btcMineDifficulty": "10.33T",
"minepoolName": "aaa",
"minepoolCode": "bbb",
"minepoolLogoUrl": "ccc",
"minepoolUrl": "ddd"
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Block hash |
height | Integer | Height |
size | Integer | size |
timestamp | Long | Time to block |
guessedMiner | String | Pool identification |
guessedMinerName | String | Pool name |
reward | Long | Mining reward, unit Satoshi |
fee | Long | Cost, unit Satoshi |
feePerKbyte | Long | Cost per kByte in Satoshi |
feePerKwu | Long | Unit cost per K weight, unit Satoshi |
blockReward | Long | Total reward, unit Satoshi |
transactionCount | Integer | Number of transactions |
wintnessCount | Integer | Number of isolated witness transactions |
inputsCount | Integer | Number of VIN |
outputsCount | Integer | Number of VOUTS |
inputsValueSat | Long | Total input,unit Satoshi |
inputsValue | Double | Total input |
outputsValueSat | Long | Total output,unit satoshi |
outputsValue | Double | Total output |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
legalRate | Double | Exchange rate against fiat |
sizeLevel | Integer | The level of block volume, from small to large, takes 256K as the base. Every increase of 256K means an increase of level, a total of 6 levels, 0-5. The front end can use this level to display color |
minerName | String | Pool name |
minerCode | String | Mine pool URL |
minerLogoUrl | String | The address of the pool icon |
Query Mine Pool Block List
Query a list of blocks from a block pool, default is block height reverse order.
HTTP Request
GET /api/explorer/v1/{chain}/blocks
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/blocks
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
queryString | type | String | Yes | Unique value: pool, which means query block based on ore pool |
queryString | pool | String | Yes | Pool identification |
queryString | offset | Integer | No | Start position, default 0 |
queryString | limit | Integer | No | Return the number of items, the default is 10 |
queryString | sort | String | No | Sort by field:desc/asc;The sorting fields supported are height and timestamp;Default height in reverse order |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data": {
"total": 590801,
"hits": [
{
"hash": "0000000000000000001b406f5ebabb45bb9d6d62d6992b343335188ce4c4ffc1",
"height": 580640,
"transactionCount": 2292,
"previousBlockHash": "0000000000000000001f00b6c00780b8d3bbef6106e9c2f3781c747317abc8f2",
"nextBlockHash": "00000000000000000010784a6225f02f82a9e14b5e4087a37cc2fe7a7e1cb41b",
"blocktime": 1560494759,
"legalRate": 56874.531124,
"size": 1149545,
"version": 536870912,
"merkleRoot": "2731759ff86e9083cad7ea872178c3ab4c9e0836b123d4df1ab58c5537ef8435",
"inputsCount": 6146,
"outputsCount": 5486,
"inputsValue": 3438.6456265,
"outputsValue": 3451.1456265,
"nonce": "0xb17d5e36",
"minerHash": "18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX",
"reward": 1250000000,
"fee": 28423704,
"feePerKbyte": 24733,
"blockReward": 1278423704,
"aux": true,
"bits": "0x1725fd03",
"difficulty": 7409399249090.253,
"mineDifficulty": 10328557357853.107,
"chainwork": "000000000000000000000000000000000000000006abc18bcec54323d3aab079",
"coinbaseDataHex": "0320dc08082f5669614254432f2cfabe6d6deda0cc7684dc7256d1f6797cad93768a da2eb953a3807c61826fdfa38906e4ef1000000000000000100459071037049bba43 377e3e3d280300",
"inputsValueSat": 343864562650,
"outputsValueSat": 345114562650,
"coindaysDestroyed": 2455583199983,
"medianTime": 1560493002,
"feePerKwu": 7120,
"witnessCount": 1829,
"weight": 3992777,
"strippedSize": 947744,
"btcDifficulty": "7.41T",
"btcMineDifficulty": "10.33T",
"minepoolName": "aaa",
"minepoolCode": "bbb",
"minepoolLogoUrl": "ccc",
"minepoolUrl": "ddd"
}
]
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Block hash |
height | Integer | Height |
size | Integer | size |
timestamp | Long | Time to block |
guessedMiner | String | Pool identification |
guessedMinerName | String | Pool name |
reward | Long | Mining reward, unit Satoshi |
fee | Long | Cost, unit Satoshi |
feePerKbyte | Long | Cost per kByte in Satoshi |
feePerKwu | Long | Unit cost per K weight, unit Satoshi |
blockReward | Long | Total reward, unit Satoshi |
transactionCount | Integer | Number of transactions |
wintnessCount | Integer | Number of isolated witness transactions |
inputsCount | Integer | Number of VIN |
outputsCount | Integer | Number of VOUTS |
inputsValueSat | Long | Total input,unit Satoshi |
inputsValue | Double | Total input |
outputsValueSat | Long | Total output,unit satoshi |
outputsValue | Double | Total output |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
legalRate | Double | Exchange rate against fiat |
sizeLevel | Integer | The level of block volume, from small to large, takes 256K as the base. Every increase of 256K means an increase of level, a total of 6 levels, 0-5. The front end can use this level to display color |
minerName | String | Pool name |
minerCode | String | Mine pool URL |
minerLogoUrl | String | The address of the pool icon |
Transaction Interface
Query Transaction List
Query the transaction list of a blockchain. The default order of query transaction is block height reverse order and index positive order. The home page transaction list is height reverse order and index reverse order.
HTTP Request
GET /api/explorer/v1/{chain}/transactions
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/transactions
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
queryString | blockHash | String | No | Block hash |
queryString | blockHeight | Long | No | Block height |
queryString | offset | Integer | No | Start position, default 0 |
queryString | limit | Integer | No | Return the number of items, the default is 20 |
queryString | sort | String | No | Sort by field:desc/asc;The sorting fields supported are height and timestamp;Default height in reverse order |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data": {
"total": 3196783,
"scrollId": null,
"hits": [
{
"hash": "3bbcf905c61831b7558936e03ff5257baa6f6dcc629796cea7bf7af16acfb9b7",
"blocktime": 1573211898,
"legalRate": 64922,
"index": 2326,
"blockHash": "0000000000000000000645e30db580cc132ed096669a84dd5192c654e0950f65",
"blockHeight": 602850,
"coinbase": false,
"size": 250,
"version": 1,
"doubleSpend": false,
"fee": 500,
"feePerKbyte": 2000,
"inputsCount": 1,
"outputsCount": 2,
"inputsValue": 0.00354234,
"outputsValue": 0.00353734,
"realTransferValue": 0.00348017,
"inputsValueSat": 354234,
"outputsValueSat": 353734,
"realTransferValueSat": 348017,
"inputs": [
{
"prevBlockHash": "0000000000000000000efd376141e80ec85b8c3b57cd0dde9739806321b0d730",
"prevAddresses": [ "325TBWEEv5dpBvCppYGKfoEshro6PP64np" ],
"scriptType": "P2SH_P2WPKH",
"vinIndex": 0,
"prevBlockHeight": 602849,
"prevTxhash": "1b3dad3bc83b3d518ee1eb6d9ffa83275a550e66a4263b2daedbcd3dcb21783e",
"prevVoutIndex": 0,
"prevValueSat": 354234,
"prevValue": 0.00354234,
"prevBlocktime": 1573211540,
"prevScriptType": "P2SH",
"scriptHex": "160014eaff5e6d6ce5fd8cbd2ee6cabc58c6e4973f046c",
"scriptData": "",
"sequence": 4294967293,
"lifespan": 358,
"coindaysDestroyed": 1467,
"witness": [ "3045022100c0a5b0e2708e42fbcc746e029da6616cfe78e8c5b2c 448b833381ba12a168da702204ab212d7856a90d88d3911671a8c973e42fd0b1984 2a86741475c9780b06403201", "02cb2dbdbcedbfb0bfd33a34f243a62122bd60739f3c465f0b44f3 e650bfa1be12"
]
}
],
"outputs": [
{
"addresses": [
"1Ep36WYw8LctrT7XhQpYuzWVQZeQWZFi5q"
],
"scriptType": "P2PKH",
"voutIndex": 0,
"valueSat": 347517,
"value": 0.00347517,
"fromCoinbase": false,
"spent": false,
"spentBlockHeight": -1,
"spentBlockHash": "",
"spentTxhash": "",
"spentVinIndex": -1,
"spentBlocktime": -1,
"scriptAsm": "OP_DUP OP_HASH160 977eef27fb7cec70417c9f0545a96e7fe5b3a1c6 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914977eef27fb7cec70417c9f0545a96e7fe5b3a1c688ac",
"outputType": "Spendable"
},
{
"addresses": [
"325TBWEEv5dpBvCppYGKfoEshro6PP64np"
],
"scriptType": "P2SH",
"voutIndex": 1,
"valueSat": 6217,
"value": 0.00006217,
"fromCoinbase": false,
"spent": true,
"spentBlockHeight": 602850,
"spentBlockHash": "0000000000000000000645e30db580cc132ed096669a84dd5192c654e0950f65",
"spentTxhash": "d77a269946f72c61aff995e16b457e73bed23a424c0162147b34c262b8f0f4b3",
"spentVinIndex": 0,
"spentBlocktime": 1573211898,
"scriptAsm": "OP_HASH160 043e3c4552688c5a4b5358bd50651457127a70fa OP_EQUAL",
"scriptHex": "a914043e3c4552688c5a4b5358bd50651457127a70fa87",
"outputType": "Spendable"
}
],
"lockTime": 0,
"coindaysDestroyed": 1467,
"sigops": 1,
"strippedSize": 140,
"virtualSize": 168,
"weight": 670,
"hasWitness": true,
"witnessHash": "f2191fdce43988b670f89e9cdedb71614a8163c18089e2f03a0f8da7717bb86a",
"feePerKwu": 746,
"feePerKvbyte": 2976,
"confirm": 1,
"realAddressBalance": 0
}
]
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Block hash |
blocktime | Long | Block time |
legalRate | Double | Exchange rate against fiat |
index | Long | Transaction index |
blockHash | String | Block hash |
blockHeight | Integer | Block height |
coinbase | Boolean | A coinbase transaction or not |
size | Integer | Transaction size |
version | Long | Version |
doubleSpend | Boolean | Double flower or not |
fee | Long | Cost, unit Satoshi |
feePerKbyte | Long | Cost per kByte, unit Satoshi |
inputsCount | Integer | Number of VIN |
outputsCount | Integer | Number of VOUTS |
inputsValue | Double | Total input |
outputsValue | Double | Total output |
realTransferValue | Double | Actual transaction amount |
inputsValueSat | Long | Total input, unit Satoshi |
outputsValueSat | Long | Total output, unit Satoshi |
realTransferValueSat | Long | Total transaction volume |
inputs | Array | Input list |
prevAddresses | String Array | Previous output address |
scriptType | String | Script type |
vinIndex | Integer | Position in the transaction |
prevBlockHeight | Integer | Height of previous block |
prevTxhash | String | Previous output transaction hash |
prevVoutIndex | Integer | Position of previous output in the transaction |
prevValueSat | Long | Previous output quantity,unit Satoshi |
prevValue | Double | Previous output quantity |
prevBlocktime | Long | Previous output transaction time |
prevScriptType | String | Previous output script type |
scriptHex | String | Script data |
scriptData | String | Script display data |
sequence | Long | Input sequence |
lifespan | Integer | Output lifetime |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
witness | String array | Isolate witness signature data |
outputs | Array | Output list |
addresses | String array | Output address |
scriptType | String | Script type |
voutIndex | Integer | output location |
valueSat | Long | Output quantity, unit Satoshi |
value | Double | Output quantity |
fromCoinbase | Boolean | A coinbase output or not |
spent | Boolean | Has it been spent |
spentBlockHeight | Integer | The height of the cost block |
spentBlockHash | String | The hash of the cost block |
spentTxhash | String | The hash of the cost transaction |
spentVinIndex | Integer | The position of the cost input |
spentBlocktime | Long | The time of the cost block |
scriptAsm | String | Script asm |
scriptHex | String | Script data |
ouputType | String | The types of output are: spendable, segwit, unknown |
lockTime | Long | Lock time |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
sigops | Integer | Number of signatures in the transaction |
strippedSize | Integer | Basic transaction size |
virtualSize | Integer | Virtual Size |
weight | Integer | weight |
hasWitness | Boolean | Does it include isolated witness transactions |
witnessHash | String | Quarantine witness hash |
feePerKwu | Long | Unit cost per K weight, unit Satoshi |
feePerKvbyte | Long | Cost per K virtual bytes in Satoshi |
confirm | Integer | Confirmation number |
realAddressBalance | Double | Address balance |
Query Transaction Details
To query the transaction details of a blockchain, the interface will support the query of both unconfirmed and confirmed transactions. The difference between unconfirmed and confirmed transactions is whether the returned block height data exists.
HTTP Request
GET /api/explorer/v1/{chain}/transactions/{hash}
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/transactions/{hash}
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
Path | hash | String | Yes | Transaction hash |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data": {
"hash": "5554fcec49e919347205aa6e7487d0d6b956ee505bbcf 43739153070b8da618e",
"blocktime": 1576355590,
"legalRate": 10081.89,
"index": 181,
"blockHash": "0000000000000000000ff6ac728cedff8cbcd04e 4d77e54de0aa77d10d9996b1",
"blockHeight": 608141,
"coinbase": false,
"size": 257,
"version": 2,
"doubleSpend": false,
"fee": 5140,
"feePerKbyte": 20000,
"inputsCount": 1,
"outputsCount": 2,
"inputsValue": 1499.0986048,
"outputsValue": 1499.0985534,
"realTransferValue": 1499.0986048,
"inputsValueSat": 149909860480,
"outputsValueSat": 149909855340,
"realTransferValueSat": 149909860480,
"inputs": [
{
"prevAddresses": [
"19tK9pC6ggFybYWwkGRcWDSKpT6MxsDWDJ"
],
"scriptType": "P2PKH",
"vinIndex": 0,
"prevBlockHeight": 581174,
"prevTxhash": "0130cbdc86f81aedeb65afca20add3db8f92 c296e7c92cb07cfbf9ac91265f02",
"prevVoutIndex": 0,
"prevValueSat": 149909860480,
"prevValue": 1499.0986048,
"prevBlocktime": 1560813252,
"prevScriptType": "P2PKH",
"scriptHex": "47304402201392300e8a660d34c4f98eab85 0874a574174a4868db9625ee9d8d244a54603002202d1e231724c5 0e3ed4e76567467ee24aeb2ed5bb78b62b225ebec674d7a2b7de014 10442b804899a46342d0668eb257ca7ac67aef3a91e5b9468b6747c 32e69ae661c925cc5869f6fa676c8960156688ab8551dda4757999ea 275765ae63a135bd295b",
"scriptData": "",
"sequence": 4294967293,
"lifespan": 15542338,
"coindaysDestroyed": 26967010661030
}
],
"outputs": [
{
"addresses": [
"1AvtcQYQiwwJkHZsExVHmjf12qbCWR48t6"
],
"scriptType": "P2PKH",
"voutIndex": 0,
"valueSat": 4000000000,
"value": 40.0,
"fromCoinbase": false,
"spent": true,
"spentBlockHeight": 608143,
"spentBlockHash": "0000000000000000000ca127a3835e 0e1dc6608801bbe5b3bd9f374d2b1d4ccc",
"spentTxhash": "5f48c0f3c0cfcc88c263464841c74c4fd05 b6f5ca181b28b8f5c11a358b54a12",
"spentVinIndex": 0,
"spentBlocktime": 1576357017,
"scriptAsm": "OP_DUP OP_HASH160 6cea42a0638e3caf 79a1624a3649b8c996afba74 OP_EQUALVERIFY OP_CHECKSIG ",
"scriptHex": "76a9146cea42a0638e3caf79a1624a3649b8 c996afba7488ac",
"outputType": "Spendable"
},
{
"addresses": [
"19HBfMyc7VpwWqk66NJFeHz4Dz3SWeznN2"
],
"scriptType": "P2PKH",
"voutIndex": 1,
"valueSat": 145909855340,
"value": 1459.0985534,
"fromCoinbase": false,
"spent": false,
"spentBlockHeight": -1,
"spentBlockHash": "",
"spentTxhash": "",
"spentVinIndex": -1,
"spentBlocktime": -1,
"scriptAsm": "OP_DUP OP_HASH160 5ad08fb4e408998 7b68a20d681216ae8b3003963 OP_EQUALVERIFY OP_CHECKSI G",
"scriptHex": "76a9145ad08fb4e4089987b68a20d681216a e8b300396388ac",
"outputType": "Spendable"
}
],
"lockTime": 608140,
"coindaysDestroyed": 26967010661030,
"sigops": 2,
"strippedSize": 257,
"virtualSize": 257,
"weight": 1028,
"hasWitness": false,
"witnessHash": "",
"feePerKwu": 5000,
"feePerKvbyte": 20000,
"confirm": 9769,
"realAddressBalance": 0,
"tagMap": {
"19tK9pC6ggFybYWwkGRcWDSKpT6MxsDWDJ":
["tag": "huobi"]
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Block hash |
blocktime | Long | Block time |
legalRate | Double | Exchange rate against fiat |
index | Long | Transaction index |
blockHash | String | Block hash |
blockHeight | Integer | Block height |
coinbase | Boolean | A coinbase transaction or not |
size | Integer | Transaction size |
version | Long | Version |
doubleSpend | Boolean | Double flower or not |
fee | Long | Cost, unit Satoshi |
feePerKbyte | Long | Cost per kByte, unit Satoshi |
inputsCount | Integer | Number of VIN |
outputsCount | Integer | Number of VOUTS |
inputsValue | Double | Total input |
outputsValue | Double | Total output |
realTransferValue | Double | Actual transaction amount |
inputsValueSat | Long | Total input, unit Satoshi |
outputsValueSat | Long | Total output, unit Satoshi |
realTransferValueSat | Long | Total transaction volume |
inputs | Array | Input list |
prevAddresses | String Array | Previous output address |
scriptType | String | Script type |
vinIndex | Integer | Position in the transaction |
prevBlockHeight | Integer | Height of previous block |
prevTxhash | String | Previous output transaction hash |
prevVoutIndex | Integer | Position of previous output in the transaction |
prevValueSat | Long | Previous output quantity,unit Satoshi |
prevValue | Double | Previous output quantity |
prevBlocktime | Long | Previous output transaction time |
prevScriptType | String | Previous output script type |
scriptHex | String | Script data |
scriptData | String | Script display data |
sequence | Long | Input sequence |
lifespan | Integer | Output lifetime |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
witness | String array | Isolate witness signature data |
outputs | Array | Output list |
addresses | String array | Output address |
scriptType | String | Script type |
voutIndex | Integer | output location |
valueSat | Long | Output quantity, unit Satoshi |
value | Double | Output quantity |
fromCoinbase | Boolean | A coinbase output or not |
spent | Boolean | Has it been spent |
spentBlockHeight | Integer | The height of the cost block |
spentBlockHash | String | The hash of the cost block |
spentTxhash | String | The hash of the cost transaction |
spentVinIndex | Integer | The position of the cost input |
spentBlocktime | Long | The time of the cost block |
scriptAsm | String | Script asm |
scriptHex | String | Script data |
ouputType | String | The types of output are: spendable, segwit, unknown |
lockTime | Long | Lock time |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
sigops | Integer | Number of signatures in the transaction |
strippedSize | Integer | Basic transaction size |
virtualSize | Integer | Virtual Size |
weight | Integer | weight |
hasWitness | Boolean | Does it include isolated witness transactions |
witnessHash | String | Quarantine witness hash |
feePerKwu | Long | Unit cost per K weight, unit Satoshi |
feePerKvbyte | Long | Cost per K virtual bytes in Satoshi |
confirm | Integer | Confirmation number |
realAddressBalance | Double | Address balance |
tagMap | Map | Label map, address hash as key, value as label array |
Query Block Transaction List
Query the transaction list of a high block
HTTP Request
GET /api/explorer/v1/{chain}/transactionsNoRestrict
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/transactionNoRestrict
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
queryString | blockHeight | Long | No | Block height |
queryString | offset | Integer | No | Start position, default 0 |
queryString | limit | Integer | No | Return the number of items, the default is 20 |
queryString | sort | String | No | Sort by field:desc/asc;The sorting fields supported are height and timestamp;Default height in reverse order |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data": {
"total": 3196783,
"scrollId": null,
"hits": [
{
"hash": "3bbcf905c61831b7558936e03ff5257baa6f6dcc629796cea7bf7af16acfb9b7",
"blocktime": 1573211898,
"legalRate": 64922,
"index": 2326,
"blockHash": "0000000000000000000645e30db580cc132ed096669a84dd5192c654e0950f65",
"blockHeight": 602850,
"coinbase": false,
"size": 250,
"version": 1,
"doubleSpend": false,
"fee": 500,
"feePerKbyte": 2000,
"inputsCount": 1,
"outputsCount": 2,
"inputsValue": 0.00354234,
"outputsValue": 0.00353734,
"realTransferValue": 0.00348017,
"inputsValueSat": 354234,
"outputsValueSat": 353734,
"realTransferValueSat": 348017,
"inputs": [
{
"prevBlockHash": "0000000000000000000efd376141e80ec85b8c3b57cd0dde9739806321b0d730",
"prevAddresses": [
"325TBWEEv5dpBvCppYGKfoEshro6PP64np"
],
"scriptType": "P2SH_P2WPKH",
"vinIndex": 0,
"prevBlockHeight": 602849,
"prevTxhash": "1b3dad3bc83b3d518ee1eb6d9ffa83275a550e66a4263b2daedbcd3dcb21783e",
"prevVoutIndex": 0,
"prevValueSat": 354234,
"prevValue": 0.00354234,
"prevBlocktime": 1573211540,
"prevScriptType": "P2SH",
"scriptHex": "160014eaff5e6d6ce5fd8cbd2ee6cabc58c6e4973f046c",
"scriptData": "",
"sequence": 4294967293,
"lifespan": 358,
"coindaysDestroyed": 1467,
"witness": [
"3045022100c0a5b0e2708e42fbcc746e029da6616cfe78e8c5b2c448b833381ba12a168da702204ab212d7856a90d88d3911671a8c973e42fd0b19842a86741475c9780b06403201",
"02cb2dbdbcedbfb0bfd33a34f243a62122bd60739f3c465f0b44f3e650bfa1be12"
]
}
],
"outputs": [
{
"addresses": [
"1Ep36WYw8LctrT7XhQpYuzWVQZeQWZFi5q"
],
"scriptType": "P2PKH",
"voutIndex": 0,
"valueSat": 347517,
"value": 0.00347517,
"fromCoinbase": false,
"spent": false,
"spentBlockHeight": -1,
"spentBlockHash": "",
"spentTxhash": "",
"spentVinIndex": -1,
"spentBlocktime": -1,
"scriptAsm": "OP_DUP OP_HASH160 977eef27fb7cec70417c9f0545a96e7fe5b3a1c6 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914977eef27fb7cec70417c9f0545a96e7fe5b3a1c688ac",
"outputType": "Spendable"
},
{
"addresses": [
"325TBWEEv5dpBvCppYGKfoEshro6PP64np"
],
"scriptType": "P2SH",
"voutIndex": 1,
"valueSat": 6217,
"value": 0.00006217,
"fromCoinbase": false,
"spent": true,
"spentBlockHeight": 602850,
"spentBlockHash": "0000000000000000000645e30db580cc132ed096669a84dd5192c654e0950f65",
"spentTxhash": "d77a269946f72c61aff995e16b457e73bed23a424c0162147b34c262b8f0f4b3",
"spentVinIndex": 0,
"spentBlocktime": 1573211898,
"scriptAsm": "OP_HASH160 043e3c4552688c5a4b5358bd50651457127a70fa OP_EQUAL",
"scriptHex": "a914043e3c4552688c5a4b5358bd50651457127a70fa87",
"outputType": "Spendable"
}
],
"lockTime": 0,
"coindaysDestroyed": 1467,
"sigops": 1,
"strippedSize": 140,
"virtualSize": 168,
"weight": 670,
"hasWitness": true,
"witnessHash": "f2191fdce43988b670f89e9cdedb71614a8163c18089e2f03a0f8da7717bb86a",
"feePerKwu": 746,
"feePerKvbyte": 2976,
"confirm": 1,
"realAddressBalance": 0
}
]
"extend": {
"19tK9pC6ggFybYWwkGRcWDSKpT6MxsDWDJ":
"okex"],
"19HBfMyc7VpwWqk66NJFeHz4Dz3SWeznN2":
"huobi",
"id": "19HBfMyc7VpwWqk66NJFeHz4Dz3SWeznN2"
}
}
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Block hash |
blocktime | Long | Block time |
legalRate | Double | Exchange rate against fiat |
index | Long | Transaction index |
blockHash | String | Block hash |
blockHeight | Integer | Block height |
coinbase | Boolean | A coinbase transaction or not |
size | Integer | Transaction size |
version | Long | Version |
doubleSpend | Boolean | Double flower or not |
fee | Long | Cost, unit Satoshi |
feePerKbyte | Long | Cost per kByte, unit Satoshi |
inputsCount | Integer | Number of VIN |
outputsCount | Integer | Number of VOUTS |
inputsValue | Double | Total input |
outputsValue | Double | Total output |
realTransferValue | Double | Actual transaction amount |
inputsValueSat | Long | Total input, unit Satoshi |
outputsValueSat | Long | Total output, unit Satoshi |
realTransferValueSat | Long | Total transaction volume |
inputs | Array | Input list |
prevAddresses | String Array | Previous output address |
scriptType | String | Script type |
vinIndex | Integer | Position in the transaction |
prevBlockHeight | Integer | Height of previous block |
prevTxhash | String | Previous output transaction hash |
prevVoutIndex | Integer | Position of previous output in the transaction |
prevValueSat | Long | Previous output quantity,unit Satoshi |
prevValue | Double | Previous output quantity |
prevBlocktime | Long | Previous output transaction time |
prevScriptType | String | Previous output script type |
scriptHex | String | Script data |
scriptData | String | Script display data |
sequence | Long | Input sequence |
lifespan | Integer | Output lifetime |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
witness | String array | Isolate witness signature data |
outputs | Array | Output list |
addresses | String array | Output address |
scriptType | String | Script type |
voutIndex | Integer | output location |
valueSat | Long | Output quantity, unit Satoshi |
value | Double | Output quantity |
fromCoinbase | Boolean | A coinbase output or not |
spent | Boolean | Has it been spent |
spentBlockHeight | Integer | The height of the cost block |
spentBlockHash | String | The hash of the cost block |
spentTxhash | String | The hash of the cost transaction |
spentVinIndex | Integer | The position of the cost input |
spentBlocktime | Long | The time of the cost block |
scriptAsm | String | Script asm |
scriptHex | String | Script data |
ouputType | String | The types of output are: spendable, segwit, unknown |
lockTime | Long | Lock time |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
sigops | Integer | Number of signatures in the transaction |
strippedSize | Integer | Basic transaction size |
virtualSize | Integer | Virtual Size |
weight | Integer | weight |
hasWitness | Boolean | Does it include isolated witness transactions |
witnessHash | String | Quarantine witness hash |
feePerKwu | Long | Unit cost per K weight, unit Satoshi |
feePerKvbyte | Long | Cost per K virtual bytes in Satoshi |
confirm | Integer | Confirmation number |
realAddressBalance | Double | Address balance |
extend | Map | Label map, address hash as key, value as label array |
Query Large Transaction List
Query the large transaction list of a blockchain, and the transaction order is block height reverse and index positive by default.
HTTP Request
GET /api/explorer/v1/{chain}/transactions
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/transactions
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
queryString | type | String | Yes | Unique value: large, which means to query large transactions |
queryString | upperBound | Long | Yes | Large amount limit boundary |
downBound | ||||
queryString | offset | Integer | No | Start position, default 0 |
queryString | limit | Integer | No | Return the number of items, the default is 20 |
queryString | sort | String | No | Sort by field:desc/asc;The sorting fields supported are height and timestamp;Default height in reverse order |
Example Response
{
"code": 0,
"msg": "",
"detailMsg": "",
"data": {
"total": 3196783,
"scrollId": null,
"hits": [
{
"hash": "3bbcf905c61831b7558936e03ff5257baa6f6dcc629796cea7bf7af16acfb9b7",
"blocktime": 1573211898,
"legalRate": 64922,
"index": 2326,
"blockHash": "0000000000000000000645e30db580cc132ed096669a84dd5192c654e0950f65",
"blockHeight": 602850,
"coinbase": false,
"size": 250,
"version": 1,
"doubleSpend": false,
"fee": 500,
"feePerKbyte": 2000,
"inputsCount": 1,
"outputsCount": 2,
"inputsValue": 0.00354234,
"outputsValue": 0.00353734,
"realTransferValue": 0.00348017,
"inputsValueSat": 354234,
"outputsValueSat": 353734,
"realTransferValueSat": 348017,
"inputs": [
{
"prevBlockHash": "0000000000000000000efd376141e80ec85b8c3b57cd0dde9739806321b0d730",
"prevAddresses": [
"325TBWEEv5dpBvCppYGKfoEshro6PP64np"
],
"scriptType": "P2SH_P2WPKH",
"vinIndex": 0,
"prevBlockHeight": 602849,
"prevTxhash": "1b3dad3bc83b3d518ee1eb6d9ffa83275a550e66a4263b2daedbcd3dcb21783e",
"prevVoutIndex": 0,
"prevValueSat": 354234,
"prevValue": 0.00354234,
"prevBlocktime": 1573211540,
"prevScriptType": "P2SH",
"scriptHex": "160014eaff5e6d6ce5fd8cbd2ee6cabc58c6e4973f046c",
"scriptData": "",
"sequence": 4294967293,
"lifespan": 358,
"coindaysDestroyed": 1467,
"witness": [
"3045022100c0a5b0e2708e42fbcc746e029da6616cfe78e8c5b2c448b833381ba12a168da702204ab212d7856a90d88d3911671a8c973e42fd0b19842a86741475c9780b06403201",
"02cb2dbdbcedbfb0bfd33a34f243a62122bd60739f3c465f0b44f3e650bfa1be12"
]
}
],
"outputs": [
{
"addresses": [
"1Ep36WYw8LctrT7XhQpYuzWVQZeQWZFi5q"
],
"scriptType": "P2PKH",
"voutIndex": 0,
"valueSat": 347517,
"value": 0.00347517,
"fromCoinbase": false,
"spent": false,
"spentBlockHeight": -1,
"spentBlockHash": "",
"spentTxhash": "",
"spentVinIndex": -1,
"spentBlocktime": -1,
"scriptAsm": "OP_DUP OP_HASH160 977eef27fb7cec70417c9f0545a96e7fe5b3a1c6 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914977eef27fb7cec70417c9f0545a96e7fe5b3a1c688ac",
"outputType": "Spendable"
},
{
"addresses": [
"325TBWEEv5dpBvCppYGKfoEshro6PP64np"
],
"scriptType": "P2SH",
"voutIndex": 1,
"valueSat": 6217,
"value": 0.00006217,
"fromCoinbase": false,
"spent": true,
"spentBlockHeight": 602850,
"spentBlockHash": "0000000000000000000645e30db580cc132ed096669a84dd5192c654e0950f65",
"spentTxhash": "d77a269946f72c61aff995e16b457e73bed23a424c0162147b34c262b8f0f4b3",
"spentVinIndex": 0,
"spentBlocktime": 1573211898,
"scriptAsm": "OP_HASH160 043e3c4552688c5a4b5358bd50651457127a70fa OP_EQUAL",
"scriptHex": "a914043e3c4552688c5a4b5358bd50651457127a70fa87",
"outputType": "Spendable"
}
],
"lockTime": 0,
"coindaysDestroyed": 1467,
"sigops": 1,
"strippedSize": 140,
"virtualSize": 168,
"weight": 670,
"hasWitness": true,
"witnessHash": "f2191fdce43988b670f89e9cdedb71614a8163c18089e2f03a0f8da7717bb86a",
"feePerKwu": 746,
"feePerKvbyte": 2976,
"confirm": 1,
"realAddressBalance": 0
}
]
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Block hash |
blocktime | Long | Block time |
legalRate | Double | Exchange rate against fiat |
index | Long | Transaction index |
blockHash | String | Block hash |
blockHeight | Integer | Block height |
coinbase | Boolean | A coinbase transaction or not |
size | Integer | Transaction size |
version | Long | Version |
doubleSpend | Boolean | Double flower or not |
fee | Long | Cost, unit Satoshi |
feePerKbyte | Long | Cost per kByte, unit Satoshi |
inputsCount | Integer | Number of VIN |
outputsCount | Integer | Number of VOUTS |
inputsValue | Double | Total input |
outputsValue | Double | Total output |
realTransferValue | Double | Actual transaction amount |
inputsValueSat | Long | Total input, unit Satoshi |
outputsValueSat | Long | Total output, unit Satoshi |
realTransferValueSat | Long | Total transaction volume |
inputs | Array | Input list |
prevAddresses | String Array | Previous output address |
scriptType | String | Script type |
vinIndex | Integer | Position in the transaction |
prevBlockHeight | Integer | Height of previous block |
prevTxhash | String | Previous output transaction hash |
prevVoutIndex | Integer | Position of previous output in the transaction |
prevValueSat | Long | Previous output quantity,unit Satoshi |
prevValue | Double | Previous output quantity |
prevBlocktime | Long | Previous output transaction time |
prevScriptType | String | Previous output script type |
scriptHex | String | Script data |
scriptData | String | Script display data |
sequence | Long | Input sequence |
lifespan | Integer | Output lifetime |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
witness | String array | Isolate witness signature data |
outputs | Array | Output list |
addresses | String array | Output address |
scriptType | String | Script type |
voutIndex | Integer | output location |
valueSat | Long | Output quantity, unit Satoshi |
value | Double | Output quantity |
fromCoinbase | Boolean | A coinbase output or not |
spent | Boolean | Has it been spent |
spentBlockHeight | Integer | The height of the cost block |
spentBlockHash | String | The hash of the cost block |
spentTxhash | String | The hash of the cost transaction |
spentVinIndex | Integer | The position of the cost input |
spentBlocktime | Long | The time of the cost block |
scriptAsm | String | Script asm |
scriptHex | String | Script data |
ouputType | String | The types of output are: spendable, segwit, unknown |
lockTime | Long | Lock time |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
sigops | Integer | Number of signatures in the transaction |
strippedSize | Integer | Basic transaction size |
virtualSize | Integer | Virtual Size |
weight | Integer | weight |
hasWitness | Boolean | Does it include isolated witness transactions |
witnessHash | String | Quarantine witness hash |
feePerKwu | Long | Unit cost per K weight, unit Satoshi |
feePerKvbyte | Long | Cost per K virtual bytes in Satoshi |
confirm | Integer | Confirmation number |
realAddressBalance | Double | Address balance |
Query Unconfirmed Transaction List
Query the unconfirmed transaction list of a blockchain, and the default blocktime is in reverse order.
HTTP Request
GET /api/explorer/v1/{chain}/transactions
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/transactions
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of the blockchain to be queried |
queryString | offset | Integer | No | Start position, default 0 |
queryString | limit | Integer | No | Return the number of items, the default is 20 |
queryString | sort | String | No | The sorting rules are as follows: field:desc/asc By default, the transaction is sorted in reverse time stamp order |
queryString | type | String | No | Unique value,"pending" |
Example Response
{
"code": 0,
"msg": "",
"detailMsg": "",
"data": {
"total": 3196783,
"scrollId": null,
"hits": [
{
"hash": "3bbcf905c61831b7558936e03ff5257baa6f6dcc629796cea7bf7af16acfb9b7",
"blocktime": 1573211898,
"legalRate": 64922,
"index": 2326,
"blockHash": "0000000000000000000645e30db580cc132ed096669a84dd5192c654e0950f65",
"blockHeight": 602850,
"coinbase": false,
"size": 250,
"version": 1,
"doubleSpend": false,
"fee": 500,
"feePerKbyte": 2000,
"inputsCount": 1,
"outputsCount": 2,
"inputsValue": 0.00354234,
"outputsValue": 0.00353734,
"realTransferValue": 0.00348017,
"inputsValueSat": 354234,
"outputsValueSat": 353734,
"realTransferValueSat": 348017,
"inputs": [
{
"prevBlockHash": "0000000000000000000efd376141e80ec85b8c3b57cd0dde9739806321b0d730",
"prevAddresses": [
"325TBWEEv5dpBvCppYGKfoEshro6PP64np"
],
"scriptType": "P2SH_P2WPKH",
"vinIndex": 0,
"prevBlockHeight": 602849,
"prevTxhash": "1b3dad3bc83b3d518ee1eb6d9ffa83275a550e66a4263b2daedbcd3dcb21783e",
"prevVoutIndex": 0,
"prevValueSat": 354234,
"prevValue": 0.00354234,
"prevBlocktime": 1573211540,
"prevScriptType": "P2SH",
"scriptHex": "160014eaff5e6d6ce5fd8cbd2ee6cabc58c6e4973f046c",
"scriptData": "",
"sequence": 4294967293,
"lifespan": 358,
"coindaysDestroyed": 1467,
"witness": [
"3045022100c0a5b0e2708e42fbcc746e029da6616cfe78e8c5b2c448b833381ba12a168da702204ab212d7856a90d88d3911671a8c973e42fd0b19842a86741475c9780b06403201",
"02cb2dbdbcedbfb0bfd33a34f243a62122bd60739f3c465f0b44f3e650bfa1be12"
]
}
],
"outputs": [
{
"addresses": [
"1Ep36WYw8LctrT7XhQpYuzWVQZeQWZFi5q"
],
"scriptType": "P2PKH",
"voutIndex": 0,
"valueSat": 347517,
"value": 0.00347517,
"fromCoinbase": false,
"spent": false,
"spentBlockHeight": -1,
"spentBlockHash": "",
"spentTxhash": "",
"spentVinIndex": -1,
"spentBlocktime": -1,
"scriptAsm": "OP_DUP OP_HASH160 977eef27fb7cec70417c9f0545a96e7fe5b3a1c6 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a914977eef27fb7cec70417c9f0545a96e7fe5b3a1c688ac",
"outputType": "Spendable"
},
{
"addresses": [
"325TBWEEv5dpBvCppYGKfoEshro6PP64np"
],
"scriptType": "P2SH",
"voutIndex": 1,
"valueSat": 6217,
"value": 0.00006217,
"fromCoinbase": false,
"spent": true,
"spentBlockHeight": 602850,
"spentBlockHash": "0000000000000000000645e30db580cc132ed096669a84dd5192c654e0950f65",
"spentTxhash": "d77a269946f72c61aff995e16b457e73bed23a424c0162147b34c262b8f0f4b3",
"spentVinIndex": 0,
"spentBlocktime": 1573211898,
"scriptAsm": "OP_HASH160 043e3c4552688c5a4b5358bd50651457127a70fa OP_EQUAL",
"scriptHex": "a914043e3c4552688c5a4b5358bd50651457127a70fa87",
"outputType": "Spendable"
}
],
"lockTime": 0,
"coindaysDestroyed": 1467,
"sigops": 1,
"strippedSize": 140,
"virtualSize": 168,
"weight": 670,
"hasWitness": true,
"witnessHash": "f2191fdce43988b670f89e9cdedb71614a8163c18089e2f03a0f8da7717bb86a",
"feePerKwu": 746,
"feePerKvbyte": 2976,
"confirm": 1,
"realAddressBalance": 0
}
]
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Block hash |
blocktime | Long | Block time |
legalRate | Double | Exchange rate against fiat |
index | Long | Transaction index |
blockHash | String | Block hash |
blockHeight | Integer | Block height |
coinbase | Boolean | A coinbase transaction or not |
size | Integer | Transaction size |
version | Long | Version |
doubleSpend | Boolean | Double flower or not |
fee | Long | Cost, unit Satoshi |
feePerKbyte | Long | Cost per kByte, unit Satoshi |
inputsCount | Integer | Number of VIN |
outputsCount | Integer | Number of VOUTS |
inputsValue | Double | Total input |
outputsValue | Double | Total output |
realTransferValue | Double | Actual transaction amount |
inputsValueSat | Long | Total input, unit Satoshi |
outputsValueSat | Long | Total output, unit Satoshi |
realTransferValueSat | Long | Total transaction volume |
inputs | Array | Input list |
prevAddresses | String Array | Previous output address |
scriptType | String | Script type |
vinIndex | Integer | Position in the transaction |
prevBlockHeight | Integer | Height of previous block |
prevTxhash | String | Previous output transaction hash |
prevVoutIndex | Integer | Position of previous output in the transaction |
prevValueSat | Long | Previous output quantity,unit Satoshi |
prevValue | Double | Previous output quantity |
prevBlocktime | Long | Previous output transaction time |
prevScriptType | String | Previous output script type |
scriptHex | String | Script data |
scriptData | String | Script display data |
sequence | Long | Input sequence |
lifespan | Integer | Output lifetime |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
witness | String array | Isolate witness signature data |
outputs | Array | Output list |
addresses | String array | Output address |
scriptType | String | Script type |
voutIndex | Integer | output location |
valueSat | Long | Output quantity, unit Satoshi |
value | Double | Output quantity |
fromCoinbase | Boolean | A coinbase output or not |
spent | Boolean | Has it been spent |
spentBlockHeight | Integer | The height of the cost block |
spentBlockHash | String | The hash of the cost block |
spentTxhash | String | The hash of the cost transaction |
spentVinIndex | Integer | The position of the cost input |
spentBlocktime | Long | The time of the cost block |
scriptAsm | String | Script asm |
scriptHex | String | Script data |
ouputType | String | The types of output are: spendable, segwit, unknown |
lockTime | Long | Lock time |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
sigops | Integer | Number of signatures in the transaction |
strippedSize | Integer | Basic transaction size |
virtualSize | Integer | Virtual Size |
weight | Integer | weight |
hasWitness | Boolean | Does it include isolated witness transactions |
witnessHash | String | Quarantine witness hash |
feePerKwu | Long | Unit cost per K weight, unit Satoshi |
feePerKvbyte | Long | Cost per K virtual bytes in Satoshi |
confirm | Integer | Confirmation number |
realAddressBalance | Double | Address balance |
Address Interface
Query Address Information
Query the basic information of an address.
HTTP Requests
GET /api/explorer/v1/{chain}/addresses/{address}
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/addresses/{address}
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of blockchain to be queried |
Path | address | String | Yes | Address |
Example Response
{
"code": 0,
"msg": "",
"detailMsg": "",
"data": {
"address": "bc1qn9enaxtnjhkypusvcmwqf5eg20nxss9gc90rnk",
"balance": 0,
"legalRate": 64922,
"balanceSat": 0,
"totalRecievedSat": 1099,
"totalRecieved": 0.00001099,
"totalSentSat": 1099,
"totalSent": 0.00001099,
"txCount": 2,
"tags":
"unconfirmedTxCount": 0,
"unconfirmedReceivedSat": 0,
"unconfirmedSentSat": 0,
"unspentTxCount": 0,
"firstTransactionTime": 1570446359000,
"lastTransactionTime": 1571840679000
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
address | String | Address hash |
balance | Double | Balance |
legalRate | Double | Exchange rate against fiat |
balanceSat | Long | Transaction index |
totalRecievedSat | String | Total reception (minimum accuracy) |
totalRecieved | Integer | Total reception |
totalSentSat | Boolean | Is it a coinbase transaction |
totalSent | Integer | Total sending volume |
txCount | Long | Number of transactions |
tags | Array | Tag array |
unconfirmedTxCount | Boolean | Number of unconfirmed transactions |
unconfirmedReceivedSat | Long | Unacknowledged reception (minimum accuracy) |
unconfirmedSentSat | Long | Unacknowledged sending (minimum accuracy) |
unspentTxCount | Long | Numbers of transactions not spent |
firstTransactionTime | Long | First transaction time |
lastTransactionTime | Long | Last trading time |
Query Address Transaction List
Query the transaction list of an address, including the unconfirmed transactions and confirmed transactions related to the address. The transaction sorting rule is that the unconfirmed transactions have high priority and are inverted according to the actual broadcast, and the confirmed transactions are inverted according to the block height.
HTTP Requests
GET /api/explorer/v1/{chain}/addresses/{address}/transactions
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/addresses/{address}/transactions
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of blockchain to be queried |
Path | address | String | Yes | Address |
queryString | offset | Integer | No | Start position, default 0 |
queryString | limit | Integer | No | Return the number of items, the default is 20 |
Example Response
{
"code": 0,
"msg": "",
"detailMsg": "",
"data": {
"total": 1,
"hits": [
{
"hash": "5554fcec49e919347205aa6e7487d0d6b956ee505bbcf43739153070b8da618e",
"blocktime": 1576355590,
"legalRate": 10092.79,
"index": 181,
"blockHash": "0000000000000000000ff6ac728cedff8cbcd04e4d77e54de0aa77d10d9996b1",
"blockHeight": 608141,
"coinbase": false,
"size": 257,
"version": 2,
"doubleSpend": false,
"fee": 5140,
"feePerKbyte": 20000,
"inputsCount": 1,
"outputsCount": 2,
"inputsValue": 1499.0986048,
"outputsValue": 1499.0985534,
"realTransferValue": 1499.0986048,
"inputsValueSat": 149909860480,
"outputsValueSat": 149909855340,
"realTransferValueSat": 149909860480,
"inputs": [
{
"prevAddresses": [
"19tK9pC6ggFybYWwkGRcWDSKpT6MxsDWDJ"
],
"scriptType": "P2PKH",
"vinIndex": 0,
"prevBlockHeight": 581174,
"prevTxhash": "0130cbdc86f81aedeb65afca20add3db8f92c296e7c92cb07cfbf9ac91265f02",
"prevVoutIndex": 0,
"prevValueSat": 149909860480,
"prevValue": 1499.0986048,
"prevBlocktime": 1560813252,
"prevScriptType": "P2PKH",
"scriptHex": "102301203",
"scriptData": "",
"sequence": 4294967293,
"lifespan": 15542338,
"coindaysDestroyed": 26967010661030
}
],
"outputs": [
{
"addresses": [
"1AvtcQYQiwwJkHZsExVHmjf12qbCWR48t6"
],
"scriptType": "P2PKH",
"voutIndex": 0,
"valueSat": 4000000000,
"value": 40.0,
"fromCoinbase": false,
"spent": true,
"spentBlockHeight": 608143,
"spentBlockHash": "0000000000000000000ca127a3835e0e1dc6608801bbe5b3bd9f374d2b1d4ccc",
"spentTxhash": "5f48c0f3c0cfcc88c263464841c74c4fd05b6f5ca181b28b8f5c11a358b54a12",
"spentVinIndex": 0,
"spentBlocktime": 1576357017,
"scriptAsm": "OP_DUP OP_HASH160 6cea42a0638e3caf79a1624a3649b8c996afba74 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a9146cea42a0638e3caf79a1624a3649b8c996afba7488ac",
"outputType": "Spendable"
},
{
"addresses": [
"19HBfMyc7VpwWqk66NJFeHz4Dz3SWeznN2"
],
"scriptType": "P2PKH",
"voutIndex": 1,
"valueSat": 145909855340,
"value": 1459.0985534,
"fromCoinbase": false,
"spent": false,
"spentBlockHeight": -1,
"spentBlockHash": "",
"spentTxhash": "",
"spentVinIndex": -1,
"spentBlocktime": -1,
"scriptAsm": "OP_DUP OP_HASH160 5ad08fb4e4089987b68a20d681216ae8b3003963 OP_EQUALVERIFY OP_CHECKSIG",
"scriptHex": "76a9145ad08fb4e4089987b68a20d681216ae8b300396388ac",
"outputType": "Spendable"
}
],
"lockTime": 608140,
"coindaysDestroyed": 26967010661030,
"sigops": 2,
"strippedSize": 257,
"virtualSize": 257,
"weight": 1028,
"hasWitness": false,
"witnessHash": "",
"feePerKwu": 5000,
"feePerKvbyte": 20000,
"confirm": 9769,
"realAddressBalance": -149909860480
}
],
"extend": {
"19tK9pC6ggFybYWwkGRcWDSKpT6MxsDWDJ": {
"address": "19tK9pC6ggFybYWwkGRcWDSKpT6MxsDWDJ",
"tag": "okex",
"id": "19tK9pC6ggFybYWwkGRcWDSKpT6MxsDWDJ"
},
"19HBfMyc7VpwWqk66NJFeHz4Dz3SWeznN2": {
"address": "19HBfMyc7VpwWqk66NJFeHz4Dz3SWeznN2",
"tag": "huobi",
"id": "19HBfMyc7VpwWqk66NJFeHz4Dz3SWeznN2"
}
}
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Block hash |
blocktime | Long | Block time |
legalRate | Double | Exchange rate against fiat |
index | Long | Transaction index |
blockHash | String | Block hash |
blockHeight | Integer | Block height |
coinbase | Boolean | Is it a coinbase transaction |
size | Integer | Transaction size |
version | Long | Version |
doubleSpend | Boolean | DoubleSpend or not |
fee | Long | Fee, unit satoshi |
feePerKbyte | Long | Fee per kByte, unit satoshi |
inputsCount | Integer | Number of vin |
outputsCount | Integer | Number of vout |
inputsValue | Double | Total input |
outputsValue | Double | Total output |
realTransferValue | Double | Actual transaction amount |
inputsValueSat | Long | Total input, unit satoshi |
outputsValueSat | Long | Total output , unit satoshi |
realTransferValueSat | Long | Total transaction volume |
inputs | Array | Input list |
prevAddresses | String Array | Previous output address |
scriptType | String | Script type |
vinIndex | Integer | Position in the transaction |
prevBlockHeight | Integer | Height of previous block |
prevTxhash | String | Transaction hash of previous output |
prevVoutIndex | Integer | Position of previous output in the transaction |
prevValueSat | Long | Previous output quantity ,unit Satoshi |
prevValue | Double | Previous output quantity |
prevBlocktime | Long | Previous output transaction time |
prevScriptType | String | Previous output script type |
scriptHex | String | Script data |
scriptData | String | Script display data |
sequence | Long | Input sequence |
lifespan | Integer | Output lifetime |
coindaysDestroyed | Long | Number of coins destroyed per day, unit Satoshi |
witness | String array | Isolate witness signature data |
outputs | Array | Output list |
addresses | String array | Output address |
scriptType | String | Script type |
voutIndex | Integer | output location |
valueSat | Long | Output quantity, unit satoshi |
value | Double | Output quantity |
fromCoinbase | Boolean | Is it a coinbase transaction |
spent | Boolean | Has it been spent |
spentBlockHeight | Integer | Cost block height |
spentBlockHash | String | Cost block hash |
spentTxhash | String | Spend transaction hash |
spentVinIndex | Integer | Cost input location |
spentBlocktime | Long | Block time spent |
scriptAsm | String | Script asm |
scriptHex | String | Script data |
ouputType | String | The types of output are:spendable, segwit,unknow |
lockTime | Long | Lock time |
coindaysDestroyed | Long | The number of coins destroyed per day, unit satoshi |
sigops | Integer | Number of signatures in the transaction |
strippedSize | Integer | Basic transaction size |
virtualSize | Integer | Virtual Size |
weight | Integer | Weight |
hasWitness | Boolean | Does it include isolated witness transactions |
witnessHash | String | Quarantine witness hash |
feePerKwu | Long | Unit cost per K weight, unit satoshi |
feePerKvbyte | Long | Cost per K virtual bytes, unit satoshi |
confirm | Integer | Confirmation |
realAddressBalance | Double | Address balance |
extend | Map | Label map, address hash is key |
Query Rich Address Ranking Statistics
Query the address ranking information of a blockchain.
HTTP Requests
GET /api/explorer/v1/{chain}/richers
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/richers
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of blockchain to be queried |
queryString | offset | Integer | No | Start position, default 0 |
queryString | limit | Integer | No | Return the number of items, the default is 20 |
Example Response
{
"code": 0,
"msg": "",
"detailMsg": "",
"data": {
"address": "bc1qn9enaxtnjhkypusvcmwqf5eg20nxss9gc90rnk",
"balance": 0,
"legalRate": 64922,
"balanceSat": 0,
"totalRecievedSat": 1099,
"totalRecieved": 0.00001099,
"totalSentSat": 1099,
"totalSent": 0.00001099,
"txCount": 2,
"tags": ["okex"],
"unconfirmedTxCount": 0,
"unconfirmedReceivedSat": 0,
"unconfirmedSentSat": 0,
"unspentTxCount": 0,
"firstTransactionTime": 1570446359000,
"lastTransactionTime": 1571840679000,
"richRank":1
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
address | String | Address hash |
balance | Double | Balance |
legalRate | Double | Exchange rate against fiat |
balanceSat | Long | Transaction index |
totalRecievedSat | String | Total reception (minimum accuracy) |
totalRecieved | Integer | Total reception |
totalSentSat | Boolean | Is it a coinbase transaction |
totalSent | Integer | Total sending volume |
txCount | Long | Number of transactions |
tags | Array | Tag array |
unconfirmedTxCount | Boolean | Number of unconfirmed transactions |
unconfirmedReceivedSat | Long | Unacknowledged reception (minimum accuracy) |
unconfirmedSentSat | Long | Unacknowledged sending (minimum accuracy) |
unspentTxCount | Long | Numbers of transactions not spent |
firstTransactionTime | Long | First transaction time |
lastTransactionTime | Long | Last trading time |
richRank | Integer | Address ranking |
Query The List of Unused Transactions
Query a list of transactions whose addresses have not been spent.
HTTP Requests
/api/explorer/v1//{chain}/addresses/{address}/unspent
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/addresses/{address}/unspent
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case of the symbol of blockchain to be queried |
address | address | String | Yes | Address to be inquired |
queryString | offset | Integer | No | Start position, default 0 |
queryString | limit | Integer | No | Return the number of items, the default is 20 |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"total":24,
"hits":[
{
"txhash":"857986f3eb87b6eef6471e010f136d7dcdcf55bf0ffbe26a49fa293629f73639",
"voutIndex":1,
"blockHeightt":612057,
"valueSat":848,
"value":0.00000848,
"address":"bc1qjl8uwezzlech723lpnyuza0h2cdkvxvh54v3dn",
"scriptHex":"001497cfc76442fe717f2a3f0cc9c175f7561b661997",
"fromCoinbase":false,
"confirmations":10912
}
],
"extend":null
}
Response Parameters
|Parameters | Types | Description | | | ----------- | -------- | ------------------------------------------------------------ | | txhash| String |Transaction hash |voutIndex |int| Index in trading |blockHeight |int| Block height |valueSat| Long| Address balance (minimum precision) |value| double| Address balance |address| String |Address |scriptHex| String |Script |fromCoinbase| Boolean |Is it from a coinbase transaction |confirmations| int|Number of confirmed transactions
Wallet Interface
Query Address Balance
Check the balance of the address according to the address.
HTTP Requests
GET /api/explorer/v1/{chain}/addresses/balance/{addresses}
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/addresses/balance/{addresses}
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case symbol of blockchain to be queried |
Path | address | String | Yes | Address to query balance (multiple addresses can be separated by commas) |
Example Response
{
"code": 0,
"msg": "",
"detailMsg": "",
"data": [
{
"address": "1FgM2PJkhuyeFQDz3jACiqgGezMFjQgasU",
"balance": 0,
"balanceSat": 0
},
{
"address": "1UttWdiAd9PFrEnZc3tdjPafp4f7AAwnc",
"balance": 0,
"balanceSat": 0
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
address | String | Address to query balance |
balance | Double | Balance |
balanceSat | BigInteger | Minimum precision balance |
Query the UTXO of the Address
Query the UTXO of the address according to the address.
HTTP Requests
GET /api/explorer/v1/{chain}/addresses/{address}/unspent
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/addresses/{address}/unspent
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case symbol of blockchain to be queried |
Path | address | String | Yes | Address to query balance |
queryString | offset | Integer | No | Start position, default 0 |
queryString | limit | Integer | No | Return the number of items, 10 by default |
Example Response
{
"code": 0,
"msg": "",
"detailMsg": "",
"data": {
"total": 2,
"hits":[
{
"txhash": "d77a269946f72c61aff995e16b457e73bed23a424c0162147b34c262b8f0f4b3",
"voutIndex": 0,
"blockHeight": 64922,
"valueSat": 990000,
"value": 0.99,
"address": "bc1qn9enaxtnjhkypusvcmwqf5eg20nxss9gc90rnk",
"scriptHex": "a914043e3c4552688c5a4b5358bd50651457127a70fa87",
"fromCoinbase": false,
"confirmations": 2
},
{
"txhash": "d77a269946f72c61aff995e16b457e73bed23a424c0162147b34c262b8f0f4b3",
"voutIndex": 0,
"blockHeight": 64922,
"valueSat": 990000,
"value": 0.99,
"address": "bc1qn9enaxtnjhkypusvcmwqf5eg20nxss9gc90rnk",
"scriptHex": "a914043e3c4552688c5a4b5358bd50651457127a70fa87",
"fromCoinbase": false,
"confirmations": 2
}
]
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
txhash | String | Transaction hash |
voutIndex | int | Index in trading |
valueSat | Long | Address balance (minimum precision) |
blockHeight | int | Block height |
value | double | Address balance |
address | String | Address |
scriptHex | String | Script |
fromCoinbase | Boolean | Is it from a coinbase transaction |
confirmations | int | Number of confirmed transactions |
Broadcast Transaction
Broadcast transaction, synchronous interface.
HTTP Requests
POST /api/explorer/v1/{chain}/transaction/publish
Request Example
POST https://www.oklink.com/api/explorer/v1/{chain}/transaction/publish
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case symbol of blockchain to be queried |
RequestBody | signedTx | String | Yes | Packaged transaction string |
The form of json | txHash | String | Optional | Transaction hash |
Example Response
{
"code": 0,
"msg": "",
"detailMsg": "",
"data": {
"txhash": d77a269946f72c61aff995e16b457e73bed23a424c0162147b34c262b8f0f4b3,
"resultCode": 100,
"resultMsg": "error info",
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
txhash | String | Transaction hash |
Decode Transaction
Decode transaction
HTTP Requests
POST /api/explorer/v1/{chain}/transaction/decode
Request Example
POST https://www.oklink.com/api/explorer/v1/{chain}/transaction/decode
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | Lower case symbol of blockchain to be queried |
RequestBody | signedTx | String | Yes | Packaged transaction string |
The form of json | txHash | String | Optional | Transaction hash |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"m":{
"txid":"81c8447bf780dacedf67c45908aafcde43c78ae108b3a06a278362ad306f7239",
"hash":"81c8447bf780dacedf67c45908aafcde43c78ae108b3a06a278362ad306f7239",
"version":1,
"size":224,
"vsize":224,
"weight":896,
"locktime":0,
"vin":[
{
"txid":"2555fe195e9de0a4725c9b76008e93bfb47d7a844309853a27a66a092ecf457c",
"vout":1,
"scriptSig":{
"asm":"12313[ALL]",
"hex":"12313"
},
"sequence":4294967295
}
],
"vout":[
{
"value":0.00271,
"n":0,
"scriptPubKey":{
"asm":"OP_HASH160 7cfcfaae9ec7c505538c7bbfe23d6b3c9d7e0e0e OP_EQUAL",
"hex":"a9147cfcfaae9ec7c505538c7bbfe23d6b3c9d7e0e0e87",
"reqSigs":1,
"type":"scripthash",
"addresses":[
"3D5tmdpJe2tdNmosuLGNwMT9bcym34K3LT"
]
}
},
{
"value":0.01981163,
"n":1,
"scriptPubKey":{
"asm":"OP_DUP OP_HASH160 de1f36251545fa30bb40d4d5288ceff3b25e2197 OP_EQUALVERIFY OP_CHECKSIG",
"hex":"76a914de1f36251545fa30bb40d4d5288ceff3b25e219788ac",
"reqSigs":1,
"type":"pubkeyhash",
"addresses":[
"1MFUQCaXzoQPkx6xrXbjrpmtnfZrStgQ3y"
]
}
}
]
}
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
m | object | Returns a mapper object |
DeFi Related Interface
List of DeFi Projects
Return to the list of defi items and basic lock information. At present, only Ethereum is supported.
HTTP Requests
GET /api/explorer/v1/defi/list
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/list
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | eth |
queryString | category | String | No | Return all items of this type, not all items |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"total":10,
"hits":[
{
"name":"Maker",
"category":"Lending",
"locked":1017144308,
"lockedRate":0.41,
"logoUrl":"http://static.bafang.com/cdn/explorer/defi/Maker.png",
"totalLocked":null,
"totalLend":null,
"totalTxValue24h":null,
"txValue24ChangeRate":null,
"lendRate":0,
"borrowRate":0.8935243138767099,
"lockedDayChangeRate":4.83
}
],
"extend":{
"totalLocked":2505455469
}
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
name | String | Project name |
category | String | Project category |
secondCategory | String | Secondary classification(Mainly DEX projects) |
underlyingAsset | String | Underlying asset(Mainly anchor assets) |
locked | Long | Locked amount, unit dollar |
lockedRate | Double | Locked rate |
logoUrl | String | Logo URL |
totalLocked | Long | Total locked |
totalLend | Double | Total lend(Special field of mortgage loan item) |
lendRate | Double | Interest rates on deposits(Special field of mortgage loan item) |
borrowRate | Double | Borrowing rates(Special field of mortgage loan item) |
timestamp | Long | Time stamp |
lockedDayChangeRate | Double | Daily change rate of locked amount |
lockedWeekChangeRate | Double | Weekly change rate of locked amount |
lockedMonthChangeRate | Double | Monthly change rate of locked amount |
DeFi Project Details
Returns the details of a specific defi project.
HTTP Requests
GET /api/explorer/v1/defi/info
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/info
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | eth |
queryString | name | String | Yes | Returns the project information |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"name":"Compound",
"category":"Lending",
"locked":782608208,
"lockedRate":null,
"logoUrl":"http://static.bafang.com/cdn/explorer/defi/Compound.png",
"totalLocked":null,
"totalLend":null,
"totalTxValue24h":null,
"txValue24ChangeRate":null,
"lendRate":8.401478666154302,
"borrowRate":10.780960217743807,
"lockedDayChangeRate":8.33,
"website":"https://compound.finance",
"tokenSymbol":"COMP",
"tokenAddress":"0xc00e94cb662c3520282e6f5717214004a7f26888",
"tokenPrice":null,
"tokenPriceChangeRate24h":null,
"releaseTime":null,
"location":"San Francisco, CA, US",
"contractAddresses":[
"0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
"0x6c8c6b02e7b2be14d4fa6022dfd6d75921d90e4e",
"0x39aa39c021dfbae8fac545936693ac917d5e7563",
"0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b"
]
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
name | String | Project name |
category | String | Project category |
secondCategory | String | Secondary classification |
underlyingAsset | String | Anchored assets |
locked | Long | Locked amount, unit dollar |
lockedRate | Double | Lock up proportion |
userCount | Long | Number of users per day |
txCount | Long | Number of transactions per day |
logoUrl | String | Image URL |
totalLocked | Double | Total locked |
totalLend | Double | Total lend(Exclusive field of mortgage loan project) |
txValue24h | Double | 24h trading volume |
txValue24hChangeRate | Double | 24h trading volume change rate |
lendRate | Double | Lend rate(Exclusive field of mortgage loan project) |
borrowRate | Double | Borrow rate(Exclusive field of mortgage loan project) |
liquidate24h | Double | 24h clearing volume |
lockedRank | Integer | Locked ranking |
lockedDayChangeRate | Double | Change rate of 24h locked |
lockedWeekChangeRate | Double | Change rate of 7 days locked |
lockedMonthChangeRate | Double | Change rate of 30 days locked |
website | String | Website |
tokenSymbol | String | Platform token symbol |
tokenAddress | String | Platform token contract address |
tokenPrice | Double | Platform token price |
tokenPricePercentChange24h | Double | 24 hour price change rate |
releaseTime | Long | Release time |
logoUrl | String | Image URL |
location | String | Location |
contractAddresses | List |
List of contract addresses |
description | String | Project description |
poster | String | Poster |
movie | String | Movie links |
String | Twitter group | |
discard | String | Discard group |
telegram | String | Telegram group |
github | String | GitHub links |
auditOrganization | String | Audit organization |
similarList | List | Similar projects |
Historical Locked Information of DeFi Project
Returns the historical locked information of the DeFi project.
HTTP Requests
GET /api/explorer/v1/defi/history
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/history
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | eth |
queryString | name | String | No | Returns historical data for the corresponding time period of the project. |
queryString | category | String | No | When name is empty, the historical data of this type of item is returned. |
queryString | period | String | No | Return the corresponding historical data of the time period, which is 30 days by default.7 days return the data of each hour, others return the data of 8 points every day.1w=7 days, 1m=30 days, 3m=90 days, 1y= one year |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"total":22,
"hits":[
{
"projectName":"Compound",
"type":"day",
"category":"Lending",
"lockedUsd":782608208,
"lockedEth":149096258.17259303,
"totalBtc":3755.163346,
"totalEth":910045.728403,
"totalDai":0,
"userCount":0,
"txCount":0,
"timestamp":1595894400
}
],
"extend":{
"totalLocked":782608208
}
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
projectName | String | Project name |
locked | Long | Locked amount, unit dollar |
type | String | Type of statistics |
timestamp | Long | Time stamp |
totalLocked | Double | Total locked amount, when name!=Null, is the total locked amount of the project; When name=null, categrot=null, it represents the total locking amount of all projects; When name=null, category!=Null represents the total lock up amount of this type of project |
DeFi Project Market Ranking List
Return to the list of items in the market value ranking, sorted by market value
HTTP Requests
GET /api/explorer/v1/defi/marketcap/list
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/marketcap/list
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | Lower case symbol of blockchain to be queried |
Example Response
{
"code": 200,
"msg": "success",
"detailMsg": "",
"data":[
{
"project" :"Chainlink",
"symbol" :"LINK",
"price" :23.3543,
"marketCap" :234224211,
"totalTxValue24h" :2342.234,
"priceChange24h" : 0.1231,
},
{
"project" :"Chainlink",
"symbol" :"LINK",
"price" :23.3543,
"marketCap" :234224211,
"totalTxValue24h" :2342.234,
"priceChange24h" : 0.1231,
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
code | Integer | Code |
msg | String | Message |
detailMsg | String | Information details |
data | List<Object> | Data |
> project | String | Project name |
> symbol | String | Token type |
> label | String | Label |
> price | double | Price |
> marketCap | double | Market cap |
> totalTxValue24h | double | 24 hour trading value |
> priceChange24h | double | 24 hour price change |
DeFi Stable Currency List
Return to the list of various tokens of stable currency, sorted by circulation
HTTP Requests
GET /api/explorer/v1/defi/stablecoin/list
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/stablecoin/list
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | Lower case symbol of blockchain to be queried |
Example Response
{
"code": 200,
"msg": "success",
"detailMsg": "",
"data":[
{
"project" :"USDT",
"circulation" :12361371,
"addressCount" :1231231,
"totalTxCount24h":1231,
"totalTxValue24h" :2342123.234,
"additional" : 1231.12
},
{
"project" :"USDT",
"circulation" :12361371,
"addressCount" :1231231,
"totalTxCount24h":1231,
"totalTxValue24h" :2342123.234,
"additional" : 1231.12
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
code | Integer | Code |
msg | String | Message |
detailMsg | String | Information details |
data | List<Object> | Data |
> project | String | Project name |
> label | String | Label |
> circulation | Long | Circulation |
> addressCount | Long | Number of addresses holding currency |
> totalTxCount24h | Long | 24 hour trading count |
> totalTxValue24h | Double | 24 hour trading value |
> additional | Double | Latest issuance |
> additionalDate | String | Latest issuance time |
DeFi Project Historical Market Cap Line Chart
Return the historical data statistics of total market cap of market value ranking
HTTP Requests
GET /api/explorer/v1/defi/marketcap/chart
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/marketcap/chart
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | Lower case symbol of blockchain to be queried |
request | period | String | No | The time period of data displayed (1w/1m/3m/1y/all), default to one month (data of 7 days is displayed by hour) |
Example Response
{
"code": 200,
"msg": "success",
"detailMsg": "",
"data":[
{
"statisticDate":20200101,
"marketCap":12352423.12341,
"timestamp":123423424234
},
{
"statisticDate":20200101,
"marketCap":12352423.12341,
"timestamp":123423424234
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
code | Integer | Code |
msg | String | Message |
detailMsg | String | Information details |
data | List<Object> | Data |
> statisticDate | long | Statistic date |
> marketCap | double | Market cap |
> timestamp | long | Time stamp |
DeFi Stablecoin Historical Circulation Line Chart
Return the line chart of historical data of the circulation of the stablecoin
HTTP Requests
GET /api/explorer/v1/defi/stablecoin/chart
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/stablecoin/chart
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | Lower case symbol of blockchain to be queried |
request | period | String | No | The data time period displayed (1m/3m/1y/all) defaults 1m |
Example Response
{
"code": 200,
"msg": "success",
"detailMsg": "",
"data":[
{
"date": "20200810",
"timestamp": 123123231,
"totalCirculate": 123123123,
"tokens":[
{
"symbel":"ABC",
"project":"abc",
"circulation": 13213,
"percent": 0.1
},
{
"symbel":"ABCD",
"project":"abc",
"circulation": 13213,
"percent": 0.1
},
{
"symbel":"AODS",
"project":"ados",
"circulation": 13213,
"percent": 0.8
}
]
},
{
"date": "20200811",
"timestamp": 123123231,
"totalCirculate": 123123123,
"tokens":[
{
"symbel":"ABC",
"name":"abc",
"circulation": 13213,
"percent": 0.1
},
{
"symbel":"ABCD",
"name":"abc",
"circulation": 13213,
"percent": 0.1
},
{
"symbel":"AODS",
"name":"ados",
"circulation": 13213,
"percent": 0.8
}
]
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
code | Integer | Code |
msg | String | Message |
detailMsg | String | Information details |
data | List<Object> | Data |
> date | String | Data |
> timestamp | Long | Time stamp |
> totalCirculate | Long | Total Circulation |
> tokens | List<Token> | List of tokens |
>> symbol | String | Symbol of tokens |
>> project | String | Project name |
>> circulation | Long | Circulation |
>> percent | Double | Percentage |
DeFi Anchor Currency List
Returns a list of each token of the anchor currency, sorted by circulation
HTTP Requests
GET /api/explorer/v1/defi/pegged/list
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/pegged/list
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | Lower case symbol of blockchain to be queried |
Example Response
{
"code": 200,
"msg": "success",
"detailMsg": "",
"data":[
{
"project" :"Chainlink",
"symbol" :"LINK",
"circulation" :234224211,
"marketCap" :2342.234,
"additional" : 0.1231
},
{
"project" :"Chainlink",
"symbol" :"LINK",
"circulation" :234224211,
"marketCap" :2342.234,
"additional" : 0.1231
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
code | Integer | Code |
msg | String | Message |
detailMsg | String | Information details |
data | List<Object> | Data |
> project | String | Project name |
> symbol | String | Token type |
> label | String | Label |
> circulation | Long | Circulation |
> marketCap | Double | Locked marketCap |
> additional | Double | 24 hour change rate of circulation |
> underlyingAsset | String | Underlying asset |
DeFi Anchor Currency Historical Circulation Line Chart
Return the line chart of historical data of the circulation of each token of the anchor currency
HTTP Requests
GET /api/explorer/v1/defi/anchor/chart
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/anchor/chart
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | Lower case symbol of blockchain to be queried |
request | period | String | No | The data time period displayed (1m/3m/1y/all) defaults 1m |
Example Response
{
"code": 200,
"msg": "success",
"detailMsg": "",
"data":[
{
"date": "20200810",
"timestamp": 123123231,
"totalCirculate": 123123123,
"tokens":[
{
"symbel":"ABC",
"project":"abc",
"circulation": 13213,
"percent": 0.1
},
{
"symbel":"ABCD",
"project":"abc",
"circulation": 13213,
"percent": 0.1
},
{
"symbel":"AODS",
"project":"ados",
"circulation": 13213,
"percent": 0.8
}
]
},
{
"date": "20200811",
"timestamp": 123123231,
"totalCirculate": 123123123,
"tokens":[
{
"symbel":"ABC",
"project":"abc",
"circulation": 13213,
"percent": 0.1
},
{
"symbel":"ABCD",
"project":"abc",
"circulate": 13213,
"percent": 0.1
},
{
"symbel":"AODS",
"project":"ados",
"circulation": 13213,
"percent": 0.8
}
]
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
code | Integer | Code |
msg | String | Message |
detailMsg | String | Information details |
data | List<Object> | Data |
> date | String | Data |
> timestamp | Long | Time stamp |
> totalCirculate | Long | Total Circulation |
> tokens | List<Token> | List of tokens |
>> symbol | String | Symbol of tokens |
>> project | String | Project name |
>> circulation | Long | Circulation |
>> percent | Double | Percentage |
Interest Rate of Mortgage Loan
Returns the currency supported by each project and its deposit and borrowing interest rates.
HTTP Requests
GET /api/explorer/v1/defi/project/rate
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/project/rate
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | Lower case symbol of blockchain to be queried |
queryString | name | String | No | Project name, not transferred back to all mortgage loan project |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":[
{
"projectName":"Aave",
"projectLogoUrl":"http://static.bafang.com/cdn/explorer/defi/Aave.png",
"tokenList":[
{
"symbol":"DAI",
"contractAddress":"0x6b175474e89094c44da98b954eedeac495271d0f",
"tokenLogoUrl":"https://oss.bafang.com/blockchain/ethToken/ETH_DAI_0x6b175474e89094c44da98b954eedeac495271d0f.jpg",
"borrowRate":null,
"supplyRate":null
},
{
"symbol":"USDC",
"contractAddress":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"tokenLogoUrl":"https://oss.bafang.com/blockchain/ethToken/ETH_USDC_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.jpg",
"borrowRate":null,
"supplyRate":null
}
]
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
projectName | String | Project name |
projectLogoUrl | String | Project logo url |
tokenList | List | Token list |
symbol | String | Symbol |
contractAddress | String | Contract address |
tokenLogoUrl | String | Token logo |
borrow_rate | Double | Borrowing interest rate |
supply_rate | Double | Deposit interest rate |
Interest Rate of Mortgage Loan Tokens
Returns the currency supported by each project and its deposit and borrowing interest rates.
HTTP Requests
GET /api/explorer/v1/defi/token/rate
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/token/rate
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | Lower case symbol of blockchain to be queried |
queryString | symbol | String | No | Token name, all token will not be returned |
Example Response
{
"code": 0,
"msg": "",
"detailMsg": "",
"data": {
"ZRX": [
"Compound":{
"borrow_rate": 0.7975518197349599,
"supply_rate": 0.059697601453138724,
"logo_url": "http://static.bafang.com/cdn/explorer/defi/Compound.png"
},
"Aave":{
"borrow_rate": 0.7975518197349599,
"supply_rate": 0.059697601453138724,
"logo_url": "http://static.bafang.com/cdn/explorer/defi/Aave.png"
}
],
"REP":[
"Maker":{
"borrow_rate": 0.7975518197349599,
"supply_rate": 0.059697601453138724,
"logo_url": "http://static.bafang.com/cdn/explorer/defi/Maker.png"
},
"Compound":{
"borrow_rate": 0.7975518197349599,
"supply_rate": 0.059697601453138724,
"logo_url": "http://static.bafang.com/cdn/explorer/defi/Compound.png"
},
"Aave":{
"borrow_rate": 0.7975518197349599,
"supply_rate": 0.059697601453138724,
"logo_url": "http://static.bafang.com/cdn/explorer/defi/Aave.png"
}
]
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
borrow_rate | Double | Borrowing interest rate |
supply_rate | Double | Deposit interest rate |
DeFi Mining List
HTTP Requests
GET /api/explorer/v1/defi/farmings
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/farmings
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | eth |
queryString | project | String | No | Filter project name |
queryString | sort | String | No | Sort field:total_stake、daily_roi、yearly_roi |
queryString | order | String | No | Sort order:asc/desc |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"total":4,
"hits":[
{
"project":"Uniswap V2",
"pairName":"ETH-WBTC",
"rewards":[
"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
],
"impermanentLoss":"High",
"totalStake":640565761.9212956,
"dailyRoi":0.04129808219178,
"yearlyRoi":15.0738,
"timestamp":1603879200,
"projectLogo":"https://static.bafang.com/cdn/explorer/defi/uniswapv2
.png",
"website":"https://app.uniswap.org",
"rewardMap":{
"UNI":"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
}
}
],
"extend":null
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
project | String | Project name |
pairName | String | Total locked amount |
rewards | ||
impermanentLoss | String | Risk level |
totalStake | Double | Total stake |
dailyRoi | Double | Daily yield |
yearlyRoi | Double | Annual yield |
timestamp | Long | Time stamp |
projectLogo | String | Project logo |
website | Stiring | Website |
rewardMap | Map | Key rewards token, value is token contract |
Real Time List Interface of Mortgage and Loan
HTTP Requests
GET /api/explorer/v1/defi/history
Request Example
GET https://www.oklink.com/api/explorer/v1/defi/history
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
request | chain | String | Yes | Eth |
queryString | category | String | Yes | Fill in lending |
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":[
{
"projectName":"Maker",
"lockedUsd":132124.12,
"totalLend":21313.21,
"liquidate24h":213123.12,
"timestamp":1599552000,
"logo":"xxxxxxxxxxxx",
"rank":1
}
]
}
Request Parameters
Parameters | Types | Description |
---|---|---|
projectName | String | Project Name |
lockedUsd | Double | Total locked |
totalLend | Double | Total borrowings |
liquidate24h | Double | 24h Clearing volume |
volume24h | Double | 24h Trading volume |
logo | String | Logo url |
rank | int | Rank |
Download Interface
Download of Ordinary Transactions
HTTP Requests
GET /api/explorer/v1/{chain}/addresses/{hash}/transaction/download
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/addresses/{hash}/transaction/download
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | ETH, currently only ETH is supported |
path | hash | String | Yes | Address hash |
queryString | start | long | Yes | Start timestamp 1601136000 |
queryString | end | long | Yes | End timestamp 1603814400 |
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Transaction hash |
block | Integer | Block height |
blocktime | Long | Block time |
from | String | From address |
to | String | To address |
value | Double | Transaction amount ,unit ETH |
fee | Double | Transaction handling fee, unit eth |
Token Transfer Transaction Download
HTTP Requests
GET /api/explorer/v1/{chain}/addresses/{hash}/transfer/download
Request Example
Get https://www.oklink.com/api/explorer/v1/{chain}/addresses/{hash}/transfer/download
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | ETH, currently only ETH is supported |
path | hash | String | Yes | Address hash (either a normal address or a contractual address) |
queryString | start | long | Yes | Start timestamp 1601136000 |
queryString | end | long | Yes | End timestamp 1603814400 |
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Transaction hash |
block | Integer | Block height |
blocktime | Long | Block time |
from | String | From address |
to | String | To address |
value | Double | Transaction value |
symbol | String | Token of transaction |
Internal Transaction Download
HTTP Requests
GET /api/explorer/v1/{chain}/addresses/{hash}/internal/download
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/addresses/{hash}/internal/download
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | ETH, currently only ETH is supported |
path | hash | String | Yes | Address hash |
queryString | start | long | Yes | Start timestamp 1601136000 |
queryString | end | long | Yes | End timestamp 1603814400 |
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Transaction hash |
block | Integer | Block height |
blocktime | Long | Block time |
from | String | From address |
to | String | To address |
value | Double | Transaction value, unit$ |
Address Balance Download
HTTP Requests
GET /api/explorer/v1/{chain}/addresses/{hash}/held/download
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/addresses/{hash}/held/download
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | ETH, currently only ETH is supported |
path | hash | String | Yes | Address hash, must be contract address |
Response Parameters
Parameters | Types | Description |
---|---|---|
rank | Integer | Balance ranking |
holder | String | Balance address |
num | Double | Balance quantity |
value | Double | Balance value, unit$ |
rate | Double | Balance proportion |
ERC20 Token Transaction Transfer Download
HTTP Requests
GET /api/explorer/v1/{chain}/addresses/{hash}/erc20/download
Request Example
GET https://www.oklink.com/api/explorer/v1/{chain}/addresses/{hash}/erc20/download
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | ETH, currently only ETH is supported |
path | hash | String | Yes | Address hash, must be ERC20 address |
queryString | start | long | Yes | Start timestamp 1601136000 |
queryString | end | long | Yes | End timestamp 1601136000 |
Response Parameters
Parameters | Types | Description |
---|---|---|
hash | String | Transaction hash |
block | Integer | Block height |
blocktime | Long | Block time |
from | String | From address |
label | String | From label |
to | String | To address |
label | String | To label |
value | Double | Number of token transfers |
symbol | String | Erc20 token symbol |
Query the Interface of the Supported Chain
HTTP Requests
GET /api/explorer/v1/info/summary
Request Example
GET https://www.oklink.com/api/explorer/v1/info/summary
Request Parameters
None
Example Response
{
"code":0,
"msg":"",
"detailMsg":"",
"data":[
{
"symbol":"BTC",
"price":53343.47,
"lastBlockTime":1619082444,
"totalTransacationCount":635928118,
"totalSupply":18687556.25,
"totalSupplyPercent":0.889883630952381,
"pendingTransactionCount":199857,
"runTime":388076246392,
"pricePercentChange24h":-0.03941595823549994,
"height":680108
},
{
"symbol":"OKC_TEST",
"price":0,
"lastBlockTime":1619053943000,
"totalTransacationCount":45402317,
"totalSupply":1002123882,
"totalSupplyPercent":100.2123882,
"pendingTransactionCount":0,
"runTime":18796351405,
"pricePercentChange24h":-0.060869565217391355,
"height":2251099
},
{
"symbol":"OKC_TEST",
"price":0,
"lastBlockTime":1619053943000,
"totalTransacationCount":45402317,
"totalSupply":1002123882,
"totalSupplyPercent":100.2123882,
"pendingTransactionCount":0,
"runTime":18796351405,
"pricePercentChange24h":-0.060869565217391355,
"height":2251099
},
{
"symbol":"OKC",
"price":169.56,
"lastBlockTime":1619053947000,
"totalTransacationCount":403000,
"totalSupply":11535930.5,
"totalSupplyPercent":1.15359305,
"pendingTransactionCount":0,
"runTime":8399551419,
"pricePercentChange24h":-0.060869565217391355,
"height":2253726
},
{
"symbol":"LTC",
"price":262.013,
"lastBlockTime":1619082664,
"totalTransacationCount":67808152,
"totalSupply":67488350,
"totalSupplyPercent":0.8034327380952381,
"pendingTransactionCount":141,
"runTime":301110086429,
"pricePercentChange24h":0.002582862040728691,
"height":2039167
},
{
"symbol":"BCH",
"price":902.408,
"lastBlockTime":1619081565,
"totalTransacationCount":325615051,
"totalSupply":18714825,
"totalSupplyPercent":0.8911821428571428,
"pendingTransactionCount":5668,
"runTime":388076246439,
"pricePercentChange24h":-0.03766755889221844,
"height":684471
},
{
"symbol":"BSV",
"price":297.792,
"lastBlockTime":1618240204,
"totalTransacationCount":600813924,
"totalSupply":18703187.5,
"totalSupplyPercent":0.8906279761904762,
"pendingTransactionCount":8,
"runTime":388076246450,
"pricePercentChange24h":-0.01566451041380894,
"height":682609
},
{
"symbol":"USDT",
"price":1.00101,
"lastBlockTime":1619082444,
"totalTransacationCount":18973438,
"totalSupply":37514219968.60655,
"totalSupplyPercent":1,
"pendingTransactionCount":1317,
"runTime":0,
"pricePercentChange24h":0.00033977235252381603,
"height":680108
},
{
"symbol":"ETH",
"price":2437.138,
"lastBlockTime":1619082725,
"totalTransacationCount":1097831760,
"totalSupply":115566627.59323,
"totalSupplyPercent":1,
"pendingTransactionCount":174805,
"runTime":180884778480,
"pricePercentChange24h":0.06192775378614413,
"height":12289114
},
{
"symbol":"DASH",
"price":293.584,
"lastBlockTime":1619082531,
"totalTransacationCount":35291967,
"totalSupply":10095037.70802254,
"totalSupplyPercent":0.5341289792604519,
"pendingTransactionCount":70,
"runTime":228987133491,
"pricePercentChange24h":-0.0835586582517616,
"height":1458623
},
{
"symbol":"ETC",
"price":34.523,
"lastBlockTime":1619082716,
"totalTransacationCount":67656228,
"totalSupply":127415605.83146189,
"totalSupplyPercent":1,
"pendingTransactionCount":8975,
"runTime":183447978502,
"pricePercentChange24h":0.04072711925720506,
"height":12599046
}
]
}
Response Parameters
Parameters | Types | Description |
---|---|---|
symbol | String | Symbol |
price | double | Price |
lastBlockTime | long | Last block time |
totalTransacationCount | Long | Total transacation count |
totalSupply | double | Total supply |
totalSupplyPercent | double | Total supply percent |
pendingTransactionCount | Long | Unsettled volume |
pricePercentChange24h | double | Price percent change 24h |
height | Integer | Height |
Interfaces associated with ChainHub
Query the Index of the Day-Level Chain Data
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/search/{type}
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/search/{type}
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth、btc、usdt |
Path | type | long | Yes | The metric ID of the query |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
The type value
type | Description | Chain |
---|---|---|
39 | Number of Addresses in Profit | BTC |
40 | Percent of Addresses in Profit | BTC |
108 | Number of Addresses in Profit | ETH |
109 | Percent of Addresses in Profit | ETH |
42 | Number of Addresses with Balance ≥ 1k | BTC |
44 | Number of Long-term Holding Addresses | BTC |
112 | Number of Long-term Holding Addresses | ETH |
5 | Total Miner Revenue | BTC |
72 | Total Miner Revenue | ETH |
6 | Fee Ratio Multiple (FRM) | BTC |
73 | Fee Ratio Multiple (FRM) | ETH |
86 | Total Transfer Volume | ETH |
27 | Total Transfer Volume | BTC |
49 | ETH 2.0 Staking Rate | ETH |
45 | ETH 2.0 Total number of depositors | ETH |
47 | ETH 2.0 Total Value Staked | ETH |
50 | ETH2.0 Total number of validators | ETH |
46 | ETH 2.0 Number of New Deposits | ETH |
48 | ETH 2.0 New Value Staked | ETH |
52 | ETH 2.0 Total Daily Income | ETH |
53 | ETH 2.0 Avg Daily Income | ETH |
54 | ETH 2.0 The Annual Percentage Yields (APY) | ETH |
212 | Number of Contracts Flows | ETH |
213 | Number of Contracts Burn | ETH |
214 | Number of Contracts Upgrade | ETH |
117 | Circulating Supply-Tether USD (Only usdt) | STABLECOIN |
116 | Market Cap-Tether USD (Only usdt) | STABLECOIN |
119 | Flows & Burn | STABLECOIN |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"btc",
"indicatorName":"price",
"targetId":2,
"detail":"btc price",
"description":"Updated daily"
"content":[
{
"statisDate":20150815,
"value":1404,
"reward": 1403.2,
"fee": 123.4
"mintAmount":1234.4,
"destoryAmount": 1234.5,
"in": 1234.5,
"out": 1234.5,
"price":1404.5
}
]
}
Market Data
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/market/{type}
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/market/{type}
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth、btc、usdt |
Path | type | long | Yes | The metric ID of the query |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Type Value
type | Description | Chain |
---|---|---|
200 | ETH 3iQ CoinShares Bitcoin ETF Holdings | ETH |
201 | ETH 3iQ CoinShares Bitcoin ETF Flows | ETH |
202 | ETH CI Galaxy Bitcoin ETF Holdings | ETH |
203 | ETH CI Galaxy Bitcoin ETF Flows | ETH |
204 | ETH Evolve Bitcoin ETF Holdings | ETH |
205 | ETH Evolve Bitcoin ETF Flows | ETH |
206 | BTC 3iQ CoinShares Bitcoin ETF Holdings | BTC |
207 | BTC 3iQ CoinShares Bitcoin ETF Flows | BTC |
208 | BTC CI Galaxy Bitcoin ETF Holdings | BTC |
209 | BTC CI Galaxy Bitcoin ETF Flows | BTC |
210 | BTC Evolve Bitcoin ETF Holdings | BTC |
211 | BTC Evolve Bitcoin ETF Flows | BTC |
22 | Grayscale BTC Holdings | BTC |
23 | Grayscale BTC Flows | BTC |
24 | Purpose Bitcoin ETF Holdings | BTC |
25 | Purpose Bitcoin ETF Flows | BTC |
100 | Grayscale ETH Holdings | ETH |
101 | Grayscale ETH Flows | ETH |
102 | Purpose Ether ETF Holdings | ETH |
103 | Purpose Ether ETF Flows | ETH |
21 | Total Supply of Pegged Token | BTC |
18 | Total Supply Held by Long-Term Holders | BTC |
97 | Total Supply Held by Long-Term Holders量 | ETH |
215 | Listed company Holdings | ETH |
216 | Listed company Holdings | BTC |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"targetId":2,
"chain":"btc",
"indicatorName":"price"
"detail":"btc 价格",
"description":"每日更新"
"content":[
{
"statisDate":20150815,
"value":1404
"price":1404.5
}
]
}
Anchor BTC Circulation
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/assets
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/assets
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth、btc、usdt |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"btc",
"indicatorName":"totalSupply",
"targetId":2,
"detail":"btc 价格",
"description":"每日更新"
"content":[
{
"20200120":[
{
"symbol":"wbtc",
"value":1404.5,
"price":1404.5
}
]
}
]
}
}
Defi Data
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/defi/{type}
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/defi/{type}
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth、btc、usdt |
Path | type | long | Yes | The metric ID of the query |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Type Value
Type | Description | Chain |
---|---|---|
56 | Total Value Locked of DEX | ETH |
57 | Total Transfer Volume of DEX | ETH |
58 | Active Users of DEX | ETH |
59 | Number of Transactions of DEX | ETH |
60 | Utilization Ratio of DEX | ETH |
62 | Protocol Revenue of DEX | ETH |
63 | Total Value Locked of Lending | ETH |
64 | Depositing Volume of Lending | ETH |
65 | Borrowing Volume of Lending | ETH |
66 | Protocol Revenue of Lending | ETH |
67 | Active Users of Lending | ETH |
55 | Protocol Revenue of All DeFi | ETH |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"btc",
"indicatorName":"price"
"targetId":2,
"detail":"btc 价格",
"description":"每日更新"
"content":[
{
"statisDate":20150815,
"value":1404
"price":1404.5
}
]
}
Protocol Revenue
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/protalrevennu/distributed
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/protalrevennu/distributed
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"btc",
"indicatorName":"protalRevennu"
"targetId":2,
"detail":"btc 价格",
"description":"每日更新"
"content":[
{
"project":"uniswap",
"value":1404.6
}
]
}
DEX Trading Volume
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/market/share
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/market/share
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"btc",
"indicatorName":"totalSupply",
"targetId":2,
"detail":"btc 价格",
"description":"每日更新"
"content":[
{
"20200120":[
{
"symbol":"wbtc",
"value":1404.5,
"price":1404.5
}
]
}
]
}
}
Exchange Indicator
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/tag/address/{type}
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/tag/address/{type}
请求参数
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth、btc、usdt |
Path | type | long | Yes | The metric ID of the query |
param | exchangeName | String | Yes | okex、huobi、bian、coinbase |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Type Value
type | Description | Chain |
---|---|---|
146 | Net Transfer Volume from/to Huobi Exchange | BTC |
147 | Total Transfer Volume to Huobi Exchange | BTC |
148 | Total Transfer Volume from Huobi Exchange | BTC |
149 | Balance on Huobi Exchange | BTC |
152 | Net Transfer Volume from/to Binance Exchange | BTC |
153 | Total Transfer Volume to Binance Exchange | BTC |
154 | Total Transfer Volume from Binance Exchange | BTC |
155 | Balance on Binance Exchange | BTC |
158 | Net Transfer Volume from/to Coinbase Exchange | BTC |
159 | Total Transfer Volume to Coinbase Exchange | BTC |
160 | Total Transfer Volume from Coinbase Exchange | BTC |
161 | Balance on Coinbase Exchange | BTC |
164 | Net Transfer Volume from/to Huobi Exchange | ETH |
165 | Total Transfer Volume to Huobi Exchange | ETH |
166 | Total Transfer Volume from Huobi Exchange | ETH |
167 | Balance on Huobi Exchange | ETH |
170 | Net Transfer Volume from/to Binance Exchange | ETH |
171 | Total Transfer Volume to Binance Exchange | ETH |
172 | Total Transfer Volume from Binance Exchange | ETH |
173 | Balance on Binance Exchange | ETH |
176 | Net Transfer Volume from/to Coinbase Exchange | ETH |
177 | Total Transfer Volume to Coinbase Exchange | ETH |
178 | Total Transfer Volume from Coinbase Exchange | ETH |
179 | Balance on Coinbase Exchange | ETH |
182 | Net Transfer Volume from/to Huobi Exchange | STABLECOIN |
183 | Total Transfer Volume to Huobi Exchange | STABLECOIN |
184 | Total Transfer Volume from Huobi Exchange | STABLECOIN |
185 | Balance on Huobi Exchange | STABLECOIN |
188 | Net Transfer Volume from/to Binance Exchange | STABLECOIN |
189 | Total Transfer Volume to Binance Exchange | STABLECOIN |
190 | Total Transfer Volume from Binance Exchange | STABLECOIN |
191 | Balance on Binance Exchange | STABLECOIN |
194 | Net Transfer Volume from/to Coinbase Exchange | STABLECOIN |
195 | Total Transfer Volume to Coinbase Exchange | STABLECOIN |
196 | Total Transfer Volume from Coinbase Exchange | STABLECOIN |
197 | Balance on Coinbase Exchange | STABLECOIN |
133 | Net Transfer Volume from/to OKEx Exchange | STABLECOIN |
134 | Total Transfer Volume to OKEx Exchange | STABLECOIN |
135 | Total Transfer Volume from OKEx Exchange | STABLECOIN |
136 | Balance on OKEx Exchange | STABLECOIN |
78 | Net Transfer Volume from/to OKEx Exchange | ETH |
79 | Total Transfer Volume to OKEx Exchange | ETH |
80 | Total Transfer Volume from OKEx Exchange | ETH |
81 | Balance on OKEx Exchange | ETH |
11 | Net Transfer Volume from/to OKEx Exchange | BTC |
12 | Total Transfer Volume to OKEx Exchange | BTC |
13 | Total Transfer Volume from OKEx Exchange | BTC |
14 | Balance on OKEx Exchange | BTC |
4 | Balance in Miner Wallets | BTC |
71 | Balance in Miner Wallets | ETH |
68 | Net Transfer Volume from/to Miner Addresses | ETH |
69 | Total Transfer Volume to Miner Addresses | ETH |
70 | Total Transfer Volume from Miner Addresses | ETH |
1 | Net Transfer Volume from/to Miner Addresses | BTC |
2 | Total Transfer Volume to Miner Addresses | BTC |
3 | Total Transfer Volume from Miner Addresses | BTC |
7 | Net Transfer Volume from/to Exchanges - All Exchanges | BTC |
8 | Total Transfer Volume to Exchanges - All Exchanges | BTC |
9 | Total Transfer Volume from Exchanges - All Exchanges | BTC |
10 | Balance on Exchanges - All Exchanges | BTC |
74 | Net Transfer Volume from/to Exchanges - All Exchanges | ETH |
75 | Total Transfer Volume to Exchanges - All Exchanges | ETH |
76 | Total Transfer Volume from Exchanges - All Exchanges | ETH |
77 | Balance on Exchanges - All Exchanges | ETH |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"btc",
"indicatorName":"price"
"targetId":2,
"detail":"btc 价格",
"description":"每日更新"
"content":[
{
"statisDate":20150815,
"value":1404
"price":1404.5
"in": 1234.5,
"out": 1234.5,
}
]
}
The Entity of Coins Transferred from Exchanges
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/exchange/detail/{type}
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/exchange/detail/{type}
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth、btc、usdt |
Path | type | long | Yes | The metric ID of the query |
param | exchangeName | String | Yes | okex、huobi、bian、coinbase |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Type Value
type | Description | Chain |
---|---|---|
150 | The Entity of BTC Transferred from Huobi | BTC |
151 | The Entity of BTC Transferred to Huobi | BTC |
156 | The Entity of BTC Transferred from Binance | BTC |
157 | The Entity of BTC Transferred to Binance | BTC |
162 | The Entity of BTC Transferred from Coinbase | BTC |
163 | The Entity of BTC Transferred to Coinbase | BTC |
168 | The Entity of ETH Transferred from Huobi | ETH |
169 | The Entity of ETH Transferred to Huobi | ETH |
174 | The Entity of ETH Transferred from Binance | ETH |
175 | The Entity of ETH Transferred to Binance | ETH |
180 | The Entity of ETH Transferred from Coinbase | ETH |
181 | The Entity of ETH Transferred to Coinbase | ETH |
186 | The Entity of USDT Transferred from Huobi | STABLECOIN |
187 | The Entity of USDT Transferred to Huobi | STABLECOIN |
192 | The Entity of USDT Transferred from Binance | STABLECOIN |
193 | The Entity of USDT Transferred to Binance | STABLECOIN |
137 | The Entity of USDT Transferred from OKEx | STABLECOIN |
138 | The Entity of USDT Transferred to OKEx | STABLECOIN |
82 | The Entity of ETH Transferred from OKEx | ETH |
83 | The Entity of ETH Transferred to OKEx | ETH |
15 | The Entity of BTC Transferred from OKEx | BTC |
16 | The Entity of BTC Transferred to OKEx | BTC |
198 | The Entity of USDT Transferred from Coinbase | STABLECOIN |
199 | The Entity of USDT Transferred to Coinbase | STABLECOIN |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"btc",
"indicatorName":"price"
"targetId":2,
"detail":"btc 价格",
"description":"每日更新"
"content":[
{
"project":huobi,
"value":1404
"price":1404.5
}
]
}
Circulation Distribution
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/circulation/ditribution
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/circulation/ditribution
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"btc",
"indicatorName":"price"
"targetId":2,
"detail":"btc 价格",
"description":"每日更新"
"content":[
{
"project":"huidu",
"value":1404.5,
"percent":0.56
}
]
}
Inquiry Pending Transaction Number
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/pending/count
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/pending/count
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"btc",
"indicatorName":"price"
"targetId":2,
"detail":"btc 价格",
"description":"每日更新"
"content":[
{
"statisDate":1620720000,
"value":"1024",
}
]}
}
Query the Index of the Hour-Level Chain Data
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/hour/search/(type)
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/hour/search/(type)
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,btc |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Path | type | String | Yes | Query metrics |
Type Value
type | Description | Chain |
---|---|---|
avgGasPrice | The average of gasPrice |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"btc",
"indicatorName":"price"
"targetId":2,
"detail":"btc 价格",
"description":"每日更新"
"content":[
{
"statisDate":20150815,
"value":1404
"price":1404.5
}
]
}
On-chain Base Data
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/chart/{type}
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/chart/{type}
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth、btc、usdt |
Path | type | long | Yes | The metric ID of the query |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Type Value
type | Description | Chain |
---|---|---|
36 | Number of Total Addresses | BTC |
37 | Number of New Addresses | BTC |
38 | Number of Active Addresses | BTC |
41 | Number of Addresses with a Non-Zero Balance | BTC |
104 | Number of Total Addresses | ETH |
105 | Number of New Addresses | ETH |
106 | Number of Active Addresses | ETH |
109 | Number of Addresses with a Non-Zero Balance | ETH |
96 | Circulating Supply | ETH |
99 | Market Cap | ETH |
17 | Circulating Supply | BTC |
20 | Market Cap | BTC |
85 | Number of Transactions | ETH |
26 | Number of Transactions | BTC |
87 | Mean Transaction Fees | ETH |
28 | Mean Transaction Fees | BTC |
29 | Large Transaction | BTC |
88 | Large Transaction | ETH |
89 | Mean Block Size | ETH |
90 | Mean Block Interval | ETH |
91 | Mean Hash Rate | ETH |
92 | Mining Difficulty | ETH |
93 | Mining Earnings | ETH |
94 | Total Size of Transactions | ETH |
30 | Mean Block Size | BTC |
31 | Mean Block Interval | BTC |
32 | Mean Hash Rate | BTC |
33 | Mining Difficulty | BTC |
34 | Mining Earnings | BTC |
35 | Total Size of Transactions | BTC |
139 | Number of Transactions | STABLECOIN |
140 | Total Transfer Volume | STABLECOIN |
141 | Large Transaction | STABLECOIN |
142 | Number of Total Addresses | STABLECOIN |
143 | Number of New Addresses | STABLECOIN |
144 | Number of Active Addresses | STABLECOIN |
145 | Number of Addresses with a Non-Zero Balance | STABLECOIN |
gasAvailability | gas utilization | |
avgGasPrice | gasprice by day |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"btc",
"indicatorName":"价格"
"targetId":2,
"detail":"btc 价格",
"description":"每日更新"
"content":[
{
"statisDate":20150815,
"value":1404
"price":1404.5
}
]
}}
Query week-month-year-level statistics
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/statistic/(type)
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/statistic/(type)
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth、btc、usdt |
Path | type | long | Yes | The metric ID of the query |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Type Value
type | Description | Chain |
---|---|---|
36 | Number of Total Addresses | BTC |
37 | Number of New Addresses | BTC |
38 | Number of Active Addresses | BTC |
41 | Number of Addresses with a Non-Zero Balance | BTC |
104 | Number of Total Addresses | ETH |
105 | Number of New Addresses | ETH |
106 | Number of Active Addresses | ETH |
109 | Number of Addresses with a Non-Zero Balance | ETH |
96 | Circulating Supply | ETH |
99 | Market Cap | ETH |
17 | Circulating Supply | BTC |
20 | Market Cap | BTC |
85 | Number of Transactions | ETH |
26 | Number of Transactions | BTC |
87 | Mean Transaction Fees | ETH |
28 | Mean Transaction Fees | BTC |
29 | Large Transaction | BTC |
88 | Large Transaction | ETH |
89 | Mean Block Size | ETH |
90 | Mean Block Interval | ETH |
91 | Mean Hash Rate | ETH |
92 | Mining Difficulty | ETH |
93 | Mining Earnings | ETH |
94 | Total Size of Transactions | ETH |
30 | Mean Block Size | BTC |
31 | Mean Block Interval | BTC |
32 | Mean Hash Rate | BTC |
33 | Mining Difficulty | BTC |
34 | Mining Earnings | BTC |
35 | Total Size of Transactions | BTC |
139 | Number of Transactions | STABLECOIN |
140 | Total Transfer Volume | STABLECOIN |
141 | Large Transaction | STABLECOIN |
142 | Number of Total Addresses | STABLECOIN |
143 | Number of New Addresses | STABLECOIN |
144 | Number of Active Addresses | STABLECOIN |
145 | Number of Addresses with a Non-Zero Balance | STABLECOIN |
gasAvailability | gas utilization | |
avgGasPrice | gasprice by day | |
201 | ETH 3iQ CoinShares Bitcoin ETF Flows | ETH |
202 | ETH CI Galaxy Bitcoin ETF Holdings | ETH |
203 | ETH CI Galaxy Bitcoin ETF Flows | ETH |
204 | ETH Evolve Bitcoin ETF Holdings | ETH |
205 | ETH Evolve Bitcoin ETF Flows | ETH |
206 | BTC 3iQ CoinShares Bitcoin ETF Holdings | BTC |
207 | BTC 3iQ CoinShares Bitcoin ETF Flows | BTC |
208 | BTC CI Galaxy Bitcoin ETF Holdings | BTC |
209 | BTC CI Galaxy Bitcoin ETF Flows | BTC |
210 | BTC Evolve Bitcoin ETF Holdings | BTC |
211 | BTC Evolve Bitcoin ETF Flows | BTC |
22 | Grayscale BTC Holdings | BTC |
23 | Grayscale BTC Flows | BTC |
24 | Purpose Bitcoin ETF Holdings | BTC |
25 | Purpose Bitcoin ETF Flows | BTC |
100 | Grayscale ETH Holdings | ETH |
101 | Grayscale ETH Flows | ETH |
102 | Purpose Ether ETF 持仓量 | ETH |
103 | Purpose Ether ETF Flows | ETH |
21 | Total Supply of BTC Pegged Token | BTC |
18 | Total Supply Held by Long-Term Holders | BTC |
97 | Total Supply Held by Long-Term Holders | ETH |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":
[
"price":{
"lastWeek": 123.4,
"lastMonth": 123.4,
"last3month": 123.4,
"last6month": 123.4,
"ytd": 123.4,
"lastYear": 123.4,
"priceLastWeek": 123.4
"priceLastMonth": 123.4
"priceLast3month": 123.4
"priceLast6month": 123.4
"priceYtd": 123.4
"priceLastYear": 123.4
}
]
}
Left Indicator Navigation
HTTP Requests
GET /api/oklink/v1/datamaster/indicators
Request Example
GET https://www.oklink.com/api/oklink/v1/datamaster/indicators
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
- | - | - | - | - |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"btc":{
"market":[
{
"targetId":2,
"targetNameEn":"price",
"targetNameZn":"btc价格",
"chain":"btc",
"category":"market",
"type":["transaction","DEX"],
"detail":"btc价格",
"description":"每日更新",
"url":"/api/explorer/v1/btc/datamaster/chart/price"
}
]
},
"eth":{
"market":[
{
"targetId":2,
"targetNameEn":"price",
"targetNameZn":"btc价格",
"chain":"btc",
"category":"market",
"type":["transaction","DEX"],
"detail":"btc价格",
"description":"每日更新",
"url":"/api/explorer/v1/btc/datamaster/chart/price"
}
]
}
}
}
Index Search
HTTP Requests
GET /api/oklink/v1/datamaster/indicators/search
Request Example
GET https://www.oklink.com/api/oklink/v1/datamaster/indicators/search
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
param | q | String | Query key |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"btc":[
{
"targetId":2,
"targetNameEn":"price",
"targetNameZn":"btc价格",
"chain":"btc",
"category":["market","miner"],
"type":["transaction"],
"detail":"btc价格"
"description":"每日更新",
"url":"/api/explorer/v1/btc/datamaster/chart/price"
}
],
"eth":[
{
"targetId":2,
"targetNameEn":"price",
"targetNameZn":"btc价格",
"chain":"btc",
"category":["market","miner"],
"type":["transaction"],
"detail":"btc价格"
"description":"每日更新",
"url":"/api/explorer/v1/btc/datamaster/chart/price"
}
]
}
}
Index Filtration
HTTP Requests
GET /api/oklink/v1/datamaster/indicators/filter
Request Example
GET https://www.oklink.com/api/oklink/v1/datamaster/indicators/filter
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
param | q | String | Filter the indicators according to the activity ID, and the activity ID of the selected indicator is 1 |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"btc":[
{
"targetId":2,
"targetNameEn":"price",
"targetNameZn":"btc价格",
"chain":"btc",
"category":["market","miner"],
"type":["transaction]",
"detail":"btc价格"
"description":"每日更新",
"url":"/api/explorer/v1/btc/datamaster/chart/price"
}
],
"eth":[
{
"targetId":2,
"targetNameEn":"price",
"targetNameZn":"btc价格",
"chain":"btc",
"category":["market","miner"],
"type":["transaction",
"detail":"btc价格"
"description":"每日更新",
"url":"/api/explorer/v1/btc/datamaster/chart/price"
}
]
}
}
Collection Index Query
HTTP Requests
GET /api/oklink/v1/datamaster/indicators/feature
Request Example
GET https://www.oklink.com/api/oklink/v1/datamaster/indicators/feature
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
head | token | String | token id |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"btc":[
{
"targetId":2,
"targetNameEn":"price",
"targetNameZn":"btc价格",
"chain":"btc",
"category":["market","miner"],
"type":["transaction"],
"detail":"btc价格"
"description":"每日更新",
"url":"/api/explorer/v1/btc/datamaster/chart/price"
}
],
"eth":[
{
"targetId":2,
"targetNameEn":"price",
"targetNameZn":"btc价格",
"chain":"btc",
"category":["market","miner"],
"type":["transaction"],
"detail":"btc价格"
"description":"每日更新",
"url":"/api/explorer/v1/btc/datamaster/chart/price"
}
]
}
}
Add a Collection
HTTP Requests
GET /api/oklink/v1/datamaster/indicators/feature/add
Request Example
GET https://www.oklink.com/api/oklink/v1/datamaster/indicators/feature/add
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
param | targetId | Long | Target Id |
Response Parameters
Code of 0 means success, anything else means failure
{
"code":0,
"msg":"",
"detailMsg":"",
"data":null
}
}
//An error example
{
"code": 4001,
"msg": "INDICATOR_NOT_FOUND",
"detailMsg": "INDICATOR_NOT_FOUND",
"data": null
}
Cancel the collection
HTTP Requests
GET /api/oklink/v1/datamaster/indicators/feature/delete
Request Example
GET https://www.oklink.com/api/oklink/v1/datamaster/indicators/feature/delete
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
param | targetId | Long | Target Id |
Response Parameters
Code of 0 means success, anything else means failure
{
"code":0,
"msg":"",
"detailMsg":"",
"data": null
}
//An error example
{
"code": 4001,
"msg": "INDICATOR_NOT_FOUND",
"detailMsg": "INDICATOR_NOT_FOUND",
"data": null
}
Interface to Download
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/indicators/download
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/indicators/download
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
param | targetId | String | Yes | Target Id,e.g:48 |
path | chain | String | Yes | Chain |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Response Parameters
Document
Interfaces of Popular Searches
HTTP Requests
GET /api/oklink/v1/datamaster/popular/search
Request Example
GET https://www.oklink.com/api/oklink/v1/datamaster/popular/search
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
- | - | - | - | - |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":[
{
"keyEn":"pool",
"keyZn":"矿池"
}
]
}
Search for Secondary Categories
HTTP Requests
GET /api/oklink/v1/datamaster/type/search
Request Example
GET https://www.oklink.com/api/oklink/v1/datamaster/type/search
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth、btc、usdt |
Path | type | long | Yes | The metric ID of the query |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":[
"dex",
"net"
]
}
Download Week-month-year-level Statistics
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/statistic/(type)/download
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/statistic/(type)/download
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth、btc、usdt |
Path | type | String | Yes | The metric of the query |
Type Value
type | Description | Chain |
---|---|---|
36 | Number of Total Addresses | BTC |
37 | Number of New Addresses | BTC |
38 | Number of Active Addresses | BTC |
41 | Number of Addresses with a Non-Zero Balance | BTC |
104 | Number of Total Addresses | ETH |
105 | Number of New Addresses | ETH |
106 | Number of Active Addresses | ETH |
109 | Number of Addresses with a Non-Zero Balance | ETH |
96 | Circulating Supply | ETH |
99 | Market Cap | ETH |
17 | Circulating Supply | BTC |
20 | Market Cap | BTC |
85 | Number of Transactions | ETH |
26 | Number of Transactions | BTC |
87 | Mean Transaction Fees | ETH |
28 | Mean Transaction Fees | BTC |
29 | Large Transaction | BTC |
88 | Large Transaction | ETH |
89 | Mean Block Size | ETH |
90 | Mean Block Interval | ETH |
91 | Mean Hash Rate | ETH |
92 | Mining Difficulty | ETH |
93 | Mining Earnings | ETH |
94 | Total Size of Transactions | ETH |
30 | Mean Block Size | BTC |
31 | Mean Block Interval | BTC |
32 | Mean Hash Rate | BTC |
33 | Mining Difficulty | BTC |
34 | Mining Earnings | BTC |
35 | Total Size of Transactions | BTC |
139 | Number of Transactions | STABLECOIN |
140 | Total Transfer Volume | STABLECOIN |
141 | Large Transaction | STABLECOIN |
142 | Number of Total Addresses | STABLECOIN |
143 | Number of New Addresses | STABLECOIN |
144 | Number of Active Addresses | STABLECOIN |
145 | Number of Addresses with a Non-Zero Balance | STABLECOIN |
gasAvailability | gas utilization | |
avgGasPrice | gasprice by day | |
201 | ETH 3iQ CoinShares Bitcoin ETF Flows | ETH |
202 | ETH CI Galaxy Bitcoin ETF Holdings | ETH |
203 | ETH CI Galaxy Bitcoin ETF Flows | ETH |
204 | ETH Evolve Bitcoin ETF Holdings | ETH |
205 | ETH Evolve Bitcoin ETF Flows | ETH |
206 | BTC 3iQ CoinShares Bitcoin ETF Holdings | BTC |
207 | BTC 3iQ CoinShares Bitcoin ETF Flows | BTC |
208 | BTC CI Galaxy Bitcoin ETF Holdings | BTC |
209 | BTC CI Galaxy Bitcoin ETF Flows | BTC |
210 | BTC Evolve Bitcoin ETF Holdings | BTC |
211 | BTC Evolve Bitcoin ETF Flows | BTC |
22 | Grayscale BTC Holdings | BTC |
23 | Grayscale BTC Flows | BTC |
24 | Purpose Bitcoin ETF Holdings | BTC |
25 | Purpose Bitcoin ETF Flows | BTC |
100 | Grayscale ETH Holdings | ETH |
101 | Grayscale ETH Flows | ETH |
102 | Purpose Ether ETF 持仓量 | ETH |
103 | Purpose Ether ETF Flows | ETH |
21 | Total Supply of BTC Pegged Token | BTC |
18 | Total Supply Held by Long-Term Holders | BTC |
97 | Total Supply Held by Long-Term Holders | ETH |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":
[
"price":{
"lastWeek": 123.4,
"lastMonth": 123.4,
"last3month": 123.4,
"last6month": 123.4,
"ytd": 123.4,
"lastYear": 123.4,
"priceLastWeek": 123.4
"priceLastMonth": 123.4
"priceLast3month": 123.4
"priceLast6month": 123.4
"priceYtd": 123.4
"priceLastYear": 123.4
}
]
}
Circulating Supply
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/circulation/distribution/{type}
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/circulation/distribution/{type}
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth、btc、usdt |
Path | type | String | Yes | The metric ID of the query |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
Type Value
type | Description | Chain |
---|---|---|
19 | Circulating Supply | BTC |
98 | Circulating Supply | ETH |
Response Parameters
{
"code": 0,
"msg": "",
"detailMsg": "",
"data": {
"chain": "btc",
"indicatorName": "BTC Supply Distribution",
"targetId": 19,
"detail": "The relative distribution of the circulating supply held by entity.",
"description": "该数据每日更新",
"exchangeName": null,
"updateTime": 1626051600000,
"content": [
{
"value": 0.0,
"usdtValue": 0.0,
"price": 33954.39,
"percent": 0.0,
"usdtFee": 0.0,
"usdtReward": 0.0,
"project": "other institution"
},
{
"value": 0.0,
"usdtValue": 0.0,
"price": 33954.39,
"percent": 0.0,
"usdtFee": 0.0,
"usdtReward": 0.0,
"project": "other"
},
{
"value": 0.0,
"usdtValue": 0.0,
"price": 33954.39,
"percent": 0.0,
"usdtFee": 0.0,
"usdtReward": 0.0,
"project": "exchange"
},
{
"value": 0.0,
"usdtValue": 0.0,
"price": 33954.39,
"percent": 0.0,
"usdtFee": 0.0,
"usdtReward": 0.0,
"project": "asset"
},
{
"value": 0.0,
"usdtValue": 0.0,
"price": 33954.39,
"percent": 0.0,
"usdtFee": 0.0,
"usdtReward": 0.0,
"project": "huidu"
},
{
"value": 0.0,
"usdtValue": 0.0,
"price": 33954.39,
"percent": 0.0,
"usdtFee": 0.0,
"usdtReward": 0.0,
"project": "miner"
}
],
"startTime": 0,
"id": null
}
}
Interface for Querying OKC Day Indicators
HTTP Requests
GET /api/oklink/v1/datamaster/common/data/target/{type}
Request Example
GET https://www.oklink.com/api/oklink/v1/datamaster/commom/data/target/{type}
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | type | long | Yes | The metric ID of the query |
PARAM | startTime | long | Yes | Start time,e.g:1604332800000 |
PARAM | endTime | long | Yes | End time,e.g:1649347199999 |
type Value
type | Description |
---|---|
228 | OKC Number of Transactions per Day |
229 | OKC Total Transfer Volume per Day |
232 | Total revenue of validators on OKC |
233 | OKC Mean Transaction Fees |
234 | OKC Mean Block Interval |
235 | OKT Circulating Supply |
237 | OKC Number of Total Addresses |
238 | OKC Number of New Addresses |
239 | OKC Number of Active Addresses |
240 | OKC Number of Addresses with a Non-Zero Balance |
241 | Number of tokens on OKC |
242 | Total contracts on OKC |
243 | Number of contracts after deduplication |
244 | Number of verified contracts on OKC |
245 | Daily contract calls on OKC |
246 | Daily number of addresses calling contracts on OKC |
247 | OKC DeFi TVL |
254 | OKT Market Cap |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"OKT",//链 String
"indicatorName":"price",//指标名英文 String
"targetId":2,//指标id long
"detail":"btc 价格",//指标含义 String
"description":"每日更新"//指标描述 String
"content":[
{
"statisDate":20150815, //日期 long
"value":1404,// 纵坐标值,object 类型
"usdtValue":1404,// value * price
"reward": 1403.2,//区块奖励 Double
"fee": 123.4//手续费 Double
"reward": 1403.2,//区块奖励 Double
"kip20TokenCount": 119,//kip20代币数量
"kip721TokenCount": 20,//kip721代币数量
"supplyRate": 0.238,//流通率
"price":1404.5// 价格,double 类型
}
]
}
OKC Super Node
HTTP Requests
GET /api/oklink/v1/{chain}/datamaster/distribution/{type}
Request Example
GET https://www.oklink.com/api/oklink/v1/{chain}/datamaster/distribution/{type}
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | chain | String | Yes | The symbol of the blockchain to be queried is lowercase,eth、btc、usdt、OKC |
Path | type | String | Yes | The metric of the query |
type Value
type | Description | Chain |
---|---|---|
252 | The number and proportion of blocks produced by OKC validators | OKC |
253 | The number and proportion of votes obtained by OKC validators | OKC |
Response Parameters
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"chain":"OKC",
"indicatorName":"OKC Validator Block Distribution",
"targetId":252,
"detail":"OKC超级节点出块分布图",
"description":"该数据每日更新",
"exchangeName":null,
"updateTime":1633741200000,
"content":[
{
"value":323460,
"usdtValue":0,
"percent":0.05326415,
"usdtFee":0,
"usdtReward":0,
"project":"DeLab"
},
{
"value":6252,
"usdtValue":0,
"percent":0.00102952,
"usdtFee":0,
"usdtReward":0,
"project":"jiqix"
},
{
"value":203,
"usdtValue":0,
"percent":0.00003343,
"usdtFee":0,
"usdtReward":0,
"project":"OKLive"
}
],
"startTime":0,
"id":null
}
}
Contract Verify Interface
Contract Verify
HTTP Requests
POST/api/explorer/v1/{chain}/contract/verify
Request Example
POST https://www.oklink.com/api/explorer/v1/{chain}/contract/verify
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | eth |
RequestBody | contractAddress | String | Yes | The address of the contract to be verified |
RequestBody | contractSource | String | Yes | User-submitted contract source code |
RequestBody | compilerVersion | String | Yes | Compiler version |
RequestBody | evmVersion | String | Yes | EVM version |
RequestBody | optimization | boolean | No | Whether to optimize |
RequestBody | optimizationRuns | Integer | No | Running times of the code during the optimization |
RequestBody | licenseType | String | Yes | Open Source License Type |
RequestBody | contractAbi | String | No | Contract initialization parameters |
RequestBody | libraryList | List<> | No | The introduction of the contract |
RequestBody | compilerType | String | Yes | Compiler type:Solidity(SingleFile)\Solidity(MultipartFiles)\Vyper(Experimental) |
Example Response
Successful
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"optimization":false,
"isSuccess":true,
"contractAddress":"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
"contractCreateTxHash":"0x034c7f55fa92b432f3bf8d3bace5785b0f2c845a7adcbcf2c179228ef043f58d"
}
}
Server error
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"errorType":"SERVER_ERROR",
"isSuccess":false,
"statusCode":500
}
}
Contract codes do not match
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"optimization":true,
"errorType":"CONTRACT_CODE_ERROR",
"isSuccess":false,
"contractErrorCodeList":[
{
"compileCode":"0x......",
"contractName":"Proxy"
},
{
"compileCode":"0x......",
"contractName":"ProxyERC20"
},
{
"compileCode":"0x......",
"contractName":"Proxyable"
},
{
"compileCode":"0x......",
"contractName":"Owned"
},
{
"compileCode":"0x",
"contractName":"IERC20"
}
],
"contractCreationCode":"0x......",
"contractAddress":"0xdac17f958d2ee523a2206206994597c13d831ec7",
"compilerVersion":"v0.4.25",
"optimizationRuns":200,
"statusCode":501
}
}
Contract compilation error
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"optimization":true,
"errorType":"CONTRACT_COMPILE_ERROR",
"isSuccess":false,
"compilerVersion":"v0.4.25",
"optimizationRuns":200,
"compileErrorMessage":" Compiling your contracts... =========================== > Compiling ./contracts/Contract.sol ./contracts/Contract.sol:50:5: ParserError: Expected ';' but got 'address' address public nominatedOwner; ^-----^ [31mCompilation failed. See above.[39m Truffle v5.1.26 (core: 5.1.26) Node v12.16.3 ",
"statusCode":502
}
}
Introduction contracts are not fully provided
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"optimization":false,
"errorType":"LIBRARY_NOT_PROVIDED",
"isSuccess":false,
"contractErrorCodeList":[
{
"compileCode":"0x......",
"contractName":"TestContract"
},
{
"compileCode":"0x......",
"contractName":"LibraryTestContract"
}
],
"contractCreationCode":"0x......",
"contractAddress":"0x398719cf929cf3c3b51891611e6092186df4c88f",
"compilerVersion":"v0.4.16",
"optimizationRuns":200,
"statusCode":503
}
}
There is no supplied import contract in the compiled contract
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"errorLibraryMap":{
"SafeDecimalMath":"0x84d626b2bb4d0f064067e4bf80fce7055d8f3e7b"
},
"optimization":true,
"errorType":"PROVIDED_LIBRARY_ERROR",
"isSuccess":false,
"contractErrorCodeList":[
{
"compileCode":"0x......",
"contractName":"Proxy"
},
{
"compileCode":"0x......",
"contractName":"ProxyERC20"
},
{
"compileCode":"0x......",
"contractName":"Proxyable"
},
{
"compileCode":"0x......",
"contractName":"Owned"
},
{
"compileCode":"0x",
"contractName":"IERC20"
}
],
"contractCreationCode":"0x......",
"contractAddress":"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
"compilerVersion":"v0.4.25",
"optimizationRuns":200,
"statusCode":504
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
isSuccess | String | The verification results |
contractAddress | String | Contract address |
contractCreateTxHash | String | The contract creates the transaction hash |
compilerVersion | String | Compiler version |
optimization | boolean | Whether to optimize |
optimizationRuns | int | Running times of the code during the optimization |
errorType | String | Wrong type |
statusCode | int | Status code |
compileErrorMessage | String | Contract compilation error message |
contractCreationCode | String | Contract creation code |
contractErrorCodeList | List |
Contract compilation error code collection |
errorLibrary | String | The contract introduces an error map |
Multicontract Verify
HTTP Requests
POST/api/explorer/v1/{chain}/contract/verify
Request Example
POST https://www.oklink.com/api/explorer/v1/{chain}/contract/verify
Request Parameters
Parameter Scope | Parameter | Type | Required | Description |
---|---|---|---|---|
Path | Chain | String | Yes | eth |
RequestParam | files | MultipartFile[] | 是 | |
RequestBody | contractAddress | String | Yes | The address of the contract to be verified |
RequestBody | contractSource | String | Yes | User-submitted contract source code |
RequestBody | compilerVersion | String | Yes | Compiler version |
RequestBody | evmVersion | String | Yes | EVM version |
RequestBody | optimization | boolean | No | Whether to optimize |
RequestBody | optimizationRuns | Integer | No | Running times of the code during the optimization |
RequestBody | licenseType | String | Yes | Open Source License Type |
RequestBody | contractAbi | String | No | Contract initialization parameters |
RequestBody | libraryList | List<> | No | The introduction of the contract |
RequestBody | compilerType | String | Yes | Compiler type:Solidity(SingleFile)\Solidity(MultipartFiles)\Vyper(Experimental) |
返回结果
Successful
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"optimization":false,
"isSuccess":true,
"contractAddress":"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
"contractCreateTxHash":"0x034c7f55fa92b432f3bf8d3bace5785b0f2c845a7adcbcf2c179228ef043f58d"
}
}
Server error
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"errorType":"SERVER_ERROR",
"isSuccess":false,
"statusCode":500
}
}
Contract codes do not match
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"optimization":true,
"errorType":"CONTRACT_CODE_ERROR",
"isSuccess":false,
"contractErrorCodeList":[
{
"compileCode":"0x......",
"contractName":"Proxy"
},
{
"compileCode":"0x......",
"contractName":"ProxyERC20"
},
{
"compileCode":"0x......",
"contractName":"Proxyable"
},
{
"compileCode":"0x......",
"contractName":"Owned"
},
{
"compileCode":"0x",
"contractName":"IERC20"
}
],
"contractCreationCode":"0x......",
"contractAddress":"0xdac17f958d2ee523a2206206994597c13d831ec7",
"compilerVersion":"v0.4.25",
"optimizationRuns":200,
"statusCode":501
}
}
Contract compilation error
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"optimization":true,
"errorType":"CONTRACT_COMPILE_ERROR",
"isSuccess":false,
"compilerVersion":"v0.4.25",
"optimizationRuns":200,
"compileErrorMessage":" Compiling your contracts... =========================== > Compiling ./contracts/Contract.sol ./contracts/Contract.sol:50:5: ParserError: Expected ';' but got 'address' address public nominatedOwner; ^-----^ [31mCompilation failed. See above.[39m Truffle v5.1.26 (core: 5.1.26) Node v12.16.3 ",
"statusCode":502
}
}
Introduction contracts are not fully provided
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"optimization":false,
"errorType":"LIBRARY_NOT_PROVIDED",
"isSuccess":false,
"contractErrorCodeList":[
{
"compileCode":"0x......",
"contractName":"TestContract"
},
{
"compileCode":"0x......",
"contractName":"LibraryTestContract"
}
],
"contractCreationCode":"0x......",
"contractAddress":"0x398719cf929cf3c3b51891611e6092186df4c88f",
"compilerVersion":"v0.4.16",
"optimizationRuns":200,
"statusCode":503
}
}
There is no supplied import contract in the compiled contract
{
"code":0,
"msg":"",
"detailMsg":"",
"data":{
"errorLibraryMap":{
"SafeDecimalMath":"0x84d626b2bb4d0f064067e4bf80fce7055d8f3e7b"
},
"optimization":true,
"errorType":"PROVIDED_LIBRARY_ERROR",
"isSuccess":false,
"contractErrorCodeList":[
{
"compileCode":"0x......",
"contractName":"Proxy"
},
{
"compileCode":"0x......",
"contractName":"ProxyERC20"
},
{
"compileCode":"0x......",
"contractName":"Proxyable"
},
{
"compileCode":"0x......",
"contractName":"Owned"
},
{
"compileCode":"0x",
"contractName":"IERC20"
}
],
"contractCreationCode":"0x......",
"contractAddress":"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
"compilerVersion":"v0.4.25",
"optimizationRuns":200,
"statusCode":504
}
}
Response Parameters
Parameters | Types | Description |
---|---|---|
isSuccess | String | The verification results |
contractAddress | String | Contract address |
contractCreateTxHash | String | The contract creates the transaction hash |
compilerVersion | String | Compiler version |
optimization | boolean | Whether to optimize |
optimizationRuns | int | Running times of the code during the optimization |
errorType | String | Wrong type |
statusCode | int | Status code |
compileErrorMessage | String | Contract compilation error message |
contractCreationCode | String | Contract creation code |
contractErrorCodeList | List |
Contract compilation error code collection |
errorLibrary | String | The contract introduces an error map |