> For the complete documentation index, see [llms.txt](https://minara.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://minara.ai/docs/minara-handbook/tr/islem/agent-api/api-reference-x402.md).

# API Referansı (x402)

### Geliştirici x402 API

Minara'nın x402 uç noktaları için Kullandıkça Öde modelini kullanan teknik özellikler.

**Temel URL**: `https://x402.minara.ai`

## Chat (Base Chain)

> Ask Minara AI - Intelligent crypto assistant

```json
{"openapi":"3.0.0","info":{"title":"Minara x402 API","version":"1.0"},"servers":[{"url":"https://x402.minara.ai"}],"security":[{"x402Payment":[]}],"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"x-payment-response","description":"Payment proof token obtained from x402 payment challenge flow. Required after completing payment."}},"schemas":{"ChatRequest":{"type":"object","required":["userQuery"],"properties":{"userQuery":{"type":"string","description":"Required. User query content."}}},"ChatResponse":{"type":"object","properties":{"content":{"type":"string","description":"AI response content."}}},"BadRequestError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"PaymentRequiredError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"paymentInstructions":{"type":"object","properties":{"amount":{"type":"string","description":"Payment amount required."},"currency":{"type":"string","description":"Payment currency (e.g., USDC)."},"recipient":{"type":"string","description":"Payment recipient address."},"chain":{"type":"string","description":"Blockchain for payment."}}}}}}},"paths":{"/x402/chat":{"post":{"summary":"Chat (Base Chain)","description":"Ask Minara AI - Intelligent crypto assistant","operationId":"x402Chat","tags":["AI"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"400":{"description":"Bad Request - Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Unauthorized - Invalid payment response token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredError"}}}}}}}}}
```

## Chat Expert (Base Chain)

> Ask Minara AI - Intelligent crypto assistant

```json
{"openapi":"3.0.0","info":{"title":"Minara x402 API","version":"1.0"},"servers":[{"url":"https://x402.minara.ai"}],"security":[{"x402Payment":[]}],"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"x-payment-response","description":"Payment proof token obtained from x402 payment challenge flow. Required after completing payment."}},"schemas":{"ChatRequest":{"type":"object","required":["userQuery"],"properties":{"userQuery":{"type":"string","description":"Required. User query content."}}},"ChatResponse":{"type":"object","properties":{"content":{"type":"string","description":"AI response content."}}},"PaymentRequiredError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"paymentInstructions":{"type":"object","properties":{"amount":{"type":"string","description":"Payment amount required."},"currency":{"type":"string","description":"Payment currency (e.g., USDC)."},"recipient":{"type":"string","description":"Payment recipient address."},"chain":{"type":"string","description":"Blockchain for payment."}}}}}}},"paths":{"/x402/chat/expert":{"post":{"summary":"Chat Expert (Base Chain)","description":"Ask Minara AI - Intelligent crypto assistant","operationId":"x402ChatExpert","tags":["AI"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"400":{"description":"Bad Request - Invalid parameters"},"401":{"description":"Unauthorized - Invalid payment response token"},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredError"}}}}}}}}}
```

## Chat (Polygon Chain)

> Ask Minara AI - Intelligent crypto assistant

```json
{"openapi":"3.0.0","info":{"title":"Minara x402 API","version":"1.0"},"servers":[{"url":"https://x402.minara.ai"}],"security":[{"x402Payment":[]}],"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"x-payment-response","description":"Payment proof token obtained from x402 payment challenge flow. Required after completing payment."}},"schemas":{"ChatRequest":{"type":"object","required":["userQuery"],"properties":{"userQuery":{"type":"string","description":"Required. User query content."}}},"ChatResponse":{"type":"object","properties":{"content":{"type":"string","description":"AI response content."}}},"BadRequestError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"PaymentRequiredError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"paymentInstructions":{"type":"object","properties":{"amount":{"type":"string","description":"Payment amount required."},"currency":{"type":"string","description":"Payment currency (e.g., USDC)."},"recipient":{"type":"string","description":"Payment recipient address."},"chain":{"type":"string","description":"Blockchain for payment."}}}}}}},"paths":{"/x402/polygon/chat":{"post":{"summary":"Chat (Polygon Chain)","description":"Ask Minara AI - Intelligent crypto assistant","operationId":"x402PolygonChat","tags":["AI"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"400":{"description":"Bad Request - Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Unauthorized - Invalid payment response token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredError"}}}}}}}}}
```

## Chat Expert (Polygon Chain)

> Ask Minara AI - Intelligent crypto assistant

```json
{"openapi":"3.0.0","info":{"title":"Minara x402 API","version":"1.0"},"servers":[{"url":"https://x402.minara.ai"}],"security":[{"x402Payment":[]}],"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"x-payment-response","description":"Payment proof token obtained from x402 payment challenge flow. Required after completing payment."}},"schemas":{"ChatRequest":{"type":"object","required":["userQuery"],"properties":{"userQuery":{"type":"string","description":"Required. User query content."}}},"ChatResponse":{"type":"object","properties":{"content":{"type":"string","description":"AI response content."}}},"PaymentRequiredError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"paymentInstructions":{"type":"object","properties":{"amount":{"type":"string","description":"Payment amount required."},"currency":{"type":"string","description":"Payment currency (e.g., USDC)."},"recipient":{"type":"string","description":"Payment recipient address."},"chain":{"type":"string","description":"Blockchain for payment."}}}}}}},"paths":{"/x402/polygon/chat/expert":{"post":{"summary":"Chat Expert (Polygon Chain)","description":"Ask Minara AI - Intelligent crypto assistant","operationId":"x402PolygonChatExpert","tags":["AI"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"400":{"description":"Bad Request - Invalid parameters"},"401":{"description":"Unauthorized - Invalid payment response token"},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredError"}}}}}}}}}
```

## Chat (Solana Chain)

> Ask Minara AI - Intelligent crypto assistant

```json
{"openapi":"3.0.0","info":{"title":"Minara x402 API","version":"1.0"},"servers":[{"url":"https://x402.minara.ai"}],"security":[{"x402Payment":[]}],"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"x-payment-response","description":"Payment proof token obtained from x402 payment challenge flow. Required after completing payment."}},"schemas":{"ChatRequest":{"type":"object","required":["userQuery"],"properties":{"userQuery":{"type":"string","description":"Required. User query content."}}},"ChatResponse":{"type":"object","properties":{"content":{"type":"string","description":"AI response content."}}},"PaymentRequiredError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"paymentInstructions":{"type":"object","properties":{"amount":{"type":"string","description":"Payment amount required."},"currency":{"type":"string","description":"Payment currency (e.g., USDC)."},"recipient":{"type":"string","description":"Payment recipient address."},"chain":{"type":"string","description":"Blockchain for payment."}}}}}}},"paths":{"/x402/solana/chat":{"post":{"summary":"Chat (Solana Chain)","description":"Ask Minara AI - Intelligent crypto assistant","operationId":"x402SolanaChat","tags":["AI"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"400":{"description":"Bad Request - Invalid parameters"},"401":{"description":"Unauthorized - Invalid payment response token"},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredError"}}}}}}}}}
```

## Chat Expert (Solana Chain)

> Ask Minara AI - Intelligent crypto assistant

```json
{"openapi":"3.0.0","info":{"title":"Minara x402 API","version":"1.0"},"servers":[{"url":"https://x402.minara.ai"}],"security":[{"x402Payment":[]}],"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"x-payment-response","description":"Payment proof token obtained from x402 payment challenge flow. Required after completing payment."}},"schemas":{"ChatRequest":{"type":"object","required":["userQuery"],"properties":{"userQuery":{"type":"string","description":"Required. User query content."}}},"ChatResponse":{"type":"object","properties":{"content":{"type":"string","description":"AI response content."}}},"PaymentRequiredError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"paymentInstructions":{"type":"object","properties":{"amount":{"type":"string","description":"Payment amount required."},"currency":{"type":"string","description":"Payment currency (e.g., USDC)."},"recipient":{"type":"string","description":"Payment recipient address."},"chain":{"type":"string","description":"Blockchain for payment."}}}}}}},"paths":{"/x402/solana/chat/expert":{"post":{"summary":"Chat Expert (Solana Chain)","description":"Ask Minara AI - Intelligent crypto assistant","operationId":"x402SolanaChatExpert","tags":["AI"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"400":{"description":"Bad Request - Invalid parameters"},"401":{"description":"Unauthorized - Invalid payment response token"},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredError"}}}}}}}}}
```

## Perpetual Trading Suggestion

> Get AI-powered perpetual trading suggestions with long/short recommendations, entry price, stop loss, take profit levels, and confidence score.

```json
{"openapi":"3.0.0","info":{"title":"Minara x402 API","version":"1.0"},"servers":[{"url":"https://x402.minara.ai"}],"security":[{"x402Payment":[]}],"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"x-payment-response","description":"Payment proof token obtained from x402 payment challenge flow. Required after completing payment."}},"schemas":{"PerpTradingRequest":{"type":"object","required":["symbol"],"properties":{"symbol":{"type":"string","description":"Required. Trading symbol (e.g., 'BTC', 'ETH', 'SOL')."},"style":{"type":"string","enum":["scalping","day-trading","swing-trading"],"default":"scalping","description":"Optional. Trading style: 'scalping', 'day-trading', or 'swing-trading'. Default: 'scalping'."},"marginUSD":{"type":"number","default":1000,"description":"Optional. Margin in USD. Default: 1000."},"leverage":{"type":"number","default":10,"minimum":1,"maximum":40,"description":"Optional. Leverage multiplier (max: 40). Default: 10."},"strategy":{"type":"string","default":"max-profit","description":"Optional. Strategy type. Default: 'max-profit'. More strategies coming soon."}}},"PerpTradingResponse":{"type":"object","properties":{"entryPrice":{"type":"number","description":"Recommended entry price."},"side":{"type":"string","enum":["long","short"],"description":"Trading side recommendation."},"stopLossPrice":{"type":"number","description":"Recommended stop loss price."},"takeProfitPrice":{"type":"number","description":"Recommended take profit price."},"confidence":{"type":"number","minimum":0,"maximum":100,"description":"Confidence score (0-100)."},"reasons":{"type":"array","items":{"type":"string"},"description":"Analysis reasons based on technical indicators."},"risks":{"type":"array","items":{"type":"string"},"description":"Risk factors to consider."}}},"PaymentRequiredError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"paymentInstructions":{"type":"object","properties":{"amount":{"type":"string","description":"Payment amount required."},"currency":{"type":"string","description":"Payment currency (e.g., USDC)."},"recipient":{"type":"string","description":"Payment recipient address."},"chain":{"type":"string","description":"Blockchain for payment."}}}}}}},"paths":{"/x402/perp-trading-suggestion":{"post":{"summary":"Perpetual Trading Suggestion","description":"Get AI-powered perpetual trading suggestions with long/short recommendations, entry price, stop loss, take profit levels, and confidence score.","operationId":"x402PerpTradingSuggestion","tags":["Trading"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpTradingRequest"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpTradingResponse"}}}},"400":{"description":"Bad Request - Invalid parameters"},"401":{"description":"Unauthorized - Invalid payment response token"},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredError"}}}}}}}}}
```

## Intent to Swap Transaction

> Convert natural language trading intent into an executable swap transaction payload. Compatible with OKX DEX by default.

```json
{"openapi":"3.0.0","info":{"title":"Minara x402 API","version":"1.0"},"servers":[{"url":"https://x402.minara.ai"}],"security":[{"x402Payment":[]}],"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"x-payment-response","description":"Payment proof token obtained from x402 payment challenge flow. Required after completing payment."}},"schemas":{"IntentToSwapRequest":{"type":"object","required":["intent","walletAddress"],"properties":{"intent":{"type":"string","description":"Required. Natural language swap intent (e.g., 'swap 0.1 ETH to USDC')."},"walletAddress":{"type":"string","description":"Required. User wallet address (0x...)."},"chain":{"type":"string","description":"Optional. Chain name (e.g., 'base', 'ethereum', 'bsc', 'arbitrum', 'optimism')."}}},"SwapTransactionResponse":{"type":"object","properties":{"transaction":{"type":"object","description":"Swap transaction details","properties":{"chain":{"type":"string","description":"Chain name."},"inputTokenAddress":{"type":"string","description":"Input token contract address."},"inputTokenSymbol":{"type":"string","description":"Input token symbol."},"outputTokenAddress":{"type":"string","description":"Output token contract address."},"outputTokenSymbol":{"type":"string","description":"Output token symbol."},"amount":{"type":"string","description":"Transaction amount."},"amountPercentage":{"type":"number","description":"Amount percentage."},"slippagePercent":{"type":"string","description":"Slippage percentage."}}}}},"PaymentRequiredError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"paymentInstructions":{"type":"object","properties":{"amount":{"type":"string","description":"Payment amount required."},"currency":{"type":"string","description":"Payment currency (e.g., USDC)."},"recipient":{"type":"string","description":"Payment recipient address."},"chain":{"type":"string","description":"Blockchain for payment."}}}}}}},"paths":{"/x402/intent-to-swap-tx":{"post":{"summary":"Intent to Swap Transaction","description":"Convert natural language trading intent into an executable swap transaction payload. Compatible with OKX DEX by default.","operationId":"x402IntentToSwap","tags":["Trading"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntentToSwapRequest"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapTransactionResponse"}}}},"400":{"description":"Bad Request - Invalid parameters"},"401":{"description":"Unauthorized - Invalid payment response token"},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredError"}}}}}}}}}
```

## Prediction Market Analysis (Base Chain)

> AI-powered prediction market analysis. Analyze prediction market events and get probability estimates for each outcome with detailed reasoning.

```json
{"openapi":"3.0.0","info":{"title":"Minara x402 API","version":"1.0"},"servers":[{"url":"https://x402.minara.ai"}],"security":[{"x402Payment":[]}],"components":{"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"x-payment-response","description":"Payment proof token obtained from x402 payment challenge flow. Required after completing payment."}},"schemas":{"PredictionMarketRequest":{"type":"object","required":["link","mode"],"properties":{"link":{"type":"string","description":"Required. Prediction market page link (e.g., Polymarket event URL)."},"mode":{"type":"string","enum":["fast","expert"],"description":"Required. Chat mode: 'fast' or 'expert'."},"only_result":{"type":"boolean","default":false,"description":"Optional. Only return prediction probabilities without reasoning. Default: false."},"customPrompt":{"type":"string","description":"Optional. Custom instructions to guide the analysis. Use this to specify focus areas, risk preferences, or analysis style."}}},"PredictionMarketResponse":{"type":"object","properties":{"predictions":{"type":"array","description":"Array of prediction outcomes. Each outcome represents an event option with its yes/no probabilities.","items":{"type":"object","properties":{"outcome":{"type":"string","description":"Outcome name (event option, e.g., candidate name, team name)."},"yesProb":{"type":"number","description":"Probability of YES for this outcome (0-1)."},"noProb":{"type":"number","description":"Probability of NO for this outcome (0-1)."}}}},"reasoning":{"type":"string","description":"AI reasoning and analysis (empty if only_result=true)."}}},"BadRequestError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"PaymentRequiredError":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"paymentInstructions":{"type":"object","properties":{"amount":{"type":"string","description":"Payment amount required."},"currency":{"type":"string","description":"Payment currency (e.g., USDC)."},"recipient":{"type":"string","description":"Payment recipient address."},"chain":{"type":"string","description":"Blockchain for payment."}}}}}}},"paths":{"/x402/prediction-market-ask":{"post":{"summary":"Prediction Market Analysis (Base Chain)","description":"AI-powered prediction market analysis. Analyze prediction market events and get probability estimates for each outcome with detailed reasoning.","operationId":"x402PredictionMarketAsk","tags":["Prediction"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionMarketRequest"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionMarketResponse"}}}},"400":{"description":"Bad Request - Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"401":{"description":"Unauthorized - Invalid payment response token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequiredError"}}}}}}}}}
```

## Uç Noktalar

### Sohbet (Base Zinciri)

**Uç Nokta:** `POST /x402/chat`

#### İstek

**Başlıklar:**

* `x-payment-response` (gerekli) - x402 protokolünden ödeme kanıtı belirteci
* `Content-Type: application/json`

**İstek Gövdesi Parametreleri:**

| Parametre   | Tür  | Gerekli | Açıklama                |
| ----------- | ---- | ------- | ----------------------- |
| `userQuery` | dize | Evet    | Kullanıcı sorgu içeriği |

#### Örnek İstek

```bash
curl -X POST https://x402.minara.ai/x402/chat \
  -H "x-payment-response: <payment_proof_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "userQuery": "BTC'nin mevcut fiyatı nedir ve önemli destek seviyeleri nelerdir?"
  }'
```

#### Yanıt

**Durum:** 201 Created

```json
{
  "content": "BTC şu anda $98,450 seviyesinde işlem görüyor. Temel destek seviyeleri $96,500 ve $94,200'de. Yüksek hacimle $97,000 üzerindeki son kırılım, yükselişin devam edeceğini gösteriyor..."
}
```

***

### Uzman Sohbet (Base Zinciri)

**Uç Nokta:** `POST /x402/chat/expert`

Minara AI'ya sor - Base zincirinde uzman modlu akıllı kripto asistanı

#### İstek

**Başlıklar:**

* `x-payment-response` (gerekli) - x402 protokolünden ödeme kanıtı belirteci
* `Content-Type: application/json`

**İstek Gövdesi Parametreleri:**

| Parametre   | Tür  | Gerekli | Açıklama                |
| ----------- | ---- | ------- | ----------------------- |
| `userQuery` | dize | Evet    | Kullanıcı sorgu içeriği |

#### Örnek İstek

```bash
curl -X POST https://x402.minara.ai/x402/chat/expert \
  -H "x-payment-response: <payment_proof_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "userQuery": "ETH için zincir üstü metrikler ve alım satım stratejisi dahil kapsamlı bir analiz sunun"
  }'
```

#### Yanıt

**Durum:** 201 Created

```json
{
  "content": "ETH Kapsamlı Analizi:\n\n**Fiyat Hareketi**: ETH şu anda $3,420 seviyesinde işlem görüyor, $3,400-$3,500 aralığında konsolide oluyor...\n\n**Zincir Üstü Metrikler**: Aktif adresler haftadan haftaya %12 arttı, bu da ağ etkinliğinin büyüdüğünü gösteriyor...\n\n**Alım Satım Stratejisi**: $3,300 desteğine geri çekilmelerde biriktirmeyi, hedef olarak $3,600 ve $3,850'yi değerlendirin..."
}
```

***

### Sohbet (Solana Zinciri)

**Uç Nokta:** `POST /x402/solana/chat`

#### İstek

**Başlıklar:**

* `x-payment-response` (gerekli) - x402 protokolünden ödeme kanıtı belirteci
* `Content-Type: application/json`

**İstek Gövdesi Parametreleri:**

| Parametre   | Tür  | Gerekli | Açıklama                |
| ----------- | ---- | ------- | ----------------------- |
| `userQuery` | dize | Evet    | Kullanıcı sorgu içeriği |

#### Örnek İstek

```bash
curl -X POST https://x402.minara.ai/x402/solana/chat \
  -H "x-payment-response: <payment_proof_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "userQuery": "Bana şu anda Solana üzerindeki en çok trend olan tokenları göster"
  }'
```

#### Yanıt

**Durum:** 201 Created

```json
{
  "content": "En çok trend olan Solana tokenları:\n1. WIF - %24 artış, 24 saatte $45M hacim\n2. BONK - güçlü topluluk etkinliğiyle %18 artış\n3. JUP - son yükselişten sonra konsolide oluyor, hacim $38M..."
}
```

### Uzman Sohbet (Solana Zinciri)

**Uç Nokta:** `POST /x402/solana/chat/expert`

Minara AI'ya sor - Solana zincirinde uzman modlu akıllı kripto asistanı

#### İstek

**Başlıklar:**

* `x-payment-response` (gerekli) - x402 protokolünden ödeme kanıtı belirteci
* `Content-Type: application/json`

**İstek Gövdesi Parametreleri:**

| Parametre   | Tür  | Gerekli | Açıklama                |
| ----------- | ---- | ------- | ----------------------- |
| `userQuery` | dize | Evet    | Kullanıcı sorgu içeriği |

#### Örnek İstek

```bash
curl -X POST https://x402.minara.ai/x402/solana/chat/expert \
  -H "x-payment-response: <payment_proof_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "userQuery": "JUP tokenı için likidite dağılımını ve balina hareketlerini analiz edin"
  }'
```

#### Yanıt

**Durum:** 201 Created

```json
{
  "content": "**JUP Token Derin Analizi**\n\n**Likidite Dağılımı**: Başlıca DEX'lerde toplam likidite $125M, bunun %65'i $0.85-$0.92 aralığında yoğunlaşmış durumda...\n\n**Balina Aktivitesi**: İlk 10 cüzdan arzın %34'ünü kontrol ediyor. Son 24 saatte toplam $4.2M tutarında 3 önemli balina işlemi tespit edildi...\n\n**Risk Değerlendirmesi**: $1.00 seviyesinin üzerinde orta düzeyde likidite riski. Pozisyon büyüklüğünü belirlerken bunu dikkate alın..."
}
```

***

### Sohbet (Polygon Zinciri)

**Uç Nokta:** `POST /x402/polygon/chat`

Minara AI'ya sor - Polygon zincirinde akıllı kripto asistanı

#### İstek

**Başlıklar:**

* `x-payment-response` (gerekli) - x402 protokolünden ödeme kanıtı belirteci
* `Content-Type: application/json`

**İstek Gövdesi Parametreleri:**

| Parametre   | Tür  | Gerekli | Açıklama                |
| ----------- | ---- | ------- | ----------------------- |
| `userQuery` | dize | Evet    | Kullanıcı sorgu içeriği |

#### Örnek İstek

```bash
curl -X POST https://x402.minara.ai/x402/polygon/chat \
  -H "x-payment-response: <payment_proof_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "userQuery": "BTC'nin mevcut fiyatı nedir ve önemli destek seviyeleri nelerdir?"
  }'
```

#### Yanıt

**Durum:** 201 Created

```json
{
  "content": "BTC şu anda $98,450 seviyesinde işlem görüyor. Temel destek seviyeleri $96,500 ve $94,200'de. Yüksek hacimle $97,000 üzerindeki son kırılım, yükselişin devam edeceğini gösteriyor..."
}
```

***

### Uzman Sohbet (Polygon Zinciri)

**Uç Nokta:** `POST /x402/polygon/chat/expert`

Minara AI'ya sor - Polygon zincirinde uzman modlu akıllı kripto asistanı

#### İstek

**Başlıklar:**

* `x-payment-response` (gerekli) - x402 protokolünden ödeme kanıtı belirteci
* `Content-Type: application/json`

**İstek Gövdesi Parametreleri:**

| Parametre   | Tür  | Gerekli | Açıklama                |
| ----------- | ---- | ------- | ----------------------- |
| `userQuery` | dize | Evet    | Kullanıcı sorgu içeriği |

#### Örnek İstek

```bash
curl -X POST https://x402.minara.ai/x402/polygon/chat/expert \
  -H "x-payment-response: <payment_proof_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "userQuery": "ETH için zincir üstü metrikler ve alım satım stratejisi dahil kapsamlı bir analiz sunun"
  }'
```

#### Yanıt

**Durum:** 201 Created

```json
{
  "content": "**Kapsamlı ETH Analizi**\n\n**Fiyat Hareketi**: ETH şu anda $3,420 seviyesinde işlem görüyor, $3,400-$3,500 aralığında konsolide oluyor...\n\n**Zincir Üstü Metrikler**: Aktif adresler haftadan haftaya %12 arttı, bu da ağ etkinliğinin büyüdüğünü gösteriyor...\n\n**Alım Satım Stratejisi**: $3,300 desteğine geri çekilmelerde biriktirmeyi, hedef olarak $3,600 ve $3,850'yi değerlendirin..."
}
```

***

## Alım Satım Uç Noktaları

### Swap İşlemine Dönüştürme Niyeti

**Uç Nokta:** `POST /x402/intent-to-swap-tx`

Doğal dildeki alım satım niyetini çalıştırılabilir bir swap işlem yüküne dönüştürür. Varsayılan olarak OKX DEX ile uyumludur.

#### İstek

**Başlıklar:**

* `x-payment-response` (gerekli) - x402 protokolünden ödeme kanıtı belirteci
* `Content-Type: application/json`

**İstek Gövdesi Parametreleri:**

| Parametre       | Tür  | Gerekli | Açıklama                                                            |
| --------------- | ---- | ------- | ------------------------------------------------------------------- |
| `intent`        | dize | Evet    | Doğal dilde swap niyeti (örn. "0.1 ETH'yi USDC'ye çevir")           |
| `walletAddress` | dize | Evet    | Kullanıcı cüzdan adresi (0x...)                                     |
| `chain`         | dize | Hayır   | Zincir adı (örn. "base", "ethereum", "bsc", "arbitrum", "optimism") |

#### Örnek İstek

```bash
curl -X POST https://x402.minara.ai/x402/intent-to-swap-tx \
  -H "x-payment-response: <payment_proof_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "intent": "0.1 ETH'yi USDC'ye çevir",
    "walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1",
    "chain": "base"
  }'
```

#### Yanıt

**Durum:** 201 Created

```json
{
  "transaction": {
    "chain": "base",
    "inputTokenAddress": "0x4200000000000000000000000000000000000006",
    "inputTokenSymbol": "ETH",
    "outputTokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "outputTokenSymbol": "USDC",
    "amount": "0.1",
    "amountPercentage": 100,
    "slippagePercent": "0.5"
  }
}
```

***

### Sürekli Vadeli İşlem Önerisi

**Uç Nokta:** `POST /x402/perp-trading-suggestion`

Kapsamlı piyasa analizine dayanarak long/short önerileri, giriş fiyatı, stop loss, take profit seviyeleri ve güven skoru içeren yapay zekâ destekli sürekli vadeli işlem önerileri alın.

#### İstek

**Başlıklar:**

* `x-payment-response` (gerekli) - x402 protokolünden ödeme kanıtı belirteci
* `Content-Type: application/json`

**İstek Gövdesi Parametreleri:**

| Parametre   | Tür  | Gerekli | Varsayılan   | Açıklama                                                      |
| ----------- | ---- | ------- | ------------ | ------------------------------------------------------------- |
| `symbol`    | dize | Evet    | -            | İşlem sembolü (örn. "BTC", "ETH", "SOL")                      |
| `style`     | dize | Hayır   | "scalping"   | Trading stili: "scalping", "day-trading" veya "swing-trading" |
| `marginUSD` | sayı | Hayır   | 1000         | USD cinsinden marjin                                          |
| `leverage`  | sayı | Hayır   | 10           | Kaldıraç çarpanı (maks: 40)                                   |
| `strategy`  | dize | Hayır   | "max-profit" | Strateji türü (daha fazla strateji yakında geliyor)           |

#### Örnek İstek

```bash
curl -X POST https://x402.minara.ai/x402/perp-trading-suggestion \
  -H "x-payment-response: <payment_proof_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "symbol": "BTC",
    "style": "gün içi işlem",
    "marginUSD": 1000,
    "leverage": 10,
    "strategy": "max-profit"
  }'
```

#### Yanıt

**Durum:** 201 Created

```json
{
  "entryPrice": 98450,
  "side": "long",
  "stopLossPrice": 96200,
  "takeProfitPrice": 102800,
  "confidence": 78,
  "reasons": [
    "BTC güçlü hacimle $97,500 seviyesindeki önemli direncin üzerine çıktı",
    "RSI'nin 62 seviyesinde olması, aşırı alım olmadan yükseliş momentumu olduğunu gösteriyor",
    "MACD'nin 4 saatlik zaman diliminde yükseliş kesişimi göstermesi",
    "Hacim profili mevcut seviyelerde birikim olduğunu gösteriyor"
  ],
  "risks": [
    "$100,000 psikolojik direncinde olası geri çekilme",
    "Yaklaşan Fed toplantısı çevresinde yüksek volatilite bekleniyor",
    "Başlıca borsalardaki fonlama oranları yükseliş eğiliminde"
  ]
}
```

***

### Tahmin Piyasası Analizi (Base Zinciri)

**Uç Nokta:** `POST /x402/prediction-market-ask`

Yapay zekâ destekli tahmin piyasası analizi. Tahmin piyasası olaylarını analiz edin ve her sonuç için ayrıntılı gerekçeyle olasılık tahminleri alın.

#### İstek

**Başlıklar:**

* `x-payment-response` (gerekli) - x402 protokolünden ödeme kanıtı belirteci
* `Content-Type: application/json`

**İstek Gövdesi Parametreleri:**

| Parametre      | Tür  | Gerekli | Varsayılan | Açıklama                                                             |
| -------------- | ---- | ------- | ---------- | -------------------------------------------------------------------- |
| `link`         | dize | Evet    | -          | Tahmin piyasası sayfası bağlantısı (örn. Polymarket etkinlik URL'si) |
| `mode`         | dize | Evet    | -          | Sohbet modu: "fast" veya "expert"                                    |
| `only_result`  | bool | Hayır   | false      | Sadece gerekçe olmadan tahmin olasılıklarını döndür                  |
| `customPrompt` | dize | Hayır   | -          | Analizi yönlendirmek için özel talimatlar                            |

#### Örnek İstek

```bash
curl -X POST https://x402.minara.ai/x402/prediction-market-ask \
  -H "x-payment-response: <payment_proof_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "link": "https://polymarket.com/event/will-there-be-another-us-government-shutdown-by-january-31",
    "mode": "fast",
    "only_result": false,
    "customPrompt": "Son haberlere ve duygu analizine odaklanın. Olasılık tahminlerinde daha temkinli olun."
  }'
```

#### Yanıt

**Durum:** 201 Created

```json
{
  "predictions": [
    {
      "outcome": "Donald Trump",
      "yesProb": 0.65,
      "noProb": 0.35
    },
    {
      "outcome": "Kamala Harris",
      "yesProb": 0.3,
      "noProb": 0.7
    }
  ],
  "reasoning": "Son anket verilerine ve tarihsel trendlere dayanarak, Trump kilit salıncak eyaletlerde hafif bir üstünlüğü koruyor. Ancak yarış hâlâ önemli belirsizlikle son derece rekabetçi..."
}
```

***

### Tahmin Piyasası Analizi (Polygon Zinciri)

**Uç Nokta:** `POST /x402/polygon/prediction-market-ask`

Polygon zincirinde yapay zekâ destekli tahmin piyasası analizi. Base zinciri uç noktasındakiyle aynı işlevsellik.

#### İstek

**Başlıklar:**

* `x-payment-response` (gerekli) - x402 protokolünden ödeme kanıtı belirteci
* `Content-Type: application/json`

**İstek Gövdesi Parametreleri:**

Yukarıdaki Base zinciri uç noktasıyla aynıdır.

#### Örnek İstek

```bash
curl -X POST https://x402.minara.ai/x402/polygon/prediction-market-ask \
  -H "x-payment-response: <payment_proof_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "link": "https://polymarket.com/event/will-there-be-another-us-government-shutdown-by-january-31",
    "mode": "fast",
    "only_result": false
  }'
```

#### Yanıt

**Durum:** 201 Created

Base zinciri uç noktasıyla aynı yanıt formatı.

***

## Hata Yanıtları

### 402 Ödeme Gerekli

Ödeme kimlik bilgileri olmadan yapılan ilk istek şunu döndürür:

```json
{
  "error": "payment_required",
  "message": "Bu kaynağa erişmek için ödeme gereklidir",
  "paymentInstructions": {
    "amount": "0.20",
    "currency": "USDC",
    "recipient": "0x...",
    "chain": "base"
  }
}
```

### 401 Unauthorized

Geçersiz veya süresi dolmuş ödeme kanıtı:

```json
{
  "error": "unauthorized",
  "message": "Geçersiz ödeme yanıtı belirteci"
}
```

### 400 Bad Request

Geçersiz istek parametreleri:

```json
{
  "error": "bad_request",
  "message": "Eksik zorunlu parametre: userQuery"
}
```

***

## Hız Sınırları

x402 uç noktaları cüzdan adresi başına hız sınırına tabidir:

* **Yapay Zekâ Uç Noktaları:** Dakikada 60 istek
* **Alım Satım Uç Noktaları:** Dakikada 30 istek

Hız sınırlarının aşılması şu yanıtı döndürür:

```json
{
  "error": "rate_limit_exceeded",
  "message": "Çok fazla istek. Lütfen 30 saniye sonra tekrar deneyin.",
  "retryAfter": 30
}
```

***

## Notlar

* Tüm x402 uç noktaları, aşağıdaki başlığı gerektirir: `x-payment-response` ödeme doğrulamasını tamamladıktan sonra
* Fiyatlar ağ koşullarına bağlı olarak değişebilir
* x402 protokolü hakkında daha fazla bilgi için bkz. [x402 Belgeleri](https://x402scan.com/server)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://minara.ai/docs/minara-handbook/tr/islem/agent-api/api-reference-x402.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
