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

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

Available options:
sol,
base,
bsc,
polygon,
arbitrum,
optimism,
avalanche,
ethereum,
zksync,
sui

Body

application/json
creator
string
required

Creator wallet address of the red packet

Required string length: 8 - 64
Example:

"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

mint
string
required

Token mint address for the red packet

Example:

"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"

maxClaims
number
required

Maximum number of recipients

Example:

10

totalAmount
string

Total amount of tokens to be distributed

Example:

"1000000000"

fixedAmount
string

Fixed amount per claim (for equal distribution)

Example:

"1000000000"

memo
string

Optional memo message for the red packet

Example:

"Happy Red Packet"

password
string

Optional password to claim the red packet

Example:

"123456"

claimAuthority
string

Optional authority address that can claim the red packet

Example:

"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"

Response

200 - application/json
txSerialize
string
required

Base64 encoded transaction

Example:

"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="

shareId
string
required

redpacket share id

Example:

"123456"