> For the complete documentation index, see [llms.txt](https://tetron.gitbook.io/tetron/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tetron.gitbook.io/tetron/tetron.fun-getting-started.md).

# Tetron.fun - Getting Started

## 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)

```bash
npm install @tetronfun/sdk
```

#### Python

```bash
bashCopyEditpip install tetronfun
```

### 5. Configuring Your Client

#### JavaScript

```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

```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

```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

```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.
