Tetron Gitbook
X/TwitterWebsite
  • Tetron.fun - Introduction
  • Tetron.fun - Platform Overview
  • Tetron.fun - Getting Started
  • Tetron.fun - Private RPC Nodes
  • Tetron.fun - Troubleshooting
  • Tetron.fun - API Refference
  • Tetron.fun - Webhooks & Event Subscriptions
  • Tetron.fun - Code Examples & Tutorials
  • Tetron.fun - Support
Powered by GitBook
On this page
  • Getting Started
  • 1. Prerequisites
  • 2. Account Registration
  • 3. Obtaining API Credentials
  • 4. Installing the SDK
  • 5. Configuring Your Client
  • 6. Executing Your First Request
  • 7. Interpreting the Response
  • 8. Error Handling
  • 9. Next Steps

Tetron.fun - Getting Started

Step‑by‑step guide to register, configure, and execute your first Tetron transaction.

Getting Started

This guide will walk you through creating an account, obtaining API credentials, installing the TetronFun SDK, and executing your first payment intelligence request.

1. Prerequisites

  • A modern development environment with one of the following languages supported by TetronFun SDKs:

    • JavaScript (Node.js ≥ 14)

    • Python (≥ 3.8)

  • API client capable of sending HTTPS requests (e.g. curl, Postman) if you prefer raw REST calls.

  • An active TetronFun account (sign‑up instructions below).

2. Account Registration

  1. Navigate to the TetronFun portal: https://app.tetronfun.com/signup

  2. Provide your email address and create a secure password.

  3. Verify your email by clicking the link sent to your inbox.

  4. Log in to the dashboard at https://app.tetronfun.com/login.

3. Obtaining API Credentials

  1. In the dashboard, open Settings → API Keys.

  2. Click Create New Key.

  3. Give the key an identifiable name (e.g. “Development Key”).

  4. Copy the API Key and API Secret; you will use these in your client configuration.

  5. Store credentials securely (do not commit to source control).

4. Installing the SDK

JavaScript (Node.js)

npm install @tetronfun/sdk

Python

bashCopyEditpip install tetronfun

5. Configuring Your Client

JavaScript

javascriptCopyEditimport TetronFun from '@tetronfun/sdk';

const client = new TetronFun({
  apiKey:    process.env.TETRONFUN_API_KEY,
  apiSecret: process.env.TETRONFUN_API_SECRET,
  baseUrl:   'https://api.tetronfun.com'
});

Python

pythonCopyEditfrom tetronfun import TetronFun

client = TetronFun(
    api_key    = os.getenv("TETRONFUN_API_KEY"),
    api_secret = os.getenv("TETRONFUN_API_SECRET"),
    base_url   = "https://api.tetronfun.com"
)

6. Executing Your First Request

Below is an example of submitting a sample transaction for intelligence scoring.

JavaScript

javascriptCopyEditasync function scoreTransaction() {
  const transaction = {
    fromAddress: "0xabc123...def",
    toAddress:   "0xdef456...abc",
    amount:      "0.5",
    currency:    "ETH",
    network:     "ethereum"
  };

  const response = await client.score(transaction);
  console.log("Fraud Score:", response.fraudScore);
  console.log("Reputation Score:", response.reputationScore);
}

scoreTransaction();

Python

pythonCopyEdittransaction = {
    "from_address": "0xabc123...def",
    "to_address":   "0xdef456...abc",
    "amount":       "0.5",
    "currency":     "ETH",
    "network":      "ethereum"
}

response = client.score(transaction)
print("Fraud Score:", response["fraud_score"])
print("Reputation Score:", response["reputation_score"])

7. Interpreting the Response

  • fraudScore: A value between 0–100 indicating likelihood of suspicious activity (higher = more suspicious).

  • reputationScore: A value between 0–100 reflecting the trustworthiness of wallet addresses (higher = more trusted).

  • recommendation: Suggested action based on combined metrics (e.g. approve, review, block).

8. Error Handling

  • 401 Unauthorized: Invalid API key or secret.

  • 429 Too Many Requests: Rate limit exceeded.

  • 5xx Server Errors: Temporary issues—retry with exponential backoff.

9. Next Steps

  • Review the API Reference for additional endpoints and parameters.

  • Explore the Best Practices & Case Studies to optimize scoring thresholds and workflows.

  • Integrate webhooks or event listeners to automate responses to intelligence outputs.

  • Contact support at support@tetronfun.com for questions or assistance.

PreviousTetron.fun - Platform OverviewNextTetron.fun - Private RPC Nodes

Last updated 12 days ago