Hive Developer logo

Hive Developer Portal

Methods:

Used to lookup market history information. These AppBase API methods are still under development and subject to change.

market_history_api.get_market_history

Returns the market history for the internal HBD:HIVE market.

Query Parameters JSON
{
  "bucket_seconds": 0,
  "start": "1970-01-01T00:00:00",
  "end": "1970-01-01T00:00:00"
}
Expected Response JSON
{
  "buckets": [
    {
      "id": 0,
      "open": "2019-12-18T01:51:15",
      "seconds": 15,
      "steem": {
        "high": 100000,
        "low": 100000,
        "open": 100000,
        "close": 100000,
        "volume": 100000
      },
      "symbol": {"nai": "@@000000013", "precision": 3},
      "non_steem": {
        "high": 100000,
        "low": 100000,
        "open": 100000,
        "close": 100000,
        "volume": 100000
      }
    }
  ]
}
Example curl
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":15,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.openhive.network
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":60,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.openhive.network
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":300,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.openhive.network
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":3600,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.openhive.network
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":86400,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.openhive.network

market_history_api.get_market_history_buckets

Returns the bucket seconds being tracked by the plugin.

Query Parameters JSON
{}
Expected Response JSON
{"bucket_sizes": [15, 60, 300, 3600, 86400]}
Example curl
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history_buckets", "id":1}' https://api.openhive.network

market_history_api.get_order_book

Returns the internal market order book.

Query Parameters JSON
{"limit": 500}
Expected Response JSON
{
  "bids": [],
  "asks": [
    {
      "order_price": {
        "base": {
          "amount": "1000",
          "precision": 3,
          "nai": "@@000000021"
        },
        "quote": {
          "amount": "100",
          "precision": 6,
          "nai": "@@100042205"
        }
      },
      "real_price": "0.10000000000000001",
      "steem": 100000,
      "sbd": 10000,
      "created": "2019-12-18T01:24:42"
    },
    {
      "order_price": {
        "base": {
          "amount": "1000",
          "precision": 3,
          "nai": "@@000000021"
        },
        "quote": {
          "amount": "1000",
          "precision": 6,
          "nai": "@@100041380"
        }
      },
      "real_price": "1.00000000000000000",
      "steem": 1000,
      "sbd": 1000,
      "created": "2019-12-18T01:22:12"
    },
    {
      "order_price": {
        "base": {
          "amount": "1000",
          "precision": 3,
          "nai": "@@000000021"
        },
        "quote": {
          "amount": "100000000000",
          "precision": 11,
          "nai": "@@100037284"
        }
      },
      "real_price": "100000000.00000000000000000",
      "steem": 1000,
      "sbd": "100000000000",
      "created": "2019-12-18T01:20:21"
    }
  ]
}
Example curl
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_order_book", "params":{"limit":10}, "id":1}' https://api.openhive.network
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_order_book", "params":{"limit":50}, "id":1}' https://api.openhive.network

market_history_api.get_recent_trades

Returns the most recent trades for the internal HBD:HIVE market.

Query Parameters JSON
{"limit": 1000}
Expected Response JSON
{
  "trades": [
    {
      "date": "2019-12-18T01:51:24",
      "current_pays": {
        "amount": "100000",
        "precision": 3,
        "nai": "@@000000013"
      },
      "open_pays": {
        "amount": "100000",
        "precision": 3,
        "nai": "@@000000021"
      }
    }
  ]
}
Example curl
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_recent_trades", "params":{"limit":10}, "id":1}' https://api.openhive.network
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_recent_trades", "params":{"limit":500}, "id":1}' https://api.openhive.network

market_history_api.get_ticker

Returns the market ticker for the internal HBD:HIVE market.

Query Parameters JSON
{}
Expected Response JSON
{
  "latest": "1.00000000000000000",
  "lowest_ask": "0.10000000000000001",
  "highest_bid": "0.00000000000000000",
  "percent_change": "0.00000000000000000",
  "steem_volume": {
    "amount": "100000",
    "precision": 3,
    "nai": "@@000000021"
  },
  "sbd_volume": {
    "amount": "100000",
    "precision": 3,
    "nai": "@@000000013"
  }
}
Example curl
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_ticker", "id":1}' https://api.openhive.network

market_history_api.get_trade_history

Returns the trade history for the internal HBD:HIVE market.

Query Parameters JSON
{
  "start": "1970-01-01T00:00:00",
  "end": "1970-01-01T00:00:00",
  "limit": 1000
}
Expected Response JSON
{
  "trades": [
    {
      "date": "2019-12-18T01:51:24",
      "current_pays": {
        "amount": "100000",
        "precision": 3,
        "nai": "@@000000013"
      },
      "open_pays": {
        "amount": "100000",
        "precision": 3,
        "nai": "@@000000021"
      }
    }
  ]
}
Example curl
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_trade_history", "params":{"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00","limit":10}, "id":1}' https://api.openhive.network

market_history_api.get_volume

Returns the market volume for the past 24 hours.

Query Parameters JSON
{}
Expected Response JSON
{
  "steem_volume": {
    "amount": "0",
    "precision": 3,
    "nai": "@@000000021"
  },
  "sbd_volume": {
    "amount": "0",
    "precision": 3,
    "nai": "@@000000013"
  }
}
Example curl
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_volume", "id":1}' https://api.openhive.network