Loopring Dev Docs
  • Introduction
  • Endpoints
  • SDK
    • SDK Guides
    • Test Mock Data
      • Mock Account
      • Mock provider
      • Mock ERC20 Token Map
      • Mock AMM MAP
      • Mock EIP712 Typed Data
      • Mock Generate eddsaKey
  • Glossary
  • 🗳️Loopring Account
    • Introduction
    • SDK Guides
      • Setup a Loopring Account
      • Unlock Account (Login)
    • API References
      • Get Account info
        • Sample code
      • Update EddsaKey
        • Sample code
      • Get apiKey
        • Sample code
      • Update apiKey
        • Sample code
  • 🎨CounterFactual NFT
    • Introduction
      • Compute NFT Address API
      • When to deploy counterfactual NFT contracts?
    • SDK Guides
      • Deposit NFT
      • Create Collection
      • Mint Counterfactual NFT
      • Transfer NFT
      • Deploy NFT
      • Withdraw NFT
      • Trade NFT
        • Validate NFT Order
      • Meta & IPFS
    • API References
      • NFT Collection
        • Create collection
          • Sample code
        • Edit collection
          • Sample code
        • Delete collection
          • Sample code
        • List owned collections
          • Sample code
        • List user's NFTs under one collection
          • Sample code
        • List user's NFT balances group by Collection ID
          • Sample code
        • List all NFTs of a collection
          • Sample code
        • Get collection by Collection ID
          • Sample code
        • Get collections by contract address
          • Sample code
      • Get NFT Assets
        • Sample code
      • Get NFT Balances
        • Sample code
      • Mint NFT
        • Sample code
      • Transfer NFT
        • Sample code
      • Validate NFT Order
        • Sample code
      • Trade NFT
        • Sample code
      • Deploy NFT TokenAddress
        • Sample code
      • Withdraw NFT
        • Sample code
      • Get NFT Transactions
        • Sample code
      • Get NFT Trade History
        • Sample code
      • Get AvailableBroker
        • Sample code
      • Get NFT Info
        • Sample code
      • Get NFT Data
        • Sample code
      • Get NFT Holders
        • Sample code
  • 🪙ERC20 Tokens
    • Introduction
    • SDK Guides
      • Transfer ERC20
      • Withdraw ERC20
      • Deposit ERC20
      • Order ERC20
    • API References
      • Get Assets
        • Sample code
      • Transfer
        • Sample code
      • Submit Order
        • Sample code
      • Cancel Order
        • Sample code
      • Withdraw
        • Sample code
      • Get Transactions
        • Sample code
      • Get Orders
        • Sample code
      • Get Trade History
        • Sample code
  • 🔬Resources
    • Advanced
      • UpdateAccount with custom seed
      • Pay payee updateAccount fee
      • Common error and solutions
      • Submit erc20 order
    • Common Info
      • Get relayer current time
        • Sample code
      • Get exchange info
        • Sample code
      • Get token info
        • Sample code
      • Get markets info
        • Sample code
    • Error codes
    • Fees
      • GET ERC20 Offchain Fee
        • Sample code
      • GET ERC20 Order Fee
        • Sample code
      • GET NFT Offchain Fee
        • Sample code
      • GET NFT Order Fee
        • Sample code
      • SDK Fees
    • Layer 2 block info
      • Get pending transactions
    • Request signing
      • Special API Request Signatures
      • Off-chain Request Signatures
      • Extra ECDSA authentic in header
    • Signature
      • ECDSA signature
        • ECDSA key generation
        • ECDSA sign
        • ECDSA verify signature
      • EdDSA signature
        • EdDSA key generation
        • EdDSA sign
        • EdDSA verify signature
      • SDK Signature
        • Mock Signature
    • Smart Contracts
    • Storage Id
      • Sample code
    • WebSocket
      • Account Notification
      • Order Notification
      • Orderbook Notification
      • Trade Notification
      • Ticker Notification
      • Candlestick Notification
      • AMM Pool Snapshot Notification
      • Block Generation Notification
    • Loopring Smart Wallet
      • Signature and verification
Powered by GitBook
On this page
  • EndPoint
  • Header
  • Request
  • Response
  • Model
  • Token
  • Order
  • Sample code
  • Request
  • Response

Was this helpful?

  1. Resources
  2. Layer 2 block info

Get pending transactions

Get pending txs to be packed into the next block

EndPoint

GET api/v3/block/getPendingRequests

Header

Field
Description
Example

X-API-KEY

ApiKey

"HlkcGxbqBeaF76j4rvPaOasyfPwnkQ6B6DQ6THZWbvrAGxzEdulXQvOKLrRWZLnN"

Request

None

Response

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

"0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"

token

/

toToken

/

fee

/

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

/

orderB

/

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

"EIP1155"

fromAddress

[Optional] from address

"0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"

toAddress

[Optional] to address

"0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"

Model

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

Sample code

Request

GET api/v3/block/getPendingRequests
https://uat2.loopring.io/api/v3/block/getPendingRequests

Response

[{
	"txType": "SpotTrade",
	"orderA": {
		"storageID": 16,
		"accountID": 88240,
		"amountS": "24555248000000000000000",
		"amountB": "12487500000",
		"tokenS": 1,
		"tokenB": 6,
		"validUntil": 1658444756,
		"taker": "",
		"feeBips": 10,
		"isAmm": false,
		"nftData": "",
		"fillS": 9158448
	},
	"orderB": {
		"storageID": 526024,
		"accountID": 108,
		"amountS": "12489000000",
		"amountB": "24555200000000000000000",
		"tokenS": 6,
		"tokenB": 1,
		"validUntil": 2147483647,
		"taker": "",
		"feeBips": 0,
		"isAmm": true,
		"nftData": "",
		"fillS": 2746330
	},
	"valid": true
}, {
	"txType": "Transfer",
	"accountId": 61279,
	"token": {
		"tokenId": 32980,
		"nftData": "0x002c471c82f1912eb3b3aff8c8b509c2126861bab0444533dbc17c06704f2235",
		"amount": "1"
	},
	"toToken": {
		"tokenId": 32899
	},
	"fee": {
		"tokenId": 1,
		"amount": "80900000000000000"
	},
	"validUntil": 1658444653,
	"toAccountId": 109068,
	"toAccountAddress": "0xd319373c55864b48e9edd03c08bade589443eff4",
	"storageId": 25
}]
PreviousLayer 2 block infoNextRequest signing

Last updated 2 years ago

Was this helpful?

[Optional] , The token info of the transaction

[Optional] , The toToken info of the transaction if the tx has destination tokenId

[Optional] , The fee of the transaction

[Optional] , The orderA of the transaction if tx is SpotTrade

[Optional] , The orderB of the transaction if tx is SpotTrade

🔬
Token
Token
Token
Order
Order