lfqian commited on
Commit
e7e35b7
·
1 Parent(s): df7cdad

feat: add Agent Integration Guide with API specification

Browse files
Files changed (1) hide show
  1. src/views/AddAssetView.vue +104 -1
src/views/AddAssetView.vue CHANGED
@@ -14,6 +14,50 @@
14
  </div>
15
  </template>
16
  <template #content>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  <div class="form-container">
18
  <div class="field">
19
  <label for="agentName">Agent Name</label>
@@ -124,6 +168,7 @@ import Textarea from 'primevue/textarea'
124
  import Dropdown from 'primevue/dropdown'
125
  import Button from 'primevue/button'
126
  import Message from 'primevue/message'
 
127
  import { supabase } from '../lib/supabase.js'
128
 
129
  export default {
@@ -134,7 +179,8 @@ export default {
134
  Textarea,
135
  Dropdown,
136
  Button,
137
- Message
 
138
  },
139
  data() {
140
  return {
@@ -348,6 +394,63 @@ export default {
348
  gap: 1.5rem;
349
  }
350
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  .field {
352
  display: flex;
353
  flex-direction: column;
 
14
  </div>
15
  </template>
16
  <template #content>
17
+ <!-- Integration Guide -->
18
+ <div class="integration-guide">
19
+ <h3>Agent Integration Guide</h3>
20
+
21
+ <div class="guide-section">
22
+ <h4>Quick Summary</h4>
23
+ <p><strong>What you need:</strong> Create an API that receives market data and returns trading decisions.</p>
24
+ </div>
25
+
26
+ <div class="guide-section">
27
+ <h4>Input (What we send to your agent)</h4>
28
+ <pre class="code-block">{
29
+ "date": "2025-10-24",
30
+ "price": {"BTC": 67890.50},
31
+ "news": {"BTC": "Bitcoin news..."},
32
+ "model": "gpt-4o",
33
+ "history_price": {
34
+ "BTC": [
35
+ {"date": "2025-10-14", "price": 65000.00},
36
+ {"date": "2025-10-15", "price": 65500.00},
37
+ {"date": "2025-10-16", "price": 66000.00},
38
+ {"date": "2025-10-17", "price": 66200.00},
39
+ {"date": "2025-10-18", "price": 66500.00},
40
+ {"date": "2025-10-21", "price": 66800.00},
41
+ {"date": "2025-10-22", "price": 67000.00},
42
+ {"date": "2025-10-23", "price": 67500.00}
43
+ ]
44
+ }
45
+ }</pre>
46
+ <p class="note"><strong>Note:</strong> <code>history_price</code> contains the last 10 days of price data (if available).</p>
47
+ </div>
48
+
49
+ <div class="guide-section">
50
+ <h4>Output (What we expect from your agent)</h4>
51
+ <pre class="code-block">{
52
+ "recommended_action": "BUY"
53
+ }</pre>
54
+ <p class="note"><strong>Valid actions:</strong> <code>"BUY"</code>, <code>"SELL"</code>, or <code>"HOLD"</code> (uppercase)</p>
55
+ </div>
56
+ </div>
57
+
58
+ <Divider />
59
+
60
+ <!-- Submission Form -->
61
  <div class="form-container">
62
  <div class="field">
63
  <label for="agentName">Agent Name</label>
 
168
  import Dropdown from 'primevue/dropdown'
169
  import Button from 'primevue/button'
170
  import Message from 'primevue/message'
171
+ import Divider from 'primevue/divider'
172
  import { supabase } from '../lib/supabase.js'
173
 
174
  export default {
 
179
  Textarea,
180
  Dropdown,
181
  Button,
182
+ Message,
183
+ Divider
184
  },
185
  data() {
186
  return {
 
394
  gap: 1.5rem;
395
  }
396
 
397
+ .integration-guide {
398
+ margin-bottom: 1rem;
399
+ }
400
+
401
+ .integration-guide h3 {
402
+ font-size: 1.5rem;
403
+ font-weight: 600;
404
+ color: #2c3e50;
405
+ margin-bottom: 1.5rem;
406
+ border-bottom: 2px solid #3b82f6;
407
+ padding-bottom: 0.5rem;
408
+ }
409
+
410
+ .integration-guide h4 {
411
+ font-size: 1.1rem;
412
+ font-weight: 600;
413
+ color: #1e40af;
414
+ margin-bottom: 0.75rem;
415
+ }
416
+
417
+ .guide-section {
418
+ margin-bottom: 1.5rem;
419
+ }
420
+
421
+ .guide-section p {
422
+ color: #4b5563;
423
+ line-height: 1.6;
424
+ margin: 0.5rem 0;
425
+ }
426
+
427
+ .guide-section p.note {
428
+ font-size: 0.9rem;
429
+ color: #6b7280;
430
+ margin-top: 0.5rem;
431
+ }
432
+
433
+ .guide-section code {
434
+ background: #f3f4f6;
435
+ padding: 0.2rem 0.4rem;
436
+ border-radius: 0.25rem;
437
+ font-family: 'Monaco', 'Courier New', monospace;
438
+ font-size: 0.9em;
439
+ color: #1e40af;
440
+ }
441
+
442
+ .code-block {
443
+ background: #1e293b;
444
+ color: #e2e8f0;
445
+ padding: 1rem;
446
+ border-radius: 0.5rem;
447
+ overflow-x: auto;
448
+ font-family: 'Monaco', 'Courier New', monospace;
449
+ font-size: 0.875rem;
450
+ line-height: 1.5;
451
+ margin: 0.5rem 0;
452
+ }
453
+
454
  .field {
455
  display: flex;
456
  flex-direction: column;