> ## Documentation Index
> Fetch the complete documentation index at: https://jupiter-docs-gacha-v2-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Buy Asset

> Build the transaction to buy a listed asset



## OpenAPI

````yaml openapi-spec/gacha/gacha.yaml post /marketplace/{asset}/buy
openapi: 3.1.0
info:
  title: Jupiter Gacha API
  version: 0.1.0
  description: >-
    One normalised API over every integrated collectible-gacha platform
    (Collector Crypt, Phygitals and Beezie): pack catalogue, machines, prize
    inventory, wallet collectibles, marketplace, buyback, rewards and the
    transaction gateway. No API key is required. Money-moving endpoints return
    451 `region_restricted` from blocked regions.
servers:
  - url: https://api.raccoons.dev/gacha/v2
    description: Jupiter Gacha API
security: []
tags:
  - name: Packs
    description: >-
      Jupiter's curated pack catalogue: the storefront, its categories and each
      pack's live price.
  - name: Machines
    description: >-
      Every platform's live gacha machines, their prize pools, and the purchase
      and open flow.
  - name: Inventory
    description: >-
      A wallet's gacha collectibles and single-asset lookups, enriched with
      grades and values.
  - name: Collections
    description: The whitelisted collections whose assets count as gacha collectibles.
  - name: Marketplace
    description: Browse listings and build buy, list and delist transactions.
  - name: Buyback
    description: Instant-sell items back into a platform's standing bid.
  - name: Transactions
    description: The build, sign, submit gateway behind every money-moving flow.
  - name: Pulls
    description: The public, cross-platform feed of recent pulls.
  - name: Users
    description: Per-wallet lifetime stats and pull history.
  - name: Rewards
    description: Seasonal leaderboards, battlepass progress and prize claims.
paths:
  /marketplace/{asset}/buy:
    post:
      tags:
        - Marketplace
      summary: Buy a listed asset
      description: >-
        Builds the purchase transaction for the active listing (collector-crypt
        only, Phygitals listings settle on Tensor / Magic Eden). Returns
        unsigned transaction(s) and a gateway `reference`; complete via POST
        /gacha/gacha/v2/transactions/submit.
      parameters:
        - schema:
            type: string
            pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
            description: NFT mint address
          required: true
          description: NFT mint address
          name: asset
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                wallet:
                  type: string
                  pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
                  description: Buyer wallet
              required:
                - wallet
      responses:
        '200':
          description: Transaction plan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketTxPlan'
        '400':
          description: Not listed / bad request
        '403':
          description: The wallet does not hold this asset
        '404':
          description: Unknown asset
        '451':
          description: Unavailable in the caller's region
        '501':
          description: Unsupported on this platform
        '502':
          description: Platform unavailable
components:
  schemas:
    MarketTxPlan:
      type: object
      properties:
        reference:
          type: string
          description: >-
            Transaction-gateway intent id; pass to POST
            /gacha/gacha/v2/transactions/submit
        platform:
          type: string
        action:
          type: string
          enum:
            - buy
            - sell
            - list
            - delist
        asset:
          type: string
        transactions:
          type: array
          items:
            type: string
          description: Base64 unsigned transaction(s) to sign
        expiresAt:
          type: string
        detail:
          type: object
          additionalProperties: {}
        next:
          type: string
          description: The route to call next
      required:
        - reference
        - platform
        - action
        - asset
        - transactions
        - expiresAt
        - next

````