メインコンテンツへスキップ
GET
/
v2
/
redpacket
/
{id}
レッドパケット - 取得
curl --request GET \
  --url https://api.chainstream.io/v2/redpacket/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.chainstream.io/v2/redpacket/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.chainstream.io/v2/redpacket/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chainstream.io/v2/redpacket/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.chainstream.io/v2/redpacket/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.chainstream.io/v2/redpacket/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.chainstream.io/v2/redpacket/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "creator": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "id": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
  "maxClaims": 10,
  "mint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
  "totalAmount": "1000000000",
  "chain": "sol",
  "claimAuthority": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
  "claimedAmount": "500000000",
  "claimedCount": 5,
  "createdAt": 1717334400000,
  "expiration": 24,
  "expired": true,
  "expiredAt": 1717420800000,
  "memo": "Happy Red Packet",
  "refundedAmount": "0",
  "shareId": "abc123",
  "txHash": "5UfDuX7hXbL3mFfPdq1pymNHM..."
}

承認

Authorization
string
header
必須

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

パスパラメータ

id
string
必須

レッドパケット識別子

レスポンス

200 - application/json

成功レスポンス

Red packet detail

creator
string
必須

作成者のウォレットアドレス

:

"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

id
string
必須

レッドパケット識別子

:

"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"

maxClaims
integer<int32>
必須

最大受取可能回数

:

10

mint
string
必須

トークンミントアドレス

:

"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"

totalAmount
string
必須

レッドパケットの合計金額

:

"1000000000"

chain
string | null

レッドパケットのブロックチェーンネットワーク

:

"sol"

claimAuthority
string | null

受取権限アドレス

:

"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"

claimedAmount
string | null

レッドパケットから受け取った金額

:

"500000000"

claimedCount
integer<int32> | null

受取回数

:

5

createdAt
integer<int64> | null

レッドパケット作成タイムスタンプ

:

1717334400000

expiration
integer<int64> | null

有効期限(秒)

:

24

expired
boolean | null

レッドパケットが引き出し済みかどうか

expiredAt
integer<int64> | null

有効期限タイムスタンプ

:

1717420800000

memo
string | null

レッドパケットのメモメッセージ

:

"Happy Red Packet"

refundedAmount
string | null

返金額

:

"0"

shareId
string | null

共有識別子

:

"abc123"

txHash
string | null

トランザクションハッシュ

:

"5UfDuX7hXbL3mFfPdq1pymNHM..."