LogoP | Magickbase
Open api

V0 txs detail

GET
/v0/txs/{txHash}
AuthorizationBearer <token>

In: header

Path Parameters

txHashstring

Response Body

curl -X GET "https://preflight.magickbase.com/api/openapi/v0/txs/string"
fetch("https://preflight.magickbase.com/api/openapi/v0/txs/string")
package main

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

func main() {
  url := "https://preflight.magickbase.com/api/openapi/v0/txs/string"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://preflight.magickbase.com/api/openapi/v0/txs/string"

response = requests.request("GET", url)

print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;

HttpClient client = HttpClient.newBuilder()
  .connectTimeout(Duration.ofSeconds(10))
  .build();

HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
  .uri(URI.create("https://preflight.magickbase.com/api/openapi/v0/txs/string"))
  .GET()
  .build();

try {
  HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
  System.out.println("Status code: " + response.statusCode());
  System.out.println("Response body: " + response.body());
} catch (Exception e) {
  e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;

var client = new HttpClient();
var response = await client.GetAsync("https://preflight.magickbase.com/api/openapi/v0/txs/string");
var responseBody = await response.Content.ReadAsStringAsync();
{
  "network": "ckb",
  "hash": "string",
  "blockHash": "string",
  "committedTime": "string",
  "submittedTime": "string",
  "feeRate": "string",
  "position": 0,
  "isCellBase": true,
  "lockTime": 0,
  "txStatus": "string",
  "transactionFee": "string",
  "blockNumber": "string",
  "cycles": 0,
  "version": "string",
  "relatedCapacityAmount": "string",
  "relatedCapacityAmountUsd": "string",
  "inputAmountUsd": "string",
  "outputAmountUsd": "string",
  "totalAmountUsd": "string",
  "inputs": [
    {
      "id": "string",
      "addressHash": "string",
      "assetId": "string",
      "icon": "string",
      "symbol": "string",
      "decimal": 0,
      "amount": "string",
      "amountUsd": "string",
      "capacityAmount": "string"
    }
  ],
  "outputs": [
    {
      "id": "string",
      "addressHash": "string",
      "assetId": "string",
      "icon": "string",
      "symbol": "string",
      "decimal": 0,
      "amount": "string",
      "amountUsd": "string",
      "capacityAmount": "string",
      "baseReward": "string",
      "commitReward": "string",
      "proposalReward": "string",
      "secondaryReward": "string"
    }
  ],
  "assetInfo": {
    "id": "string",
    "icon": "string",
    "symbol": "string",
    "name": "string",
    "decimals": 0
  }
}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}