> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstream.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 红包 - 领取

> 从已有红包中领取代币



## OpenAPI

````yaml /cn/api-reference/openapi-data-cn.yaml POST /v2/redpacket/{chain}/claim
openapi: 3.1.0
info:
  title: Services API
  description: Services API
  contact:
    name: AI
    email: ai@sx.ai
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.chainstream.io
    description: Production
security:
  - bearer_auth: []
  - api_key_auth: []
tags:
  - name: Blockchain
    description: 区块链相关操作
  - name: Token
    description: 代币相关操作
  - name: Trade
    description: 交易相关操作
  - name: Wallet
    description: 钱包相关操作
  - name: Dex
    description: DEX 相关操作
  - name: Ranking
    description: 排行榜相关操作
  - name: DexPool
    description: DEX 池子相关操作
  - name: Watchlist
    description: 关注列表相关操作
  - name: KYT
    description: KYT 相关操作
  - name: Webhook
    description: Webhook 相关操作
  - name: RedPacket
    description: 红包相关操作
  - name: IPFS
    description: IPFS 相关操作
  - name: DexScreener
    description: DexScreener 相关操作
paths:
  /v2/redpacket/{chain}/claim:
    post:
      tags:
        - RedPacket
      summary: 红包 - 领取
      description: 从已有红包中领取代币
      operationId: claim.redpacket
      parameters:
        - name: chain
          in: path
          description: 支持网络列表中的链名称
          required: true
          schema:
            $ref: '#/components/schemas/ChainSymbol'
          example: sol
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClaimRedPacketRequest'
        required: true
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClaimRedPacketResponse'
components:
  schemas:
    ChainSymbol:
      type: string
      description: Supported blockchain chains
      enum:
        - sol
        - eth
        - bsc
    ClaimRedPacketRequest:
      type: object
      description: 领取者钱包地址
      required:
        - claimer
      properties:
        claimer:
          type: string
          description: 领取者钱包地址
          example: Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
        packetId:
          type:
            - string
            - 'null'
          description: 红包链上 ID
          example: Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
        password:
          type:
            - string
            - 'null'
          description: 红包领取密码
          example: '123456'
        shareId:
          type:
            - string
            - 'null'
          description: 分享标识
          example: abc123
    ClaimRedPacketResponse:
      type: object
      description: Claim red packet response
      required:
        - txSerialize
      properties:
        txSerialize:
          type: string
          description: 序列化交易数据
          example: AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRg...
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    api_key_auth:
      type: apiKey
      in: header
      name: X-API-KEY

````