MetaPath API
  • API Introduction
    • General Instruction
    • Major Blockchain Name Conventions
  • Cross-platform Aggregator Interface
    • Token Swap Flow
    • Get <The Token List> Interface
    • <Price Inquiry> Interface
    • <Swap> Interface
    • <BlackList> Interface
  • Upload gas free orders
  • Aggregate NFTs Interface V1.0
    • Get <Basic Information> Interface
    • Get <NFT List> Interface
    • <Price Inquiry> Interface
    • <Swap> Interface
    • Get <NFT List Held by User> Interface
  • Aggregate NFTs Interface V2.0
    • Get <Latest Collections> Interface
    • Get <Top NFT Collections> Interface
    • <List Page> Interface
    • Get <NFT Details> Interface
    • Get <NFT Details> Other Related Interface
    • <Price Inquiry> Interface
    • <Swap> Interface
    • <Batch Purchase> Interface
  • List Related Interface
    • Get <User's NFT> Interface
    • Get <Listed NFT List (My List)> Interface
    • <Create/Update Listing> Interface
    • <Create/Update Listing in the Backend> Interface
    • <Cancel Listing> Interface
    • <Change Listing> Interface
  • Swap Information Related Interface
    • <Add Swap Information> Interface
    • <Get Swap Information List> Interface
    • <Get Detailed Transation Infromation > Interface
Powered by GitBook
On this page
  1. Aggregate NFTs Interface V2.0

<Batch Purchase> Interface

Obtain relevant transaction information for users to purchase wanted NFT/NFTs in one time

Request Address: /api/v2/meta/batchBuy

Request Method: POST

Request Parameters:

{
"userAddr": "0xe814c2709eBD2Bd6289eEa6Ec32F8690BFbC7F88", // user wallet address
"buy": [{ //the list of NFTs in this purchase
"contractAddress": "0xa5d37c0364b9e6d96ee37e03964e7ad2b33a93f4", // nft contract address
"tokenId": "4197" // tokenId of NFT
},{
"contractAddress": "0xa5d37c0364b9e6d96ee37e03964e7ad2b33a93f4", 
"tokenId": "1422"
}]
}

Output example:

{
    "resCode": "100",
    "resMsg": "Success",
    "data": {
        "txInfo": {
            "transaction": "xxxxxxxxxxxxxxx", // data for transaction broadcast
            "value": { // transaction value
                "type": "BigNumber",
                "hex": "0x18838370f34000" 
            },
            "contractAddress": "0x83C8F28c26bF6aaca652Df1DbBE0e1b56F8baBa2", //target contract address
        }
    }
}


Previous<Swap> InterfaceNextList Related Interface

Last updated 2 years ago