กราฟการเงิน
ใช้งานได้แสดงกราฟจากข้อมูลแท่งราคา OHLCV
Finance chart
Example outputCaller-supplied data
Example price series
Open 100 · High 103 · Low 98 · Close 101
Data table
| Time | Open | High | Low | Close | Volume |
|---|---|---|---|---|---|
| 100 | 103 | 98 | 101 | 1,050 | |
| 103 | 106 | 101 | 104 | 1,100 | |
| 102 | 105 | 100 | 103 | 1,150 | |
| 108 | 111 | 106 | 109 | 1,200 | |
| 105 | 108 | 103 | 106 | 1,250 | |
| 110 | 113 | 108 | 111 | 1,300 | |
| 109 | 112 | 107 | 110 | 1,350 |
{ "data": { "candles": [ { "time": "2026-01-01T00:00:00Z", "open": 100, "high": 103, "low": 98, "close": 101, "volume": 1050 }, { "time": "2026-01-02T00:00:00Z", "open": 103, "high": 106, "low": 101, "close": 104, "volume": 1100 }, { "time": "2026-01-03T00:00:00Z", "open": 102, "high": 105, "low": 100, "close": 103, "volume": 1150 }, { "time": "2026-01-04T00:00:00Z", "open": 108, "high": 111, "low": 106, "close": 109, "volume": 1200 }, { "time": "2026-01-05T00:00:00Z", "open": 105, "high": 108, "low": 103, "close": 106, "volume": 1250 }, { "time": "2026-01-06T00:00:00Z", "open": 110, "high": 113, "low": 108, "close": 111, "volume": 1300 }, { "time": "2026-01-07T00:00:00Z", "open": 109, "high": 112, "low": 107, "close": 110, "volume": 1350 } ], "type": "candlestick", "title": "Example price series" }, "meta": { "sources": [ "Caller-supplied data" ], "retrieved_at": "2026-11-11T01:39:41.977674+00:00", "example_output": true } }
ทำงานอย่างไร
- 01เลือกข้อมูลนำเข้าใส่สัญลักษณ์หุ้น ชุดข้อมูล หรือแท่งราคา OHLCV ที่เรียงตามเวลา
- 02ตรวจสอบผลลัพธ์เลือกข้อมูลในกราฟเพื่อไฮไลต์ค่า JSON ที่ตรงกัน
เรียก กราฟการเงิน จากโค้ดของคุณ
REST และ MCP ใช้ข้อมูลนำเข้า ผลลัพธ์ และข้อผิดพลาดรูปแบบเดียวกัน
https:/ / api.opennan.com/ v1/ finance/ chartsรับคีย์ API
สร้างคีย์ในคอนโซล คีย์ใช้ยอดเงินเดียวกับส่วนทดลองใช้
สร้างคีย์ส่งคำขอแรก
คำขอเดียวกับที่ส่วนทดลองใช้ส่ง ตั้งค่า OPENNAN_KEY เป็นคีย์ของคุณ
curl 'https://api.opennan.com/v1/finance/charts' \ -H 'Authorization: Bearer <OPENNAN_API_KEY>' \ -H 'Content-Type: application/json' \ --data '{"type":"candlestick","title":"Example price series","candles":[{"time":"2026-01-01T00:00:00Z","open":100,"high":103,"low":98,"close":101,"volume":1050},{"time":"2026-01-02T00:00:00Z","open":103,"high":106,"low":101,"close":104,"volume":1100},{"time":"2026-01-03T00:00:00Z","open":102,"high":105,"low":100,"close":103,"volume":1150},{"time":"2026-01-04T00:00:00Z","open":108,"high":111,"low":106,"close":109,"volume":1200},{"time":"2026-01-05T00:00:00Z","open":105,"high":108,"low":103,"close":106,"volume":1250},{"time":"2026-01-06T00:00:00Z","open":110,"high":113,"low":108,"close":111,"volume":1300},{"time":"2026-01-07T00:00:00Z","open":109,"high":112,"low":107,"close":110,"volume":1350}]}'อ่านผลลัพธ์
ผลลัพธ์มาในคำตอบเดียวกัน เฮดเดอร์ X-Usage-Cost-Usd บอกค่าใช้จ่ายของการเรียก
ข้อผิดพลาดและวิธีแก้
401ไม่มีคีย์หรือคีย์ผิด
ส่งเฮดเดอร์ Authorization: Bearer พร้อมคีย์จากคอนโซล
402ยอดเงินไม่พอ
เติมเงินในหน้าการเรียกเก็บเงิน แล้วส่งคำขอเดิมอีกครั้ง
400มีค่าที่ระบบไม่รับ
อ่าน error.message ซึ่งบอกชื่อช่อง แล้วใช้ค่าจากตารางพารามิเตอร์
429คำขอมากเกินไป
รอสักครู่แล้วลองใหม่ และรอนานขึ้นทุกครั้งที่เจอ 429
https://api.opennan.com/v1/finance/mcpใช้จากเอเจนต์ AI
เพิ่มเซิร์ฟเวอร์ MCP ของ Opennan ให้เอเจนต์ แล้วเรียกเครื่องมือนี้
- เครื่องมือ
- finance_chart
- ตัวอย่างอาร์กิวเมนต์
{ "type": "candlestick", "title": "Example price series", "candles": [ { "time": "2026-01-01T00:00:00Z", "open": 100, "high": 103, "low": 98, "close": 101, "volume": 1050 }, { "time": "2026-01-02T00:00:00Z", "open": 103, "high": 106, "low": 101, "close": 104, "volume": 1100 }, { "time": "2026-01-03T00:00:00Z", "open": 102, "high": 105, "low": 100, "close": 103, "volume": 1150 }, { "time": "2026-01-04T00:00:00Z", "open": 108, "high": 111, "low": 106, "close": 109, "volume": 1200 }, { "time": "2026-01-05T00:00:00Z", "open": 105, "high": 108, "low": 103, "close": 106, "volume": 1250 }, { "time": "2026-01-06T00:00:00Z", "open": 110, "high": 113, "low": 108, "close": 111, "volume": 1300 }, { "time": "2026-01-07T00:00:00Z", "open": 109, "high": 112, "low": 107, "close": 110, "volume": 1350 } ] }
กราฟการเงิน: คำถามที่พบบ่อย
ใช้ฟรีไหม
ใช้ฟรีด้วยคีย์ OpenNan สูงสุด 30 คำขอการเงินต่อนาทีต่อบัญชี
ตัวอย่างมาจากไหน
ผลลัพธ์ตัวอย่างบันทึกจากเอนด์พอยต์ที่เผยแพร่ กด Run live เพื่อขอข้อมูลปัจจุบัน ตัวอย่างคริปโตมีป้าย Sample data
มีข้อจำกัดอะไรบ้าง
หุ้นรองรับบริษัทใน SEC และข้อมูล US-GAAP สกุล USD ค่าที่ขาดใช้ null เศรษฐกิจครอบคลุมสามปีปฏิทินล่าสุดพร้อมสถานะความครอบคลุม กราฟรับ 2–5,000 แท่ง SMA ต้องมีอย่างน้อย period แท่ง RSI และผลตอบแทนต้องมี period บวกหนึ่ง ช่วง period คือ 2–500 วันที่รวม from และไม่รวม to