TradeMire TradeMire
ดึงรายการตลาด
เอกสารอ้างอิง API

The TradeMire Platform API

v1·เวอร์ชันเริ่มต้น·เม.ย. 2026

REST API ที่เซ็นด้วยลายเซ็นเดียวครอบคลุมทั้งแพลตฟอร์ม TradeMire ได้แก่ ข้อมูลตลาดสาธารณะ (ตลาด สินทรัพย์ ตลาดแลกเปลี่ยน เชน ตัวชี้วัดมหภาค) และคลังสินทรัพย์ กลยุทธ์ โหนด และคำสั่งส่วนตัวของคุณ - ทั้งหมดยืนยันตัวตนด้วย HMAC-SHA256 และรองรับการแบ่งหน้าตลอดทั้งระบบ

URL หลัก https://trademire.ai/api
คำนำหน้าพาธ /v1/{apiKey}
เวอร์ชัน v1
การยืนยันตัวตน HMAC-SHA256
ขีดจำกัดอัตราการเรียก แตกต่างกันไปตามแต่ละเอนด์พอยต์
SDK @trademire/platform-api
GETTING STARTED · QUICK START

เริ่มต้นใช้งานอย่างรวดเร็ว

สามขั้นตอนสู่การเรียกที่เซ็นแล้วครั้งแรกของคุณ: ติดตั้ง SDK ตั้งค่าข้อมูลยืนยันตัวตน และเรียก markets.list()

1 - ติดตั้ง SDK

npm install @trademire/platform-api

2 - ตั้งค่าไคลเอนต์

import { PlatformApiClient } from "@trademire/platform-api";

let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

3 - เรียกคำขอแรกของคุณ

let res = await client.markets.list({ pagination: { page: 1, limit: 10 } });

if (!res.success) {
  console.error("Auth or upstream failure:", res.message);
} else {
  for (let m of res.items) {
    console.log(m.pair, m.lastPrice, m.priceQuote);
  }
}

SDK จะสร้าง {anyKey} ให้ทุกคำขอโดยอัตโนมัติ เซ็นเนื้อหาด้วย HMAC-SHA256 แนบเฮดเดอร์ที่จำเป็นทั้งสี่ตัว และแปลงการตอบกลับ JSON ให้พร้อมใช้งาน คุณไม่จำเป็นต้องยุ่งกับกลไกการเซ็นโดยตรงเลย หากคุณเรียก API โดยไม่ใช้ SDK (cURL ไคลเอนต์ HTTP แบบกำหนดเอง หรือภาษาอื่นๆ) ดูขั้นตอนการเซ็นแบบเต็มได้ที่การยืนยันตัวตนด้านล่าง

GETTING STARTED · AUTHENTICATION

การยืนยันตัวตน

หัวข้อนี้เจาะลึกเรื่องการเซ็นคำขอ หากคุณใช้ SDK @trademire/platform-api การเซ็นจะเกิดขึ้นโดยอัตโนมัติ คุณจึงสามารถอ่านผ่านๆ หรือข้ามไปก่อนได้ - ขั้นตอนด้านล่างนี้มีไว้สำหรับผู้ที่เซ็นคำขอด้วยตนเอง (cURL ไคลเอนต์ HTTP ระดับล่าง หรือภาษาอื่นๆ) ทุกการเรียก Platform API - ทั้งรายการสาธารณะและการดำเนินการส่วนตัวของพูล - จะถูกเซ็นด้วย HMAC-SHA256 บนเนื้อหา JSON ดิบของคำขอ ลายเซ็นนี้พิสูจน์ว่าคุณถือ API secret ไว้โดยไม่ต้องส่งค่านั้นออกไปเลย และ timestamp จะจำกัดแต่ละคำขอไว้ในช่วงหน้าต่างการเล่นซ้ำ 5 นาที เฮดเดอร์ทั้งสามตัวเดียวกัน (key, signature, timestamp) ใช้ยืนยันตัวตนทุกอย่าง เอนด์พอยต์ PRIVATE จะถูกจำกัดขอบเขตไว้ที่พูลที่ API key ของคุณผูกไว้ตั้งแต่สร้าง ดังนั้นค่า poolKey ที่ผู้เรียกส่งมาใน body จะถูกละเว้น แต่ละเอนด์พอยต์ด้านล่างมีการระบุเมธอดมาตรฐานกำกับไว้ - GET สำหรับการอ่านล้วนๆ ที่ไม่มี body และ POST สำหรับสิ่งที่มี body หรือเปลี่ยนสถานะ SDK จะส่งคำสั่งตามที่ระบุไว้โดยอัตโนมัติ - GET สำหรับการอ่านที่ไม่มี body (เซ็นเป็น object ว่างมาตรฐาน) และ POST สำหรับคำขอที่มี body

แต่ละเอนด์พอยต์ระบุเมธอด HTTP ไว้: GET สำหรับการอ่านที่ไม่มี body และ POST สำหรับคำขอที่มี body (list, search, OHLC) รวมถึงการเขียนที่เปลี่ยนสถานะ (การตั้งค่าโปรไฟล์รันไทม์ การดำเนินการเกี่ยวกับวงจรการทำงาน) body ที่ว่างเปล่าหรือไม่มีจะเซ็นเป็น {} (ไม่ใช่สตริงว่าง) และเอนด์พอยต์สำหรับค้นหา /help ให้บริการโดยไม่ต้องใช้เฮดเดอร์ยืนยันตัวตน SDK จะเซ็นและส่งคำขอด้วยเมธอดที่ระบุไว้โดยอัตโนมัติ ส่วนผู้เรียกที่ใช้ HTTP ดิบต้องใช้เมธอดตามที่ระบุไว้ในแต่ละเอนด์พอยต์

สิ่งที่ถูกเซ็น
// Generate HMAC-SHA256 signature from the raw request body as lowercase hex signature = HMAC_SHA256(apiSecret, requestBody).toHex()

มีเพียงเนื้อหา JSON ดิบเท่านั้นที่ถูกเซ็น พาธ {apiKey} query string และ timestamp ไม่ได้เป็นส่วนหนึ่งของข้อมูลที่ถูกเซ็น เนื้อหาต้องเหมือนกันทุกไบต์กับสิ่งที่คุณส่งจริง - แปลงเป็นสตริงครั้งเดียว เซ็นสตริงนั้นตรงๆ แล้วส่งเป็นเนื้อหาของคำขอ

เมื่อสร้างเนื้อหา ให้เรียงคีย์ของ object ตามลำดับตัวอักษรจากน้อยไปมาก (canonical JSON) อาร์เรย์จะคงลำดับตามที่กำหนดไว้ และค่า undefined จะถูกตัดออก SDK จะดำเนินการนี้โดยอัตโนมัติ ส่วนผู้ที่เซ็นด้วยตนเองต้องทำให้ตรงกันทุกไบต์ ไม่เช่นนั้นลายเซ็นจะไม่สามารถตรวจสอบผ่านได้

เฮดเดอร์ที่จำเป็น

ชื่อ จำเป็น คำอธิบาย
Content-Type จำเป็น ต้องเป็น application/json
X-API-Key จำเป็น ตัวระบุสาธารณะของ API key ที่ออกจากแดชบอร์ดของแพลตฟอร์ม ห้ามเปิดเผย secret ที่จับคู่กันโดยเด็ดขาด
X-API-Signature จำเป็น ค่า HMAC-SHA256 ของเนื้อหาคำขอดิบ เข้ารหัสเป็นเลขฐานสิบหกตัวพิมพ์เล็ก คำนวณโดยใช้ API secret เป็นคีย์
X-API-Timestamp จำเป็น เวลาที่สร้างคำขอในรูปแบบ Unix epoch หน่วยเป็นมิลลิวินาที เซิร์ฟเวอร์จะปฏิเสธ timestamp ที่คลาดเคลื่อนเกินหน้าต่าง 5 นาที (เพื่อป้องกันการเล่นซ้ำ)

URL ของคำขอ

ทุกเอนด์พอยต์มีรูปแบบเดียวกัน:

POST /:path

ทุกเอนด์พอยต์อยู่ภายใต้ /v1/{apiKey} ส่วนพาธ {apiKey} คือ API key สาธารณะของคุณ (ค่าเดียวกับที่ส่งในเฮดเดอร์ X-API-Key) และไม่ได้เป็นส่วนหนึ่งของข้อมูลที่ถูกเซ็น

ที่อยู่ฟีเจอร์แบบยาว https://trademire.ai/api/platform-api/{apiKey}/v1 ตอบสนองเอนด์พอยต์ชุดเดียวกันทุกประการ และยังคงเปิดใช้งานสำหรับการเชื่อมต่อที่สร้างไว้แล้วบนที่อยู่นี้ ทั้งสองรูปแบบเข้าถึงเซิร์ฟเวอร์เดียวกัน มีข้อจำกัดอัตราการเรียกเท่ากัน และใช้ลายเซ็นแบบเดียวกัน

การเซ็นคำขอ

คำนวณ HMAC จากลำดับไบต์ที่แน่นอนของเนื้อหาที่คุณส่ง เลือกภาษาที่คุณใช้:

import crypto from "crypto";

// 1. Build the request body and per-request metadata
let apiKey = process.env.API_KEY;
let body = JSON.stringify({ pagination: { page: 1, limit: 50 } });
let timestamp = Date.now().toString();

// 2. Sign the raw body with HMAC-SHA256 using your API secret
let signature = crypto
  .createHmac("sha256", process.env.API_SECRET)
  .update(body)
  .digest("hex");

// 3. Send the signed request with all four required auth headers
let res = await fetch(`https://trademire.ai/api/v1/${apiKey}/markets/list`, {
  method: "POST",
  headers: {
    "Content-Type":    "application/json",
    "X-API-Key":       apiKey,
    "X-API-Signature": signature,
    "X-API-Timestamp": timestamp,
  },
  body,
});
BODY='{"pagination":{"page":1,"limit":50}}'
TS=$(date +%s%3N)
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$API_SECRET" -hex | awk '{print $2}')
curl -X POST "https://trademire.ai/api/v1/$API_KEY/markets/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data "$BODY"

เอนด์พอยต์แบบ Public เทียบกับ Private

ขอบเขต เฮดเดอร์ HMAC รูปแบบ Body ตัวอย่าง
PUBLIC จำเป็น มีเฉพาะฟิลด์สำหรับรายการ/กรอง/เรียงลำดับ/แบ่งหน้าเท่านั้น /markets/list, /asset/:symbol, /exchanges/list, /chains/list, /macro/types
PRIVATE จำเป็น จำกัดขอบเขตไว้ที่พูลที่ API key ของคุณผูกไว้ตั้งแต่สร้าง - ฟิลด์ poolKey ใน body จะถูกละเว้น /vaults/list, /strategies/list, /orders/list, /trades/list

พฤติกรรมเมื่อยืนยันตัวตนล้มเหลว

ไม่ว่าจะเป็นความล้มเหลวในการยืนยันตัวตนรูปแบบใดก็ตาม - เฮดเดอร์หายไป ลายเซ็นผิดรูปแบบ timestamp หมดอายุ คีย์ถูกระงับ IP ถูกบล็อก หรือหมวดหมู่ที่ไม่ได้รับอนุญาต - เซิร์ฟเวอร์จะคืนค่าการตอบกลับแบบเดียวกันคือ MessageAccessForbidden เหตุผลที่แท้จริงถูกจงใจไม่เปิดเผยแก่ผู้เรียก (เพื่อป้องกันการไล่เดาข้อมูลยืนยันตัวตนและการโจมตีแบบ oracle) ตรวจสอบคำขอในฝั่งของคุณก่อนลองใหม่:

  • เนื้อหาตรงกันทุกไบต์กับสตริงที่คุณเซ็นหรือไม่? การแปลงเป็นสตริงซ้ำอาจเปลี่ยนช่องว่างและลำดับคีย์ ซึ่งจะทำให้ hash ผิดเพี้ยน
  • นาฬิกาในเครื่องของคุณคลาดเคลื่อนจาก UTC ไม่เกิน 5 นาทีหรือไม่? X-API-Timestamp มีหน่วยเป็นมิลลิวินาที ไม่ใช่วินาที
  • คุณเซ็นด้วย API secret ใช่หรือไม่ (ไม่ใช่ API key)?
  • ลายเซ็นอยู่ในรูปเลขฐานสิบหกตัวพิมพ์เล็กหรือไม่ (0-9a-f)?
  • IP ของคุณอยู่ในรายการที่อนุญาตของคีย์หรือไม่ (หากคุณตั้งค่าไว้ในแดชบอร์ด)?
GETTING STARTED · ERRORS

ข้อผิดพลาด

รหัสข้อผิดพลาดเหล่านี้ใช้กับทุกเอนด์พอยต์ การตอบกลับข้อผิดพลาดแต่ละครั้งจะมี rayId ที่คุณสามารถอ้างอิงได้เมื่อติดต่อฝ่ายสนับสนุน

รหัส คำอธิบาย
MessageAccessForbidden คืนค่าเมื่อการยืนยันตัวตนล้มเหลวไม่ว่ากรณีใด (ลายเซ็นหายไป ผิดรูปแบบ หรือไม่ถูกต้อง timestamp หมดอายุ คีย์ถูกระงับ IP ถูกบล็อก) สาเหตุที่แท้จริงถูกจงใจไม่เปิดเผย เพื่อป้องกันการไล่เดาข้อมูล
MessageMissingParameter พารามิเตอร์ URL ที่จำเป็น (เช่น :pair บนเอนด์พอยต์รายตลาด) หายไป ผิดรูปแบบ หรือไม่ผ่านการตรวจสอบความถูกต้องของตัวอักษร/ความยาว
MessageRateLimitExceeded เกินขีดจำกัดอัตราการเรียกต่อคีย์สำหรับเอนด์พอยต์นี้ ตรวจสอบเฮดเดอร์ Retry-After ในการตอบกลับก่อนลองใหม่
MessageInternalError เกิดข้อผิดพลาดภายในที่ไม่คาดคิด การตอบกลับมี rayId ที่คุณสามารถอ้างอิงได้เมื่อติดต่อฝ่ายสนับสนุน - จะไม่มีรายละเอียดเพิ่มเติมเปิดเผยแก่ผู้เรียก
PUBLIC · MARKETS

ดึงรายการตลาด

