Skip to main content
POST
/
v2
/
redpacket
/
{chain}
/
create
RedPacket - Create
curl --request POST \
  --url https://api.dex.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

DTO.RED_PACKET.CREATOR

creator
string
required

DTO.RED_PACKET.CREATOR

Example:

"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

maxClaims
integer<int32>
required

DTO.RED_PACKET.MAX_CLAIMS

Example:

10

mint
string
required

DTO.RED_PACKET.MINT

Example:

"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"

claimAuthority
string | null

DTO.RED_PACKET.CLAIM_AUTHORITY

Example:

"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"

expiration
integer<int64> | null

DTO.RED_PACKET.EXPIRATION

Example:

24

fixedAmount
string | null

DTO.RED_PACKET.FIXED_AMOUNT

Example:

"1000000000"

memo
string | null

DTO.RED_PACKET.MEMO

Example:

"Happy Red Packet"

password
string | null

DTO.RED_PACKET.PASSWORD

Example:

"123456"

totalAmount
string | null

DTO.RED_PACKET.TOTAL_AMOUNT

Example:

"1000000000"

Response

200 - application/json

Successful response

Create red packet response

shareId
string
required

DTO.RED_PACKET.SHARE_ID

Example:

"abc123"

txSerialize
string
required

DTO.RED_PACKET.SERIALIZED_TX

Example:

"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRg..."