mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-12 13:37:24 -04:00
docs: rebrand API reference to AI-Trader-Server
Update API_REFERENCE.md for the AI-Trader-Server rebrand: - Change title from "AI-Trader API Reference" to "AI-Trader-Server API Reference" - Update description to reference AI-Trader-Server - Rename client class examples from AITraderClient to AITraderServerClient - Update Python and TypeScript/JavaScript code examples Part of Phase 1 rebrand (Task 3)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# AI-Trader API Reference
|
# AI-Trader-Server API Reference
|
||||||
|
|
||||||
Complete reference for the AI-Trader REST API service.
|
Complete reference for the AI-Trader-Server REST API service.
|
||||||
|
|
||||||
**Base URL:** `http://localhost:8080` (default)
|
**Base URL:** `http://localhost:8080` (default)
|
||||||
|
|
||||||
@@ -616,7 +616,7 @@ Interactive API documentation available at:
|
|||||||
import requests
|
import requests
|
||||||
import time
|
import time
|
||||||
|
|
||||||
class AITraderClient:
|
class AITraderServerClient:
|
||||||
def __init__(self, base_url="http://localhost:8080"):
|
def __init__(self, base_url="http://localhost:8080"):
|
||||||
self.base_url = base_url
|
self.base_url = base_url
|
||||||
|
|
||||||
@@ -664,7 +664,7 @@ class AITraderClient:
|
|||||||
return response.json()
|
return response.json()
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
client = AITraderClient()
|
client = AITraderServerClient()
|
||||||
job = client.trigger_simulation("2025-01-16", models=["gpt-4"])
|
job = client.trigger_simulation("2025-01-16", models=["gpt-4"])
|
||||||
result = client.wait_for_completion(job["job_id"])
|
result = client.wait_for_completion(job["job_id"])
|
||||||
results = client.get_results(job_id=job["job_id"])
|
results = client.get_results(job_id=job["job_id"])
|
||||||
@@ -673,7 +673,7 @@ results = client.get_results(job_id=job["job_id"])
|
|||||||
### TypeScript/JavaScript
|
### TypeScript/JavaScript
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
class AITraderClient {
|
class AITraderServerClient {
|
||||||
constructor(private baseUrl: string = "http://localhost:8080") {}
|
constructor(private baseUrl: string = "http://localhost:8080") {}
|
||||||
|
|
||||||
async triggerSimulation(
|
async triggerSimulation(
|
||||||
@@ -732,7 +732,7 @@ class AITraderClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
const client = new AITraderClient();
|
const client = new AITraderServerClient();
|
||||||
const job = await client.triggerSimulation("2025-01-16", null, ["gpt-4"]);
|
const job = await client.triggerSimulation("2025-01-16", null, ["gpt-4"]);
|
||||||
const result = await client.waitForCompletion(job.job_id);
|
const result = await client.waitForCompletion(job.job_id);
|
||||||
const results = await client.getResults({ jobId: job.job_id });
|
const results = await client.getResults({ jobId: job.job_id });
|
||||||
|
|||||||
Reference in New Issue
Block a user