LogoP | Magickbase
Open api

V0 blocks txs

GET
/v0/blocks/{blockHash}/txs
AuthorizationBearer <token>

In: header

Path Parameters

blockHashstring

Query Parameters

from?string
to?string
addressFilterOperator?string
Default"and"
Value in"or" | "and"
txHash?string
orderKey?string
Value in"volume"
orderDirection?string
Value in"asc" | "desc"
page?number
Default1
Range1 <= value
pageSize?number
Default10
Range1 <= value <= 100

Response Body

curl -X GET "https://preflight.magickbase.com/api/openapi/v0/blocks/string/txs?from=string&to=string&addressFilterOperator=or&txHash=string&orderKey=volume&orderDirection=asc&page=1&pageSize=10"
fetch("https://preflight.magickbase.com/api/openapi/v0/blocks/string/txs?from=string&to=string&addressFilterOperator=or&txHash=string&orderKey=volume&orderDirection=asc&page=1&pageSize=10")
package main

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

func main() {
  url := "https://preflight.magickbase.com/api/openapi/v0/blocks/string/txs?from=string&to=string&addressFilterOperator=or&txHash=string&orderKey=volume&orderDirection=asc&page=1&pageSize=10"

  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/blocks/string/txs?from=string&to=string&addressFilterOperator=or&txHash=string&orderKey=volume&orderDirection=asc&page=1&pageSize=10"

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/blocks/string/txs?from=string&to=string&addressFilterOperator=or&txHash=string&orderKey=volume&orderDirection=asc&page=1&pageSize=10"))
  .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/blocks/string/txs?from=string&to=string&addressFilterOperator=or&txHash=string&orderKey=volume&orderDirection=asc&page=1&pageSize=10");
var responseBody = await response.Content.ReadAsStringAsync();
{
  "result": [
    {
      "hash": "string",
      "txIndex": 0,
      "amount": "string",
      "amountUsd": "string",
      "from": "string",
      "fromCount": 0,
      "to": "string",
      "toCount": 0,
      "asset": {
        "id": "string",
        "name": "string",
        "icon": "string",
        "symbol": "string",
        "decimals": 0
      }
    }
  ],
  "total": 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": []
}