Skip to main content
POST
/
v2
/
redpacket
/
{chain}
/
create
RedPacket - Create
curl --request POST \
  --url https://api.chainstream.io/v2/redpacket/{chain}/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "creator": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "maxClaims": 10,
  "mint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
  "claimAuthority": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
  "expiration": 24,
  "fixedAmount": "1000000000",
  "memo": "Happy Red Packet",
  "password": "123456",
  "totalAmount": "1000000000"
}
'
{
  "shareId": "abc123",
  "txSerialize": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRg..."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

chain
enum<string>
required

A chain name listed in supported networks Supported blockchain chains

Available options:
sol,
eth,
bsc

Body

application/json

Creator wallet address

creator
string
required

Creator wallet address

Example:

"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

maxClaims
integer<int32>
required

Maximum number of claims allowed

Example:

10

mint
string
required

Token mint address

Example:

"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"

claimAuthority
string | null

Claim authority address

Example:

"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"

expiration
integer<int64> | null

Expiration duration in seconds

Example:

24

fixedAmount
string | null

Fixed amount per claim

Example:

"1000000000"

memo
string | null

Red packet memo message

Example:

"Happy Red Packet"

password
string | null

Red packet password for claiming

Example:

"123456"

totalAmount
string | null

Total amount in the red packet

Example:

"1000000000"

Response

200 - application/json

Successful response

Create red packet response

shareId
string
required

Share identifier

Example:

"abc123"

txSerialize
string
required

Serialized transaction data

Example:

"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRg..."