Layer 2 block info

EndPoint

GET api/v3/block/getBlock

Header

​
Field
Description
Example
X-API-KEY
ApiKey
"HlkcGxbqBeaF76j4rvPaOasyfPwnkQ6B6DQ6THZWbvrAGxzEdulXQvOKLrRWZLnN"

Request

Field
Description
Example
id
block id number
200
​

Response

Field
Description
Example
blockId
The num index of the block
1235
blockSize
The block size
64
exchange
The exchange address
"0xbbbbca6a90 1c926f240b89 eacb641d8aec 7aeafd"
txHash
The txHash of the block
"0xf7c9323511 86c3a9053f31 3eefa16209c0 18f7f1dba8aa 8ca7100400f7 c31085"
status
The status of the block, WAIT_SUBMIT or SUBMITTED or COMPLETED
"COMPLETED"
createdAt
The creation time of the block
1627904776000
transactions
List[BlockTransaction], The txs list inside the block
/

Model

BlockTransaction

​
Field
Description
Example
txType
The txType of the transaction, one in [Noop,Deposit,Withdraw,Transfer,SpotTrade,AccountUpdate,AmmUpdate,JoinAmm,ExitAmm,SignatureVerification,NftMint,NftData] Allowable : ['Noop', 'Deposit', 'Withdraw', 'Transfer', 'SpotTrade', 'AccountUpdate', 'AmmUpdate', 'JoinAmm', 'ExitAmm', 'SignatureVerification', 'NftMint', 'NftData']
"transfer"
accountId
[Optional] The accountId of the transaction
10006
owner
[Optional] The owner of the transaction
"0xbbbbca6a90 1c926f240b89 eacb641d8aec 7aeafd"
token
[Optional] Token, The token info of the transaction
/
toToken
[Optional] Token, The toToken info of the transaction if the tx has destination tokenId
/
fee
[Optional] Token, The fee of the transaction
/
validUntil
[Optional] The validUntil of the transaction
1627904776
toAccountId
[Optional] The toAccountId of the transaction if tx has a destination account
10006
toAccountAddress
[Optional] The toAccountAddress of the transaction if tx has a destination account
"0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"
storageId
[Optional] The storageId of the transaction
2
orderA
[Optional] Order, The orderA of the transaction if tx is SpotTrade
/
orderB
[Optional] Order, The orderB of the transaction if tx is SpotTrade
/
valid
[Optional] The validness of the transaction
"false"
nonce
[Optional] The nonce of the transaction if it uses nonce
65
minterAccountId
[Optional] The minterAccountId of the transaction if its a mint tx
10008
minter
[Optional] The minter of the transaction if its a mint tx
"0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"
nftToken
[Optional] The nftToken of the transaction if its a NFT related tx
/
nftType
[Optional] The nftType of the transaction if its a mint tx
"ERC1155"
fromAddress
[Optional] from address
"0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"
toAddress
[Optional] to address
"0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"

Token

​
Field
Description
Example
tokenId
[Optional] The tokenId of the token
"6"
tokenAddress
[Optional] The token Address
"0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"
nftData
[Optional] The nftData of the NFT token
"0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085"
nftId
[Optional] The NFT_ID of the NFT token
"0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085"
amount
[Optional] The token amount
"100"

Order

Field
Description
Example
storageID
The storageId of the order
6
accountID
The accountID of the order
10006
amountS
The amountS of the order
"100"
amountB
The amountB of the order
"600"
tokenS
The tokenS of the order
6
tokenB
The tokenB of the order
32768
validUntil
The validUntil of the order
1235123512
taker
The taker of the order
"0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"
feeBips
The feeBips of the order
60
isAmm
If the order isAmm
"true"
nftData
The nftData of the order, if its NFT order
"0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"
fillS
The fillS of the order
500

Example

Request

GET api/v3/block/getBlock
https://uat2.loopring.io/api/v3/block/getBlock?id=200

Response

{
"blockId": 200,
"blockSize": 16,
"exchange": "0x2e76ebd1c7c0c8e7c2b875b6d505a260c525d25e",
"txHash": "0xed78550231d3df1e68de286980628774c2bcfb1a72a09a20feaf48e8d9acdb0b",
"status": "COMPLETED",
"createdAt": 1610164628895,
"transactions": [{
"txType": "Deposit",
"accountId": 10010,
"owner": "0x6b1029c9ae8aa5eea9e045e8ba3c93d380d5bdda",
"token": {
"tokenId": 2,
"amount": "1000000"
}
}]
}