跳到正文

condenser_api.get_market_history ​

Purpose ​

返回内部 SBD:STEEM 市场的行情历史(market history)。参数:bucket_seconds:int;start:timestamp;end:timestamp

bucket_seconds (int)start (timestamp)end (timestamp)
15"2018-01-01T00:00:00""2018-01-02T00:00:00"查询 2018 年 1 月 1 日至 2018 年 1 月 2 日之间的行情历史,按 15 秒分段。
60"2018-01-01T00:00:00""2018-01-02T00:00:00"查询 2018 年 1 月 1 日至 2018 年 1 月 2 日之间的行情历史,按 1 分钟分段。
300"2018-01-01T00:00:00""2018-01-02T00:00:00"查询 2018 年 1 月 1 日至 2018 年 1 月 2 日之间的行情历史,按 5 分钟分段。
3600"2018-01-01T00:00:00""2018-01-02T00:00:00"查询 2018 年 1 月 1 日至 2018 年 1 月 2 日之间的行情历史,按 1 小时分段。
86400"2018-01-01T00:00:00""2018-01-02T00:00:00"查询 2018 年 1 月 1 日至 2018 年 1 月 2 日之间的行情历史,按 1 天分段。

另见:market_history_api.get_market_history

Parameters ​

PARAMETERS
json
[
  0,
  "1970-01-01T00:00:00",
  "1970-01-01T00:00:00"
]

Example ​

Example 1 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "condenser_api.get_market_history",
    "params": [
      15,
      "2018-01-01T00:00:00",
      "2018-01-02T00:00:00"
    ],
    "id": 1
  }'

Example 2 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "condenser_api.get_market_history",
    "params": [
      60,
      "2018-01-01T00:00:00",
      "2018-01-02T00:00:00"
    ],
    "id": 1
  }'

Example 3 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "condenser_api.get_market_history",
    "params": [
      300,
      "2018-01-01T00:00:00",
      "2018-01-02T00:00:00"
    ],
    "id": 1
  }'

Example 4 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "condenser_api.get_market_history",
    "params": [
      3600,
      "2018-01-01T00:00:00",
      "2018-01-02T00:00:00"
    ],
    "id": 1
  }'

Example 5 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "condenser_api.get_market_history",
    "params": [
      86400,
      "2018-01-01T00:00:00",
      "2018-01-02T00:00:00"
    ],
    "id": 1
  }'

Response ​

RESPONSE
json
[
  {
    "id": 0,
    "open": "1970-01-01T00:00:00",
    "seconds": 0,
    "steem": {
      "high": 0,
      "low": 0,
      "open": 0,
      "close": 0,
      "volume": 0
    },
    "non_steem": {
      "high": 0,
      "low": 0,
      "open": 0,
      "close": 0,
      "volume": 0
    }
  }
]