-
Notifications
You must be signed in to change notification settings - Fork 0
/
code check dữ liệu 3
47 lines (30 loc) · 1.18 KB
/
code check dữ liệu 3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
$project_id = "mainnetsO4iFPuoMFLG8bz8XqQLmDAszLuKOHyn"
$url = "https://cardano-mainnet.blockfrost.io/api/v0/metadata/txs/labels?project_id=$project_id"
$headers = @{
"accept" = "application/json"
"content-type" = "application/json"
}
$response = Invoke-RestMethod -Uri $url -Method Post -Headers $headers -Body $body
# Extract relevant information from the response
$time = $time
$height = $height
# Create the formatted text
$text = "<b>Dạ! thông tin sếp cần đây ạ $emoji</b>`n"
# $text += "Pool: $delegatedPool`n"
$text += "<b>Tổng số dư</b>: {0:N0} ADA`n" -f $time
$text += "Tổng thưởng stake: {0:N0} ADA`n" -f $height
# Display the formatted text
Write-Output $text
# Định nghĩa project_id
$project_id = "mainnetsO4iFPuoMFLG8bz8XqQLmDAszLuKOHyn" # Thay YOUR_PROJECT_ID bằng project_id của bạn
# Xây dựng URL
$url = "https://cardano-mainnet.blockfrost.io/api/v0/accounts/stake1u9uz4j024qfud557ucrqw3kqfdndjgaxj7m44x7tamkvmyqzdwe7v"
# Tạo header với project_id
$headers = @{
"project_id" = $project_id
}
# Gửi yêu cầu
$response = Invoke-RestMethod -Uri $url -Headers $headers -Method Get
# Hiển thị response
$response
//fyyytr