Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

207 lines (161 sloc) 4.44 KB

日本語

Table of Contents generated with DocToc

Public REST API for Bitbank (2019-09-27)

General API Information

  • The base endpoint is: https://public.bitbank.cc
  • HTTP 4XX return codes are used for malformed requests; the issue is on the sender's side.
  • Any endpoint can return an ERROR; the error payload is as follows:
{
  "success": 0,
  "data": {
    "code": 10000
  }
}
  • For GET endpoints, parameters must be sent as a query string.

General endpoints

Ticker

Get Ticker information

GET /{pair}/ticker

Parameters:

Name Type Mandatory Description
pair string YES pair enum: btc_jpy, xrp_jpy, ltc_btc, eth_btc, mona_jpy, mona_btc, bcc_jpy, bcc_btc

Response:

Name Type Description
sell string the lowest price of sell orders
buy string the highest price of buy orders
high string the highest price in last 24 hours
low string the lowest price in last 24 hours
last string the latest price executed
vol string trading volume in last 24 hours
timestamp number ticked at unix timestamp

response format:

{
  "success": 0,
  "data": {
    "sell": "string",
    "buy": "string",
    "high": "string",
    "low": "string",
    "last": "string",
    "vol": "string",
    "timestamp": 0
  }
}

Depth

Get Depth information.

GET /{pair}/depth

Parameters:

Name Type Mandatory Description
pair string YES pair enum: btc_jpy, xrp_jpy, ltc_btc, eth_btc, mona_jpy, mona_btc, bcc_jpy, bcc_btc

Response:

Name Type Description
asks [string, string][] array of [price, amount]
bids [string, string][] array of [price, amount]

response format:

{
  "success": 1,
  "data": {
    "asks": [
      [
        "string",  "string"
      ]
    ],
    "bids": [
      [
        "string",  "string"
      ]
    ]
  }
}

Transactions

Get latest executed transactions.

GET /{pair}/transactions/{YYYYMMDD}

Parameters:

Name Type Mandatory Description
pair string YES pair enum: btc_jpy, xrp_jpy, ltc_btc, eth_btc, mona_jpy, mona_btc, bcc_jpy, bcc_btc
YYYYMMDD string NO date formatted as YYYYMMDD

Response:

Name Type Description
transaction_id string transaction id
side string enum: buy, sell
price string price
amount string amount
executed_at number executed at unix timestamp

response format:

{
  "success": 1,
  "data": {
    "transactions": [
      {
        "transaction_id": 0,
        "side": "string",
        "price": "string",
        "amount": "string",
        "executed_at": 0
      }
    ]
  }
}

Candlestick

Get candlestick information.

GET /{pair}/candlestick/{candle-type}/{YYYY}

Parameters:

Name Type Mandatory Description
pair string YES pair enum: btc_jpy, xrp_jpy, ltc_btc, eth_btc, mona_jpy, mona_btc, bcc_jpy, bcc_btc
candle-type string YES candle type enum: 1min, 5min, 15min, 30min, 1hour, 4hour, 8hour, 12hour, 1day, 1week
YYYY string YES date formatted as YYYY or YYYYMMDD

Response:

Name Type Description
ohlcv string[] [open, high, low, close, volume, unix timestamp]

response format:

{
  "success": 1,
  "data": {
    "candlestick": [
      {
        "type": "string",
        "ohlcv": [
          [
            "string"
          ]
        ]
      }
    ]
  }
}
You can’t perform that action at this time.