Blockchain API

Read network statistics and block embedding matrices from https://api.sentichain.com/blockchain. A block query costs 1 credit. Network height, block time and transaction counts are free.

Access and credits

Connect your wallet from the menu to use the explorer. For background requests, obtain your permanent API key from Yototec Credits and send it in the Authorization: Bearer header. Keep the key in your environment as YOTOTEC_API_KEY and out of request URLs.

GET /get_chain_length Free

Returns the current block count for the selected network.

Parameters

NameTypeRequiredDescription
networkstringYesmainnet or testnet

Example

curl "https://api.sentichain.com/blockchain/get_chain_length?network=mainnet"

Use an actual block number for a block query. The block count itself is not a block identifier.

GET /get_last_block_time Free

Returns the UTC time of the most recent block. Accepts network.

GET /get_total_number_of_transactions Free

Returns the confirmed transaction count. Accepts network.

GET /get_block_by_number 1 credit

Retrieves a block with complete embedding matrices. Authentication is required. The public representation contains block information and permitted matrix data.

Parameters

NameTypeRequiredDescription
networkstringYesmainnet or testnet
block_numberintegerYesThe block number to retrieve

Request headers

NameValuePurpose
AuthorizationBearer $YOTOTEC_API_KEYAuthenticate background requests
Idempotency-KeyA UUID for this purchaseReuse the same value on transport retries

Example

purchase_id="$(python3 -c 'import uuid; print(uuid.uuid4())')"
curl --fail-with-body \
  -H "Authorization: Bearer $YOTOTEC_API_KEY" \
  -H "Idempotency-Key: $purchase_id" \
  "https://api.sentichain.com/blockchain/get_block_by_number?network=mainnet&block_number=130199"

Public block fields

FieldDescription
block.block_numberThe requested block number
block.block_timestampThe block's UTC time
block.transactionsOrdered transaction entries containing the complete post_matrix

The public view omits source records for every account. It is a restricted representation, so it must not be treated as the complete original signed record. Matrix rows retain their order and full numeric values.

GET /get_last_block 1 credit

Retrieves the latest block using the same authentication, headers and public representation. Accepts network. A retry with the same purchase UUID keeps the original requested block even if a newer block becomes available.

SentiMove Reports

SentiMove reports are served from https://api.sentimove.com/agent. The same Yototec account and credit balance work across both products.

Install the SentiMove Python SDK from its official source repository:

python -m pip install git+https://github.com/Yototec/sentimove-sdk.git
GET /report_metadata Free

Discover available report windows, revisions, readiness, prices and limitations. Check availability before purchasing an update. This response does not include report content.

GET /report 1 credit

Request one ticker, chunk_start and chunk_end. Events and overall analysis arrive together as sm_events and sm_signal. Use your bearer key and a purchase UUID.

Each report includes report_status, limitations and report_revision. A useful limited report costs 1 credit. It may have no supported direction or confidence while still explaining the evidence and its limits. A missing directional call is not a neutral signal. Unavailable analysis is not charged.

GET /latest_snapshot 15 credits

The current full overview contains 15 assets in one coherent window. Each asset's events and analysis are bundled. If the full purchase is unavailable or the balance is too low, no reports are delivered and no credits are charged.

Visit SentiMove to browse the full overview with your wallet.

Yototec Credits

Connect an Ethereum-compatible wallet using the menu. Your first authenticated connection initializes one account, one permanent API key and 1,000 credits. Reconnecting or switching products reuses the same account and balance.

View your API key, balance, prices and top-up instructions at Yototec Credits. Account viewing is free, including at a zero balance. To arrange more credits, email [email protected] with your needs.

GET https://credits.yototec.com/api/account Free

Read your account using your permanent bearer key.

curl --fail-with-body \
  -H "Authorization: Bearer $YOTOTEC_API_KEY" \
  "https://credits.yototec.com/api/account"

The account includes wallet, credits and available_credits. Available credits exclude pending purchases.

Charges and retries

A purchase of one block changes a 1,000-credit balance to 999 credits. A later intentional purchase uses a new UUID and costs another credit. Transport retries reuse the original UUID and requested resources, so they cannot charge twice. Changing the requested resources requires a new purchase UUID.

Successful paid responses include X-Yototec-Credits-Charged, X-Yototec-Credits-Remaining and X-Yototec-Operation-Id headers. Login, account viewing, availability checks and unsuccessful requests are free.

Insufficient credits

HTTP 402 returns error.code as insufficient_credits, with required_credits and available_credits. The whole requested purchase is rejected without data or charge. Narrow your request or arrange a top-up through Yototec Credits.

Disconnect ends this website's wallet session and paid refreshes. Background applications using the permanent key can continue to access the same account.

Python Access

The SentiChain Python SDK provides product helpers. Its current usage reference is maintained in the SDK repository. The following example uses Python's standard HTTP library and the bearer-key contract.

python -m pip install sentichain

Read a Block

Set YOTOTEC_API_KEY in your environment before running this example.

import json
import os
import uuid
from urllib.request import Request, urlopen

# Preserve this value if you retry this purchase after a transport failure.
purchase_id = str(uuid.uuid4())
request = Request(
    "https://api.sentichain.com/blockchain/get_block_by_number"
    "?network=mainnet&block_number=130199",
    headers={
        "Authorization": "Bearer " + os.environ["YOTOTEC_API_KEY"],
        "User-Agent": "SentiChain-Python",
        "Idempotency-Key": purchase_id,
    },
)
with urlopen(request, timeout=15) as response:
    block = json.load(response)["block"]
    print("Block:", block["block_number"])
    print("Block time:", block["block_timestamp"])
    print("Transaction entries:", len(block["transactions"]))
    print("Credits charged:", response.headers["X-Yototec-Credits-Charged"])
    print("Credits remaining:", response.headers["X-Yototec-Credits-Remaining"])

Handle HTTP errors before using response data. Reuse the purchase UUID only when retrying the same request. Keep the API key on the machine running your application; website visitors authenticate through the wallet control.

Public Data and Signing

Public reads return the restricted block representation and complete matrices. Blockchain signing helpers serve transaction authors and do not expand account access. Verification must apply to the fields and proofs actually returned by the public API.