參考
HTTP API
不使用 SDK 的整合方可直接呼叫以下端點;除授權與健康檢查外,都要帶 Authorization: Bearer <token>。測試環境位址為 https://sdk-api.lapidinsight.com。
curl https://sdk-api.lapidinsight.com/v1/release/current \
-H "Authorization: Bearer <token>" \
-H "Accept-Encoding: gzip"取一檔證券日 K 的步驟
GET /v1/release/current取得release。GET /v1/release/{release}/symbols以代號查出securityId。GET /v1/release/{release}/sec/{securityId},取datasets["price.daily"].chunks。- 依序
GET /v1/obj/price.daily/{securityId}/{kind}.{hash},依from排序後串接各欄。
規則
- 回應為
application/json,請求帶Accept-Encoding: gzip時回傳壓縮內容。 - 帶
If-None-Match可取得 304;304 仍計入每日請求次數。例外:/v1/release/current帶目前的 ETag(不含*)而回 304 時不計入每日次數,仍計入每秒限流。 {release}格式為YYYY-MM-DD.N;{securityId}為sec_加 26 字元;{kind}為hist、ytd、mtd、snap或fyYYYY。- 分塊路徑不含版本,版本撤回不影響分塊;以版本為路徑的端點對已撤回的版回 410。
- token 有效 30 分鐘,每 24 小時需重新通過平台驗證(改走 register)。token 的
ent決定可存取的資料集。 - 每個回應帶
X-Request-Id,回報問題時請附上。