コンテンツにスキップ

Historical.metadata.list_fields

GET/v0/metadata.list_fieldsPython · HTTP

スキーマのレコードの全列を、順に、型と意味とともに返します。データ形式と同じ内容です。

パラメーター

schema str 必須

スキーマ名。

戻り値

list[dict]

{name, type, description} のリスト。

API メソッド
Historical.metadata.list_fields(
    schema: str,
) -> list[dict]
使用例
1
2
3
4
5
import briskapi

client = briskapi.Historical()
for field in client.metadata.list_fields("trades")[:5]:
    print(field)
1
2
3
4
export BRISK_KEY=$(brisk identity --export)   # your archive identity is the API key
curl -G 'https://h2dxahfcj6436nlf3y255exu6e0omhrk.lambda-url.ap-northeast-1.on.aws/v0/metadata.list_fields' \
  -u "$BRISK_KEY:" \
  -d schema=trades
レスポンス例デモで実行した結果
{'name': 'ts_recv', 'type': 'timestamp[ns, tz=UTC]', 'description': "When the uploader's computer received the frame (millisecond precision; the demo: ts_event)"}
{'name': 'ts_event', 'type': 'timestamp[ns, tz=UTC]', 'description': "BRiSK's server stamp for the frame (microseconds); not established to be the exchange's time"}
{'name': 'publisher_id', 'type': 'uint16', 'description': '1 for XTKS.BRISK, 2 for XTKS.BRISKDEMO (metadata.list_publishers)'}
{'name': 'instrument_id', 'type': 'uint32', 'description': 'Fixed per code: digits-only codes are their number, others 100,000 plus base 36'}
{'name': 'action', 'type': 'string', 'description': "'T'"}
[
  {
    "name": "ts_recv",
    "type": "timestamp[ns, tz=UTC]",
    "description": "When the uploader's computer received the frame (millisecond precision; the demo: ts_event)"
  },
  {
    "name": "ts_event",
    "type": "timestamp[ns, tz=UTC]",
    "description": "BRiSK's server stamp for the frame (microseconds); not established to be the exchange's time"
  },
  {
    "name": "publisher_id",
    "type": "uint16",
    "description": "1 for XTKS.BRISK, 2 for XTKS.BRISKDEMO (metadata.list_publishers)"
  },
  {
    "name": "instrument_id",
    "type": "uint32",
    "description": "Fixed per code: digits-only codes are their number, others 100,000 plus base 36"
  },
  {
    "name": "action",
    "type": "string",
    "description": "'T'"
  },
  {
    "name": "side",
    "type": "string",
    "description": "The aggressor: 'B' buyer-initiated, 'A' seller-initiated, 'N' none (most opening prints)"
  },
  {
    "name": "depth",
    "type": "uint8",
    "description": "0"
  },
  {
    "name": "price",
    "type": "double",
    "description": "Trade price (yen)"
…