คืนค่ารายการตลาดแบบกระชับมาตรฐานของทุกตลาดที่แพลตฟอร์มติดตามอยู่ในปัจจุบัน แต่ละรายการประกอบด้วยราคารวมล่าสุดจากทุกตลาดแลกเปลี่ยน สกุลเงินอ้างอิงที่ใช้แสดงราคา และสถานะบ่งชี้ว่าตลาดนั้นเปิดใช้งานอยู่หรือไม่ ใช้ body เพื่อกรอง เรียงลำดับ และแบ่งหน้าแบบ cursor - รายละเอียดรายคู่เทรด (ticker แบบเต็ม การจดทะเบียน ขีดจำกัด โปรไฟล์ OHLC) อยู่ที่เอนด์พอยต์แบบแบ่งส่วน /market/:pair/*

POST /markets/list
การยืนยันตัวตน HMAC-SHA256 ขีดจำกัดอัตราการเรียก 10 req/min การแบ่งหน้า เนื้อหา application/json

พารามิเตอร์ใน Body

ชื่อ ตำแหน่ง ประเภท จำเป็น คำอธิบาย
เนื้อหาคำขอ
filtering body object ไม่บังคับ Filter object: { term?: string } คำค้นหาจะถูกจับคู่กับฟิลด์คู่เทรด สัญลักษณ์สกุลฐาน และสัญลักษณ์สกุลอ้างอิง
sorting body object ไม่บังคับ Sort object: { field, direction } ฟิลด์ที่ใช้บ่อยได้แก่ pair, lastPrice และ isActive ทิศทางเป็น asc หรือ desc
pagination body object ไม่บังคับ การแบ่งหน้าแบบ cursor: { limit?: number, cursor?: string } ค่า limit ถูกจำกัดเพดานไว้ฝั่งเซิร์ฟเวอร์ ส่วน cursor เป็นค่าทึบแสงที่ได้รับจากการตอบกลับครั้งก่อนหน้า

โครงสร้างการตอบกลับ

items[]
ฟิลด์ ประเภท คำอธิบาย
pair string คีย์คู่เทรดมาตรฐานในรูปแบบ BASE_QUOTE (เช่น BTC_USDT)
baseSymbol string สัญลักษณ์สินทรัพย์ฐานของตลาด
quoteSymbol string สัญลักษณ์สินทรัพย์อ้างอิงของตลาด
isActive boolean ระบุว่าตลาดนี้กำลังเปิดใช้งานและมีการเทรดอยู่บนตลาดแลกเปลี่ยนที่ติดตามอย่างน้อยหนึ่งแห่งหรือไม่
lastPrice number ราคารวมล่าสุดจากทุกตลาดแลกเปลี่ยน แสดงในหน่วย priceQuote
priceQuote string สกุลเงินอ้างอิงที่ใช้แสดงค่า lastPrice (โดยทั่วไปคือ USDT หรือ USD)
sourceDelaySecs number ระยะเวลาที่ราคานี้ล่าช้ากว่าตลาดจริง มีหน่วยเป็นวินาที จะไม่ปรากฏเมื่อราคาเป็นแบบเรียลไทม์ ซึ่งเป็นกรณีของสินทรัพย์คริปโต
pagination
ฟิลด์ ประเภท คำอธิบาย
currentPage integer หมายเลขหน้าที่ตอบกลับมา เริ่มนับจาก 1
totalPages integer จำนวนหน้าทั้งหมดที่มีสำหรับตัวกรองและ limit ปัจจุบัน
pageSize integer ขนาดหน้าจริงที่เซิร์ฟเวอร์ใช้ (อาจน้อยกว่า limit ที่ร้องขอ)
totalRows integer จำนวนแถวทั้งหมดที่ตรงกับตัวกรองในทุกหน้า

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "pair": "BTC_USDT",
      "baseSymbol": "BTC",
      "quoteSymbol": "USDT",
      "isActive": true,
      "lastPrice": 64803.7,
      "priceQuote": "USDT"
    },
    {
      "pair": "ETH_USDT",
      "baseSymbol": "ETH",
      "quoteSymbol": "USDT",
      "isActive": true,
      "lastPrice": 3421.18,
      "priceQuote": "USDT"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 5,
    "pageSize": 50,
    "totalRows": 247
  }
}
PUBLIC · MARKETS

ดึงข้อมูล Market Ticker

คืนค่า ticker แบบรวมแบบเรียลไทม์สำหรับคู่เทรดเดียว ได้แก่ ราคาล่าสุดและการเปลี่ยนแปลงใน 24 ชั่วโมง ราคาเสนอซื้อ/เสนอขายที่ดีที่สุดพร้อม spread ปริมาณสกุลฐานใน 24 ชั่วโมง และจำนวนตลาดแลกเปลี่ยนที่ประกอบเป็นค่านี้

GET /market/:pair/ticker
Auth HMAC-SHA256 Rate limit 30 req/min URL param :pair

พารามิเตอร์ URL

ชื่อจำเป็นคำอธิบาย
pairrequiredCanonical pair key in BASE_QUOTE form (e.g. BTC_USDT). Alphanumeric, underscore and dash only, max 64 chars.

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/market/BTC_USDT/ticker" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.markets.getTicker("BTC_USDT");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ticker
ฟิลด์ประเภทคำอธิบาย
pair string Canonical market pair key.
baseSymbol string Base asset symbol.
quoteSymbol string Quote asset symbol.
nrOfExchanges number Number of venues contributing to the aggregate.
lastPrice number Last aggregated trade price.
change number Change of the last aggregated price over the last 24 hours.
bidPrice number Current best bid price.
askPrice number Current best ask price.
volume number 24h base-currency volume.
spread number Current bid/ask spread.
hasVolumeData boolean Whether live volume data is present.
hasPriceData boolean Whether live price data is present.
sourceDelaySecs number How far behind the live market the price is, in seconds. Left out while the price is live.

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "pair": "BTC/USDT",
    "baseSymbol": "BTC",
    "quoteSymbol": "USDT",
    "nrOfExchanges": 4,
    "lastPrice": 67234.5,
    "change": 1245.3,
    "bidPrice": 67234.48,
    "askPrice": 67234.55,
    "volume": 2451306538.16,
    "spread": 0.0000764,
    "hasVolumeData": true,
    "hasPriceData": true
  }
}
PUBLIC · MARKETS

Ticker แยกตามตลาดแลกเปลี่ยน

ออกแบบมาเพื่อแยก ticker ของคู่เทรดตามตลาดแลกเปลี่ยนทุกแห่งที่จดทะเบียนคู่เทรดนั้น ขณะนี้คืนค่า ticker แบบรวมเพียงรายการเดียว เหมือนกับ Get Market Ticker

GET /market/ticker/:pair/exchanges
Auth HMAC-SHA256 Rate limit 30 req/min

พารามิเตอร์ URL

ชื่อจำเป็นคำอธิบาย
pairrequiredCanonical pair key (BASE_QUOTE).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/market/ticker/BTC_USDT/exchanges" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.markets.getTickerExchanges("BTC_USDT");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

item

ขณะนี้คำตอบเป็น item เดียวในรูปแบบ ticker จาก Get Market Ticker ไม่ใช่รายการแยกตามตลาดแลกเปลี่ยน

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "pair": "BTC/USDT",
    "baseSymbol": "BTC",
    "quoteSymbol": "USDT",
    "nrOfExchanges": 4,
    "lastPrice": 67234.5,
    "change": 1245.3,
    "bidPrice": 67234.48,
    "askPrice": 67234.55,
    "volume": 2451306538.16,
    "spread": 0.0000764,
    "hasVolumeData": true,
    "hasPriceData": true
  }
}
PUBLIC · MARKETS

ดึงข้อมูลสถานะการจดทะเบียนของตลาด

คืนค่าข้อมูลสถานะการจดทะเบียนสำหรับตลาดเดียว - ชุดข้อมูลสถานะแบบกระชับที่ระบุว่าคู่เทรดนั้นได้รับการจดทะเบียน เปิดใช้งาน เทรดได้แบบเปิดเผย และรองรับการเทรดมาร์จิ้นหรือไม่

GET /market/:pair/listing
Auth HMAC-SHA256 Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/market/BTC_USDT/listing" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.markets.getListing("BTC_USDT");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

listing
ฟิลด์ประเภทคำอธิบาย
baseSymbol string Base asset symbol.
quoteSymbol string Quote asset symbol.
isListed boolean Whether the market is currently listed.
isActive boolean Whether the market is currently active.
openTrading boolean Whether trading is open at all.
openApiTrading boolean Whether API trading is open.
hasMarginTrading boolean Whether margin trading is supported.

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "baseSymbol": "BTC",
    "quoteSymbol": "USDT",
    "isListed": true,
    "isActive": true,
    "openTrading": true,
    "openApiTrading": true,
    "hasMarginTrading": false
  }
}
PUBLIC · MARKETS

ดึงข้อมูลขีดจำกัดของตลาด

คืนค่าขีดจำกัดการเทรดและค่าธรรมเนียมที่ผ่านการตรวจสอบแล้วสำหรับตลาดเดียว ได้แก่ ความละเอียดของตัวเลข ขอบเขตราคา/ปริมาณ ขนาด tick มูลค่าขั้นต่ำ/สูงสุด และอัตราค่าธรรมเนียม maker/taker

GET /market/:pair/limits
Auth HMAC-SHA256 Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/market/BTC_USDT/limits" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.markets.getLimits("BTC_USDT");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

limit
ฟิลด์ประเภทคำอธิบาย
basePrecision number Base asset decimal precision.
quotePrecision number Quote asset decimal precision.
priceMin / priceMax / priceTick number Price bounds and tick size.
quantityMin / quantityMax / quantityTick number Quantity bounds and tick size.
totalMin / totalMax number Notional value bounds.
feeMaker / feeTaker number Maker / taker fee rates.
feeIsTiered boolean Whether fees are tiered by 30d volume.
maxNumOrders number Maximum number of open orders allowed.

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "basePrecision": 8,
    "quotePrecision": 2,
    "priceMin": 0.01,
    "priceMax": 1000000,
    "priceTick": 0.01,
    "quantityMin": 0.00001,
    "quantityMax": 9000,
    "quantityTick": 0.00001,
    "totalMin": 5,
    "totalMax": 9000000,
    "feeMaker": 0.001,
    "feeTaker": 0.001,
    "feeIsTiered": true,
    "maxNumOrders": 200
  }
}
PUBLIC · MARKETS

ดึงข้อมูลโปรไฟล์ตลาด

คืนค่าข้อมูลโปรไฟล์ตลาด ได้แก่ แท็กและข้อมูลเมทาดาต้าด้านการจดทะเบียน/สถานะการใช้งานเช่นเดียวกับ Get Market Listing ใช้เอนด์พอยต์นี้เมื่อต้องการทั้งข้อมูลอธิบายและสถานะความพร้อมใช้งานในคำขอเดียว

GET /market/:pair/profile
Auth HMAC-SHA256 Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/market/BTC_USDT/profile" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.markets.getProfile("BTC_USDT");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

profile
ฟิลด์ประเภทคำอธิบาย
baseSymbol / quoteSymbol string Base / quote asset symbols.
isListed / isActive boolean Whether the market is listed and active.
openTrading / openApiTrading boolean Whether trading and API trading are open.
hasMarginTrading boolean Whether margin trading is supported.
tags array Array of tag keys associated with the market.

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "baseSymbol": "BTC",
    "quoteSymbol": "USDT",
    "isListed": true,
    "isActive": true,
    "openTrading": true,
    "openApiTrading": true,
    "hasMarginTrading": false,
    "tags": [
      "spot",
      "major"
    ]
  }
}
PUBLIC · MARKETS

ดึงข้อมูล OHLC ของตลาด

คืนค่าชุดแท่งเทียน OHLC สำหรับตลาดเดียว ค่าเริ่มต้นเป็นแท่งเทียนแบบ aggLast (ราคาซื้อขายล่าสุด) และมี aggVol สำหรับแท่งเทียนแบบปริมาณ ช่วงเวลาและกรอบเวลาถูกส่งผ่านใน body

POST /market/:pair/ohlc
Auth HMAC-SHA256 Rate limit 30 req/min

พารามิเตอร์ใน Body

ชื่อประเภทจำเป็นคำอธิบาย
field string optional One of aggLast (default) or aggVol.
intervalstringoptionalLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M.
tOldest integer optional Oldest bin time, ms epoch (inclusive).
tNewest integer optional Newest bin time, ms epoch (inclusive).

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/market/BTC_USDT/ohlc" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"5m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.markets.getOhlc("BTC_USDT", { interval: "5m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ohlc
ฟิลด์ประเภทคำอธิบาย
pairstringCanonical market pair key
field string Snapshotted field that drove the bins.
intervalstringLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M
series array Sorted bins: { tOpen, tClose, open, high, low, close, volume }.
summary object Aggregate change summary over the requested window.

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "pair": "BTC_USDT",
    "field": "aggLast",
    "interval": "5m",
    "series": [
      {
        "tOpen": 1700000100000,
        "tClose": 1700000400000,
        "open": 67200,
        "high": 67450,
        "low": 67150,
        "close": 67400,
        "volume": 8120.4
      },
      {
        "tOpen": 1700000400000,
        "tClose": 1700000700000,
        "open": 67400,
        "high": 67800,
        "low": 67350,
        "close": 67700,
        "volume": 9340.2
      }
    ],
    "summary": {
      "change_v": 500,
      "change_p": 0.74
    }
  }
}
PUBLIC · MARKETS

ดึงตัวชี้วัดทั้งหมดของตลาด

คืนค่าตัวชี้วัดทางเทคนิคที่คำนวณแล้วทั้งหมดของตลาด โดยคำนวณจากแท่งเทียนราคา และใช้เฉพาะแท่งเทียนที่ปิดแล้วเท่านั้น เพื่อให้ค่าที่อ่านได้คงที่จนกว่าแท่งเทียนถัดไปจะปิด ไม่ใช่ทุกค่าที่จะมีให้ในทุกความยาวแท่งเทียน - ค่าที่ไม่มีให้จะถูกตัดออกจากคำตอบ และค่าที่ปรากฏแต่ละค่าจะระบุแท่งเทียนที่ใช้คำนวณ ค่าที่ตั้งชื่อตามช่วงย้อนหลัง เช่น ema50 จะไม่ปรากฏเช่นกันจนกว่าชุดข้อมูลจะมีแท่งเทียนครบตามจำนวนนั้น ระหว่างนั้นฟิลด์ periods จะนับแท่งเทียนที่มีอยู่แล้ว และฟิลด์ periodsNeeded จะระบุจำนวนที่ต้องการ

POST /market/:pair/indicators
Auth HMAC-SHA256 Rate limit 30 req/min URL params :pair

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
pairrequiredCanonical market pair key in BASE_QUOTE form (e.g. BTC_USDT).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/market/BTC_USDT/indicators" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"15m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.markets.indicators("BTC_USDT", { interval: "15m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

market-indicators[":pair"]
ฟิลด์ ประเภท คำอธิบาย
pairstringCanonical market pair key
intervalstringLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w
tComputednumberUnix time of the calculation moment
changePct_valnumberPercentage change between the first and last candle of the window
changePct_periodsnumberCandles used for the change percentage
changePct9_valnumberPercentage change over the last 9 candles
changePct9_periodsnumberCandles used for the 9 candle change percentage
changePct12_valnumberPercentage change over the last 12 candles
changePct12_periodsnumberCandles used for the 12 candle change percentage
changePct25_valnumberPercentage change over the last 25 candles
changePct25_periodsnumberCandles used for the 25 candle change percentage
sma20_valnumberSimple moving average of the candle closes, over 20 candles
sma20_periodsnumberCandles used for the 20 candle simple moving average
sma50_valnumberSimple moving average of the candle closes, over 50 candles
sma50_periodsnumberCandles used for the 50 candle simple moving average
sma200_valnumberSimple moving average of the candle closes, over 200 candles, the long trend line
sma200_periodsnumberCandles used for the 200 candle simple moving average
ema9_valnumberExponential moving average of the candle closes, over 9 candles
ema9_periodsnumberCandles used for the 9 candle exponential moving average
ema21_valnumberExponential moving average of the candle closes, over 21 candles
ema21_periodsnumberCandles used for the 21 candle exponential moving average
ema50_valnumberExponential moving average of the candle closes, over 50 candles
ema50_periodsnumberCandles used for the 50 candle exponential moving average
rsi9_valnumberFast relative strength index between 0 and 100, over 9 candles
rsi9_periodsnumberCandles used for the fast relative strength index
rsi14_valnumberRelative strength index between 0 and 100, over 14 candles
rsi14_periodsnumberCandles used for the relative strength index
rsi21_valnumberSlow relative strength index between 0 and 100, over 21 candles
rsi21_periodsnumberCandles used for the slow relative strength index
atr7_valnumberAverage true range over 7 candles
atr7_periodsnumberCandles used for the 7 candle average true range
atr14_valnumberAverage true range over 14 candles
atr14_periodsnumberCandles used for the 14 candle average true range
atr21_valnumberAverage true range over 21 candles
atr21_periodsnumberCandles used for the 21 candle average true range
bollinger1sd_valnumberBollinger middle band over 20 candles, the simple average of the recent closes
bollinger1sd_uppernumberBollinger upper band, the middle band plus one standard deviation
bollinger1sd_lowernumberBollinger lower band, the middle band minus one standard deviation
bollinger1sd_periodsnumberCandles used for the bollinger bands
bollinger2sd_valnumberBollinger middle band over 20 candles, the simple average of the recent closes
bollinger2sd_uppernumberBollinger upper band, the middle band plus two standard deviations
bollinger2sd_lowernumberBollinger lower band, the middle band minus two standard deviations
bollinger2sd_periodsnumberCandles used for the bollinger bands
bollinger3sd_valnumberBollinger middle band over 20 candles, the simple average of the recent closes
bollinger3sd_uppernumberBollinger upper band, the middle band plus three standard deviations
bollinger3sd_lowernumberBollinger lower band, the middle band minus three standard deviations
bollinger3sd_periodsnumberCandles used for the bollinger bands
macd_valnumberMoving average convergence divergence line, using 12, 26 and 9 candles
macd_signalnumberSignal line of the convergence divergence indicator
macd_histogramnumberDistance between the convergence divergence line and its signal line
macd_periodsnumberCandles used for the convergence divergence indicator
macd535_valnumberMoving average convergence divergence line, using 5, 35 and 5 candles
macd535_signalnumberSignal line of the 5, 35 and 5 convergence divergence indicator
macd535_histogramnumberDistance between the 5, 35 and 5 convergence divergence line and its signal line
macd535_periodsnumberCandles used for the 5, 35 and 5 convergence divergence indicator
relativeVolume10_valnumberLatest daily volume reading against the average of the previous 10 readings, where one means the usual pace
relativeVolume10_periodsnumberReadings used for the 10 reading relative volume
relativeVolume20_valnumberLatest daily volume reading against the average of the previous 20 readings, where one means the usual pace
relativeVolume20_periodsnumberReadings used for the 20 reading relative volume
relativeVolume50_valnumberLatest daily volume reading against the average of the previous 50 readings, where one means the usual pace
relativeVolume50_periodsnumberReadings used for the 50 reading relative volume
rollingHigh10_valnumberHighest price seen over the last 10 candles
rollingHigh10_periodsnumberCandles used for the 10 candle rolling high
rollingHigh20_valnumberHighest price seen over the last 20 candles
rollingHigh20_periodsnumberCandles used for the 20 candle rolling high
rollingHigh55_valnumberHighest price seen over the last 55 candles
rollingHigh55_periodsnumberCandles used for the 55 candle rolling high
rollingLow10_valnumberLowest price seen over the last 10 candles
rollingLow10_periodsnumberCandles used for the 10 candle rolling low
rollingLow20_valnumberLowest price seen over the last 20 candles
rollingLow20_periodsnumberCandles used for the 20 candle rolling low
rollingLow55_valnumberLowest price seen over the last 55 candles
rollingLow55_periodsnumberCandles used for the 55 candle rolling low
vwap_valnumberVolume weighted average price over whole days, each day weighted by what it traded
vwap_periodsnumberWhole days used for the volume weighted average price
rankPct20_valnumberShare of the last 20 candles that closed at or below the latest one, from 0 to 100
rankPct20_periodsnumberCandles used for the 20 candle rank
rankPct50_valnumberShare of the last 50 candles that closed at or below the latest one, from 0 to 100
rankPct50_periodsnumberCandles used for the 50 candle rank
<indicator>_periodsNeedednumberLookback a reading waits to fill, published with its periods only while it has no value; each new candle adds one to the periods

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "pair": "BTC/USDT",
    "interval": "15m",
    "tComputed": 1785313277,
    "changePct_val": 1.9162513985504726,
    "changePct_periods": 48,
    "changePct9_val": -0.4218339107,
    "changePct9_periods": 9,
    "changePct12_val": 0.3671224885,
    "changePct12_periods": 12,
    "changePct25_val": 1.2884019226,
    "changePct25_periods": 25,
    "sma20_val": 63697.17930616253,
    "sma20_periods": 20,
    "sma50_val": 63411.90284412,
    "sma50_periods": 50,
    "sma200_val": 62884.31775093,
    "sma200_periods": 200,
    "ema9_val": 63740.22615508,
    "ema9_periods": 9,
    "ema21_val": 63719.44210771339,
    "ema21_periods": 21,
    "ema50_val": 63498.06612284,
    "ema50_periods": 50,
    "rsi9_val": 57.12,
    "rsi9_periods": 9,
    "rsi14_val": 54.35,
    "rsi14_periods": 14,
    "rsi21_val": 52.68,
    "rsi21_periods": 21,
    "atr7_val": 688.4419028841,
    "atr7_periods": 7,
    "atr14_val": 631.3883305255476,
    "atr14_periods": 14,
    "atr21_val": 602.7710664918,
    "atr21_periods": 21,
    "bollinger1sd_val": 63697.17930616253,
    "bollinger1sd_upper": 64208.25611396,
    "bollinger1sd_lower": 63186.10249836,
    "bollinger1sd_periods": 20,
    "bollinger2sd_val": 63697.17930616253,
    "bollinger2sd_upper": 64719.33291696,
    "bollinger2sd_lower": 62675.02569536,
    "bollinger2sd_periods": 20,
    "bollinger3sd_val": 63697.17930616253,
    "bollinger3sd_upper": 65230.40972236,
    "bollinger3sd_lower": 62163.94888996,
    "bollinger3sd_periods": 20,
    "macd_val": 133.7640765429413,
    "macd_signal": 101.91548688986005,
    "macd_histogram": 31.84858965,
    "macd_periods": 26,
    "macd535_val": 86.4429117733,
    "macd535_signal": 71.2205318841,
    "macd535_histogram": 15.22237989,
    "macd535_periods": 35,
    "rollingHigh10_val": 64180.55418822,
    "rollingHigh10_periods": 10,
    "rollingHigh20_val": 64394.42867907523,
    "rollingHigh20_periods": 20,
    "rollingHigh55_val": 65022.11930448,
    "rollingHigh55_periods": 55,
    "rollingLow10_val": 63188.30117744,
    "rollingLow10_periods": 10,
    "rollingLow20_val": 62965.47219655413,
    "rollingLow20_periods": 20,
    "rollingLow55_val": 61903.88512207,
    "rollingLow55_periods": 55,
    "rankPct20_val": 85,
    "rankPct50_val": 72
  }
}
PUBLIC · MARKETS

ดึงตัวชี้วัดหนึ่งรายการของตลาด

คืนค่าตัวชี้วัดทางเทคนิคที่คำนวณแล้วหนึ่งรายการของตลาด โดยคำนวณจากแท่งเทียนราคา และใช้เฉพาะแท่งเทียนที่ปิดแล้วเท่านั้น เพื่อให้ค่าที่อ่านได้คงที่จนกว่าแท่งเทียนถัดไปจะปิด ไม่ใช่ทุกค่าที่จะมีให้ในทุกความยาวแท่งเทียน - ค่าที่ไม่มีให้จะถูกตัดออกจากคำตอบ และค่าที่ปรากฏแต่ละค่าจะระบุแท่งเทียนที่ใช้คำนวณ ค่าที่ตั้งชื่อตามช่วงย้อนหลัง เช่น ema50 จะไม่ปรากฏเช่นกันจนกว่าชุดข้อมูลจะมีแท่งเทียนครบตามจำนวนนั้น ระหว่างนั้นฟิลด์ periods จะนับแท่งเทียนที่มีอยู่แล้ว และฟิลด์ periodsNeeded จะระบุจำนวนที่ต้องการ

POST /market/:pair/indicator/:indicatorKey
Auth HMAC-SHA256 Rate limit 60 req/min URL params :pair, :indicatorKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
pairrequiredCanonical market pair key in BASE_QUOTE form (e.g. BTC_USDT).
indicatorKeyrequiredIndicator to compute.
Trend
sma20 sma50 sma200 ema9 ema21 ema50
Momentum
rsi9 rsi14 rsi21
Convergence1s, 15m, 12h, 5d
macd macd535
Volatility
atr7 atr14 atr21 bollinger1sd bollinger2sd bollinger3sd
Range
rollingHigh10 rollingHigh20 rollingHigh55 rollingLow10 rollingLow20 rollingLow55
Change
changePct changePct9 changePct12 changePct25
Weighted price6h, 12h
vwap
Volume6h, 12h, 5d, 1M
relativeVolume10 relativeVolume20 relativeVolume50
Position in range
rankPct20 rankPct50

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/market/BTC_USDT/indicator/rsi14" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"15m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.markets.indicator("BTC_USDT", "rsi14", { interval: "15m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

market-indicators[":pair"]
ฟิลด์ ประเภท คำอธิบาย
pairstringCanonical market pair key
intervalstringLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w
tComputednumberUnix time of the calculation moment

ฟิลด์ต่อตัวชี้วัด

ตัวชี้วัดที่ร้องขอ ฟิลด์ในคำตอบ
changePctchangePct_val, changePct_periods
changePct9changePct9_val, changePct9_periods
changePct12changePct12_val, changePct12_periods
changePct25changePct25_val, changePct25_periods
sma20sma20_val, sma20_periods
sma50sma50_val, sma50_periods
sma200sma200_val, sma200_periods
ema9ema9_val, ema9_periods
ema21ema21_val, ema21_periods
ema50ema50_val, ema50_periods
rsi9rsi9_val, rsi9_periods
rsi14rsi14_val, rsi14_periods
rsi21rsi21_val, rsi21_periods
atr7atr7_val, atr7_periods
atr14atr14_val, atr14_periods
atr21atr21_val, atr21_periods
bollinger1sdbollinger1sd_val, bollinger1sd_upper, bollinger1sd_lower, bollinger1sd_periods
bollinger2sdbollinger2sd_val, bollinger2sd_upper, bollinger2sd_lower, bollinger2sd_periods
bollinger3sdbollinger3sd_val, bollinger3sd_upper, bollinger3sd_lower, bollinger3sd_periods
macdmacd_val, macd_signal, macd_histogram, macd_periods
macd535macd535_val, macd535_signal, macd535_histogram, macd535_periods
relativeVolume10relativeVolume10_val, relativeVolume10_periods
relativeVolume20relativeVolume20_val, relativeVolume20_periods
relativeVolume50relativeVolume50_val, relativeVolume50_periods
rollingHigh10rollingHigh10_val, rollingHigh10_periods
rollingHigh20rollingHigh20_val, rollingHigh20_periods
rollingHigh55rollingHigh55_val, rollingHigh55_periods
rollingLow10rollingLow10_val, rollingLow10_periods
rollingLow20rollingLow20_val, rollingLow20_periods
rollingLow55rollingLow55_val, rollingLow55_periods
vwapvwap_val, vwap_periods
rankPct20rankPct20_val
rankPct50rankPct50_val

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "pair": "BTC/USDT",
    "interval": "15m",
    "tComputed": 1785313278,
    "rsi14_val": 54.35,
    "rsi14_periods": 14
  }
}
PUBLIC · MARKETS

แผนที่ช่วยเหลือของตลาด

คืนค่าแผนที่ JSON แบบมีโครงสร้างของทุกเอนด์พอยต์ในหมวดตลาด - เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ รวมถึงกลุ่มฟิลด์ที่แต่ละเอนด์พอยต์คืนค่า มีประโยชน์สำหรับการตรวจสอบภายในของ SDK และเอเจนต์

GET /markets/help
Auth None Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/markets/help" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.markets.help();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ฟิลด์ ประเภท คำอธิบาย
success boolean ระบุว่าการเรียกสำเร็จหรือไม่
category string หมวดหมู่ที่แผนที่ช่วยเหลือนี้อธิบาย
help object คอนเทนเนอร์แผนที่ช่วยเหลือ paths จับคู่แต่ละพาธของเอนด์พอยต์เข้ากับเมทาดาต้าของตน (เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ สถานะ isListing เมื่อเกี่ยวข้อง และกลุ่มฟิลด์ที่อ้างอิงถึง) fieldGroups จับคู่แต่ละชื่อกลุ่มเข้ากับตัวอธิบายฟิลด์ของตน (ประเภทและคำอธิบาย) ที่ถูกอ้างอิงจากรายการพาธ

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "category": "markets",
  "help": {
    "paths": {
      "/markets/help": {
        "method": "GET",
        "description": "Returns this help map",
        "rateLimit": 30,
        "params": { "required": [], "optional": [] },
        "fieldGroups": []
      }
    },
    "fieldGroups": {}
  }
}
PUBLIC · ASSETS

ดึงรายการสินทรัพย์

รายการสินทรัพย์แบบกระชับมาตรฐานของทุกสินทรัพย์ที่แพลตฟอร์มติดตาม ได้แก่ ราคารวมล่าสุด ประเภทสินทรัพย์ และสถานะการจดทะเบียน รองรับการกรอง การเรียงลำดับ และการแบ่งหน้าแบบ cursor

POST /assets/list
Auth HMAC-SHA256 Rate limit 10 req/min Pagination

พารามิเตอร์ใน Body

มีรูปแบบเดียวกับ List Markets: filtering, sorting, pagination คำค้นหาจะถูกจับคู่กับฟิลด์สัญลักษณ์และชื่อของสินทรัพย์

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/assets/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.assets.list({ pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

items[]
ฟิลด์ประเภทคำอธิบาย
assetType number Asset type classification code (numeric enum).
isListed boolean Whether the asset is currently listed.
lastPrice number Latest aggregated price.
priceQuote string Quote currency the price is denominated in.

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "assetType": "crypto",
      "isListed": true,
      "lastPrice": 67234.5,
      "priceQuote": "USDT"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · ASSETS

ดึงข้อมูลสินทรัพย์

คืนค่าข้อมูลสินทรัพย์เดียว พร้อมราคา ปริมาณใน 24 ชั่วโมง การเปลี่ยนแปลง ส่วนแบ่งตลาด จำนวนกระดานเทรดที่มีสินทรัพย์นี้ ขีดจำกัดรวม และขีดจำกัดแยกตามเครือข่ายที่ระบุด้วยตัวระบุเครือข่าย

GET /asset/:symbol
Auth HMAC-SHA256 Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/asset/BTC" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.assets.get("BTC");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

asset
ฟิลด์ประเภทคำอธิบาย
assetType / isListed string / bool Type and listing flag.
lastPrice / priceQuote number / string Latest aggregated price and its quote currency.
volume24h / change24h / dominance number 24h volume, percent change, and market dominance share.
limits object Aggregated limits: precision, orderMin/Max, depositMin/Max, withdrawalMin/Max.
chains[":network"] object Per-network limits: depositEnabled, withdrawEnabled, withdrawFee, withdrawMin/Max, depositMin, confirmations, isDefault.

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "assetType": "crypto",
    "isListed": true,
    "lastPrice": 67234.5,
    "priceQuote": "USDT",
    "volume24h": 12500.5,
    "change24h": 1.23,
    "dominance": 52.4,
    "limits": {
      "precision": 8,
      "orderMin": 0.00001,
      "orderMax": 9000,
      "depositMin": 0.0001,
      "depositMax": 1000000,
      "withdrawalMin": 0.0005,
      "withdrawalMax": 100
    },
    "chains": {
      "ETH": {
        "depositEnabled": true,
        "withdrawEnabled": true,
        "withdrawFee": 0.0005,
        "withdrawMin": 0.001,
        "withdrawMax": 100,
        "depositMin": 0.0001,
        "confirmations": 12,
        "isDefault": true
      }
    }
  }
}
PUBLIC · ASSETS

ดึงข้อมูลโปรไฟล์สินทรัพย์

คืนค่าข้อมูลเมทาดาต้าเชิงพรรณนาสำหรับสินทรัพย์เดียว ได้แก่ คำอธิบาย ตัวเลขปริมาณอุปทาน ลิงก์โซเชียล/เว็บไซต์ คีย์แท็ก และรายการคะแนนจัดอันดับ

GET /asset/:symbol/profile
Auth HMAC-SHA256 Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/asset/BTC/profile" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.assets.getProfile("BTC");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

profile
ฟิลด์ประเภทคำอธิบาย
description string Asset description text.
supplyCirculating / supplyTotal / supplyMax number Supply figures.
urls array Array of { key, value } URL entries (social, web, explorer).
tags array Array of tag keys.
ratings array Array of { key, value } rating entries.

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "description": "Bitcoin is a decentralized digital currency.",
    "supplyCirculating": 19700000,
    "supplyTotal": 19700000,
    "supplyMax": 21000000,
    "urls": [
      {
        "key": "website",
        "value": "https://bitcoin.org"
      },
      {
        "key": "twitter",
        "value": "https://twitter.com/bitcoin"
      }
    ],
    "tags": [
      "layer-1",
      "pow",
      "store-of-value"
    ],
    "ratings": [
      {
        "key": "cmcRank",
        "value": 1
      }
    ]
  }
}
PUBLIC · ASSETS

ดึงข้อมูล OHLC ของสินทรัพย์

คืนค่าชุดแท่งเทียน OHLC สำหรับสินทรัพย์เดียว สามารถเลือกกรอบเวลาได้จากคีย์ตัวสุ่มตัวอย่างของแพลตฟอร์ม

POST /asset/:symbol/ohlc
Auth HMAC-SHA256 Rate limit 30 req/min

พารามิเตอร์ใน Body

มีรูปแบบเดียวกับ Get Market OHLC แต่ไม่มีตัวเลือก field (aggLast เป็นฟิลด์เดียวที่ใช้สุ่มตัวอย่างสำหรับราคาสินทรัพย์)

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/asset/BTC/ohlc" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"5m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.assets.getOhlc("BTC", { interval: "5m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

asset-ohlc[":symbol"]
ฟิลด์ ประเภท คำอธิบาย
symbolstringGlobal asset symbol
intervalstringLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M
seriesarraySorted OHLC bins: { tOpen, tClose, open, high, low, close, volume }
summaryobjectAggregate change summary over the returned window

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "symbol": "BTC",
    "interval": "5m",
    "series": [
      {
        "tOpen": 1700000100000,
        "tClose": 1700000400000,
        "open": 67200,
        "high": 67450,
        "low": 67150,
        "close": 67400,
        "volume": 8120.4
      },
      {
        "tOpen": 1700000400000,
        "tClose": 1700000700000,
        "open": 67400,
        "high": 67800,
        "low": 67350,
        "close": 67700,
        "volume": 9340.2
      }
    ],
    "summary": {
      "change_v": 500,
      "change_p": 0.74
    }
  }
}
PUBLIC · ASSETS

ดึงตัวชี้วัดทั้งหมดของสินทรัพย์

คืนค่าตัวชี้วัดทางเทคนิคที่คำนวณแล้วทั้งหมดของสินทรัพย์ โดยคำนวณจากแท่งเทียนราคา และใช้เฉพาะแท่งเทียนที่ปิดแล้วเท่านั้น เพื่อให้ค่าที่อ่านได้คงที่จนกว่าแท่งเทียนถัดไปจะปิด ไม่ใช่ทุกค่าที่จะมีให้ในทุกความยาวแท่งเทียน - ค่าที่ไม่มีให้จะถูกตัดออกจากคำตอบ และค่าที่ปรากฏแต่ละค่าจะระบุแท่งเทียนที่ใช้คำนวณ ค่าที่ตั้งชื่อตามช่วงย้อนหลัง เช่น ema50 จะไม่ปรากฏเช่นกันจนกว่าชุดข้อมูลจะมีแท่งเทียนครบตามจำนวนนั้น ระหว่างนั้นฟิลด์ periods จะนับแท่งเทียนที่มีอยู่แล้ว และฟิลด์ periodsNeeded จะระบุจำนวนที่ต้องการ

POST /asset/:symbol/indicators
Auth HMAC-SHA256 Rate limit 30 req/min URL params :symbol

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
symbolrequiredAsset symbol (e.g. BTC).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/asset/BTC/indicators" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"15m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.assets.indicators("BTC", { interval: "15m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

asset-indicators[":symbol"]
ฟิลด์ ประเภท คำอธิบาย
symbolstringAsset symbol
intervalstringLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w
tComputednumberUnix time of the calculation moment
changePct_valnumberPercentage change between the first and last candle of the window
changePct_periodsnumberCandles used for the change percentage
changePct9_valnumberPercentage change over the last 9 candles
changePct9_periodsnumberCandles used for the 9 candle change percentage
changePct12_valnumberPercentage change over the last 12 candles
changePct12_periodsnumberCandles used for the 12 candle change percentage
changePct25_valnumberPercentage change over the last 25 candles
changePct25_periodsnumberCandles used for the 25 candle change percentage
sma20_valnumberSimple moving average of the candle closes, over 20 candles
sma20_periodsnumberCandles used for the 20 candle simple moving average
sma50_valnumberSimple moving average of the candle closes, over 50 candles
sma50_periodsnumberCandles used for the 50 candle simple moving average
sma200_valnumberSimple moving average of the candle closes, over 200 candles, the long trend line
sma200_periodsnumberCandles used for the 200 candle simple moving average
ema9_valnumberExponential moving average of the candle closes, over 9 candles
ema9_periodsnumberCandles used for the 9 candle exponential moving average
ema21_valnumberExponential moving average of the candle closes, over 21 candles
ema21_periodsnumberCandles used for the 21 candle exponential moving average
ema50_valnumberExponential moving average of the candle closes, over 50 candles
ema50_periodsnumberCandles used for the 50 candle exponential moving average
rsi9_valnumberFast relative strength index between 0 and 100, over 9 candles
rsi9_periodsnumberCandles used for the fast relative strength index
rsi14_valnumberRelative strength index between 0 and 100, over 14 candles
rsi14_periodsnumberCandles used for the relative strength index
rsi21_valnumberSlow relative strength index between 0 and 100, over 21 candles
rsi21_periodsnumberCandles used for the slow relative strength index
atr7_valnumberAverage true range over 7 candles
atr7_periodsnumberCandles used for the 7 candle average true range
atr14_valnumberAverage true range over 14 candles
atr14_periodsnumberCandles used for the 14 candle average true range
atr21_valnumberAverage true range over 21 candles
atr21_periodsnumberCandles used for the 21 candle average true range
bollinger1sd_valnumberBollinger middle band over 20 candles, the simple average of the recent closes
bollinger1sd_uppernumberBollinger upper band, the middle band plus one standard deviation
bollinger1sd_lowernumberBollinger lower band, the middle band minus one standard deviation
bollinger1sd_periodsnumberCandles used for the bollinger bands
bollinger2sd_valnumberBollinger middle band over 20 candles, the simple average of the recent closes
bollinger2sd_uppernumberBollinger upper band, the middle band plus two standard deviations
bollinger2sd_lowernumberBollinger lower band, the middle band minus two standard deviations
bollinger2sd_periodsnumberCandles used for the bollinger bands
bollinger3sd_valnumberBollinger middle band over 20 candles, the simple average of the recent closes
bollinger3sd_uppernumberBollinger upper band, the middle band plus three standard deviations
bollinger3sd_lowernumberBollinger lower band, the middle band minus three standard deviations
bollinger3sd_periodsnumberCandles used for the bollinger bands
macd_valnumberMoving average convergence divergence line, using 12, 26 and 9 candles
macd_signalnumberSignal line of the convergence divergence indicator
macd_histogramnumberDistance between the convergence divergence line and its signal line
macd_periodsnumberCandles used for the convergence divergence indicator
macd535_valnumberMoving average convergence divergence line, using 5, 35 and 5 candles
macd535_signalnumberSignal line of the 5, 35 and 5 convergence divergence indicator
macd535_histogramnumberDistance between the 5, 35 and 5 convergence divergence line and its signal line
macd535_periodsnumberCandles used for the 5, 35 and 5 convergence divergence indicator
relativeVolume10_valnumberLatest daily volume reading against the average of the previous 10 readings, where one means the usual pace
relativeVolume10_periodsnumberReadings used for the 10 reading relative volume
relativeVolume20_valnumberLatest daily volume reading against the average of the previous 20 readings, where one means the usual pace
relativeVolume20_periodsnumberReadings used for the 20 reading relative volume
relativeVolume50_valnumberLatest daily volume reading against the average of the previous 50 readings, where one means the usual pace
relativeVolume50_periodsnumberReadings used for the 50 reading relative volume
rollingHigh10_valnumberHighest price seen over the last 10 candles
rollingHigh10_periodsnumberCandles used for the 10 candle rolling high
rollingHigh20_valnumberHighest price seen over the last 20 candles
rollingHigh20_periodsnumberCandles used for the 20 candle rolling high
rollingHigh55_valnumberHighest price seen over the last 55 candles
rollingHigh55_periodsnumberCandles used for the 55 candle rolling high
rollingLow10_valnumberLowest price seen over the last 10 candles
rollingLow10_periodsnumberCandles used for the 10 candle rolling low
rollingLow20_valnumberLowest price seen over the last 20 candles
rollingLow20_periodsnumberCandles used for the 20 candle rolling low
rollingLow55_valnumberLowest price seen over the last 55 candles
rollingLow55_periodsnumberCandles used for the 55 candle rolling low
vwap_valnumberVolume weighted average price over whole days, each day weighted by what it traded
vwap_periodsnumberWhole days used for the volume weighted average price
rankPct20_valnumberShare of the last 20 candles that closed at or below the latest one, from 0 to 100
rankPct20_periodsnumberCandles used for the 20 candle rank
rankPct50_valnumberShare of the last 50 candles that closed at or below the latest one, from 0 to 100
rankPct50_periodsnumberCandles used for the 50 candle rank
<indicator>_periodsNeedednumberLookback a reading waits to fill, published with its periods only while it has no value; each new candle adds one to the periods

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "symbol": "BTC",
    "interval": "15m",
    "tComputed": 1785313279,
    "changePct_val": 1.9162513985504726,
    "changePct_periods": 48,
    "changePct9_val": -0.4218339107,
    "changePct9_periods": 9,
    "changePct12_val": 0.3671224885,
    "changePct12_periods": 12,
    "changePct25_val": 1.2884019226,
    "changePct25_periods": 25,
    "sma20_val": 63697.17930616253,
    "sma20_periods": 20,
    "sma50_val": 63411.90284412,
    "sma50_periods": 50,
    "sma200_val": 62884.31775093,
    "sma200_periods": 200,
    "ema9_val": 63740.22615508,
    "ema9_periods": 9,
    "ema21_val": 63719.44210771339,
    "ema21_periods": 21,
    "ema50_val": 63498.06612284,
    "ema50_periods": 50,
    "rsi9_val": 57.12,
    "rsi9_periods": 9,
    "rsi14_val": 54.35,
    "rsi14_periods": 14,
    "rsi21_val": 52.68,
    "rsi21_periods": 21,
    "atr7_val": 688.4419028841,
    "atr7_periods": 7,
    "atr14_val": 631.3883305255476,
    "atr14_periods": 14,
    "atr21_val": 602.7710664918,
    "atr21_periods": 21,
    "bollinger1sd_val": 63697.17930616253,
    "bollinger1sd_upper": 64208.25611396,
    "bollinger1sd_lower": 63186.10249836,
    "bollinger1sd_periods": 20,
    "bollinger2sd_val": 63697.17930616253,
    "bollinger2sd_upper": 64719.33291696,
    "bollinger2sd_lower": 62675.02569536,
    "bollinger2sd_periods": 20,
    "bollinger3sd_val": 63697.17930616253,
    "bollinger3sd_upper": 65230.40972236,
    "bollinger3sd_lower": 62163.94888996,
    "bollinger3sd_periods": 20,
    "macd_val": 133.7640765429413,
    "macd_signal": 101.91548688986005,
    "macd_histogram": 31.84858965,
    "macd_periods": 26,
    "macd535_val": 86.4429117733,
    "macd535_signal": 71.2205318841,
    "macd535_histogram": 15.22237989,
    "macd535_periods": 35,
    "rollingHigh10_val": 64180.55418822,
    "rollingHigh10_periods": 10,
    "rollingHigh20_val": 64394.42867907523,
    "rollingHigh20_periods": 20,
    "rollingHigh55_val": 65022.11930448,
    "rollingHigh55_periods": 55,
    "rollingLow10_val": 63188.30117744,
    "rollingLow10_periods": 10,
    "rollingLow20_val": 62965.47219655413,
    "rollingLow20_periods": 20,
    "rollingLow55_val": 61903.88512207,
    "rollingLow55_periods": 55,
    "rankPct20_val": 85,
    "rankPct50_val": 72
  }
}
PUBLIC · ASSETS

ดึงตัวชี้วัดหนึ่งรายการของสินทรัพย์

คืนค่าตัวชี้วัดทางเทคนิคที่คำนวณแล้วหนึ่งรายการของสินทรัพย์ โดยคำนวณจากแท่งเทียนราคา และใช้เฉพาะแท่งเทียนที่ปิดแล้วเท่านั้น เพื่อให้ค่าที่อ่านได้คงที่จนกว่าแท่งเทียนถัดไปจะปิด ไม่ใช่ทุกค่าที่จะมีให้ในทุกความยาวแท่งเทียน - ค่าที่ไม่มีให้จะถูกตัดออกจากคำตอบ และค่าที่ปรากฏแต่ละค่าจะระบุแท่งเทียนที่ใช้คำนวณ ค่าที่ตั้งชื่อตามช่วงย้อนหลัง เช่น ema50 จะไม่ปรากฏเช่นกันจนกว่าชุดข้อมูลจะมีแท่งเทียนครบตามจำนวนนั้น ระหว่างนั้นฟิลด์ periods จะนับแท่งเทียนที่มีอยู่แล้ว และฟิลด์ periodsNeeded จะระบุจำนวนที่ต้องการ

POST /asset/:symbol/indicator/:indicatorKey
Auth HMAC-SHA256 Rate limit 60 req/min URL params :symbol, :indicatorKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
symbolrequiredAsset symbol (e.g. BTC).
indicatorKeyrequiredIndicator to compute.
Trend
sma20 sma50 sma200 ema9 ema21 ema50
Momentum
rsi9 rsi14 rsi21
Convergence1s, 15m, 12h, 5d
macd macd535
Volatility
atr7 atr14 atr21 bollinger1sd bollinger2sd bollinger3sd
Range
rollingHigh10 rollingHigh20 rollingHigh55 rollingLow10 rollingLow20 rollingLow55
Change
changePct changePct9 changePct12 changePct25
Weighted price6h, 12h
vwap
Volume6h, 12h, 5d, 1M
relativeVolume10 relativeVolume20 relativeVolume50
Position in range
rankPct20 rankPct50

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/asset/BTC/indicator/rsi14" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"15m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.assets.indicator("BTC", "rsi14", { interval: "15m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

asset-indicators[":symbol"]
ฟิลด์ ประเภท คำอธิบาย
symbolstringAsset symbol
intervalstringLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w
tComputednumberUnix time of the calculation moment

ฟิลด์ต่อตัวชี้วัด

ตัวชี้วัดที่ร้องขอ ฟิลด์ในคำตอบ
changePctchangePct_val, changePct_periods
changePct9changePct9_val, changePct9_periods
changePct12changePct12_val, changePct12_periods
changePct25changePct25_val, changePct25_periods
sma20sma20_val, sma20_periods
sma50sma50_val, sma50_periods
sma200sma200_val, sma200_periods
ema9ema9_val, ema9_periods
ema21ema21_val, ema21_periods
ema50ema50_val, ema50_periods
rsi9rsi9_val, rsi9_periods
rsi14rsi14_val, rsi14_periods
rsi21rsi21_val, rsi21_periods
atr7atr7_val, atr7_periods
atr14atr14_val, atr14_periods
atr21atr21_val, atr21_periods
bollinger1sdbollinger1sd_val, bollinger1sd_upper, bollinger1sd_lower, bollinger1sd_periods
bollinger2sdbollinger2sd_val, bollinger2sd_upper, bollinger2sd_lower, bollinger2sd_periods
bollinger3sdbollinger3sd_val, bollinger3sd_upper, bollinger3sd_lower, bollinger3sd_periods
macdmacd_val, macd_signal, macd_histogram, macd_periods
macd535macd535_val, macd535_signal, macd535_histogram, macd535_periods
relativeVolume10relativeVolume10_val, relativeVolume10_periods
relativeVolume20relativeVolume20_val, relativeVolume20_periods
relativeVolume50relativeVolume50_val, relativeVolume50_periods
rollingHigh10rollingHigh10_val, rollingHigh10_periods
rollingHigh20rollingHigh20_val, rollingHigh20_periods
rollingHigh55rollingHigh55_val, rollingHigh55_periods
rollingLow10rollingLow10_val, rollingLow10_periods
rollingLow20rollingLow20_val, rollingLow20_periods
rollingLow55rollingLow55_val, rollingLow55_periods
vwapvwap_val, vwap_periods
rankPct20rankPct20_val
rankPct50rankPct50_val

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "symbol": "BTC",
    "interval": "15m",
    "tComputed": 1785313279,
    "rsi14_val": 54.35,
    "rsi14_periods": 14
  }
}
PUBLIC · ASSETS

แผนที่ช่วยเหลือของสินทรัพย์

คืนค่าแผนที่ JSON แบบมีโครงสร้างของทุกเอนด์พอยต์ในหมวดสินทรัพย์ - เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ รวมถึงกลุ่มฟิลด์ที่แต่ละเอนด์พอยต์คืนค่า มีประโยชน์สำหรับการตรวจสอบภายในของ SDK และเอเจนต์

GET /assets/help
Auth None Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/assets/help" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.assets.help();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ฟิลด์ ประเภท คำอธิบาย
success boolean ระบุว่าการเรียกสำเร็จหรือไม่
category string หมวดหมู่ที่แผนที่ช่วยเหลือนี้อธิบาย
help object คอนเทนเนอร์แผนที่ช่วยเหลือ paths จับคู่แต่ละพาธของเอนด์พอยต์เข้ากับเมทาดาต้าของตน (เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ สถานะ isListing เมื่อเกี่ยวข้อง และกลุ่มฟิลด์ที่อ้างอิงถึง) fieldGroups จับคู่แต่ละชื่อกลุ่มเข้ากับตัวอธิบายฟิลด์ของตน (ประเภทและคำอธิบาย) ที่ถูกอ้างอิงจากรายการพาธ

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "category": "assets",
  "help": {
    "paths": {
      "/assets/help": {
        "method": "GET",
        "description": "Returns this help map",
        "rateLimit": 30,
        "params": { "required": [], "optional": [] },
        "fieldGroups": []
      }
    },
    "fieldGroups": {}
  }
}
PUBLIC · EXCHANGES

ดึงรายการตลาดแลกเปลี่ยน

คืนค่าตลาดแลกเปลี่ยนที่ติดตามทั้งหมด พร้อมข้อมูลการจดทะเบียนแบบรวม ได้แก่ จำนวนสินทรัพย์และตลาด ปริมาณใน 24 ชั่วโมง คะแนนความน่าเชื่อถือและอันดับ ประเทศ ปีที่ก่อตั้ง ความสามารถ และส่วนแบ่งตลาด

POST /exchanges/list
Auth HMAC-SHA256 Rate limit 10 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchanges/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.list({ pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

items[]
ฟิลด์ประเภทคำอธิบาย
nrOfAssets / nrOfMarkets number Number of listed assets and trading pairs.
exchangeVolume24h number 24h trading volume in BTC.
trustScore / trustScoreRank / exchangeRank number Trust score (0-10) and ranks.
companyYear / companyCountry number / string Year established and country.
isCentralized / isActive boolean CEX/DEX flag and active flag.
dominance number Volume dominance percentage.

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "nrOfAssets": 350,
      "nrOfMarkets": 1500,
      "exchangeVolume24h": 250000,
      "trustScore": 9.5,
      "trustScoreRank": 1,
      "exchangeRank": 1,
      "companyYear": 2017,
      "companyCountry": "KY",
      "isCentralized": true,
      "isActive": true,
      "hasVolumeData": true,
      "hasTrustScore": true,
      "hasApiSupport": true,
      "dominance": 22.5
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · EXCHANGES

ดึงข้อมูลตลาดแลกเปลี่ยน

คืนค่ารายการข้อมูลของตลาดแลกเปลี่ยนเดียวตามคีย์ที่ระบุ มีรูปแบบเดียวกับรายการใน List Exchanges

GET /exchange/:exchangeKey
Auth HMAC-SHA256 Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/exchange/binance" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.get("binance");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange[":exchangeKey"]
ฟิลด์ ประเภท คำอธิบาย
nrOfAssetsnumberNumber of assets listed on exchange
nrOfMarketsnumberNumber of trading pairs on exchange
exchangeVolume24hnumber24h trading volume in BTC
trustScorenumberTrust score (0-10)
trustScoreRanknumberTrust score rank
exchangeRanknumberExchange rank
companyYearnumberYear the company was established
companyCountrystringCountry where exchange company is based
isCentralizedbooleanWhether exchange is centralized (CEX)
isActivebooleanWhether exchange is active
hasVolumeDatabooleanWhether volume data is available
hasTrustScorebooleanWhether trust score is available
hasApiSupportbooleanWhether exchange has API support
dominancenumberExchange volume dominance percentage

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "nrOfAssets": 350,
    "nrOfMarkets": 1500,
    "exchangeVolume24h": 250000,
    "trustScore": 9.5,
    "trustScoreRank": 1,
    "exchangeRank": 1,
    "companyYear": 2017,
    "companyCountry": "KY",
    "isCentralized": true,
    "isActive": true,
    "hasVolumeData": true,
    "hasTrustScore": true,
    "hasApiSupport": true,
    "dominance": 22.5
  }
}
PUBLIC · EXCHANGES

ดึงข้อมูลโปรไฟล์ตลาดแลกเปลี่ยน

คืนค่าโปรไฟล์ตลาดแลกเปลี่ยน (คำอธิบาย ลิงก์ แท็ก คะแนนจัดอันดับ ความสามารถ)

GET /exchange/:exchangeKey/profile
Auth HMAC-SHA256 Rate limit 30 req/min URL params :exchangeKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/exchange/binance/profile" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getProfile("binance");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-profile[":exchangeKey"]
ฟิลด์ ประเภท คำอธิบาย
descriptionstringExchange description
companyCountrystringCountry of company
companyYearnumberYear established
capabilitiesobjectCapability flags (spot/futures/margin/p2p/otc/staking)
urlsarrayArray of { key, value } url entries
tagsarrayArray of tag keys
ratingsarrayArray of { key, value } rating entries

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "description": "Binance is a global cryptocurrency exchange.",
    "companyCountry": "KY",
    "companyYear": 2017,
    "capabilities": {
      "spot": true,
      "futures": true,
      "margin": true,
      "p2p": true,
      "otc": true,
      "staking": true
    },
    "urls": [
      {
        "key": "website",
        "value": "https://binance.com"
      }
    ],
    "tags": [
      "cex",
      "global"
    ],
    "ratings": [
      {
        "key": "trustScore",
        "value": 9.5
      }
    ]
  }
}
PUBLIC · EXCHANGES

OHLC ปริมาณของตลาดแลกเปลี่ยน

คืนค่าชุดแท่งเทียน OHLC สำหรับตลาดแลกเปลี่ยน (ค่าเริ่มต้น aggVol ส่วน aggDom เป็นตัวเลือก)

POST /exchange/:exchangeKey/ohlc
Auth HMAC-SHA256 Rate limit 30 req/min URL params :exchangeKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
fieldstringoptionalSnapshotted field selector (e.g. aggLast or aggVol).
intervalstringoptionalLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M.
tOldestintegeroptionalOldest bin time, ms epoch (inclusive).
tNewestintegeroptionalNewest bin time, ms epoch (inclusive).

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/ohlc" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"5m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getOhlc("binance", { interval: "5m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-ohlc[":exchangeKey"]
ฟิลด์ ประเภท คำอธิบาย
exchangeKeystringExchange short key
fieldstringSnapshotted field: aggVol (default) or aggDom
intervalstringLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M
seriesarraySorted OHLC bins for the requested field
summaryobjectChange summary over the window

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "exchangeKey": "binance",
    "field": "aggVol",
    "interval": "5m",
    "series": [
      {
        "tOpen": 1700000100000,
        "tClose": 1700000400000,
        "open": 240000,
        "high": 252000,
        "low": 238000,
        "close": 250000,
        "volume": 250000
      },
      {
        "tOpen": 1700000400000,
        "tClose": 1700000700000,
        "open": 250000,
        "high": 268000,
        "low": 249000,
        "close": 265000,
        "volume": 265000
      }
    ],
    "summary": {
      "change_v": 25000,
      "change_p": 10.42
    }
  }
}
PUBLIC · EXCHANGES

ตลาดของตลาดแลกเปลี่ยน

คืนค่ารายการตลาดที่มีอยู่บนตลาดแลกเปลี่ยนที่ระบุ จำกัดขอบเขตไว้ที่ตลาดแลกเปลี่ยนนั้น รองรับการกรอง การเรียงลำดับ และการแบ่งหน้าแบบ cursor ผ่าน body

POST /exchange/:exchangeKey/markets/list
Auth HMAC-SHA256 Rate limit 10 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/markets/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.listMarkets("binance", { pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

items[]
ฟิลด์ประเภทคำอธิบาย
isActive boolean Whether the market is active on this venue.
lastPrice number Last traded price on this venue.
volume number 24h trading volume.
bidPrice / askPrice number Top of book bid / ask.

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "isActive": true,
      "lastPrice": 67234.5,
      "volume": 12500.5,
      "bidPrice": 67230,
      "askPrice": 67235
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · EXCHANGES

Ticker ของตลาดแลกเปลี่ยน

ข้อมูล ticker ของตลาดแยกตามตลาดแลกเปลี่ยน พร้อมข้อมูลราคาแบบเรียลไทม์ครบถ้วน ได้แก่ ราคาล่าสุด ราคาสูงสุด/ต่ำสุดใน 24 ชั่วโมง การเปลี่ยนแปลง ปริมาณ ราคาเสนอซื้อ/เสนอขาย และส่วนต่างราคา สำหรับทุกคู่เทรดบนตลาดแลกเปลี่ยนนั้น

POST /exchange/:exchangeKey/markets/tickers
Auth HMAC-SHA256 Rate limit 10 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/markets/tickers" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.listMarketsTickers("binance", { pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

items[]

แต่ละรายการประกอบด้วย marketKey, localPair, baseSymbol, quoteSymbol, lastPrice, highPrice24h, lowPrice24h, change, volume, bidPrice, askPrice, spread และ isActive

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "marketKey": "BTC_USDT",
      "localPair": "BTC_USDT",
      "baseSymbol": "BTC",
      "quoteSymbol": "USDT",
      "lastPrice": 67234.5,
      "highPrice24h": 68500,
      "lowPrice24h": 66800,
      "change": 1.23,
      "volume": 12500.5,
      "bidPrice": 67230,
      "askPrice": 67235,
      "spread": 5,
      "isActive": true
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · EXCHANGES

OHLC ของตลาดทั้งหมดบนตลาดแลกเปลี่ยน

คืนค่าแท่งเทียน OHLC ล่าสุดของแต่ละตลาดบนตลาดแลกเปลี่ยน

POST /exchange/:exchangeKey/markets/ohlc
Auth HMAC-SHA256 Rate limit 10 req/min Pagination URL params :exchangeKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M.
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/markets/ohlc" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50},"interval":"5m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getMarketsOhlc("binance", { pagination: { page: 1, limit: 50 }, interval: "5m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-market-ohlc-list[":marketKey"]
ฟิลด์ ประเภท คำอธิบาย
tOpennumberBin open time (ms epoch)
tClosenumberBin close time (ms epoch)
opennumberBin open price
highnumberBin high price
lownumberBin low price
closenumberBin close price
volumenumberBin aggregate volume

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "tOpen": 1700000000000,
      "tClose": 1700003600000,
      "open": 67200,
      "high": 67800,
      "low": 67000,
      "close": 67500,
      "volume": 12500.5
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · EXCHANGES

ขีดจำกัดตลาดบนตลาดแลกเปลี่ยน

คืนค่าขีดจำกัดตลาดแยกตามตลาดแลกเปลี่ยน (กฎการเทรด + ค่าธรรมเนียม)

POST /exchange/:exchangeKey/markets/limits
Auth HMAC-SHA256 Rate limit 10 req/min Pagination URL params :exchangeKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/markets/limits" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.listMarketsLimits("binance", { pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-market-limit[":marketKey"]
ฟิลด์ ประเภท คำอธิบาย
priceMinnumberMinimum price
priceMaxnumberMaximum price
priceTicknumberPrice tick size
quantityMinnumberMinimum quantity
quantityMaxnumberMaximum quantity
quantityTicknumberQuantity tick size
totalMinnumberMinimum notional
totalMaxnumberMaximum notional
feeMakernumberMaker fee rate
feeTakernumberTaker fee rate
feeIsTieredbooleanWhether fees are tiered

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "priceMin": 0.01,
      "priceMax": 1000000,
      "priceTick": 0.01,
      "quantityMin": 0.00001,
      "quantityMax": 9000,
      "quantityTick": 0.00001,
      "totalMin": 5,
      "totalMax": 9000000,
      "feeMaker": 0.001,
      "feeTaker": 0.001,
      "feeIsTiered": true
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · EXCHANGES

ดึงข้อมูลตลาดบนตลาดแลกเปลี่ยน

คืนค่าตลาดเดียวสำหรับตลาดแลกเปลี่ยนที่ระบุ

GET /exchange/:exchangeKey/market/:marketKey
Auth HMAC-SHA256 Rate limit 30 req/min URL params :exchangeKey, :marketKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).
marketKeyrequiredGlobal market pair in BASE_QUOTE form (e.g. BTC_USDT).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/exchange/binance/market/BTC_USDT" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getMarket("binance", "BTC_USDT");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchangeMarket[":marketKey"]
ฟิลด์ ประเภท คำอธิบาย
isActivebooleanWhether market is active
lastPricenumberLast traded price
volumenumber24h trading volume
bidPricenumberCurrent bid price
askPricenumberCurrent ask price

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "isActive": true,
    "lastPrice": 67234.5,
    "volume": 12500.5,
    "bidPrice": 67230,
    "askPrice": 67235
  }
}
PUBLIC · EXCHANGES

Ticker ของตลาดบนตลาดแลกเปลี่ยน

คืนค่า ticker ของตลาดเดียวบนตลาดแลกเปลี่ยน

GET /exchange/:exchangeKey/market/:marketKey/ticker
Auth HMAC-SHA256 Rate limit 30 req/min URL params :exchangeKey, :marketKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).
marketKeyrequiredGlobal market pair in BASE_QUOTE form (e.g. BTC_USDT).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/exchange/binance/market/BTC_USDT/ticker" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getMarketTicker("binance", "BTC_USDT");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-market-ticker[":marketKey"]
ฟิลด์ ประเภท คำอธิบาย
marketKeystringGlobal pair symbol
localPairstringLocal pair on exchange
baseSymbolstringBase symbol
quoteSymbolstringQuote symbol
lastPricenumberLast traded price
highPrice24hnumber24h high
lowPrice24hnumber24h low
changenumber24h price change
volumenumber24h volume
bidPricenumberCurrent bid price
askPricenumberCurrent ask price
spreadnumberBid/ask spread
isActivebooleanWhether market is active

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "marketKey": "BTC_USDT",
    "localPair": "BTC_USDT",
    "baseSymbol": "BTC",
    "quoteSymbol": "USDT",
    "lastPrice": 67234.5,
    "highPrice24h": 68500,
    "lowPrice24h": 66800,
    "change": 1.23,
    "volume": 12500.5,
    "bidPrice": 67230,
    "askPrice": 67235,
    "spread": 5,
    "isActive": true
  }
}
PUBLIC · EXCHANGES

โปรไฟล์ตลาดบนตลาดแลกเปลี่ยน

คืนค่าเมทาดาต้าโปรไฟล์ของตลาดเดียวบนตลาดแลกเปลี่ยน (แท็ก + สถานะ)

GET /exchange/:exchangeKey/market/:marketKey/profile
Auth HMAC-SHA256 Rate limit 30 req/min URL params :exchangeKey, :marketKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).
marketKeyrequiredGlobal market pair in BASE_QUOTE form (e.g. BTC_USDT).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/exchange/binance/market/BTC_USDT/profile" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getMarketProfile("binance", "BTC_USDT");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-market-profile[":marketKey"]
ฟิลด์ ประเภท คำอธิบาย
localPairstringLocal pair on exchange
baseSymbolstringBase symbol
quoteSymbolstringQuote symbol
globalPairstringGlobal pair symbol
isListedbooleanWhether market is listed
isActivebooleanWhether market is active
openTradingbooleanTrading enabled
openApiTradingbooleanAPI trading enabled
limitsFetchedOnnumberLast limit fetch timestamp (ms epoch)
tagsarrayArray of tag keys

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "localPair": "BTC_USDT",
    "baseSymbol": "BTC",
    "quoteSymbol": "USDT",
    "globalPair": "BTC_USDT",
    "isListed": true,
    "isActive": true,
    "openTrading": true,
    "openApiTrading": true,
    "limitsFetchedOn": 1700000000000,
    "tags": [
      "spot",
      "major"
    ]
  }
}
PUBLIC · EXCHANGES

OHLC ของตลาดบนตลาดแลกเปลี่ยน

คืนค่าชุด OHLC สำหรับตลาดเดียวบนตลาดแลกเปลี่ยน (lastPrice)

POST /exchange/:exchangeKey/market/:marketKey/ohlc
Auth HMAC-SHA256 Rate limit 30 req/min URL params :exchangeKey, :marketKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).
marketKeyrequiredGlobal market pair in BASE_QUOTE form (e.g. BTC_USDT).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M.
tOldestintegeroptionalOldest bin time, ms epoch (inclusive).
tNewestintegeroptionalNewest bin time, ms epoch (inclusive).

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/market/BTC_USDT/ohlc" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"5m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getMarketOhlc("binance", "BTC_USDT", { interval: "5m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-market-ohlc[":marketKey"]
ฟิลด์ ประเภท คำอธิบาย
exchangeKeystringExchange short key
marketKeystringGlobal pair symbol
intervalstringLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M
seriesarraySorted OHLC bins on lastPrice
summaryobjectChange summary over the window

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "exchangeKey": "binance",
    "marketKey": "BTC_USDT",
    "interval": "5m",
    "series": [
      {
        "tOpen": 1700000100000,
        "tClose": 1700000400000,
        "open": 67200,
        "high": 67450,
        "low": 67150,
        "close": 67400,
        "volume": 8120.4
      },
      {
        "tOpen": 1700000400000,
        "tClose": 1700000700000,
        "open": 67400,
        "high": 67800,
        "low": 67350,
        "close": 67700,
        "volume": 9340.2
      }
    ],
    "summary": {
      "change_v": 500,
      "change_p": 0.74
    }
  }
}
PUBLIC · EXCHANGES

สินทรัพย์ของตลาดแลกเปลี่ยน

คืนค่าสินทรัพย์ที่จดทะเบียนบนตลาดแลกเปลี่ยนที่ระบุ

POST /exchange/:exchangeKey/assets/list
Auth HMAC-SHA256 Rate limit 10 req/min Pagination URL params :exchangeKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/assets/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.listAssets("binance", { pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchangeAsset[":assetKey"]
ฟิลด์ ประเภท คำอธิบาย
symbolstringAsset symbol
depositEnabledbooleanWhether deposits are enabled
withdrawEnabledbooleanWhether withdrawals are enabled
tradingEnabledbooleanWhether trading is enabled

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "symbol": "BTC",
      "depositEnabled": true,
      "withdrawEnabled": true,
      "tradingEnabled": true
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · EXCHANGES

Ticker ของสินทรัพย์บนตลาดแลกเปลี่ยน

คืนค่าข้อมูล ticker ของสินทรัพย์แยกตามตลาดแลกเปลี่ยน พร้อมข้อมูลราคาแบบเรียลไทม์ (แบ่งหน้า)

POST /exchange/:exchangeKey/assets/tickers
Auth HMAC-SHA256 Rate limit 10 req/min Pagination URL params :exchangeKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/assets/tickers" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.listAssetsTickers("binance", { pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-asset-ticker[":assetKey"]
ฟิลด์ ประเภท คำอธิบาย
assetKeystringGlobal asset symbol
localSymbolstringLocal symbol on exchange
lastPricenumberLatest aggregated price
priceQuotestringQuote currency of lastPrice
volume24hnumber24h aggregated volume
change24hnumber24h price change percentage
dominancenumberMarket dominance share

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "assetKey": "BTC",
      "localSymbol": "BTC",
      "lastPrice": 67234.5,
      "priceQuote": "USDT",
      "volume24h": 12500.5,
      "change24h": 1.23,
      "dominance": 52.4
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · EXCHANGES

ขีดจำกัดสินทรัพย์บนตลาดแลกเปลี่ยน

คืนค่าขีดจำกัดสินทรัพย์แยกตามตลาดแลกเปลี่ยน (ความละเอียด + ขอบเขตคำสั่ง/ฝาก/ถอน + ค่าธรรมเนียม)

POST /exchange/:exchangeKey/assets/limits
Auth HMAC-SHA256 Rate limit 10 req/min Pagination URL params :exchangeKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/assets/limits" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.listAssetsLimits("binance", { pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-asset-limit[":assetKey"]
ฟิลด์ ประเภท คำอธิบาย
precisionnumberDecimal precision
orderMinnumberMinimum order size
orderMaxnumberMaximum order size
depositMinnumberMinimum deposit amount
depositMaxnumberMaximum deposit amount
withdrawalMinnumberMinimum withdrawal amount
withdrawalMaxnumberMaximum withdrawal amount
withdrawFeenumberWithdrawal fee
depositEnabledbooleanWhether deposits are enabled
withdrawEnabledbooleanWhether withdrawals are enabled
tradingEnabledbooleanWhether trading is enabled

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "precision": 8,
      "orderMin": 0.00001,
      "orderMax": 9000,
      "depositMin": 0.0001,
      "depositMax": 1000000,
      "withdrawalMin": 0.001,
      "withdrawalMax": 100,
      "withdrawFee": 0.0005,
      "depositEnabled": true,
      "withdrawEnabled": true,
      "tradingEnabled": true
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · EXCHANGES

ดึงข้อมูลสินทรัพย์บนตลาดแลกเปลี่ยน

คืนค่าสินทรัพย์เดียวสำหรับตลาดแลกเปลี่ยนที่ระบุ

GET /exchange/:exchangeKey/asset/:assetKey
Auth HMAC-SHA256 Rate limit 30 req/min URL params :exchangeKey, :assetKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).
assetKeyrequiredGlobal asset symbol (e.g. BTC).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/exchange/binance/asset/BTC" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getAsset("binance", "BTC");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchangeAsset[":assetKey"]
ฟิลด์ ประเภท คำอธิบาย
symbolstringAsset symbol
depositEnabledbooleanWhether deposits are enabled
withdrawEnabledbooleanWhether withdrawals are enabled
tradingEnabledbooleanWhether trading is enabled

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "symbol": "BTC",
    "depositEnabled": true,
    "withdrawEnabled": true,
    "tradingEnabled": true
  }
}
PUBLIC · EXCHANGES

โปรไฟล์สินทรัพย์บนตลาดแลกเปลี่ยน

คืนค่าเมทาดาต้าโปรไฟล์ของสินทรัพย์เดียวบนตลาดแลกเปลี่ยน (แท็ก + สถานะ)

GET /exchange/:exchangeKey/asset/:assetKey/profile
Auth HMAC-SHA256 Rate limit 30 req/min URL params :exchangeKey, :assetKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).
assetKeyrequiredGlobal asset symbol (e.g. BTC).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/exchange/binance/asset/BTC/profile" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getAssetProfile("binance", "BTC");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-asset-profile[":assetKey"]
ฟิลด์ ประเภท คำอธิบาย
localSymbolstringLocal symbol on exchange
localNamestringLocal display name
isListedbooleanWhether asset is currently listed
depositEnabledbooleanDeposits enabled
withdrawEnabledbooleanWithdrawals enabled
tradingEnabledbooleanTrading enabled
precisionnumberDecimal precision
limitsFetchedOnnumberLast limit fetch timestamp (ms epoch)
isWarningbooleanWarning flag
tagsarrayArray of tag keys

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "localSymbol": "BTC",
    "localName": "Bitcoin",
    "isListed": true,
    "depositEnabled": true,
    "withdrawEnabled": true,
    "tradingEnabled": true,
    "precision": 8,
    "limitsFetchedOn": 1700000000000,
    "isWarning": false,
    "tags": [
      "major"
    ]
  }
}
PUBLIC · EXCHANGES

OHLC ของสินทรัพย์บนตลาดแลกเปลี่ยน

คืนค่าชุด OHLC สำหรับสินทรัพย์เดียวบนตลาดแลกเปลี่ยน (aggLast)

POST /exchange/:exchangeKey/asset/:assetKey/ohlc
Auth HMAC-SHA256 Rate limit 30 req/min URL params :exchangeKey, :assetKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).
assetKeyrequiredGlobal asset symbol (e.g. BTC).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M.
tOldestintegeroptionalOldest bin time, ms epoch (inclusive).
tNewestintegeroptionalNewest bin time, ms epoch (inclusive).

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/asset/BTC/ohlc" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"5m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getAssetOhlc("binance", "BTC", { interval: "5m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-asset-ohlc[":assetKey"]
ฟิลด์ ประเภท คำอธิบาย
exchangeKeystringExchange short key
assetKeystringGlobal asset symbol
intervalstringLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M
seriesarraySorted OHLC bins on aggLast
summaryobjectChange summary over the window

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "exchangeKey": "binance",
    "assetKey": "BTC",
    "interval": "5m",
    "series": [
      {
        "tOpen": 1700000100000,
        "tClose": 1700000400000,
        "open": 67200,
        "high": 67450,
        "low": 67150,
        "close": 67400,
        "volume": 8120.4
      },
      {
        "tOpen": 1700000400000,
        "tClose": 1700000700000,
        "open": 67400,
        "high": 67800,
        "low": 67350,
        "close": 67700,
        "volume": 9340.2
      }
    ],
    "summary": {
      "change_v": 500,
      "change_p": 0.74
    }
  }
}
PUBLIC · EXCHANGES

ดึงตัวชี้วัดทั้งหมดของสินทรัพย์บนตลาดแลกเปลี่ยน

คืนค่าตัวชี้วัดทางเทคนิคที่คำนวณแล้วทั้งหมดของสินทรัพย์บนตลาดแลกเปลี่ยนหนึ่งแห่ง โดยคำนวณจากแท่งเทียนราคา และใช้เฉพาะแท่งเทียนที่ปิดแล้วเท่านั้น เพื่อให้ค่าที่อ่านได้คงที่จนกว่าแท่งเทียนถัดไปจะปิด ไม่ใช่ทุกค่าที่จะมีให้ในทุกความยาวแท่งเทียน - ค่าที่ไม่มีให้จะถูกตัดออกจากคำตอบ และค่าที่ปรากฏแต่ละค่าจะระบุแท่งเทียนที่ใช้คำนวณ ค่าที่ตั้งชื่อตามช่วงย้อนหลัง เช่น ema50 จะไม่ปรากฏเช่นกันจนกว่าชุดข้อมูลจะมีแท่งเทียนครบตามจำนวนนั้น ระหว่างนั้นฟิลด์ periods จะนับแท่งเทียนที่มีอยู่แล้ว และฟิลด์ periodsNeeded จะระบุจำนวนที่ต้องการ

POST /exchange/:exchangeKey/asset/:assetKey/indicators
Auth HMAC-SHA256 Rate limit 30 req/min URL params :exchangeKey, :assetKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).
assetKeyrequiredGlobal asset symbol (e.g. BTC).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/asset/BTC/indicators" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"15m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getAssetIndicators("binance", "BTC", { interval: "15m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-asset-indicators[":assetKey"]
ฟิลด์ ประเภท คำอธิบาย
exchangeKeystringExchange short key
assetKeystringGlobal asset symbol
intervalstringLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w
tComputednumberUnix time of the calculation moment
changePct_valnumberPercentage change between the first and last candle of the window
changePct_periodsnumberCandles used for the change percentage
changePct9_valnumberPercentage change over the last 9 candles
changePct9_periodsnumberCandles used for the 9 candle change percentage
changePct12_valnumberPercentage change over the last 12 candles
changePct12_periodsnumberCandles used for the 12 candle change percentage
changePct25_valnumberPercentage change over the last 25 candles
changePct25_periodsnumberCandles used for the 25 candle change percentage
sma20_valnumberSimple moving average of the candle closes, over 20 candles
sma20_periodsnumberCandles used for the 20 candle simple moving average
sma50_valnumberSimple moving average of the candle closes, over 50 candles
sma50_periodsnumberCandles used for the 50 candle simple moving average
sma200_valnumberSimple moving average of the candle closes, over 200 candles, the long trend line
sma200_periodsnumberCandles used for the 200 candle simple moving average
ema9_valnumberExponential moving average of the candle closes, over 9 candles
ema9_periodsnumberCandles used for the 9 candle exponential moving average
ema21_valnumberExponential moving average of the candle closes, over 21 candles
ema21_periodsnumberCandles used for the 21 candle exponential moving average
ema50_valnumberExponential moving average of the candle closes, over 50 candles
ema50_periodsnumberCandles used for the 50 candle exponential moving average
rsi9_valnumberFast relative strength index between 0 and 100, over 9 candles
rsi9_periodsnumberCandles used for the fast relative strength index
rsi14_valnumberRelative strength index between 0 and 100, over 14 candles
rsi14_periodsnumberCandles used for the relative strength index
rsi21_valnumberSlow relative strength index between 0 and 100, over 21 candles
rsi21_periodsnumberCandles used for the slow relative strength index
atr7_valnumberAverage true range over 7 candles
atr7_periodsnumberCandles used for the 7 candle average true range
atr14_valnumberAverage true range over 14 candles
atr14_periodsnumberCandles used for the 14 candle average true range
atr21_valnumberAverage true range over 21 candles
atr21_periodsnumberCandles used for the 21 candle average true range
bollinger1sd_valnumberBollinger middle band over 20 candles, the simple average of the recent closes
bollinger1sd_uppernumberBollinger upper band, the middle band plus one standard deviation
bollinger1sd_lowernumberBollinger lower band, the middle band minus one standard deviation
bollinger1sd_periodsnumberCandles used for the bollinger bands
bollinger2sd_valnumberBollinger middle band over 20 candles, the simple average of the recent closes
bollinger2sd_uppernumberBollinger upper band, the middle band plus two standard deviations
bollinger2sd_lowernumberBollinger lower band, the middle band minus two standard deviations
bollinger2sd_periodsnumberCandles used for the bollinger bands
bollinger3sd_valnumberBollinger middle band over 20 candles, the simple average of the recent closes
bollinger3sd_uppernumberBollinger upper band, the middle band plus three standard deviations
bollinger3sd_lowernumberBollinger lower band, the middle band minus three standard deviations
bollinger3sd_periodsnumberCandles used for the bollinger bands
macd_valnumberMoving average convergence divergence line, using 12, 26 and 9 candles
macd_signalnumberSignal line of the convergence divergence indicator
macd_histogramnumberDistance between the convergence divergence line and its signal line
macd_periodsnumberCandles used for the convergence divergence indicator
macd535_valnumberMoving average convergence divergence line, using 5, 35 and 5 candles
macd535_signalnumberSignal line of the 5, 35 and 5 convergence divergence indicator
macd535_histogramnumberDistance between the 5, 35 and 5 convergence divergence line and its signal line
macd535_periodsnumberCandles used for the 5, 35 and 5 convergence divergence indicator
relativeVolume10_valnumberLatest daily volume reading against the average of the previous 10 readings, where one means the usual pace
relativeVolume10_periodsnumberReadings used for the 10 reading relative volume
relativeVolume20_valnumberLatest daily volume reading against the average of the previous 20 readings, where one means the usual pace
relativeVolume20_periodsnumberReadings used for the 20 reading relative volume
relativeVolume50_valnumberLatest daily volume reading against the average of the previous 50 readings, where one means the usual pace
relativeVolume50_periodsnumberReadings used for the 50 reading relative volume
rollingHigh10_valnumberHighest price seen over the last 10 candles
rollingHigh10_periodsnumberCandles used for the 10 candle rolling high
rollingHigh20_valnumberHighest price seen over the last 20 candles
rollingHigh20_periodsnumberCandles used for the 20 candle rolling high
rollingHigh55_valnumberHighest price seen over the last 55 candles
rollingHigh55_periodsnumberCandles used for the 55 candle rolling high
rollingLow10_valnumberLowest price seen over the last 10 candles
rollingLow10_periodsnumberCandles used for the 10 candle rolling low
rollingLow20_valnumberLowest price seen over the last 20 candles
rollingLow20_periodsnumberCandles used for the 20 candle rolling low
rollingLow55_valnumberLowest price seen over the last 55 candles
rollingLow55_periodsnumberCandles used for the 55 candle rolling low
vwap_valnumberVolume weighted average price over whole days, each day weighted by what it traded
vwap_periodsnumberWhole days used for the volume weighted average price
rankPct20_valnumberShare of the last 20 candles that closed at or below the latest one, from 0 to 100
rankPct20_periodsnumberCandles used for the 20 candle rank
rankPct50_valnumberShare of the last 50 candles that closed at or below the latest one, from 0 to 100
rankPct50_periodsnumberCandles used for the 50 candle rank
<indicator>_periodsNeedednumberLookback a reading waits to fill, published with its periods only while it has no value; each new candle adds one to the periods

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "exchangeKey": "binance",
    "assetKey": "BTC",
    "interval": "15m",
    "tComputed": 1785313279,
    "changePct_val": 1.9162513985504726,
    "changePct_periods": 48,
    "changePct9_val": -0.4218339107,
    "changePct9_periods": 9,
    "changePct12_val": 0.3671224885,
    "changePct12_periods": 12,
    "changePct25_val": 1.2884019226,
    "changePct25_periods": 25,
    "sma20_val": 63697.17930616253,
    "sma20_periods": 20,
    "sma50_val": 63411.90284412,
    "sma50_periods": 50,
    "sma200_val": 62884.31775093,
    "sma200_periods": 200,
    "ema9_val": 63740.22615508,
    "ema9_periods": 9,
    "ema21_val": 63719.44210771339,
    "ema21_periods": 21,
    "ema50_val": 63498.06612284,
    "ema50_periods": 50,
    "rsi9_val": 57.12,
    "rsi9_periods": 9,
    "rsi14_val": 54.35,
    "rsi14_periods": 14,
    "rsi21_val": 52.68,
    "rsi21_periods": 21,
    "atr7_val": 688.4419028841,
    "atr7_periods": 7,
    "atr14_val": 631.3883305255476,
    "atr14_periods": 14,
    "atr21_val": 602.7710664918,
    "atr21_periods": 21,
    "bollinger1sd_val": 63697.17930616253,
    "bollinger1sd_upper": 64208.25611396,
    "bollinger1sd_lower": 63186.10249836,
    "bollinger1sd_periods": 20,
    "bollinger2sd_val": 63697.17930616253,
    "bollinger2sd_upper": 64719.33291696,
    "bollinger2sd_lower": 62675.02569536,
    "bollinger2sd_periods": 20,
    "bollinger3sd_val": 63697.17930616253,
    "bollinger3sd_upper": 65230.40972236,
    "bollinger3sd_lower": 62163.94888996,
    "bollinger3sd_periods": 20,
    "macd_val": 133.7640765429413,
    "macd_signal": 101.91548688986005,
    "macd_histogram": 31.84858965,
    "macd_periods": 26,
    "macd535_val": 86.4429117733,
    "macd535_signal": 71.2205318841,
    "macd535_histogram": 15.22237989,
    "macd535_periods": 35,
    "rollingHigh10_val": 64180.55418822,
    "rollingHigh10_periods": 10,
    "rollingHigh20_val": 64394.42867907523,
    "rollingHigh20_periods": 20,
    "rollingHigh55_val": 65022.11930448,
    "rollingHigh55_periods": 55,
    "rollingLow10_val": 63188.30117744,
    "rollingLow10_periods": 10,
    "rollingLow20_val": 62965.47219655413,
    "rollingLow20_periods": 20,
    "rollingLow55_val": 61903.88512207,
    "rollingLow55_periods": 55,
    "rankPct20_val": 85,
    "rankPct50_val": 72
  }
}
PUBLIC · EXCHANGES

ดึงตัวชี้วัดหนึ่งรายการของสินทรัพย์บนตลาดแลกเปลี่ยน

คืนค่าตัวชี้วัดทางเทคนิคที่คำนวณแล้วหนึ่งรายการของสินทรัพย์บนตลาดแลกเปลี่ยนหนึ่งแห่ง โดยคำนวณจากแท่งเทียนราคา และใช้เฉพาะแท่งเทียนที่ปิดแล้วเท่านั้น เพื่อให้ค่าที่อ่านได้คงที่จนกว่าแท่งเทียนถัดไปจะปิด ไม่ใช่ทุกค่าที่จะมีให้ในทุกความยาวแท่งเทียน - ค่าที่ไม่มีให้จะถูกตัดออกจากคำตอบ และค่าที่ปรากฏแต่ละค่าจะระบุแท่งเทียนที่ใช้คำนวณ ค่าที่ตั้งชื่อตามช่วงย้อนหลัง เช่น ema50 จะไม่ปรากฏเช่นกันจนกว่าชุดข้อมูลจะมีแท่งเทียนครบตามจำนวนนั้น ระหว่างนั้นฟิลด์ periods จะนับแท่งเทียนที่มีอยู่แล้ว และฟิลด์ periodsNeeded จะระบุจำนวนที่ต้องการ

POST /exchange/:exchangeKey/asset/:assetKey/indicator/:indicatorKey
Auth HMAC-SHA256 Rate limit 60 req/min URL params :exchangeKey, :assetKey, :indicatorKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).
assetKeyrequiredGlobal asset symbol (e.g. BTC).
indicatorKeyrequiredIndicator to compute.
Trend
sma20 sma50 sma200 ema9 ema21 ema50
Momentum
rsi9 rsi14 rsi21
Convergence1s, 15m, 12h, 5d
macd macd535
Volatility
atr7 atr14 atr21 bollinger1sd bollinger2sd bollinger3sd
Range
rollingHigh10 rollingHigh20 rollingHigh55 rollingLow10 rollingLow20 rollingLow55
Change
changePct changePct9 changePct12 changePct25
Weighted price6h, 12h
vwap
Volume6h, 12h, 5d, 1M
relativeVolume10 relativeVolume20 relativeVolume50
Position in range
rankPct20 rankPct50

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/asset/BTC/indicator/rsi14" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"15m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getAssetIndicator("binance", "BTC", "rsi14", { interval: "15m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-asset-indicators[":assetKey"]
ฟิลด์ ประเภท คำอธิบาย
exchangeKeystringExchange short key
assetKeystringGlobal asset symbol
intervalstringLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w
tComputednumberUnix time of the calculation moment

ฟิลด์ต่อตัวชี้วัด

ตัวชี้วัดที่ร้องขอ ฟิลด์ในคำตอบ
changePctchangePct_val, changePct_periods
changePct9changePct9_val, changePct9_periods
changePct12changePct12_val, changePct12_periods
changePct25changePct25_val, changePct25_periods
sma20sma20_val, sma20_periods
sma50sma50_val, sma50_periods
sma200sma200_val, sma200_periods
ema9ema9_val, ema9_periods
ema21ema21_val, ema21_periods
ema50ema50_val, ema50_periods
rsi9rsi9_val, rsi9_periods
rsi14rsi14_val, rsi14_periods
rsi21rsi21_val, rsi21_periods
atr7atr7_val, atr7_periods
atr14atr14_val, atr14_periods
atr21atr21_val, atr21_periods
bollinger1sdbollinger1sd_val, bollinger1sd_upper, bollinger1sd_lower, bollinger1sd_periods
bollinger2sdbollinger2sd_val, bollinger2sd_upper, bollinger2sd_lower, bollinger2sd_periods
bollinger3sdbollinger3sd_val, bollinger3sd_upper, bollinger3sd_lower, bollinger3sd_periods
macdmacd_val, macd_signal, macd_histogram, macd_periods
macd535macd535_val, macd535_signal, macd535_histogram, macd535_periods
relativeVolume10relativeVolume10_val, relativeVolume10_periods
relativeVolume20relativeVolume20_val, relativeVolume20_periods
relativeVolume50relativeVolume50_val, relativeVolume50_periods
rollingHigh10rollingHigh10_val, rollingHigh10_periods
rollingHigh20rollingHigh20_val, rollingHigh20_periods
rollingHigh55rollingHigh55_val, rollingHigh55_periods
rollingLow10rollingLow10_val, rollingLow10_periods
rollingLow20rollingLow20_val, rollingLow20_periods
rollingLow55rollingLow55_val, rollingLow55_periods
vwapvwap_val, vwap_periods
rankPct20rankPct20_val
rankPct50rankPct50_val

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "exchangeKey": "binance",
    "assetKey": "BTC",
    "interval": "15m",
    "tComputed": 1785313279,
    "rsi14_val": 54.35,
    "rsi14_periods": 14
  }
}
PUBLIC · EXCHANGES

ดึงตัวชี้วัดทั้งหมดของตลาดบนตลาดแลกเปลี่ยน

คืนค่าตัวชี้วัดทางเทคนิคที่คำนวณแล้วทั้งหมดของตลาดบนตลาดแลกเปลี่ยนหนึ่งแห่ง โดยคำนวณจากแท่งเทียนราคา และใช้เฉพาะแท่งเทียนที่ปิดแล้วเท่านั้น เพื่อให้ค่าที่อ่านได้คงที่จนกว่าแท่งเทียนถัดไปจะปิด ไม่ใช่ทุกค่าที่จะมีให้ในทุกความยาวแท่งเทียน - ค่าที่ไม่มีให้จะถูกตัดออกจากคำตอบ และค่าที่ปรากฏแต่ละค่าจะระบุแท่งเทียนที่ใช้คำนวณ ค่าที่ตั้งชื่อตามช่วงย้อนหลัง เช่น ema50 จะไม่ปรากฏเช่นกันจนกว่าชุดข้อมูลจะมีแท่งเทียนครบตามจำนวนนั้น ระหว่างนั้นฟิลด์ periods จะนับแท่งเทียนที่มีอยู่แล้ว และฟิลด์ periodsNeeded จะระบุจำนวนที่ต้องการ

POST /exchange/:exchangeKey/market/:marketKey/indicators
Auth HMAC-SHA256 Rate limit 30 req/min URL params :exchangeKey, :marketKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).
marketKeyrequiredGlobal market pair in BASE_QUOTE form (e.g. BTC_USDT).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/market/BTC_USDT/indicators" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"15m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getMarketIndicators("binance", "BTC_USDT", { interval: "15m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-market-indicators[":marketKey"]
ฟิลด์ ประเภท คำอธิบาย
exchangeKeystringExchange short key
marketKeystringGlobal market pair key
intervalstringLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w
tComputednumberUnix time of the calculation moment
changePct_valnumberPercentage change between the first and last candle of the window
changePct_periodsnumberCandles used for the change percentage
changePct9_valnumberPercentage change over the last 9 candles
changePct9_periodsnumberCandles used for the 9 candle change percentage
changePct12_valnumberPercentage change over the last 12 candles
changePct12_periodsnumberCandles used for the 12 candle change percentage
changePct25_valnumberPercentage change over the last 25 candles
changePct25_periodsnumberCandles used for the 25 candle change percentage
sma20_valnumberSimple moving average of the candle closes, over 20 candles
sma20_periodsnumberCandles used for the 20 candle simple moving average
sma50_valnumberSimple moving average of the candle closes, over 50 candles
sma50_periodsnumberCandles used for the 50 candle simple moving average
sma200_valnumberSimple moving average of the candle closes, over 200 candles, the long trend line
sma200_periodsnumberCandles used for the 200 candle simple moving average
ema9_valnumberExponential moving average of the candle closes, over 9 candles
ema9_periodsnumberCandles used for the 9 candle exponential moving average
ema21_valnumberExponential moving average of the candle closes, over 21 candles
ema21_periodsnumberCandles used for the 21 candle exponential moving average
ema50_valnumberExponential moving average of the candle closes, over 50 candles
ema50_periodsnumberCandles used for the 50 candle exponential moving average
rsi9_valnumberFast relative strength index between 0 and 100, over 9 candles
rsi9_periodsnumberCandles used for the fast relative strength index
rsi14_valnumberRelative strength index between 0 and 100, over 14 candles
rsi14_periodsnumberCandles used for the relative strength index
rsi21_valnumberSlow relative strength index between 0 and 100, over 21 candles
rsi21_periodsnumberCandles used for the slow relative strength index
atr7_valnumberAverage true range over 7 candles
atr7_periodsnumberCandles used for the 7 candle average true range
atr14_valnumberAverage true range over 14 candles
atr14_periodsnumberCandles used for the 14 candle average true range
atr21_valnumberAverage true range over 21 candles
atr21_periodsnumberCandles used for the 21 candle average true range
bollinger1sd_valnumberBollinger middle band over 20 candles, the simple average of the recent closes
bollinger1sd_uppernumberBollinger upper band, the middle band plus one standard deviation
bollinger1sd_lowernumberBollinger lower band, the middle band minus one standard deviation
bollinger1sd_periodsnumberCandles used for the bollinger bands
bollinger2sd_valnumberBollinger middle band over 20 candles, the simple average of the recent closes
bollinger2sd_uppernumberBollinger upper band, the middle band plus two standard deviations
bollinger2sd_lowernumberBollinger lower band, the middle band minus two standard deviations
bollinger2sd_periodsnumberCandles used for the bollinger bands
bollinger3sd_valnumberBollinger middle band over 20 candles, the simple average of the recent closes
bollinger3sd_uppernumberBollinger upper band, the middle band plus three standard deviations
bollinger3sd_lowernumberBollinger lower band, the middle band minus three standard deviations
bollinger3sd_periodsnumberCandles used for the bollinger bands
macd_valnumberMoving average convergence divergence line, using 12, 26 and 9 candles
macd_signalnumberSignal line of the convergence divergence indicator
macd_histogramnumberDistance between the convergence divergence line and its signal line
macd_periodsnumberCandles used for the convergence divergence indicator
macd535_valnumberMoving average convergence divergence line, using 5, 35 and 5 candles
macd535_signalnumberSignal line of the 5, 35 and 5 convergence divergence indicator
macd535_histogramnumberDistance between the 5, 35 and 5 convergence divergence line and its signal line
macd535_periodsnumberCandles used for the 5, 35 and 5 convergence divergence indicator
relativeVolume10_valnumberLatest daily volume reading against the average of the previous 10 readings, where one means the usual pace
relativeVolume10_periodsnumberReadings used for the 10 reading relative volume
relativeVolume20_valnumberLatest daily volume reading against the average of the previous 20 readings, where one means the usual pace
relativeVolume20_periodsnumberReadings used for the 20 reading relative volume
relativeVolume50_valnumberLatest daily volume reading against the average of the previous 50 readings, where one means the usual pace
relativeVolume50_periodsnumberReadings used for the 50 reading relative volume
rollingHigh10_valnumberHighest price seen over the last 10 candles
rollingHigh10_periodsnumberCandles used for the 10 candle rolling high
rollingHigh20_valnumberHighest price seen over the last 20 candles
rollingHigh20_periodsnumberCandles used for the 20 candle rolling high
rollingHigh55_valnumberHighest price seen over the last 55 candles
rollingHigh55_periodsnumberCandles used for the 55 candle rolling high
rollingLow10_valnumberLowest price seen over the last 10 candles
rollingLow10_periodsnumberCandles used for the 10 candle rolling low
rollingLow20_valnumberLowest price seen over the last 20 candles
rollingLow20_periodsnumberCandles used for the 20 candle rolling low
rollingLow55_valnumberLowest price seen over the last 55 candles
rollingLow55_periodsnumberCandles used for the 55 candle rolling low
vwap_valnumberVolume weighted average price over whole days, each day weighted by what it traded
vwap_periodsnumberWhole days used for the volume weighted average price
rankPct20_valnumberShare of the last 20 candles that closed at or below the latest one, from 0 to 100
rankPct20_periodsnumberCandles used for the 20 candle rank
rankPct50_valnumberShare of the last 50 candles that closed at or below the latest one, from 0 to 100
rankPct50_periodsnumberCandles used for the 50 candle rank
<indicator>_periodsNeedednumberLookback a reading waits to fill, published with its periods only while it has no value; each new candle adds one to the periods

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "exchangeKey": "binance",
    "marketKey": "BTC/USDT",
    "interval": "15m",
    "tComputed": 1785313279,
    "changePct_val": 1.9162513985504726,
    "changePct_periods": 48,
    "changePct9_val": -0.4218339107,
    "changePct9_periods": 9,
    "changePct12_val": 0.3671224885,
    "changePct12_periods": 12,
    "changePct25_val": 1.2884019226,
    "changePct25_periods": 25,
    "sma20_val": 63697.17930616253,
    "sma20_periods": 20,
    "sma50_val": 63411.90284412,
    "sma50_periods": 50,
    "sma200_val": 62884.31775093,
    "sma200_periods": 200,
    "ema9_val": 63740.22615508,
    "ema9_periods": 9,
    "ema21_val": 63719.44210771339,
    "ema21_periods": 21,
    "ema50_val": 63498.06612284,
    "ema50_periods": 50,
    "rsi9_val": 57.12,
    "rsi9_periods": 9,
    "rsi14_val": 54.35,
    "rsi14_periods": 14,
    "rsi21_val": 52.68,
    "rsi21_periods": 21,
    "atr7_val": 688.4419028841,
    "atr7_periods": 7,
    "atr14_val": 631.3883305255476,
    "atr14_periods": 14,
    "atr21_val": 602.7710664918,
    "atr21_periods": 21,
    "bollinger1sd_val": 63697.17930616253,
    "bollinger1sd_upper": 64208.25611396,
    "bollinger1sd_lower": 63186.10249836,
    "bollinger1sd_periods": 20,
    "bollinger2sd_val": 63697.17930616253,
    "bollinger2sd_upper": 64719.33291696,
    "bollinger2sd_lower": 62675.02569536,
    "bollinger2sd_periods": 20,
    "bollinger3sd_val": 63697.17930616253,
    "bollinger3sd_upper": 65230.40972236,
    "bollinger3sd_lower": 62163.94888996,
    "bollinger3sd_periods": 20,
    "macd_val": 133.7640765429413,
    "macd_signal": 101.91548688986005,
    "macd_histogram": 31.84858965,
    "macd_periods": 26,
    "macd535_val": 86.4429117733,
    "macd535_signal": 71.2205318841,
    "macd535_histogram": 15.22237989,
    "macd535_periods": 35,
    "rollingHigh10_val": 64180.55418822,
    "rollingHigh10_periods": 10,
    "rollingHigh20_val": 64394.42867907523,
    "rollingHigh20_periods": 20,
    "rollingHigh55_val": 65022.11930448,
    "rollingHigh55_periods": 55,
    "rollingLow10_val": 63188.30117744,
    "rollingLow10_periods": 10,
    "rollingLow20_val": 62965.47219655413,
    "rollingLow20_periods": 20,
    "rollingLow55_val": 61903.88512207,
    "rollingLow55_periods": 55,
    "rankPct20_val": 85,
    "rankPct50_val": 72
  }
}
PUBLIC · EXCHANGES

ดึงตัวชี้วัดหนึ่งรายการของตลาดบนตลาดแลกเปลี่ยน

คืนค่าตัวชี้วัดทางเทคนิคที่คำนวณแล้วหนึ่งรายการของตลาดบนตลาดแลกเปลี่ยนหนึ่งแห่ง โดยคำนวณจากแท่งเทียนราคา และใช้เฉพาะแท่งเทียนที่ปิดแล้วเท่านั้น เพื่อให้ค่าที่อ่านได้คงที่จนกว่าแท่งเทียนถัดไปจะปิด ไม่ใช่ทุกค่าที่จะมีให้ในทุกความยาวแท่งเทียน - ค่าที่ไม่มีให้จะถูกตัดออกจากคำตอบ และค่าที่ปรากฏแต่ละค่าจะระบุแท่งเทียนที่ใช้คำนวณ ค่าที่ตั้งชื่อตามช่วงย้อนหลัง เช่น ema50 จะไม่ปรากฏเช่นกันจนกว่าชุดข้อมูลจะมีแท่งเทียนครบตามจำนวนนั้น ระหว่างนั้นฟิลด์ periods จะนับแท่งเทียนที่มีอยู่แล้ว และฟิลด์ periodsNeeded จะระบุจำนวนที่ต้องการ

POST /exchange/:exchangeKey/market/:marketKey/indicator/:indicatorKey
Auth HMAC-SHA256 Rate limit 60 req/min URL params :exchangeKey, :marketKey, :indicatorKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
exchangeKeyrequiredExchange key (e.g. binance, kraken, coinbase).
marketKeyrequiredGlobal market pair in BASE_QUOTE form (e.g. BTC_USDT).
indicatorKeyrequiredIndicator to compute.
Trend
sma20 sma50 sma200 ema9 ema21 ema50
Momentum
rsi9 rsi14 rsi21
Convergence1s, 15m, 12h, 5d
macd macd535
Volatility
atr7 atr14 atr21 bollinger1sd bollinger2sd bollinger3sd
Range
rollingHigh10 rollingHigh20 rollingHigh55 rollingLow10 rollingLow20 rollingLow55
Change
changePct changePct9 changePct12 changePct25
Weighted price6h, 12h
vwap
Volume6h, 12h, 5d, 1M
relativeVolume10 relativeVolume20 relativeVolume50
Position in range
rankPct20 rankPct50

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/exchange/binance/market/BTC_USDT/indicator/rsi14" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"15m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.getMarketIndicator("binance", "BTC_USDT", "rsi14", { interval: "15m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

exchange-market-indicators[":marketKey"]
ฟิลด์ ประเภท คำอธิบาย
exchangeKeystringExchange short key
marketKeystringGlobal market pair key
intervalstringLength of one candle: 1m, 5m, 15m, 1h, 4h, 1d or 1w
tComputednumberUnix time of the calculation moment

ฟิลด์ต่อตัวชี้วัด

ตัวชี้วัดที่ร้องขอ ฟิลด์ในคำตอบ
changePctchangePct_val, changePct_periods
changePct9changePct9_val, changePct9_periods
changePct12changePct12_val, changePct12_periods
changePct25changePct25_val, changePct25_periods
sma20sma20_val, sma20_periods
sma50sma50_val, sma50_periods
sma200sma200_val, sma200_periods
ema9ema9_val, ema9_periods
ema21ema21_val, ema21_periods
ema50ema50_val, ema50_periods
rsi9rsi9_val, rsi9_periods
rsi14rsi14_val, rsi14_periods
rsi21rsi21_val, rsi21_periods
atr7atr7_val, atr7_periods
atr14atr14_val, atr14_periods
atr21atr21_val, atr21_periods
bollinger1sdbollinger1sd_val, bollinger1sd_upper, bollinger1sd_lower, bollinger1sd_periods
bollinger2sdbollinger2sd_val, bollinger2sd_upper, bollinger2sd_lower, bollinger2sd_periods
bollinger3sdbollinger3sd_val, bollinger3sd_upper, bollinger3sd_lower, bollinger3sd_periods
macdmacd_val, macd_signal, macd_histogram, macd_periods
macd535macd535_val, macd535_signal, macd535_histogram, macd535_periods
relativeVolume10relativeVolume10_val, relativeVolume10_periods
relativeVolume20relativeVolume20_val, relativeVolume20_periods
relativeVolume50relativeVolume50_val, relativeVolume50_periods
rollingHigh10rollingHigh10_val, rollingHigh10_periods
rollingHigh20rollingHigh20_val, rollingHigh20_periods
rollingHigh55rollingHigh55_val, rollingHigh55_periods
rollingLow10rollingLow10_val, rollingLow10_periods
rollingLow20rollingLow20_val, rollingLow20_periods
rollingLow55rollingLow55_val, rollingLow55_periods
vwapvwap_val, vwap_periods
rankPct20rankPct20_val
rankPct50rankPct50_val

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "exchangeKey": "binance",
    "marketKey": "BTC/USDT",
    "interval": "15m",
    "tComputed": 1785313279,
    "rsi14_val": 54.35,
    "rsi14_periods": 14
  }
}
PUBLIC · EXCHANGES

แผนที่ช่วยเหลือของตลาดแลกเปลี่ยน

คืนค่าแผนที่ JSON แบบมีโครงสร้างของทุกเอนด์พอยต์ในหมวดตลาดแลกเปลี่ยน - เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ รวมถึงกลุ่มฟิลด์ที่แต่ละเอนด์พอยต์คืนค่า มีประโยชน์สำหรับการตรวจสอบภายในของ SDK และเอเจนต์

GET /exchanges/help
Auth None Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/exchanges/help" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.exchanges.help();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ฟิลด์ ประเภท คำอธิบาย
success boolean ระบุว่าการเรียกสำเร็จหรือไม่
category string หมวดหมู่ที่แผนที่ช่วยเหลือนี้อธิบาย
help object คอนเทนเนอร์แผนที่ช่วยเหลือ paths จับคู่แต่ละพาธของเอนด์พอยต์เข้ากับเมทาดาต้าของตน (เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ สถานะ isListing เมื่อเกี่ยวข้อง และกลุ่มฟิลด์ที่อ้างอิงถึง) fieldGroups จับคู่แต่ละชื่อกลุ่มเข้ากับตัวอธิบายฟิลด์ของตน (ประเภทและคำอธิบาย) ที่ถูกอ้างอิงจากรายการพาธ

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "category": "exchanges",
  "help": {
    "paths": {
      "/exchanges/help": {
        "method": "GET",
        "description": "Returns this help map",
        "rateLimit": 30,
        "params": { "required": [], "optional": [] },
        "fieldGroups": []
      }
    },
    "fieldGroups": {}
  }
}
PUBLIC · CHAINS

ดึงรายการเชน

คืนค่ารายการเครือข่ายบล็อกเชนทั้งหมดที่แพลตฟอร์มติดตาม พร้อมข้อมูลการจดทะเบียนแบบรวม รองรับการกรอง การเรียงลำดับ และการแบ่งหน้าแบบ cursor

POST /chains/list
Auth HMAC-SHA256 Rate limit 10 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/chains/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.list({ pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

chain[":chainId"]
ฟิลด์ ประเภท คำอธิบาย
namestringChain name
nativeTokenstringNative token symbol
iconstringChain icon URL
tvlnumberTotal value locked
chainIdnumberChain identifier

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "name": "Ethereum",
      "nativeToken": "ETH",
      "icon": "https://cdn.example.com/chains/ethereum.png",
      "tvl": 45000000000,
      "chainId": 1
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · CHAINS

ดึงข้อมูลเชน

คืนค่าเชนเดียวตามรหัสเชน

GET /chain/:chainId
Auth HMAC-SHA256 Rate limit 30 req/min URL params :chainId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
chainIdrequiredChain identifier (e.g. ethereum, polygon, base).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/chain/ethereum" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.get("ethereum");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

chain[":chainId"]
ฟิลด์ ประเภท คำอธิบาย
namestringChain name
nativeTokenstringNative token symbol
iconstringChain icon URL
tvlnumberTotal value locked
chainIdnumberChain identifier

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "name": "Ethereum",
    "nativeToken": "ETH",
    "icon": "https://cdn.example.com/chains/ethereum.png",
    "tvl": 45000000000,
    "chainId": 1
  }
}
PUBLIC · CHAINS

โปรไฟล์เชน

คืนค่าโปรไฟล์เชน (คำอธิบาย ลิงก์ แท็ก คะแนนจัดอันดับ)

GET /chain/:chainId/profile
Auth HMAC-SHA256 Rate limit 30 req/min URL params :chainId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
chainIdrequiredChain identifier (e.g. ethereum, polygon, base).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/chain/ethereum/profile" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.getProfile("ethereum");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

chain-profile[":chainId"]
ฟิลด์ ประเภท คำอธิบาย
descriptionstringChain description
urlsarrayArray of { key, value } url entries
tagsarrayArray of tag keys
ratingsarrayArray of { key, value } rating entries

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "description": "Ethereum is a decentralized smart contract platform.",
    "urls": [
      {
        "key": "website",
        "value": "https://ethereum.org"
      },
      {
        "key": "explorer",
        "value": "https://etherscan.io"
      }
    ],
    "tags": [
      "layer-1",
      "evm",
      "pos"
    ],
    "ratings": [
      {
        "key": "cmcRank",
        "value": 2
      }
    ]
  }
}
PUBLIC · CHAINS

ราคาแก๊ส

คืนค่าราคาแก๊สปัจจุบันของทุกเชนที่รองรับในชุดข้อมูลเดียว ใช้สำหรับตัวเลือกค่าธรรมเนียมหรือชั้นการจัดเส้นทางแบบหลายเชน

GET /chains/gas-prices/list
Auth HMAC-SHA256 Rate limit 10 req/min Pagination

เอนด์พอยต์ที่เกี่ยวข้อง

ราคาต่อเชน: POST /v1/chain/gas-price/:chainId รูปแบบเดียวกัน แต่จำกัดขอบเขตไว้ที่เชนเดียว

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/chains/gas-prices/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.listGasPrices();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

gas[":chainId"]
ฟิลด์ ประเภท คำอธิบาย
gasPricenumberCurrent gas price
gasPriceGweinumberGas price in gwei
gasPriceWeistringGas price in wei (raw)
baseFeestringBase fee (raw wei or gwei)
baseFeeGweinumberBase fee in gwei
priorityFeenumberPriority fee (tip)
priorityFeeGweinumberPriority fee in gwei
safeGasPricenumberSafe/slow gas price recommendation
proposeGasPricenumberProposed/average gas price recommendation
fastGasPricenumberFast gas price recommendation
gasCostUsdnumberGas cost in USD
gasQuoteRatenumberNative token to USD exchange rate
blockNumbernumberCurrent block number
timestampnumberMeasurement timestamp (unix)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "gasPrice": 32,
      "gasPriceGwei": 32,
      "gasPriceWei": "32000000000",
      "baseFee": "28000000000",
      "baseFeeGwei": 28,
      "priorityFee": 2,
      "priorityFeeGwei": 2,
      "safeGasPrice": 28,
      "proposeGasPrice": 32,
      "fastGasPrice": 38,
      "gasCostUsd": 1.45,
      "gasQuoteRate": 3500,
      "blockNumber": 18900000,
      "timestamp": 1700000000
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · CHAINS

ราคาแก๊สของเชน (รายการเดียว)

คืนค่าราคาแก๊สของเชนที่ระบุ

GET /chain/:chainId/gas-price
Auth HMAC-SHA256 Rate limit 30 req/min URL params :chainId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
chainIdrequiredChain identifier (e.g. ethereum, polygon, base).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/chain/ethereum/gas-price" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.getGasPrice("ethereum");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

gas[":chainId"]
ฟิลด์ ประเภท คำอธิบาย
gasPricenumberCurrent gas price
gasPriceGweinumberGas price in gwei
gasPriceWeistringGas price in wei (raw)
baseFeestringBase fee (raw wei or gwei)
baseFeeGweinumberBase fee in gwei
priorityFeenumberPriority fee (tip)
priorityFeeGweinumberPriority fee in gwei
safeGasPricenumberSafe/slow gas price recommendation
proposeGasPricenumberProposed/average gas price recommendation
fastGasPricenumberFast gas price recommendation
gasCostUsdnumberGas cost in USD
gasQuoteRatenumberNative token to USD exchange rate
blockNumbernumberCurrent block number
timestampnumberMeasurement timestamp (unix)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "gasPrice": 32,
    "gasPriceGwei": 32,
    "gasPriceWei": "32000000000",
    "baseFee": "28000000000",
    "baseFeeGwei": 28,
    "priorityFee": 2,
    "priorityFeeGwei": 2,
    "safeGasPrice": 28,
    "proposeGasPrice": 32,
    "fastGasPrice": 38,
    "gasCostUsd": 1.45,
    "gasQuoteRate": 3500,
    "blockNumber": 18900000,
    "timestamp": 1700000000
  }
}
PUBLIC · CHAINS

OHLC ราคาแก๊สของเชน

คืนค่าชุดแท่งเทียน OHLC สำหรับราคาแก๊สของเชน

POST /chain/:chainId/gas-ohlc
Auth HMAC-SHA256 Rate limit 30 req/min URL params :chainId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
chainIdrequiredChain identifier (e.g. ethereum, polygon, base).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M.
tOldestintegeroptionalOldest bin time, ms epoch (inclusive).
tNewestintegeroptionalNewest bin time, ms epoch (inclusive).

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/chain/ethereum/gas-ohlc" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"5m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.getGasOhlc("ethereum", { interval: "5m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

chain-gas-ohlc[":chainId"]
ฟิลด์ ประเภท คำอธิบาย
chainKeystringChain short key (e.g. eth)
intervalstringLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M
seriesarraySorted OHLC bins on gasPrice
summaryobjectChange summary over the window

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "chainKey": "ethereum",
    "interval": "5m",
    "series": [
      {
        "tOpen": 1700000100000,
        "tClose": 1700000400000,
        "open": 30,
        "high": 34,
        "low": 29,
        "close": 32,
        "volume": 155
      },
      {
        "tOpen": 1700000400000,
        "tClose": 1700000700000,
        "open": 32,
        "high": 36,
        "low": 31,
        "close": 35,
        "volume": 168
      }
    ],
    "summary": {
      "change_v": 5,
      "change_p": 16.67
    }
  }
}
PUBLIC · CHAINS

โทเคนของเชน

คืนค่ารายการโทเคนของเชนที่ระบุ รวมถึงเมทาดาต้ารูปแบบ ERC-20 รองรับการกรอง การเรียงลำดับ และการแบ่งหน้าแบบ cursor

POST /chain/:chainId/tokens
Auth HMAC-SHA256 Rate limit 10 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

เอนด์พอยต์ที่เกี่ยวข้อง

โทเคนรายการเดียว: POST /v1/chain/:chainId/token/:tokenAddress
ผู้ถือครอง: POST /v1/chain/:chainId/token/:tokenAddress/holders
การโอน: POST /v1/chain/:chainId/token/:tokenAddress/transfers
พอร์ตกระเป๋าเงิน: POST /v1/chain/:chainId/wallet/:walletAddress/portfolio

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/chain/ethereum/tokens" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.listTokens("ethereum", { pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

token[":tokenAddress"]
ฟิลด์ ประเภท คำอธิบาย
circulatingSupplynumberCirculating supply
holderCountnumberNumber of token holders
priceUsdnumberCurrent token price in USD
volumeUsd24hnumber24h trading volume in USD
marketCapUsdnumberMarket capitalization in USD
verifiedbooleanWhether token contract is verified

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "circulatingSupply": 1000000000,
      "holderCount": 250000,
      "priceUsd": 1,
      "volumeUsd24h": 5000000000,
      "marketCapUsd": 1000000000,
      "verified": true
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · CHAINS

ดึงข้อมูลโทเคน

คืนค่าข้อมูลรายละเอียดของโทเคนที่ระบุบนเชน

GET /chain/:chainId/token/:tokenAddress
Auth HMAC-SHA256 Rate limit 30 req/min URL params :chainId, :tokenAddress

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
chainIdrequiredChain identifier (e.g. ethereum, polygon, base).
tokenAddressrequiredToken contract address (chain-specific format).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/chain/ethereum/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.getToken("ethereum", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

token[":tokenAddress"]
ฟิลด์ ประเภท คำอธิบาย
circulatingSupplynumberCirculating supply
holderCountnumberNumber of token holders
priceUsdnumberCurrent token price in USD
volumeUsd24hnumber24h trading volume in USD
marketCapUsdnumberMarket capitalization in USD
verifiedbooleanWhether token contract is verified

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "circulatingSupply": 1000000000,
    "holderCount": 250000,
    "priceUsd": 1,
    "volumeUsd24h": 5000000000,
    "marketCapUsd": 1000000000,
    "verified": true
  }
}
PUBLIC · CHAINS

ผู้ถือครองโทเคน

คืนค่ารายชื่อผู้ถือครองของโทเคนที่ระบุ

POST /chain/:chainId/token/:tokenAddress/holders
Auth HMAC-SHA256 Rate limit 10 req/min Pagination URL params :chainId, :tokenAddress

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
chainIdrequiredChain identifier (e.g. ethereum, polygon, base).
tokenAddressrequiredToken contract address (chain-specific format).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/chain/ethereum/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/holders" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.listTokenHolders("ethereum", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", { pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

holder[":holderAddress"]
ฟิลด์ ประเภท คำอธิบาย
balancestringRaw balance held
balanceFormattednumberHuman-readable balance
balanceUsdnumberUSD value of holdings
percentageOfSupplynumberPercentage of total supply held

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "balance": "5000000000000000000",
      "balanceFormatted": 5,
      "balanceUsd": 17500,
      "percentageOfSupply": 0.0005
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · CHAINS

ดึงข้อมูลผู้ถือครองโทเคน

คืนค่ารายละเอียดของผู้ถือครองโทเคนที่ระบุ

GET /chain/:chainId/token/:tokenAddress/holder/:holderAddress
Auth HMAC-SHA256 Rate limit 30 req/min URL params :chainId, :tokenAddress, :holderAddress

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
chainIdrequiredChain identifier (e.g. ethereum, polygon, base).
tokenAddressrequiredToken contract address (chain-specific format).
holderAddressrequiredToken holder wallet address.

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/chain/ethereum/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/holder/0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.getTokenHolder("ethereum", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

holder[":holderAddress"]
ฟิลด์ ประเภท คำอธิบาย
balancestringRaw balance held
balanceFormattednumberHuman-readable balance
balanceUsdnumberUSD value of holdings
percentageOfSupplynumberPercentage of total supply held

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "balance": "5000000000000000000",
    "balanceFormatted": 5,
    "balanceUsd": 17500,
    "percentageOfSupply": 0.0005
  }
}
PUBLIC · CHAINS

การโอนโทเคน

คืนค่าประวัติการโอนของโทเคนที่ระบุ

POST /chain/:chainId/token/:tokenAddress/transfers
Auth HMAC-SHA256 Rate limit 10 req/min Pagination URL params :chainId, :tokenAddress

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
chainIdrequiredChain identifier (e.g. ethereum, polygon, base).
tokenAddressrequiredToken contract address (chain-specific format).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/chain/ethereum/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/transfers" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.listTokenTransfers("ethereum", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", { pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

transfer[":txHash"]
ฟิลด์ ประเภท คำอธิบาย
fromAddressstringSender address
toAddressstringRecipient address
valuestringTransfer amount in smallest unit (raw)
valueFormattednumberHuman-readable transfer amount
valueUsdnumberUSD value of transfer
gasSpentnumberGas consumed
gasFeeUsdnumberGas fee in USD
successfulbooleanTransaction success status
timestampnumberTransfer timestamp (unix)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "fromAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "toAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "value": "1000000000000000000",
      "valueFormatted": 1,
      "valueUsd": 3500,
      "gasSpent": 21000,
      "gasFeeUsd": 1.45,
      "successful": true,
      "timestamp": 1700000000
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · CHAINS

ดึงข้อมูลการโอนโทเคน

คืนค่ารายละเอียดของการโอนโทเคนที่ระบุ

GET /chain/:chainId/token/:tokenAddress/transfer/:txHash
Auth HMAC-SHA256 Rate limit 30 req/min URL params :chainId, :tokenAddress, :txHash

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
chainIdrequiredChain identifier (e.g. ethereum, polygon, base).
tokenAddressrequiredToken contract address (chain-specific format).
txHashrequiredTransaction hash on the chain.

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/chain/ethereum/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/transfer/0x1234abcd5678ef901234567890abcdef1234567890abcdef1234567890abcdef" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.getTokenTransfer("ethereum", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x1234abcd5678ef901234567890abcdef1234567890abcdef1234567890abcdef");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

transfer[":txHash"]
ฟิลด์ ประเภท คำอธิบาย
fromAddressstringSender address
toAddressstringRecipient address
valuestringTransfer amount in smallest unit (raw)
valueFormattednumberHuman-readable transfer amount
valueUsdnumberUSD value of transfer
gasSpentnumberGas consumed
gasFeeUsdnumberGas fee in USD
successfulbooleanTransaction success status
timestampnumberTransfer timestamp (unix)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "fromAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "toAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "value": "1000000000000000000",
    "valueFormatted": 1,
    "valueUsd": 3500,
    "gasSpent": 21000,
    "gasFeeUsd": 1.45,
    "successful": true,
    "timestamp": 1700000000
  }
}
PUBLIC · CHAINS

พอร์ตกระเป๋าเงิน

คืนค่ายอดคงเหลือพอร์ตของกระเป๋าเงินบนเชน

GET /chain/:chainId/wallet/:walletAddress/portfolio
Auth HMAC-SHA256 Rate limit 10 req/min URL params :chainId, :walletAddress

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
chainIdrequiredChain identifier (e.g. ethereum, polygon, base).
walletAddressrequiredWallet address (chain-specific format).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/chain/ethereum/wallet/0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1/portfolio" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.getWalletPortfolio("ethereum", "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

walletPortfolio[":walletAddress"]
ฟิลด์ ประเภท คำอธิบาย
totalBalanceUsdnumberTotal portfolio value in USD
totalTokenCountnumberTotal number of tokens held

โครงสร้างการตอบกลับ

walletPortfolio[":walletAddress"].tokens[0]
ฟิลด์ ประเภท คำอธิบาย
balancestringToken raw balance
balanceUsdnumberToken balance in USD
priceUsdnumberToken price in USD

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "totalBalanceUsd": 25000,
    "totalTokenCount": 12,
    "tokens": [
      {
        "balance": "5000000000000000000",
        "balanceUsd": 17500,
        "priceUsd": 3500
      }
    ]
  }
}
PUBLIC · CHAINS

ยอดคงเหลือโทเคนในกระเป๋าเงิน

คืนค่ายอดคงเหลือของโทเคนที่ระบุในกระเป๋าเงิน

GET /chain/:chainId/wallet/:walletAddress/balance/:tokenAddress
Auth HMAC-SHA256 Rate limit 30 req/min URL params :chainId, :walletAddress, :tokenAddress

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
chainIdrequiredChain identifier (e.g. ethereum, polygon, base).
walletAddressrequiredWallet address (chain-specific format).
tokenAddressrequiredToken contract address (chain-specific format).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/chain/ethereum/wallet/0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1/balance/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.getWalletBalance("ethereum", "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

walletBalance[":walletAddress"][":tokenAddress"]
ฟิลด์ ประเภท คำอธิบาย
balancestringRaw token balance
balanceFormattednumberHuman-readable balance
balanceUsdnumberUSD value of balance
priceUsdnumberCurrent token price in USD
priceUsd24hnumberToken price 24h ago in USD
nativeTokenbooleanWhether this is the native gas token
isSpambooleanWhether token is suspected spam

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "balance": "5000000000000000000",
    "balanceFormatted": 5,
    "balanceUsd": 17500,
    "priceUsd": 3500,
    "priceUsd24h": 3450,
    "nativeToken": true,
    "isSpam": false
  }
}
PUBLIC · CHAINS

แผนที่ช่วยเหลือของเชน

คืนค่าแผนที่ JSON แบบมีโครงสร้างของทุกเอนด์พอยต์ในหมวดเชน - เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ รวมถึงกลุ่มฟิลด์ที่แต่ละเอนด์พอยต์คืนค่า มีประโยชน์สำหรับการตรวจสอบภายในของ SDK และเอเจนต์

GET /chains/help
Auth None Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/chains/help" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.chains.help();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ฟิลด์ ประเภท คำอธิบาย
success boolean ระบุว่าการเรียกสำเร็จหรือไม่
category string หมวดหมู่ที่แผนที่ช่วยเหลือนี้อธิบาย
help object คอนเทนเนอร์แผนที่ช่วยเหลือ paths จับคู่แต่ละพาธของเอนด์พอยต์เข้ากับเมทาดาต้าของตน (เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ สถานะ isListing เมื่อเกี่ยวข้อง และกลุ่มฟิลด์ที่อ้างอิงถึง) fieldGroups จับคู่แต่ละชื่อกลุ่มเข้ากับตัวอธิบายฟิลด์ของตน (ประเภทและคำอธิบาย) ที่ถูกอ้างอิงจากรายการพาธ

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "category": "blockchain",
  "help": {
    "paths": {
      "/chains/help": {
        "method": "GET",
        "description": "Returns this help map",
        "rateLimit": 30,
        "params": { "required": [], "optional": [] },
        "fieldGroups": []
      }
    },
    "fieldGroups": {}
  }
}
PUBLIC · MACRO

ดึงรายการประเภทตัวชี้วัดมหภาค

คืนค่าประเภทตัวชี้วัดมหภาคทั้งหมดที่แพลตฟอร์มติดตาม (เช่น อัตราดอกเบี้ยอ้างอิง ดัชนีความผันผวน) ใช้คีย์ macroType ที่ได้รับร่วมกับเอนด์พอยต์ค่าและ OHLC ด้านล่าง

GET /macro/types
Auth HMAC-SHA256 Rate limit 30 req/min Pagination

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/macro/types" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.macro.listTypes();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

macro-type[":key"]
ฟิลด์ ประเภท คำอธิบาย
keystringMacro type identifier
labelstringHuman-readable type label
descriptionstringType description
paramsarrayRequired parameters for value lookup
ohlcParamsarrayRequired parameters for OHLC
additionalFieldsarrayType-specific output fields beyond country/date/value/isLatest

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "label": "Inflation Rate",
      "description": "Year-over-year change in CPI",
      "params": [
        "country"
      ],
      "ohlcParams": [
        "country"
      ],
      "additionalFields": [
        "inflationIndex"
      ]
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · MACRO

ค่าตัวชี้วัดมหภาค

คืนค่าล่าสุดของประเภทตัวชี้วัดมหภาคที่ระบุ (เช่น reference-rates) ใช้เอนด์พอยต์รายการเพื่อดูประเภทที่มีให้ใช้งาน

POST /macro/values/:macroType
Auth HMAC-SHA256 Rate limit 10 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/macro/values/policy_rate" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.macro.listValues("policy_rate", { pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

macro-value[":country"]
ฟิลด์ ประเภท คำอธิบาย
countrystringCountry code the observation belongs to
valuenumberType-specific numeric value
datestringObservation date (YYYY-MM-DD)
isLatestbooleanWhether this is the most recent observation
centralBankKeystringCentral bank identifier (policyRate only)
inflationIndexnumberCPI index value (inflationRate only)
currencystringCurrency code (moneySupply only)
scalestringScale indicator (moneySupply only)
maturitystringMaturity period (bondYield only)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "value": 3.2,
      "date": "2026-04-30",
      "isLatest": true,
      "centralBankKey": "FED",
      "inflationIndex": 312.4,
      "currency": "USD",
      "scale": "billions",
      "maturity": "10Y"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PUBLIC · MACRO

ดึงค่าตัวชี้วัดมหภาค

คืนค่าตัวชี้วัดมหภาคล่าสุดสำหรับประเทศเดียว (bondYield ต้องระบุ maturity เพิ่มเติมด้วย)

POST /macro/value/:macroType
Auth HMAC-SHA256 Rate limit 30 req/min URL params :macroType

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
macroTyperequiredMacro indicator type key (see List Macro Types).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
countrystringrequiredCountry code the observation belongs to (e.g. US, TR, DE).
maturitystringoptionalBond maturity period (e.g. 2Y, 10Y). Required for bondYield only.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/macro/value/policy_rate" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"country":"YOUR_COUNTRY"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.macro.getValue("policy_rate", { country: "YOUR_COUNTRY" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

macro-value[":country"]
ฟิลด์ ประเภท คำอธิบาย
countrystringCountry code the observation belongs to
valuenumberType-specific numeric value
datestringObservation date (YYYY-MM-DD)
isLatestbooleanWhether this is the most recent observation
centralBankKeystringCentral bank identifier (policyRate only)
inflationIndexnumberCPI index value (inflationRate only)
currencystringCurrency code (moneySupply only)
scalestringScale indicator (moneySupply only)
maturitystringMaturity period (bondYield only)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "value": 3.2,
    "date": "2026-04-30",
    "isLatest": true,
    "centralBankKey": "FED",
    "inflationIndex": 312.4,
    "currency": "USD",
    "scale": "billions",
    "maturity": "10Y"
  }
}
PUBLIC · MACRO

OHLC ของตัวชี้วัดมหภาค

คืนค่าชุดแท่งเทียน OHLC สำหรับประเภทตัวชี้วัดมหภาค ใช้พารามิเตอร์มาตรฐานใน body ได้แก่ timeframe, tOldest, tNewest

POST /macro/ohlc/:macroType
Auth HMAC-SHA256 Rate limit 30 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
countrystringrequiredCountry code the observation belongs to (e.g. US, TR, DE).
intervalstringoptionalLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M.
tOldestintegeroptionalOldest bin time, ms epoch (inclusive).
tNewestintegeroptionalNewest bin time, ms epoch (inclusive).

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/macro/ohlc/policy_rate" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"country":"TR","interval":"5m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.macro.getOhlc("policy_rate", { interval: "5m", country: "TR" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

macro-ohlc[":macroType"]
ฟิลด์ ประเภท คำอธิบาย
macroTypestringMacro type the series belongs to
countrystringCountry code the series belongs to
summaryobjectAggregate change summary over the window
intervalstringLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M
seriesarrayOHLC bars: {tOpen, tClose, open, high, low, close}. For sparse macro observations the bar is degenerate (open = high = low = close = value).

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "macroType": "policy_rate",
    "country": "TR",
    "interval": "5m",
    "series": [
      {
        "tOpen": 1698796800000,
        "tClose": 1698796800000,
        "open": 3.1,
        "high": 3.1,
        "low": 3.1,
        "close": 3.1
      },
      {
        "tOpen": 1701388800000,
        "tClose": 1701388800000,
        "open": 3.2,
        "high": 3.2,
        "low": 3.2,
        "close": 3.2
      }
    ],
    "summary": {
      "change_v": 0.1,
      "change_p": 3.23
    }
  }
}
PUBLIC · MACRO

ดึงรายการดัชนี

คืนค่าดัชนีที่แพลตฟอร์มคำนวณทั้งหมด พร้อมค่าล่าสุด (Fear & Greed ตะกร้าคริปโต)

POST /macro/indexes/list
Auth HMAC-SHA256 Rate limit 10 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/macro/indexes/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.macro.listIndexes({ pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

macro-index-list[":indexKey"]
ฟิลด์ ประเภท คำอธิบาย
indexKeystringUnique index key
namestringHuman readable index name
lastValuenumberLatest index value
change24hnumberMove since the previous reading, in index points on a bounded scale and as a percentage otherwise

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "indexKey": "fearGreed",
      "name": "Fear & Greed Index",
      "lastValue": 61,
      "change24h": 3
    },
    {
      "indexKey": "crypto20",
      "name": "Crypto 20",
      "lastValue": 117.64,
      "change24h": -1.12
    },
    {
      "indexKey": "crypto100",
      "name": "Crypto 100",
      "lastValue": 104.39,
      "change24h": -0.84
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 3
  }
}
PUBLIC · MACRO

ดึงข้อมูลดัชนี

คืนค่าดัชนีของแพลตฟอร์มรายการเดียว พร้อมค่าล่าสุด วิธีการคำนวณ และสรุปองค์ประกอบ

GET /macro/index/:indexKey
Auth HMAC-SHA256 Rate limit 30 req/min URL params :indexKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
indexKeyrequiredPlatform index key (e.g. fearGreed, crypto20, crypto100).

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/macro/index/fearGreed" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.macro.getIndex("fearGreed");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

macro-index-get[":indexKey"]
ฟิลด์ ประเภท คำอธิบาย
indexKeystringUnique index key
namestringHuman readable index name
descriptionstringWhat the index measures and how to read it
methodologystringHow the index is built: equal weight, market cap weight, or external when it is published by another party and read as is
sourcestringPublisher an externally sourced index is credited to, absent when the platform computes the index itself
lastValuenumberLatest index value
change24hnumberMove since the previous reading, in index points on a bounded scale and as a percentage otherwise. Measured against the last available reading, so a skipped day is not read as no change
nrOfConstituentsnumberNumber of assets composing the index, absent for indexes that are not built from a basket
tComputednumberUnix time the latest value last moved, so a source that went quiet shows as stale rather than freshly published

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "indexKey": "fearGreed",
    "name": "Fear & Greed Index",
    "description": "Overall crypto market sentiment from extreme fear (0) to extreme greed (100)",
    "methodology": "external",
    "source": "alternative.me",
    "lastValue": 61,
    "change24h": 3,
    "tComputed": 1753718400
  }
}
PUBLIC · MACRO

OHLC ของดัชนี

คืนค่าชุดแท่งเทียน OHLC สำหรับค่าดัชนีในกรอบเวลาที่ร้องขอ

POST /macro/index/:indexKey/ohlc
Auth HMAC-SHA256 Rate limit 30 req/min URL params :indexKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
indexKeyrequiredPlatform index key (e.g. fearGreed, crypto20, crypto100).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
intervalstringoptionalLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M.
tOldestintegeroptionalOldest bin time, ms epoch (inclusive).
tNewestintegeroptionalNewest bin time, ms epoch (inclusive).

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/macro/index/fearGreed/ohlc" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"interval":"5m"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.macro.getIndexOhlc("fearGreed", { interval: "5m" });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

macro-index-ohlc[":indexKey"]
ฟิลด์ ประเภท คำอธิบาย
indexKeystringUnique index key
intervalstringLength of one candle: 1s, 1m, 5m, 4h, 12h, 73h or 0.5M
seriesarraySorted OHLC bins: { tOpen, tClose, open, high, low, close }. History is recorded from the moment an index starts being tracked, so the longer candles fill in over time rather than reaching back before that point
summaryobjectAggregate change summary over the returned window

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "indexKey": "fearGreed",
    "interval": "5m",
    "series": [
      {
        "tOpen": 1700000100000,
        "tClose": 1700000400000,
        "open": 58,
        "high": 60,
        "low": 57,
        "close": 59
      },
      {
        "tOpen": 1700000400000,
        "tClose": 1700000700000,
        "open": 59,
        "high": 62,
        "low": 59,
        "close": 61
      }
    ],
    "summary": {
      "change_v": 3,
      "change_p": 5.17
    }
  }
}
PUBLIC · MACRO

แผนที่ช่วยเหลือของข้อมูลมหภาค

คืนค่าแผนที่ JSON แบบมีโครงสร้างของทุกเอนด์พอยต์ในหมวดข้อมูลมหภาค - เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ รวมถึงกลุ่มฟิลด์ที่แต่ละเอนด์พอยต์คืนค่า มีประโยชน์สำหรับการตรวจสอบภายในของ SDK และเอเจนต์

GET /macro/help
Auth None Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/macro/help" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.macro.help();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ฟิลด์ ประเภท คำอธิบาย
success boolean ระบุว่าการเรียกสำเร็จหรือไม่
category string หมวดหมู่ที่แผนที่ช่วยเหลือนี้อธิบาย
help object คอนเทนเนอร์แผนที่ช่วยเหลือ paths จับคู่แต่ละพาธของเอนด์พอยต์เข้ากับเมทาดาต้าของตน (เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ สถานะ isListing เมื่อเกี่ยวข้อง และกลุ่มฟิลด์ที่อ้างอิงถึง) fieldGroups จับคู่แต่ละชื่อกลุ่มเข้ากับตัวอธิบายฟิลด์ของตน (ประเภทและคำอธิบาย) ที่ถูกอ้างอิงจากรายการพาธ

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "category": "macro",
  "help": {
    "paths": {
      "/macro/help": {
        "method": "GET",
        "description": "Returns this help map",
        "rateLimit": 30,
        "params": { "required": [], "optional": [] },
        "fieldGroups": []
      }
    },
    "fieldGroups": {}
  }
}
PRIVATE · POOLS

ดึงรายการค่าคำสั่งควบคุม

ค่าปัจจุบันของทุกคำสั่งควบคุมที่พูลเปิดให้ใช้งาน หรือเฉพาะรายการที่ระบุชื่อไว้ เป็นเอนด์พอยต์ที่กลยุทธ์เรียกซ้ำๆ บ่อยครั้ง จึงถูกออกแบบให้มีขนาดเล็ก

POST /pool/directives/list
Auth HMAC + pool-bound key Rate limit 60 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
directiveKeysarrayoptionalNames of the directives wanted, up to 100. Omit to read every directive the pool exposes.
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/pool/directives/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.pools.directives.list({ pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

directive-value[":directiveKey"]
ฟิลด์ ประเภท คำอธิบาย
directiveKeystringShort name the pool gave this directive
kindnumberWhich kind of control this directive is
rawobjectThe value as it is stored, wrapped so any kind of value fits
entriesobjectThe named entries of a directive that holds a set, such as one reading per asset. Name the entry to read one of them; empty for every other kind of directive
numbernumberThe value as a plain number, when the directive holds one
textstringThe value written out as a short line of text
hashstringFingerprint of the current value, quoted back on a write so nobody is overwritten
updatedOnnumberWhen the value last changed, as a stamp
updatedVianumberWhich door the last change came through - the browser, this api, an assistant, or the platform itself

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "directiveKey": "kill_switch",
      "kind": 10,
      "raw": { "v": true },
      "entries": {},
      "number": 1,
      "text": "Trading enabled",
      "hash": "4c1f9a3e7b2d85604fe1c93a7b0d2e58f4a6c17b9d3e0852af61c94b7e2d5083",
      "updatedOn": 1756642800000,
      "updatedVia": 10
    },
    {
      "directiveKey": "greed_xckdf1",
      "kind": 20,
      "raw": { "v": 35 },
      "entries": {},
      "number": 35,
      "text": "35%",
      "hash": "b70e4d2c8f1a63950dc7e21b845f3a06c9d18e47b2306fa5e8c14d97b0532fae",
      "updatedOn": 1756729200000,
      "updatedVia": 20
    },
    {
      "directiveKey": "asset_directives",
      "kind": 60,
      "raw": { "v": { "BTC": "buy", "ETH": "hold", "SOL": "sell" } },
      "entries": { "BTC": "buy", "ETH": "hold", "SOL": "sell" },
      "number": null,
      "text": "BTC:buy, ETH:hold, SOL:sell",
      "hash": "e93b1c50a7d248f6b0359e1cd84a72b6f05e3d91c827a460bd5f1e38c9047ab2",
      "updatedOn": 1756732800000,
      "updatedVia": 20
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 3
  }
}

The kind decides which field carries a usable value. Switch 10 answers 1 or 0 in number and its on or off label in text; slider 20 and number 30 answer the figure in number and the figure with its unit in text; text 40 and select 50 answer only text, and a select answers the label of the choice rather than its key; map 60 answers its named entries in entries, with text holding only a short summary of the first few. updatedVia says which door the change came through - 10 the browser, 20 this interface, 30 an assistant, 40 the platform itself. A directive the pool never opened for reading is left out of the listing entirely. For how each one is designed, see List Directive Definitions.

PRIVATE · POOLS

ดึงรายการนิยามคำสั่งควบคุม

วิธีการออกแบบของทุกคำสั่งควบคุมที่พูลเปิดให้ใช้งาน การออกแบบนี้เปลี่ยนแปลงน้อยมาก จึงควรจดจำไว้แทนที่จะเรียกซ้ำ

POST /pool/directives/defs
Auth HMAC + pool-bound key Rate limit 30 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/pool/directives/defs" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.pools.directives.listDefs({ pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

directive-definition[":directiveKey"]
ฟิลด์ ประเภท คำอธิบาย
directiveKeystringShort name the pool gave this directive
kindnumberWhich kind of control this directive is
labelstringReadable name shown for the directive
descriptionstringWhat the directive is for, in the words of whoever created it
detailsobjectHow the directive is defined - its bounds, steps, choices or named entries
allowExternalWritebooleanWhether the owner of the directive lets an outside caller change its value
updatedOnnumberWhen the definition last changed, as a stamp
relPoolKeystringThe pool this directive belongs to

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "directiveKey": "greed_xckdf1",
      "kind": 20,
      "label": "Risk Appetite",
      "description": "How much risk the pool is willing to carry right now",
      "details": {
        "kind": 20,
        "label": "Risk Appetite",
        "description": "How much risk the pool is willing to carry right now",
        "icon": "pace",
        "defSlider": {
          "min": 0,
          "max": 100,
          "step": 1,
          "valUnit": "%",
          "valDefault": 50
        }
      },
      "raw": { "v": 35 },
      "entries": {},
      "number": 35,
      "text": "35%",
      "hash": "b70e4d2c8f1a63950dc7e21b845f3a06c9d18e47b2306fa5e8c14d97b0532fae",
      "allowExternalWrite": true,
      "updatedOn": 1756555200000,
      "updatedVia": 20,
      "relPoolKey": "pl-9df31a"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}

The shape of details follows the kind. A switch carries defSwitch with its default and its two labels; a slider carries defSlider with min, max, step and valUnit; a number carries defNumber; a text carries defText with maxLength and an optional pattern; a select carries defSelect with its declared options; and a map carries defMap with keyMaxLength, maxEntries, its valKind and, for a choice-valued map, its valOptions. Only one of the six is ever present. A design changes very rarely, so remember this answer rather than asking for it every round - the current value belongs to List Directive Values, which is the address to poll. Note that updatedOn here is when the design last changed, not the value.

PRIVATE · POOLS

ดึงค่าคำสั่งควบคุม

คืนค่าปัจจุบันของคำสั่งควบคุมหนึ่งรายการ

POST /pool/directive/:directiveKey
Auth HMAC + pool-bound key Rate limit 60 req/min URL params :directiveKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
directiveKeyrequiredDirective name chosen by the pool (e.g. greed_xckdf1, kill_switch).

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/pool/directive/greed_xckdf1" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.pools.directives.get("greed_xckdf1");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

directive-value[":directiveKey"]
ฟิลด์ ประเภท คำอธิบาย
directiveKeystringShort name the pool gave this directive
kindnumberWhich kind of control this directive is
rawobjectThe value as it is stored, wrapped so any kind of value fits
entriesobjectThe named entries of a directive that holds a set, such as one reading per asset. Name the entry to read one of them; empty for every other kind of directive
numbernumberThe value as a plain number, when the directive holds one
textstringThe value written out as a short line of text
hashstringFingerprint of the current value, quoted back on a write so nobody is overwritten
updatedOnnumberWhen the value last changed, as a stamp
updatedVianumberWhich door the last change came through - the browser, this api, an assistant, or the platform itself

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "directiveKey": "greed_xckdf1",
    "kind": 20,
    "raw": { "v": 35 },
    "entries": {},
    "number": 35,
    "text": "35%",
    "hash": "b70e4d2c8f1a63950dc7e21b845f3a06c9d18e47b2306fa5e8c14d97b0532fae",
    "updatedOn": 1756729200000,
    "updatedVia": 20
  }
}

A directive the pool never opened for reading answers exactly like one that does not exist - success: false with isEntityNotFound - so no caller can map a pool's directives by comparing failures. Carry the hash into Set Directive Value as expectedHash and a change somebody else made in the meantime is reported instead of being overwritten.

PRIVATE · POOLS

ดึงนิยามคำสั่งควบคุม

คืนค่าวิธีการออกแบบของคำสั่งควบคุมหนึ่งรายการ - ขอบเขต ขั้นตอน ตัวเลือก หรือรายการที่มีชื่อ และระบุว่าผู้เรียกจากภายนอกสามารถเปลี่ยนแปลงได้หรือไม่

POST /pool/directive/:directiveKey/def
Auth HMAC + pool-bound key Rate limit 30 req/min URL params :directiveKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
directiveKeyrequiredDirective name chosen by the pool (e.g. greed_xckdf1, kill_switch).

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/pool/directive/greed_xckdf1/def" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.pools.directives.getDef("greed_xckdf1");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

directive-definition[":directiveKey"]
ฟิลด์ ประเภท คำอธิบาย
directiveKeystringShort name the pool gave this directive
kindnumberWhich kind of control this directive is
labelstringReadable name shown for the directive
descriptionstringWhat the directive is for, in the words of whoever created it
detailsobjectHow the directive is defined - its bounds, steps, choices or named entries
allowExternalWritebooleanWhether the owner of the directive lets an outside caller change its value
updatedOnnumberWhen the definition last changed, as a stamp
relPoolKeystringThe pool this directive belongs to

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "directiveKey": "asset_directives",
    "kind": 60,
    "label": "Asset Directives",
    "description": "What the pool wants done with each asset it names",
    "details": {
      "kind": 60,
      "label": "Asset Directives",
      "description": "What the pool wants done with each asset it names",
      "icon": "instruction",
      "defMap": {
        "keyPattern": "^[A-Z0-9]{1,20}$",
        "keyMaxLength": 20,
        "maxEntries": 200,
        "valKind": "option",
        "valOptions": [
          { "optKey": "buy", "label": "Buy" },
          { "optKey": "sell", "label": "Sell" },
          { "optKey": "hold", "label": "Hold" }
        ],
        "valDefault": {}
      }
    },
    "raw": { "v": { "BTC": "buy", "ETH": "hold", "SOL": "sell" } },
    "entries": { "BTC": "buy", "ETH": "hold", "SOL": "sell" },
    "number": null,
    "text": "BTC:buy, ETH:hold, SOL:sell",
    "hash": "e93b1c50a7d248f6b0359e1cd84a72b6f05e3d91c827a460bd5f1e38c9047ab2",
    "allowExternalWrite": false,
    "updatedOn": 1756468800000,
    "updatedVia": 20,
    "relPoolKey": "pl-9df31a"
  }
}

Read allowExternalWrite before trying to write. It is false here, so Set Directive Value on this directive is refused with isPermissionDenied however the credential is scoped. The bounds in details are what a value is checked against: a map entry has to match keyPattern and be one of valOptions, and the whole set has to stay within maxEntries.

PRIVATE · POOLS

ดึงรายการการเปลี่ยนแปลงคำสั่งควบคุม

รายการการเปลี่ยนแปลงที่บันทึกไว้ของคำสั่งควบคุมหนึ่งรายการ เรียงจากล่าสุดก่อน พร้อมระบุผู้ทำการเปลี่ยนแปลงแต่ละครั้ง

POST /pool/directive/:directiveKey/revs
Auth HMAC + pool-bound key Rate limit 30 req/min Pagination URL params :directiveKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
directiveKeyrequiredDirective name chosen by the pool (e.g. greed_xckdf1, kill_switch).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/pool/directive/greed_xckdf1/revs" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.pools.directives.listRevs("greed_xckdf1", { pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

directive-revision[":directiveKey"]
ฟิลด์ ประเภท คำอธิบาย
directiveKeystringShort name the pool gave this directive
revNrnumberWhere this change sits in the trail of the directive, counting up
revKindnumberWhat the change was about - a new directive, a new value, a new definition or a removal
rawobjectThe value this change stored, as it is kept
numbernumberThe value this change stored, as a plain number
entriesobjectThe named entries of a directive that holds a set, such as one reading per asset. Name the entry to read one of them; empty for every other kind of directive
textstringThe value this change stored, written out as text
changedVianumberWhich door the change came through, such as the browser or this interface
changedBystringThe person the change is credited to, when there is one
changedOnnumberWhen the change was recorded, as a stamp
changeNotestringThe reason given for the change, when one was given

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "directiveKey": "greed_xckdf1",
      "revNr": 7,
      "revKind": 20,
      "raw": { "v": 35 },
      "entries": {},
      "number": 35,
      "text": "35%",
      "changedVia": 20,
      "changedBy": "usr-4b81ce",
      "changedOn": 1756729200000,
      "changeNote": "Trimmed ahead of the rate decision"
    },
    {
      "directiveKey": "greed_xckdf1",
      "revNr": 6,
      "revKind": 20,
      "raw": { "v": 60 },
      "entries": {},
      "number": 60,
      "text": "60%",
      "changedVia": 10,
      "changedBy": "usr-4b81ce",
      "changedOn": 1756645800000,
      "changeNote": ""
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 7
  }
}

revKind says what the change was about - 10 the directive being created, 20 a new value, 30 a new design, 40 a removal. Newest first. A trail is kept to the last 500 changes of a directive, so a busy directive loses its oldest entries. The person credited in changedBy is present only when a change had one behind it, so a change made by the platform itself carries none. Neither the address a change came from nor the client that made it is ever published here.

PRIVATE · POOLS

ตั้งค่าคำสั่งควบคุม

บันทึกค่าใหม่สำหรับคำสั่งควบคุมหนึ่งรายการ อ้างอิงลายนิ้วมือของค่าที่คุณอ่านมาเป็น expectedHash และหากมีการเปลี่ยนแปลงโดยผู้อื่นเกิดขึ้นก่อน ระบบจะแจ้งกลับแทนที่จะเขียนทับ

POST /pool/directive/:directiveKey/set
Auth HMAC + pool-bound key Rate limit 10 req/min URL params :directiveKey

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
directiveKeyrequiredDirective name chosen by the pool (e.g. greed_xckdf1, kill_switch).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
valueanyrequiredThe value to store. Its shape follows the kind of the directive - a yes or no, a number, a line of text, one of the declared choices, or a set of named entries.
expectedHashstringoptionalFingerprint of the version you read, quoted back so a change somebody else made is reported instead of overwritten.
notestringoptionalReason recorded beside the change, up to 256 characters.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/pool/directive/greed_xckdf1/set" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"value":35,"expectedHash":"$HASH","note":"Trimmed ahead of the rate decision"}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.pools.directives.set("greed_xckdf1", 35);

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ฟิลด์ ประเภท คำอธิบาย
successbooleanWhether the value was stored.
isUnchangedbooleanPresent and true when the value sent was the one already stored. Nothing is written and no change is recorded.
itemobjectThe stored value afterwards, in the same shape as Get Directive Value - including the new hash to carry into the next write.
isConflictbooleanThe value moved since the expectedHash you quoted was read. Nothing was written; read it again and decide.
isPermissionDeniedbooleanThe directive exists and is readable, but its owner has not opened it for outside writing.
isInvalidValuebooleanThe value does not fit what the directive accepts. message says why.
messagestringPlain reason accompanying a refusal.

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "isUnchanged": false,
  "item": {
    "directiveKey": "greed_xckdf1",
    "kind": 20,
    "raw": { "v": 35 },
    "entries": {},
    "number": 35,
    "text": "35%",
    "hash": "b70e4d2c8f1a63950dc7e21b845f3a06c9d18e47b2306fa5e8c14d97b0532fae",
    "updatedOn": 1756729200000,
    "updatedVia": 20
  }
}

And the same call refused, because the value moved after the expectedHash was read:

200 OK APPLICATION/JSON
{
  "success": false,
  "isConflict": true,
  "message": "The value changed since it was read, please look again"
}

A refusal is an ordinary answer, not an error. The call still returns 200 with success: false and one of the three flags above, so a caller reads the flag rather than a status code. expectedHash is optional and is how you avoid overwriting somebody: quote the hash you read, and a value that moved in between is reported instead. Sending the value that is already stored is not a refusal - it answers isUnchanged, writes nothing and leaves the trail alone. The shape value takes follows the directive's kind, so check its design at Get Directive Definition first: true or false for a switch, a figure inside the declared bounds and on the declared step for a slider or a number, a line of text within its length for a text, one of the declared option keys for a select, and a plain object of named entries for a map. A value that fits none of these is refused with isInvalidValue rather than being rounded into shape.

PRIVATE · POOLS

ตั้งค่าคำสั่งควบคุมหลายรายการ

บันทึกค่าใหม่สำหรับคำสั่งควบคุมหลายรายการในคำขอเดียว items bag เก็บหนึ่งรายการต่อหนึ่งคีย์คำสั่งควบคุม โดยแต่ละรายการเป็น object ที่มี value และมี expectedHash กับ note เป็นตัวเลือก

POST /pool/directives/set
Auth HMAC + pool-bound key Rate limit 10 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
itemsobjectrequiredOne entry per directive, keyed by its name: { "<directiveKey>": { "value": ..., "expectedHash": "...", "note": "..." } }. Only value is needed; expectedHash and note are optional per entry, exactly as on the single write. Up to 20 entries in one call.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/pool/directives/set" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"items":{"greed_xckdf1":{"value":35},"kill_switch":{"value":false,"note":"Halting for maintenance"}}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.pools.directives.setMany({ "greed_xckdf1": { value: 35 }, "kill_switch": { value: false, note: "Halting for maintenance" } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ฟิลด์ ประเภท คำอธิบาย
successbooleanWhether the call itself was accepted. It is true even when some rows were refused - each row carries its own outcome.
itemsobjectOne outcome per directive key you sent, keyed the same way.
items[key].successbooleanWhether that row was stored.
items[key].isUnchangedbooleanThat row already held the value sent, so nothing was written.
items[key].itemobjectThe stored value of that row afterwards, in the same shape as Get Directive Value.
items[key].isEntityNotFoundbooleanNo such directive, or one the pool never opened for reading.
items[key].isConflictbooleanThat row quoted an expectedHash that no longer matches.
items[key].isPermissionDeniedbooleanThat directive is not open to outside writing.
items[key].isInvalidValuebooleanThat value does not fit what the directive accepts.
items[key].messagestringPlain reason accompanying that row's refusal.

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": {
    "greed_xckdf1": {
      "success": true,
      "isUnchanged": false,
      "item": {
        "directiveKey": "greed_xckdf1",
        "kind": 20,
        "raw": { "v": 35 },
        "entries": {},
        "number": 35,
        "text": "35%",
        "hash": "b70e4d2c8f1a63950dc7e21b845f3a06c9d18e47b2306fa5e8c14d97b0532fae",
        "updatedOn": 1756729200000,
        "updatedVia": 20
      }
    },
    "kill_switch": {
      "success": false,
      "isPermissionDenied": true,
      "message": "This directive is not open to outside writing"
    }
  }
}

Rows are settled one at a time and a refused row never stops the rest. That is why the call answers success: true while a row inside it failed - read each row's own success rather than the one at the top. A row sent without a value key is refused as an invalid value rather than being treated as a request to clear the directive. The allowance is 10 calls a minute whether you send one directive or twenty, so a batch is the cheaper way to move several at once.

PRIVATE · POOLS

แผนที่ช่วยเหลือของพูล

คืนค่าแผนที่ช่วยเหลือนี้

GET /pool/help
Auth None Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/pool/help" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.pools.directives.help();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ฟิลด์ ประเภท คำอธิบาย
successbooleanระบุว่าการเรียกสำเร็จหรือไม่
categorystringหมวดหมู่ที่แผนที่ช่วยเหลือนี้อธิบาย
helpobjectคอนเทนเนอร์แผนที่ช่วยเหลือ paths จับคู่แต่ละพาธของเอนด์พอยต์เข้ากับเมทาดาต้าของตน (เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ สถานะ isListing เมื่อเกี่ยวข้อง และกลุ่มฟิลด์ที่อ้างอิงถึง) fieldGroups จับคู่แต่ละชื่อกลุ่มเข้ากับตัวอธิบายฟิลด์ของตน (ประเภทและคำอธิบาย) ที่ถูกอ้างอิงจากรายการพาธ

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "category": "pools",
  "help": {
    "paths": {
      "/pool/directives/list": {
        "method": "ALL",
        "description": "Current value of every directive a pool exposes, or only of the ones named. This is the address a strategy asks repeatedly, so it stays small",
        "rateLimit": 60,
        "nominalRefreshSecs": 5,
        "params": {
          "required": [],
          "optional": ["directiveKeys", "filtering", "sorting", "pagination"]
        },
        "isListing": true,
        "fieldGroups": ["directive-value[\":directiveKey\"]"]
      }
    },
    "fieldGroups": {
      "directive-value[\":directiveKey\"]": {
        "number": {
          "type": "number",
          "description": "The value as a plain number, when the directive holds one",
          "supportsMetrics": true,
          "canonicalPath": "pools.directiveValue.number",
          "supportsVenue": false,
          "params": [
            {
              "name": "directiveKey",
              "kind": "selector",
              "isRequired": false,
              "description": "Short name the pool gave this directive"
            }
          ]
        }
      }
    }
  }
}

This is the one pools address served without authentication, like every other help map, so it can be read before a key exists. It only describes the category - it never names a pool or any of its directives. The answer is trimmed above: the real one carries all eight paths and all three field groups. Since a design changes very rarely, read it once at start-up rather than each round.

ชื่อตัวชี้วัดของกลยุทธ์

กลยุทธ์ที่ทำงานอยู่บนแพลตฟอร์มสามารถอ่านคำสั่งควบคุมในฐานะตัวชี้วัดได้ โดยไม่ต้องเรียกเอนด์พอยต์เหล่านี้เอง ชื่อทุกรายการด้านล่างถูกเผยแพร่ไว้ในแผนที่ช่วยเหลือด้านบน พร้อมวิธีลดรูปที่ต้องใช้: ตัวเลขจะถูกใช้ตามที่เป็นอยู่ ข้อความหนึ่งบรรทัดต้องถูกลดรูปให้เหลือหนึ่งค่า และค่าที่จัดกลุ่มไว้ต้องถูกจัดสรรเข้าลำดับแรกก่อน คำสั่งควบคุมถูกระบุไว้ในตัวชี้วัดเอง เนื่องจากแต่ละชุดในสามชุดนี้จะถูกจัดทำดัชนีตามคำสั่งควบคุมนั้น

ชื่อตัวชี้วัด ประเภท คำอธิบาย
pools.directiveValue.numbernumberThe value as a plain number. A switch reads as one or zero, so a strategy can gate on it directly.
pools.directiveValue.textstringThe value in its readable form - a choice shows its name and a switch its on or off wording. Reduce it with equals, oneOf, length or toNumber, and remember a name can be reworded.
pools.directiveValue.entriesobjectThe named entries of a directive that holds a set. Route into one by name, such as the entry for an asset.
pools.directiveValue.rawobjectThe stored value in its wrapper. Route through the wrapper key to reach it, which is the way to read the key behind a choice rather than its name.
pools.directiveValue.hashstringFingerprint of the current value.
pools.directiveValue.updatedOnnumberWhen the value last changed, as a stamp in milliseconds. Useful for ignoring an instruction nobody has touched for too long.
pools.directiveValue.updatedVianumberWhich door the last change came through.
pools.directiveDefinition.labelstringReadable name of the directive.
pools.directiveDefinition.descriptionstringWhat the directive is for.
pools.directiveDefinition.detailsobjectHow the directive is defined - its bounds, steps, choices or named entries.
pools.directiveDefinition.allowExternalWritebooleanWhether an outside caller may change the value.
pools.directiveDefinition.updatedOnnumberWhen the definition last changed, as a stamp in milliseconds.
pools.directiveRevision.revNrnumberWhere a change sits in the trail of the directive, counting up.
pools.directiveRevision.revKindnumberWhat the change was about.
pools.directiveRevision.numbernumberThe value a change stored, as a plain number.
pools.directiveRevision.textstringThe value a change stored, as text.
pools.directiveRevision.entriesobjectThe named entries a change stored.
pools.directiveRevision.rawobjectThe value a change stored, in its wrapper.
pools.directiveRevision.changedVianumberWhich door a change came through.
pools.directiveRevision.changedBystringThe person a change is credited to.
pools.directiveRevision.changedOnnumberWhen a change was recorded, as a stamp in milliseconds.
pools.directiveRevision.changeNotestringThe reason given for a change.

มีค่าสองรายการที่คำตอบมีอยู่แต่ไม่ได้เปิดให้เป็นชื่อตัวชี้วัด ชื่อของคำสั่งควบคุมเป็นสิ่งที่พูลเลือกกำหนดเอง การอ่านค่ากลับมาจึงจะได้เพียงสิ่งที่ผู้เรียกส่งเข้ามา ส่วนชนิดของคำสั่งควบคุมบอกวิธีที่ควรอ่านค่าของมัน มากกว่าจะเป็นค่าที่อ่านได้เองอยู่แล้ว

PRIVATE · VAULTS

ดึงรายการคลังสินทรัพย์

คืนค่ารายการสรุปแบบกระชับของทุกคลังสินทรัพย์ที่อยู่ในพูล ได้แก่ ตัวระบุ ชื่อ และสถานะ รองรับการเรียงลำดับ การค้นหา และการแบ่งหน้าแบบ cursor

POST /vaults/list
Auth HMAC + pool-bound key Rate limit 30 req/min Pagination

พารามิเตอร์ใน Body

ชื่อประเภทจำเป็นคำอธิบาย
search string optional Free-text search over vault name and id.
sorting object optional Standard { field, direction }.
pagination object optional Standard { page, limit }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/vaults/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.vaults.list({ pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

vault-summary[":vaultId"]
ฟิลด์ ประเภท คำอธิบาย
fullNamestringHuman-readable vault name
statusnumberCurrent lifecycle status enum
targetStatusnumberTarget lifecycle status
exchangeKeystringExchange store item key (e.g., binance)
relPoolKeystringOwning pool key
attachedStrategyIdstringAttached strategy id (if any)
reportedOnnumberLast status report timestamp (ms epoch)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "fullName": "binance-spot-main",
      "status": 1000,
      "targetStatus": 1000,
      "exchangeKey": "binance",
      "relPoolKey": "pool_main",
      "attachedStrategyId": "stg_1",
      "reportedOn": 1700000000000
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PRIVATE · VAULTS

สรุปคลังสินทรัพย์

คืนค่าข้อมูลสรุปแบบกระชับของคลังสินทรัพย์ (id, name, status) สำหรับคลังสินทรัพย์เดียว มีต้นทุนต่ำและแคชได้ - เหมาะสำหรับกรณีที่ต้องการเพียงสถานะหลัก

POST /vault/:vaultId/summary
Auth HMAC + pool-bound key Rate limit 30 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/vault/vlt-abc123/summary" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.vaults.getSummary("vlt-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

vault-summary[":vaultId"]
ฟิลด์ ประเภท คำอธิบาย
fullNamestringHuman-readable vault name
statusnumberCurrent lifecycle status enum
targetStatusnumberTarget lifecycle status
exchangeKeystringExchange store item key (e.g., binance)
relPoolKeystringOwning pool key
attachedStrategyIdstringAttached strategy id (if any)
reportedOnnumberLast status report timestamp (ms epoch)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "fullName": "binance-spot-main",
    "status": 1000,
    "targetStatus": 1000,
    "exchangeKey": "binance",
    "relPoolKey": "pool_main",
    "attachedStrategyId": "stg_1",
    "reportedOn": 1700000000000
  }
}
PRIVATE · VAULTS

รายละเอียดคลังสินทรัพย์

คืนค่ารายละเอียดฉบับเต็มของคลังสินทรัพย์ตาม id ได้แก่ การตั้งค่า การจัดสรร ตัวชี้วัดผลการดำเนินงาน และสถานะรันไทม์

POST /vault/:vaultId
Auth HMAC + pool-bound key Rate limit 30 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/vault/vlt-abc123" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.vaults.get("vlt-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

vault[":vaultId"]
ฟิลด์ ประเภท คำอธิบาย
fullNamestringVault full name
exchangeKeystringExchange key
providerstringProvider identifier
statusstringStatus as string
isActivebooleanIs the vault active
createdOnnumberCreation timestamp
updatedOnnumberLast update timestamp

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "fullName": "binance-spot-main",
    "exchangeKey": "binance",
    "provider": "ccxt",
    "status": "active",
    "isActive": true,
    "createdOn": 1690000000000,
    "updatedOn": 1700000000000
  }
}
PRIVATE · VAULTS

โปรไฟล์รันไทม์ของคลังสินทรัพย์

คืนค่าโปรไฟล์รันไทม์ของคลังสินทรัพย์ในรูปแบบ { profile: object, hash: string } ค่า hash ช่วยให้ฝั่งไคลเอนต์ข้ามการเรนเดอร์ใหม่ได้เมื่อโปรไฟล์ไม่มีการเปลี่ยนแปลง

POST /vault/:vaultId/runtime-profile
Auth HMAC + pool-bound key Rate limit 30 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/vault/vlt-abc123/runtime-profile" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.vaults.getRuntimeProfile("vlt-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

vault-runtime-profile[":vaultId"]
ฟิลด์ ประเภท คำอธิบาย
profileobjectRuntime profile JSON payload
hashstringContent hash for optimistic concurrency
updatedOnnumberLast update timestamp

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "profile": {
      "riskLimit": 100000,
      "allowedAssets": [
        "BTC",
        "ETH"
      ]
    },
    "hash": "sha256:a1b2c3...",
    "updatedOn": 1700000000000
  }
}
PRIVATE · VAULTS

ตั้งค่าโปรไฟล์รันไทม์ของคลังสินทรัพย์

อัปเดตโปรไฟล์รันไทม์ของคลังสินทรัพย์ (แบบ optimistic ผ่าน expectedHash)

PUT /vault/:vaultId/runtime-profile/set
Auth HMAC + pool-bound key Rate limit 10 req/min URL params :vaultId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
vaultIdrequiredVault identifier.

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
profileobjectrequiredRuntime profile body to apply.
expectedHashstringoptionalExpected runtime-profile hash for optimistic concurrency.

ตัวอย่างคำขอ

cURL
curl -X PUT "https://trademire.ai/api/v1/$API_KEY/vault/vlt-abc123/runtime-profile/set" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"profile":{}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.vaults.setRuntimeProfile("vlt-abc123", { profile: {} });

// 3. Inspect the parsed response
console.log(res);

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true
}
PRIVATE · VAULTS

การดำเนินการกับคลังสินทรัพย์

ส่งคำสั่งดำเนินการสำหรับคลังสินทรัพย์หนึ่งรายการหรือมากกว่า (deploy|start|stop|undeploy|reconfigure|unpark|reply-to-prompt|execute-flow|cancel-flow|query-flow) คำสั่งจะถูกส่งไปใน url และ items map จะมีหนึ่งรายการต่อคลังสินทรัพย์หนึ่งรายการ

PUT /vaults/actions/:action
Auth HMAC + pool-bound key Rate limit 10 req/min URL params :action

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
actionrequiredAction verb (e.g. deploy, start, stop, undeploy).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
itemsobjectrequiredTargets of the action, keyed by item id: { "<itemId>": { ...params } }. Use an empty object per id when no per-item parameters are needed.

ตัวอย่างคำขอ

cURL
curl -X PUT "https://trademire.ai/api/v1/$API_KEY/vaults/actions/deploy" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"items":{"vlt-abc123":{}}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.vaults.action("deploy", { items: { "vlt-abc123": {} } });

// 3. Inspect the parsed response
console.log(res);

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": {
    "vlt-abc123": {
      "success": true
    }
  }
}
PRIVATE · VAULTS

แผนที่ช่วยเหลือของคลังสินทรัพย์

คืนค่าแผนที่ JSON แบบมีโครงสร้างของทุกเอนด์พอยต์ในหมวดคลังสินทรัพย์ - เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ รวมถึงกลุ่มฟิลด์ที่แต่ละเอนด์พอยต์คืนค่า มีประโยชน์สำหรับการตรวจสอบภายในของ SDK และเอเจนต์

GET /vaults/help
Auth None Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/vaults/help" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.vaults.help();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ฟิลด์ ประเภท คำอธิบาย
success boolean ระบุว่าการเรียกสำเร็จหรือไม่
category string หมวดหมู่ที่แผนที่ช่วยเหลือนี้อธิบาย
help object คอนเทนเนอร์แผนที่ช่วยเหลือ paths จับคู่แต่ละพาธของเอนด์พอยต์เข้ากับเมทาดาต้าของตน (เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ สถานะ isListing เมื่อเกี่ยวข้อง และกลุ่มฟิลด์ที่อ้างอิงถึง) fieldGroups จับคู่แต่ละชื่อกลุ่มเข้ากับตัวอธิบายฟิลด์ของตน (ประเภทและคำอธิบาย) ที่ถูกอ้างอิงจากรายการพาธ

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "category": "vaults",
  "help": {
    "paths": {
      "/vaults/help": {
        "method": "GET",
        "description": "Returns this help map",
        "rateLimit": 30,
        "params": { "required": [], "optional": [] },
        "fieldGroups": []
      }
    },
    "fieldGroups": {}
  }
}
PRIVATE · STRATEGIES

ดึงรายการกลยุทธ์

คืนค่ารายการสรุปแบบกระชับของทุกกลยุทธ์ที่อยู่ในพูล ได้แก่ ตัวระบุ ชื่อ และสถานะ รองรับการเรียงลำดับ การค้นหา และการแบ่งหน้าแบบ cursor

POST /strategies/list
Auth HMAC + pool-bound key Rate limit 30 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/strategies/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.strategies.list({ pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

strategy-summary[":strategyId"]
ฟิลด์ ประเภท คำอธิบาย
namestringHuman-readable strategy name
statusnumberCurrent lifecycle status enum
targetStatusnumberTarget lifecycle status
relPoolKeystringOwning pool key
relNodeIdstringHost node id (if deployed)
reportedOnnumberLast status report timestamp (ms epoch)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "name": "arbitrage-btc-usdt",
      "status": 1000,
      "targetStatus": 1000,
      "relPoolKey": "pool_main",
      "relNodeId": "node_1",
      "reportedOn": 1700000000000
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PRIVATE · STRATEGIES

สรุปกลยุทธ์

คืนค่าข้อมูลสรุปของกลยุทธ์เดียวตาม ID (รูปแบบกระชับ)

POST /strategy/:strategyId/summary
Auth HMAC + pool-bound key Rate limit 30 req/min URL params :strategyId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
strategyIdrequiredStrategy identifier.

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/strategy/str-abc123/summary" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.strategies.getSummary("str-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

strategy-summary[":strategyId"]
ฟิลด์ ประเภท คำอธิบาย
namestringHuman-readable strategy name
statusnumberCurrent lifecycle status enum
targetStatusnumberTarget lifecycle status
relPoolKeystringOwning pool key
relNodeIdstringHost node id (if deployed)
reportedOnnumberLast status report timestamp (ms epoch)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "name": "arbitrage-btc-usdt",
    "status": 1000,
    "targetStatus": 1000,
    "relPoolKey": "pool_main",
    "relNodeId": "node_1",
    "reportedOn": 1700000000000
  }
}
PRIVATE · STRATEGIES

รายละเอียดกลยุทธ์

คืนค่ารายละเอียดฉบับเต็มของกลยุทธ์ตาม id ได้แก่ การตั้งค่า กระบวนการสัญญาณ กฎการเปิดรับความเสี่ยง และสถานะรันไทม์ ใช้ร่วมกับ POST /v1/strategy/:strategyId/runtime-profile เพื่อดึงข้อมูลฝั่งรันไทม์

POST /strategy/:strategyId
Auth HMAC + pool-bound key Rate limit 30 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/strategy/str-abc123" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.strategies.get("str-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

strategy[":strategyId"]
ฟิลด์ ประเภท คำอธิบาย
namestringStrategy name
typestringStrategy type
statusstringStatus as string
isActivebooleanIs the strategy active
createdOnnumberCreation timestamp
updatedOnnumberLast update timestamp

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "name": "arbitrage-btc-usdt",
    "type": "arbitrage",
    "status": "active",
    "isActive": true,
    "createdOn": 1690000000000,
    "updatedOn": 1700000000000
  }
}
PRIVATE · STRATEGIES

โปรไฟล์รันไทม์ของกลยุทธ์

คืนค่าโปรไฟล์รันไทม์ (JSON + hash + controlDetails) ของกลยุทธ์

POST /strategy/:strategyId/runtime-profile
Auth HMAC + pool-bound key Rate limit 30 req/min URL params :strategyId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
strategyIdrequiredStrategy identifier.

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/strategy/str-abc123/runtime-profile" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.strategies.getRuntimeProfile("str-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

strategy-runtime-profile[":strategyId"]
ฟิลด์ ประเภท คำอธิบาย
profileobjectRuntime profile JSON payload
hashstringContent hash for optimistic concurrency
controlDetailsobjectControl details blob from the parent strategy row
tuneProfilebooleanWhether the strategy has profile tuning capabilities activated. When false, runtime profile updates are rejected.
updatedOnnumberLast update timestamp

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "profile": {
      "entrySpread": 0.002,
      "exitSpread": 0.0005
    },
    "hash": "sha256:a1b2c3...",
    "controlDetails": {
      "lastTunedBy": "user_1",
      "lastTunedOn": 1700000000000
    },
    "tuneProfile": true,
    "updatedOn": 1700000000000
  }
}
PRIVATE · STRATEGIES

ตั้งค่าโปรไฟล์รันไทม์ของกลยุทธ์

อัปเดตโปรไฟล์รันไทม์ของกลยุทธ์ (แบบ optimistic ผ่าน expectedHash จะถูกปฏิเสธเมื่อ tune_profile เป็น false)

PUT /strategy/:strategyId/runtime-profile/set
Auth HMAC + pool-bound key Rate limit 10 req/min URL params :strategyId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
strategyIdrequiredStrategy identifier.

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
profileobjectrequiredRuntime profile body to apply.
expectedHashstringoptionalExpected runtime-profile hash for optimistic concurrency.

ตัวอย่างคำขอ

cURL
curl -X PUT "https://trademire.ai/api/v1/$API_KEY/strategy/str-abc123/runtime-profile/set" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"profile":{}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.strategies.setRuntimeProfile("str-abc123", { profile: {} });

// 3. Inspect the parsed response
console.log(res);

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true
}
PRIVATE · STRATEGIES

การดำเนินการกับกลยุทธ์

ส่งคำสั่งดำเนินการสำหรับกลยุทธ์หนึ่งรายการหรือมากกว่า (deploy|start|stop|undeploy|reconfigure|hard-restart|enable-console|disable-console|unpark|execute-flow|cancel-flow|query-flow) คำสั่งจะถูกส่งไปใน url และ items map จะมีหนึ่งรายการต่อหนึ่งรายการ

PUT /strategies/actions/:action
Auth HMAC + pool-bound key Rate limit 10 req/min URL params :action

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
actionrequiredAction verb (e.g. deploy, start, stop, undeploy).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
itemsobjectrequiredTargets of the action, keyed by item id: { "<itemId>": { ...params } }. Use an empty object per id when no per-item parameters are needed.

ตัวอย่างคำขอ

cURL
curl -X PUT "https://trademire.ai/api/v1/$API_KEY/strategies/actions/deploy" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"items":{"str-abc123":{}}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.strategies.action("deploy", { items: { "str-abc123": {} } });

// 3. Inspect the parsed response
console.log(res);

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": {
    "str-abc123": {
      "success": true
    }
  }
}
PRIVATE · STRATEGIES

แผนที่ช่วยเหลือของกลยุทธ์

คืนค่าแผนที่ JSON แบบมีโครงสร้างของทุกเอนด์พอยต์ในหมวดกลยุทธ์ - เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ รวมถึงกลุ่มฟิลด์ที่แต่ละเอนด์พอยต์คืนค่า มีประโยชน์สำหรับการตรวจสอบภายในของ SDK และเอเจนต์

GET /strategies/help
Auth None Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/strategies/help" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.strategies.help();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ฟิลด์ ประเภท คำอธิบาย
success boolean ระบุว่าการเรียกสำเร็จหรือไม่
category string หมวดหมู่ที่แผนที่ช่วยเหลือนี้อธิบาย
help object คอนเทนเนอร์แผนที่ช่วยเหลือ paths จับคู่แต่ละพาธของเอนด์พอยต์เข้ากับเมทาดาต้าของตน (เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ สถานะ isListing เมื่อเกี่ยวข้อง และกลุ่มฟิลด์ที่อ้างอิงถึง) fieldGroups จับคู่แต่ละชื่อกลุ่มเข้ากับตัวอธิบายฟิลด์ของตน (ประเภทและคำอธิบาย) ที่ถูกอ้างอิงจากรายการพาธ

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "category": "strategies",
  "help": {
    "paths": {
      "/strategies/help": {
        "method": "GET",
        "description": "Returns this help map",
        "rateLimit": 30,
        "params": { "required": [], "optional": [] },
        "fieldGroups": []
      }
    },
    "fieldGroups": {}
  }
}
PRIVATE · NODES

ดึงรายการโหนด

คืนค่ารายการสรุปแบบกระชับของทุกโหนดที่อยู่ในพูล ได้แก่ ตัวระบุ ชื่อ และสถานะ รองรับการเรียงลำดับ การค้นหา และการแบ่งหน้าแบบ cursor

POST /nodes/list
Auth HMAC + pool-bound key Rate limit 30 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/nodes/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.nodes.list({ pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

node-summary[":nodeId"]
ฟิลด์ ประเภท คำอธิบาย
namestringHuman-readable node name
statusnumberCurrent lifecycle status enum
targetStatusnumberTarget lifecycle status
relPoolKeystringOwning pool key
relServerIdstringHost server id (if deployed)
reportedOnnumberLast status report timestamp (ms epoch)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "name": "eth-mainnet-1",
      "status": 1000,
      "targetStatus": 1000,
      "relPoolKey": "pool_main",
      "relServerId": "srv_1",
      "reportedOn": 1700000000000
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PRIVATE · NODES

สรุปข้อมูลโหนด

คืนค่าข้อมูลสรุปของโหนดเดียวตาม id (รูปแบบกระชับ)

POST /node/:nodeId/summary
Auth HMAC + pool-bound key Rate limit 30 req/min URL params :nodeId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
nodeIdrequiredNode identifier.

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/node/nod-abc123/summary" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.nodes.getSummary("nod-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

node-summary[":nodeId"]
ฟิลด์ ประเภท คำอธิบาย
namestringHuman-readable node name
statusnumberCurrent lifecycle status enum
targetStatusnumberTarget lifecycle status
relPoolKeystringOwning pool key
relServerIdstringHost server id (if deployed)
reportedOnnumberLast status report timestamp (ms epoch)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "name": "eth-mainnet-1",
    "status": 1000,
    "targetStatus": 1000,
    "relPoolKey": "pool_main",
    "relServerId": "srv_1",
    "reportedOn": 1700000000000
  }
}
PRIVATE · NODES

รายละเอียดโหนด

คืนค่ารายละเอียดฉบับเต็มของโหนดตาม id ได้แก่ การตั้งค่า กลยุทธ์ที่เชื่อมโยงอยู่ และสถานะรันไทม์ ใช้ POST /v1/nodes/action เพื่อควบคุมวงจรการทำงาน (เริ่ม หยุด รีสตาร์ท) ของโหนด

POST /node/:nodeId
Auth HMAC + pool-bound key Rate limit 30 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/node/nod-abc123" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.nodes.get("nod-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

node[":nodeId"]
ฟิลด์ ประเภท คำอธิบาย
namestringNode name
typestringNode type
statusstringStatus as string
isActivebooleanIs the node active
ipAddressstringLatest reported IP address
createdOnnumberCreation timestamp
updatedOnnumberLast update timestamp

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "name": "eth-mainnet-1",
    "type": "execution",
    "status": "active",
    "isActive": true,
    "ipAddress": "10.0.0.42",
    "createdOn": 1690000000000,
    "updatedOn": 1700000000000
  }
}
PRIVATE · NODES

โปรไฟล์รันไทม์ของโหนด

คืนค่าโปรไฟล์รันไทม์ (JSON และ hash) ของโหนด

POST /node/:nodeId/runtime-profile
Auth HMAC + pool-bound key Rate limit 30 req/min URL params :nodeId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
nodeIdrequiredNode identifier.

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/node/nod-abc123/runtime-profile" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.nodes.getRuntimeProfile("nod-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

node-runtime-profile[":nodeId"]
ฟิลด์ ประเภท คำอธิบาย
profileobjectRuntime profile JSON payload
hashstringContent hash for optimistic concurrency
updatedOnnumberLast update timestamp

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "profile": {
      "rpcUrl": "https://rpc.example",
      "maxConnections": 50
    },
    "hash": "sha256:a1b2c3...",
    "updatedOn": 1700000000000
  }
}
PRIVATE · NODES

ตั้งค่าโปรไฟล์รันไทม์ของโหนด

อัปเดตโปรไฟล์รันไทม์ของโหนด (แบบ optimistic ผ่าน expectedHash)

PUT /node/:nodeId/runtime-profile/set
Auth HMAC + pool-bound key Rate limit 10 req/min URL params :nodeId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
nodeIdrequiredNode identifier.

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
profileobjectrequiredRuntime profile body to apply.
expectedHashstringoptionalExpected runtime-profile hash for optimistic concurrency.

ตัวอย่างคำขอ

cURL
curl -X PUT "https://trademire.ai/api/v1/$API_KEY/node/nod-abc123/runtime-profile/set" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"profile":{}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.nodes.setRuntimeProfile("nod-abc123", { profile: {} });

// 3. Inspect the parsed response
console.log(res);

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true
}
PRIVATE · NODES

การดำเนินการกับโหนด

ส่งคำสั่งการดำเนินการ (action verb) สำหรับโหนดหนึ่งรายการหรือมากกว่า (deploy|start|stop|undeploy|hard-restart|reconfigure|enable-console|disable-console|park|unpark|execute-flow|cancel-flow|query-flow) คำสั่งจะถูกส่งผ่านใน url ส่วน items map จะมีหนึ่งรายการต่อหนึ่งไอเทม

PUT /nodes/actions/:action
Auth HMAC + pool-bound key Rate limit 10 req/min URL params :action

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
actionrequiredAction verb (e.g. deploy, start, stop, undeploy).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
itemsobjectrequiredTargets of the action, keyed by item id: { "<itemId>": { ...params } }. Use an empty object per id when no per-item parameters are needed.

ตัวอย่างคำขอ

cURL
curl -X PUT "https://trademire.ai/api/v1/$API_KEY/nodes/actions/deploy" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"items":{"nod-abc123":{}}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.nodes.action("deploy", { items: { "nod-abc123": {} } });

// 3. Inspect the parsed response
console.log(res);

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": {
    "nod-abc123": {
      "success": true
    }
  }
}
PRIVATE · NODES

แผนที่ช่วยเหลือของโหนด

คืนค่าแผนที่ JSON แบบมีโครงสร้างของทุกเอนด์พอยต์ในหมวดโหนด - เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ รวมถึงกลุ่มฟิลด์ที่แต่ละเอนด์พอยต์คืนค่า มีประโยชน์สำหรับการตรวจสอบภายในของ SDK และเอเจนต์

GET /nodes/help
Auth None Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/nodes/help" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.nodes.help();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ฟิลด์ ประเภท คำอธิบาย
success boolean ระบุว่าการเรียกสำเร็จหรือไม่
category string หมวดหมู่ที่แผนที่ช่วยเหลือนี้อธิบาย
help object คอนเทนเนอร์แผนที่ช่วยเหลือ paths จับคู่แต่ละพาธของเอนด์พอยต์เข้ากับเมทาดาต้าของตน (เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ สถานะ isListing เมื่อเกี่ยวข้อง และกลุ่มฟิลด์ที่อ้างอิงถึง) fieldGroups จับคู่แต่ละชื่อกลุ่มเข้ากับตัวอธิบายฟิลด์ของตน (ประเภทและคำอธิบาย) ที่ถูกอ้างอิงจากรายการพาธ

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "category": "nodes",
  "help": {
    "paths": {
      "/nodes/help": {
        "method": "GET",
        "description": "Returns this help map",
        "rateLimit": 30,
        "params": { "required": [], "optional": [] },
        "fieldGroups": []
      }
    },
    "fieldGroups": {}
  }
}
PRIVATE · SERVERS

ดึงรายการเซิร์ฟเวอร์

คืนค่ารายการสรุปแบบกระชับของทุกเซิร์ฟเวอร์ที่จัดสรรไว้สำหรับพูล มีรูปแบบรายการมาตรฐาน พร้อมการค้นหา การเรียงลำดับ และการแบ่งหน้าแบบ cursor

POST /servers/list
Auth HMAC + pool-bound key Rate limit 30 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/servers/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.servers.list({ pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

server-summary[":serverId"]
ฟิลด์ ประเภท คำอธิบาย
namestringHuman-readable server name
statusnumberCurrent lifecycle status enum
targetStatusnumberTarget lifecycle status
progressnumberLifecycle progress percentage (0-100)
storeTypeKeystringStore type identifier (provider class)
relPoolKeystringOwning pool key
reportedOnnumberLast status report timestamp (ms epoch)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "name": "srv-frankfurt-1",
      "status": 1000,
      "targetStatus": 1000,
      "progress": 100,
      "storeTypeKey": "aws-ec2",
      "relPoolKey": "pool_main",
      "reportedOn": 1700000000000
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PRIVATE · SERVERS

สรุปข้อมูลเซิร์ฟเวอร์

คืนค่าข้อมูลสรุปของเซิร์ฟเวอร์เดียวตาม id (รูปแบบกระชับ)

POST /server/:serverId/summary
Auth HMAC + pool-bound key Rate limit 30 req/min URL params :serverId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
serverIdrequiredServer identifier.

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/server/srv-abc123/summary" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.servers.getSummary("srv-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

server-summary[":serverId"]
ฟิลด์ ประเภท คำอธิบาย
namestringHuman-readable server name
statusnumberCurrent lifecycle status enum
targetStatusnumberTarget lifecycle status
progressnumberLifecycle progress percentage (0-100)
storeTypeKeystringStore type identifier (provider class)
relPoolKeystringOwning pool key
reportedOnnumberLast status report timestamp (ms epoch)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "name": "srv-frankfurt-1",
    "status": 1000,
    "targetStatus": 1000,
    "progress": 100,
    "storeTypeKey": "aws-ec2",
    "relPoolKey": "pool_main",
    "reportedOn": 1700000000000
  }
}
PRIVATE · SERVERS

รายละเอียดเซิร์ฟเวอร์

คืนค่ารายละเอียดฉบับเต็มของเซิร์ฟเวอร์ตาม id ได้แก่ โปรไฟล์ฮาร์ดแวร์ สถานะเครือข่าย และสถานะรันไทม์ ใช้ร่วมกับ POST /v1/servers/action สำหรับการดำเนินการเกี่ยวกับวงจรการทำงาน

POST /server/:serverId
Auth HMAC + pool-bound key Rate limit 30 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/server/srv-abc123" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.servers.get("srv-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

server[":serverId"]
ฟิลด์ ประเภท คำอธิบาย
namestringServer name
typestringServer type
statusstringStatus as string
isActivebooleanIs the server active
ipAddressstringLatest reported IP address
createdOnnumberCreation timestamp
updatedOnnumberLast update timestamp

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "name": "srv-frankfurt-1",
    "type": "compute",
    "status": "active",
    "isActive": true,
    "ipAddress": "10.0.0.10",
    "createdOn": 1690000000000,
    "updatedOn": 1700000000000
  }
}
PRIVATE · SERVERS

โปรไฟล์รันไทม์ของเซิร์ฟเวอร์

คืนค่าโปรไฟล์รันไทม์ (JSON, hash และ controlDetails) ของเซิร์ฟเวอร์

POST /server/:serverId/runtime-profile
Auth HMAC + pool-bound key Rate limit 30 req/min URL params :serverId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
serverIdrequiredServer identifier.

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/server/srv-abc123/runtime-profile" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.servers.getRuntimeProfile("srv-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

server-runtime-profile[":serverId"]
ฟิลด์ ประเภท คำอธิบาย
profileobjectRuntime profile JSON payload
hashstringContent hash for optimistic concurrency
controlDetailsobjectControl details blob from the parent server row
updatedOnnumberLast update timestamp

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "profile": {
      "region": "eu-central-1",
      "instanceType": "t3.medium"
    },
    "hash": "sha256:a1b2c3...",
    "controlDetails": {
      "lastDeployBy": "user_1",
      "lastDeployedOn": 1700000000000
    },
    "updatedOn": 1700000000000
  }
}
PRIVATE · SERVERS

ตั้งค่าโปรไฟล์รันไทม์ของเซิร์ฟเวอร์

อัปเดตโปรไฟล์รันไทม์ของเซิร์ฟเวอร์ (แบบ optimistic ผ่าน expectedHash)

PUT /server/:serverId/runtime-profile/set
Auth HMAC + pool-bound key Rate limit 10 req/min URL params :serverId

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
serverIdrequiredServer identifier.

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
profileobjectrequiredRuntime profile body to apply.
expectedHashstringoptionalExpected runtime-profile hash for optimistic concurrency.

ตัวอย่างคำขอ

cURL
curl -X PUT "https://trademire.ai/api/v1/$API_KEY/server/srv-abc123/runtime-profile/set" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"profile":{}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.servers.setRuntimeProfile("srv-abc123", { profile: {} });

// 3. Inspect the parsed response
console.log(res);

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true
}
PRIVATE · SERVERS

การดำเนินการกับเซิร์ฟเวอร์

ส่งคำสั่งการดำเนินการ (action verb) สำหรับเซิร์ฟเวอร์หนึ่งรายการหรือมากกว่า (deploy|start|stop|undeploy|hard-restart|reconfigure|enable-console|disable-console|spawn-node|kill-node|park|unpark) คำสั่งจะถูกส่งผ่านใน url ส่วน items map จะมีหนึ่งรายการต่อหนึ่งไอเทม

PUT /servers/actions/:action
Auth HMAC + pool-bound key Rate limit 10 req/min URL params :action

พารามิเตอร์ URL

ชื่อ จำเป็น คำอธิบาย
actionrequiredAction verb (e.g. deploy, start, stop, undeploy).

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
itemsobjectrequiredTargets of the action, keyed by item id: { "<itemId>": { ...params } }. Use an empty object per id when no per-item parameters are needed.

ตัวอย่างคำขอ

cURL
curl -X PUT "https://trademire.ai/api/v1/$API_KEY/servers/actions/deploy" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"items":{"srv-abc123":{}}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.servers.action("deploy", { items: { "srv-abc123": {} } });

// 3. Inspect the parsed response
console.log(res);

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": {
    "srv-abc123": {
      "success": true
    }
  }
}
PRIVATE · SERVERS

แผนที่ข้อมูลช่วยเหลือของเซิร์ฟเวอร์

คืนค่า JSON map ที่มีโครงสร้างของทุกเอนด์พอยต์ในหมวดเซิร์ฟเวอร์ ได้แก่ HTTP method คำอธิบาย อัตราจำกัดการใช้งาน พารามิเตอร์ที่จำเป็นและไม่จำเป็น รวมถึงกลุ่มฟิลด์ที่แต่ละเอนด์พอยต์ส่งคืน มีประโยชน์สำหรับการตรวจสอบภายในของ SDK และเอเจนต์

GET /servers/help
Auth None Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/servers/help" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.servers.help();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

ฟิลด์ ประเภท คำอธิบาย
success boolean ระบุว่าการเรียกสำเร็จหรือไม่
category string หมวดหมู่ที่แผนที่ช่วยเหลือนี้อธิบาย
help object คอนเทนเนอร์แผนที่ช่วยเหลือ paths จับคู่แต่ละพาธของเอนด์พอยต์เข้ากับเมทาดาต้าของตน (เมธอด HTTP คำอธิบาย ขีดจำกัดอัตราการเรียก พารามิเตอร์ที่จำเป็นและไม่บังคับ สถานะ isListing เมื่อเกี่ยวข้อง และกลุ่มฟิลด์ที่อ้างอิงถึง) fieldGroups จับคู่แต่ละชื่อกลุ่มเข้ากับตัวอธิบายฟิลด์ของตน (ประเภทและคำอธิบาย) ที่ถูกอ้างอิงจากรายการพาธ

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "category": "servers",
  "help": {
    "paths": {
      "/servers/help": {
        "method": "GET",
        "description": "Returns this help map",
        "rateLimit": 30,
        "params": { "required": [], "optional": [] },
        "fieldGroups": []
      }
    },
    "fieldGroups": {}
  }
}
PRIVATE · TRADING

แผนที่ความช่วยเหลือการเทรด

คืนค่าแผนที่ช่วยเหลือนี้

GET /trading/help
Auth HMAC + pool-bound key Rate limit 30 req/min

ตัวอย่างคำขอ

cURL
curl -X GET "https://trademire.ai/api/v1/$API_KEY/trading/help" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS"
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.trading.help();

// 3. Inspect the parsed response
console.log(res);
PRIVATE · TRADING

รายการโพซิชัน

รายการโพซิชันฟิวเจอร์สที่เปิดอยู่ของ pool (แยกตามสัญญาและประเภทบัญชี)

POST /positions/list
Auth HMAC + pool-bound key Rate limit 30 req/min Pagination

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/positions/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.positions.list({ pagination: { page: 1, limit: 50 } });

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

position[":contractSymbol"]
ฟิลด์ ประเภท คำอธิบาย
contractSymbolstringFutures contract identifier (e.g. BTCUSDT)
sidenumberPosition side (OneWay / Long / Short, see PositionSide enum)
quantitynumberPosition size in contracts
entryPricenumberAverage entry price
markPricenumberCurrent mark price
liquidationPricenumberEstimated liquidation price (0 when not provided)
leveragenumberPosition leverage
isIsolatedbooleanMargin mode (true = isolated, false = cross)
marginAmountnumberMargin allocated to the position (isolated only)
unrealizedPnlnumberUnrealized profit and loss
timestampOpenednumberWhen the position was opened (ms epoch)
accTypenumberAccount type (one of the futures family values)
PRIVATE · TRADING

ดึงรายการคำสั่ง

คืนค่าประวัติคำสั่งของพูล โดยจำกัดขอบเขตตามสิทธิ์ของ API key ที่ผูกไว้ รองรับ search, sorting และการแบ่งหน้าแบบ pagination ด้วย cursor ใช้ filter object เพื่อจำกัดขอบเขตตามสถานะ ตลาด หรือช่วงวันที่

POST /orders/list
Auth HMAC + pool-bound key Rate limit 30 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/orders/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.trading.orders.list();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

order[":orderId"]
ฟิลด์ ประเภท คำอธิบาย
pairstringTrading pair (e.g. BTC_USDT)
sidestringOrder side (buy or sell)
typestringOrder type (limit, market, stop, ...)
statusstringLifecycle status (open, filled, cancelled, ...)
pricenumberOrder price (quote currency)
quantitynumberOrder base quantity
fillednumberFilled base quantity
feenumberCumulative fee paid
createdOnnumberCreation timestamp (ms epoch)
updatedOnnumberLast update timestamp (ms epoch)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "pair": "BTC_USDT",
      "side": "buy",
      "type": "limit",
      "status": "filled",
      "price": 67200,
      "quantity": 0.05,
      "filled": 0.05,
      "fee": 3.36,
      "createdOn": 1700000000000,
      "updatedOn": 1700000060000
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PRIVATE · TRADING

ดึงข้อมูลคำสั่ง

คืนค่ารายละเอียดฉบับเต็มของคำสั่งเดียว - สถานะ การจับคู่คำสั่ง ค่าธรรมเนียม และช่วงเวลาของวงจรการทำงาน

POST /order/:orderId
Auth HMAC + pool-bound key Rate limit 60 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/order/ord-abc123" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.trading.orders.get("ord-abc123");

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

order[":orderId"]
ฟิลด์ ประเภท คำอธิบาย
pairstringTrading pair (e.g. BTC_USDT)
sidestringOrder side (buy or sell)
typestringOrder type (limit, market, stop, ...)
statusstringLifecycle status (open, filled, cancelled, ...)
pricenumberOrder price (quote currency)
quantitynumberOrder base quantity
fillednumberFilled base quantity
feenumberCumulative fee paid
createdOnnumberCreation timestamp (ms epoch)
updatedOnnumberLast update timestamp (ms epoch)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "item": {
    "pair": "BTC_USDT",
    "side": "buy",
    "type": "limit",
    "status": "filled",
    "price": 67200,
    "quantity": 0.05,
    "filled": 0.05,
    "fee": 3.36,
    "createdOn": 1700000000000,
    "updatedOn": 1700000060000
  }
}
PRIVATE · TRADING

ดึงรายการเทรด

คืนค่าประวัติการเทรดของพูล แต่ละรายการคือการจับคู่คำสั่ง (maker หรือ taker) พร้อมราคา ปริมาณ ค่าธรรมเนียม บทบาท และ id ของคำสั่งต้นทาง รองรับการค้นหา/เรียงลำดับ/แบ่งหน้าแบบ cursor มาตรฐาน

POST /trades/list
Auth HMAC + pool-bound key Rate limit 30 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/trades/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.trading.trades.list();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

trade[":tradeId"]
ฟิลด์ ประเภท คำอธิบาย
pairstringTrading pair
sidestringTrade side (buy or sell)
pricenumberExecution price
quantitynumberExecuted base quantity
feenumberFee paid for this fill, in feeAsset
feeAssetstringAsset the fee was taken in
createdOnnumberExecution timestamp (ms epoch)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "pair": "BTC_USDT",
      "side": "buy",
      "price": 67200,
      "quantity": 0.05,
      "fee": 3.36,
      "createdOn": 1700000000000
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PRIVATE · TRADING

ดึงรายการยอดคงเหลือ

คืนค่ายอดคงเหลือแยกตามสินทรัพย์ของพูล แต่ละรายการประกอบด้วย available (ยอดที่ใช้ได้สำหรับคำสั่งใหม่) locked (ถูกกันไว้โดยคำสั่งที่เปิดอยู่) และ total รองรับการค้นหา/เรียงลำดับ/แบ่งหน้าแบบ cursor มาตรฐาน

POST /balances/list
Auth HMAC + pool-bound key Rate limit 30 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/balances/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.trading.balances.list();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

balance[":symbol"]
ฟิลด์ ประเภท คำอธิบาย
symbolstringAsset symbol (e.g. BTC, USDT)
availablenumberAvailable balance for new orders
lockednumberBalance reserved by open orders
totalnumberavailable + locked

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "symbol": "BTC",
      "available": 0.5,
      "locked": 0.05,
      "total": 0.55
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}
PRIVATE · TRADING

ดึงรายการธุรกรรม

คืนค่าบันทึกรายการเงินเข้า/ออกของพูล ได้แก่ การฝาก การถอน และค่าธรรมเนียมแพลตฟอร์ม แต่ละรายการประกอบด้วยประเภท สินทรัพย์ จำนวน สถานะ และ tx hash บนเชน (ถ้ามี) รองรับการค้นหา/เรียงลำดับ/แบ่งหน้าแบบ cursor มาตรฐาน

POST /transactions/list
Auth HMAC + pool-bound key Rate limit 30 req/min

พารามิเตอร์ใน Body

ชื่อ ประเภท จำเป็น คำอธิบาย
filteringobjectoptionalFilter object: { term?: string }. Free-text term matched against the listing.
sortingobjectoptionalSort object: { field, direction }. Direction is asc or desc.
paginationobjectoptionalPage-based pagination: { page: number, limit: number }. page is 1-based; limit is between 10 and 100 (default 10). Response carries { currentPage, totalPages, pageSize, totalRows }.

ตัวอย่างคำขอ

cURL
curl -X POST "https://trademire.ai/api/v1/$API_KEY/transactions/list" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $API_KEY" \
  -H "X-API-Signature: $SIG" \
  -H "X-API-Timestamp: $TS" \
  --data '{"pagination":{"page":1,"limit":50}}'
Node.js
import { PlatformApiClient } from "@trademire/platform-api";

// 1. Configure the client with your API credentials
let client = new PlatformApiClient({
  baseUrl:   "https://trademire.ai/api",
  apiKey:    process.env.API_KEY!,
  apiSecret: process.env.API_SECRET!,
});

// 2. Send the signed request through the typed SDK method
let res = await client.trading.transactions.list();

// 3. Inspect the parsed response
console.log(res);

โครงสร้างการตอบกลับ

transaction[":transactionId"]
ฟิลด์ ประเภท คำอธิบาย
typestringTransaction type (deposit, withdrawal, fee, ...)
symbolstringAsset symbol
amountnumberTransaction amount
feenumberNetwork or platform fee
statusstringTransaction status (pending, confirmed, failed, ...)
txHashstringOn-chain transaction hash if applicable
createdOnnumberCreation timestamp (ms epoch)

ตัวอย่างการตอบกลับ

200 OK APPLICATION/JSON
{
  "success": true,
  "items": [
    {
      "type": "deposit",
      "symbol": "BTC",
      "amount": 0.5,
      "fee": 0.0005,
      "status": "confirmed",
      "txHash": "0xabc",
      "createdOn": 1700000000000
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "pageSize": 50,
    "totalRows": 1
  }
}