GET v0/subscriptions
Return all active address subscriptions for the current account.
JSON object
subscriptions
— array<JSON object>
A list of all subsriptions that are connected to your account
address
— string
The address that is being monitored for transactions.
callbackUrl
— string
The callback URL where notifications will be sent when new transactions are detected for the subscribed address.
chainId
— string
The specific chain-id for the blockchain network the address resides on. (Celestia “mainnet” or “mocha-4”, Eden “eden-1-testnet”)
id
— uuid string
The ID of your subscription.
network
— string
The blockchain network on which the address resides (Celestia or Eden).
{
"subscriptions": [
{
"id": "0145f6d3-401c-4fc9-9915-0e11a2471991",
"network": "celestia",
"chainId": "mocha-4",
"address": "celestia111111111111111111111111111111111111111",
"callbackUrl": "http://testnet.test.com/"
},
{
"id": "d140608a-dc87-4ef9-84ac-3ef2fe417856",
"network": "celestia",
"chainId": "celestia",
"address": "celestia111111111111111111111111111111111111112",
"callbackUrl": "http://test.com/"
}
]
}
curl \
-H 'Authorization: Bearer <YOUR API KEY>' \
'https://t.tech/v0/subscriptions'
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://t.tech/v0/subscriptions"
apiKey := "Your API Key" // Replace with your actual token
req, err := http.NewRequest("GET", url, nil)
if err != nil {
fmt.Println("Error creating request:", err)
return
}
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", apiKey))
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error sending request:", err)
return
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response body:", err)
return
}
fmt.Println("Status:", resp.Status)
fmt.Println("Response:", string(body))
}
// Cargo.toml dependencies:
// [dependencies]
// reqwest = { version = "0.12" }
// tokio = { version = "1.46", features = ["macros", "rt-multi-thread"] }
use reqwest::{Client, header};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let url = "https://t.tech/v0/subscriptions";
let api_key = "Your API Key"; // Replace with your actual token
let res = client
.get(url)
.bearer_auth(api_key)
.send()
.await?;
let status = res.status();
let body = res.text().await?;
println!("Status: {}", status);
println!("Response: {}", body);
Ok(())
}