BitDAX Developer Platform

API Documentation

Use the BitDAX public API to access market data, check balances, manage spot orders, and receive order state callbacks.

Base URL https://bitdax.co/api/public/v1/

Auth

HMAC requests require the following HTTP headers. Public market data endpoints can be called without an API key, while account and order endpoints require authentication.

Header Description
APIKEY Your API key.
SIGNATURE HMAC-SHA256 hash generated from the API key and nonce, signed with your API secret.
NONCE Timestamp in milliseconds.

Python example

import requests
from pprint import pprint
import hashlib
import hmac
import time

def make_request(uri, data=None):
    url = 'https://bitdax.co/api/public/v1/' + uri
    nonce = str(int(round(time.time() * 1000)))
    api_key = '<YOUR API KEY>'
    secret_key = '<YOUR SECRET KEY>'

    message = api_key + nonce
    signature = hmac.new(
        secret_key.encode(),
        message.encode('utf-8'),
        hashlib.sha256
    ).hexdigest().upper()

    headers = {
        'APIKEY': api_key,
        'SIGNATURE': signature,
        'NONCE': nonce,
    }

    if data:
        return requests.post(url, headers=headers, json=data)

    return requests.get(url, headers=headers)

Common response status codes

200

OK

201

Created

400

Incorrect query params. Details are returned in response.

404

Requested object was not found.

429

Too many requests. Max 2 requests per second.

Market endpoints

Summary

Overview of market data for all tickers.

GET
URL /api/public/v1/summary

Example request

GET https://bitdax.co/api/public/v1/summary

Success response

{
  "data": {
    "BTC_USDT": {
      "last_price": 9503.364483,
      "high_24h": 9519.215928,
      "low_24h": 9475.8597,
      "base_volume": 0.20381013,
      "quote_volume": 1934.88922435,
      "lowest_ask": 9503.364483,
      "highest_bid": 9475.8597,
      "percent_change": 0.0345,
      "is_frozen": 0
    }
  },
  "coins": {
    "BTC": {
      "name": "Bitcoin",
      "withdraw": "ON",
      "deposit": "ON"
    }
  }
}

Assets list

Returns assets list.

GET
URL /api/public/v1/assets

Example request

GET https://bitdax.co/api/public/v1/assets

Success response

{
  "BTC": { "name": "Bitcoin" },
  "ETH": { "name": "Ethereum" },
  "USDT": { "name": "Tether" }
}

Markets list

Returns markets list.

GET
URL /api/public/v1/markets

Example request

GET https://bitdax.co/api/public/v1/markets

Success response

[
  {
    "id": "BTC-USDT",
    "base": "BTC",
    "quote": "USDT"
  },
  {
    "id": "ETH-USDT",
    "base": "ETH",
    "quote": "USDT"
  }
]

Tickers

Returns stats of markets.

GET
URL /api/public/v1/ticker

Example request

GET https://bitdax.co/api/public/v1/ticker

Success response

{
  "BTC_USDT": {
    "last_price": 9503.364483,
    "base_volume": 0.20381013,
    "quote_volume": 1934.88922435,
    "is_frozen": 0
  },
  "ETH_USDT": {
    "last_price": 198.82570815,
    "base_volume": 266.91056844,
    "quote_volume": 54669.13833,
    "is_frozen": 0
  }
}

Binance BTC-USDT price

Returns external BTC-USDT reference price.

GET
URL /api/public/v1/otcprice

Example request

GET https://bitdax.co/api/public/v1/otcprice

Success response

{
  "price": 5234.32
}

Order book

Returns the order book of a specified market.

GET
URL /api/public/v1/orderbook/

Params

  • depth Optional integer. Number of entries. 100 by default, max 500.

Example request

GET https://bitdax.co/api/public/v1/orderbook/?pair=BTC-USDT&depth=100

Success response

{
  "timestamp": 1569313042682,
  "asks": [[9733.685, 0.00037616]],
  "bids": [[9733.183, 0.00030966]]
}

Last trades

Returns recent trades.

GET
URL /api/public/v1/trades/

Example request

GET https://bitdax.co/api/public/v1/trades/?pair=BTC-USDT

Success response

[
  {
    "trade_id": 30694469,
    "price": 9724.14488444,
    "base_volume": 0.00038326,
    "quote_volume": 3.7268757684104745,
    "trade_timestamp": 1569313098,
    "type": "buy"
  }
]

Balances

Balances

Returns balances of all wallets. Requires API key.

GET
URL /api/public/v1/balance

Example request

GET https://bitdax.co/api/public/v1/balance

Success response

{
  "BTC": {
    "actual": 73.59451,
    "orders": 0.40877
  },
  "USDT": {
    "actual": 100078.73854682,
    "orders": 6.61468349
  }
}

Selected wallet balance

Returns balances of selected wallet. Requires API key.

GET
URL /api/public/v1/balance/:wallet_name

Example request

GET https://bitdax.co/api/public/v1/balance/BTC

Success response

{
  "currency": "BTC",
  "actual": 73.59498,
  "orders": 0.40855
}

Orders

Order response params: operation: 0 = Buy, 1 = Sell state: 0 = Opened, 1 = Closed, 2 = Cancelled type: 0 = Limit Order, 2 = OTC Order

Orders list

Returns user orders list. Requires API key.

GET
URL /api/public/v1/order

Params

  • limit Optional integer. Number of entries.
  • pair Optional pair name, for example BTC-USDT.
  • state Optional. 0 = Opened, 1 = Closed, 2 = Cancelled.
  • operation Optional. 0 = Buy, 1 = Sell.

Example request

GET https://bitdax.co/api/public/v1/order?pair=BTC-USDT&state=0

Success response

[
  {
    "id": 8467,
    "state": 0,
    "pair": "BTC-USDT",
    "operation": 0,
    "type": 0,
    "quantity": "0.00048000",
    "price": "5272.67000000",
    "executed": false,
    "quantity_left": "0.00048000",
    "updated": 1555579069649,
    "created": 1555579069649,
    "vwap": "0"
  }
]

Order details

Returns order details. Requires API key.

GET
URL /api/public/v1/order/:id

Example request

GET https://bitdax.co/api/public/v1/order/8467

Success response

{
  "id": 8467,
  "state": 0,
  "pair": "BTC-USDT",
  "operation": 0,
  "type": 0,
  "quantity": "0.00048000",
  "price": "5272.67000000",
  "executed": false,
  "matches": [
    {
      "id": 491569,
      "order_price": "1917.00000000",
      "quantity": "0.00100000"
    }
  ]
}

Create limit order

Creates a new limit order. Requires API key.

POST
URL /api/public/v1/order

Body data

  • type Required. Always 0 for limit order.
  • pair Required. Pair name, for example BTC-USDT.
  • quantity Required decimal or float.
  • price Required decimal or float.
  • operation Required. 0 = Buy, 1 = Sell.

Example request

POST https://bitdax.co/api/public/v1/order

{
  "type": 0,
  "pair": "BTC-USDT",
  "quantity": 0.01,
  "price": 50000,
  "operation": 0
}

Success response

{
  "id": 8467,
  "state": 0,
  "pair": "BTC-USDT",
  "operation": 0,
  "type": 0,
  "quantity": "0.01000000",
  "price": "50000.00000000",
  "executed": false,
  "quantity_left": "0.01000000"
}

Create OTC order

Creates a new OTC order. Requires API key.

POST
URL /api/public/v1/order

Body data

  • type Required. Always 2 for OTC order.
  • pair Required. Pair name, for example BTC-USDT.
  • quantity Required decimal or float.
  • operation Required. 0 = Buy, 1 = Sell.
  • otc_percent Required decimal or float.
  • otc_limit Required decimal or float.

Example request

POST https://bitdax.co/api/public/v1/order

{
  "type": 2,
  "pair": "BTC-USDT",
  "quantity": 1,
  "operation": 1,
  "otc_percent": 2,
  "otc_limit": 5272
}

Success response

{
  "id": 8466,
  "state": 0,
  "pair": "BTC-USDT",
  "operation": 1,
  "type": 2,
  "quantity": "1.00000000",
  "price": "5324.40000000",
  "executed": false,
  "quantity_left": "1.00000000",
  "otc_percent": "2.00000000",
  "otc_limit": "5272.00000000"
}

Update limit order

Updates an existing limit order. Requires API key.

PUT
URL /api/public/v1/order/:id

Body data

  • quantity Required decimal or float.
  • price Required decimal or float.

Example request

PUT https://bitdax.co/api/public/v1/order/8467

{
  "quantity": 0.02,
  "price": 51000
}

Success response

{
  "data": null,
  "status": 1
}

Update OTC order

Updates an existing OTC order. Requires API key.

PUT
URL /api/public/v1/order/:id

Body data

  • quantity Required decimal or float.
  • otc_percent Required decimal or float.
  • otc_limit Required decimal or float.

Example request

PUT https://bitdax.co/api/public/v1/order/8466

{
  "quantity": 2,
  "otc_percent": 1.5,
  "otc_limit": 5272
}

Success response

{
  "data": null,
  "status": 1
}

Cancel order

Cancels an order. Requires API key.

DELETE
URL /api/public/v1/order/:id

Example request

DELETE https://bitdax.co/api/public/v1/order/8467

Success response

{
  "data": null,
  "status": 1
}

Orders state callback

Configure your callback URL in the account API settings. BitDAX sends order state updates using JSON body data and the same API headers.

Content-Type application/json
APIKEY Your API key.
SIGNATURE Signed callback payload signature.
NONCE Timestamp in milliseconds.
{
  "id": 3525,
  "data": {
    "special_data": {
      "percent": null,
      "limit": null
    }
  },
  "state": 1,
  "pair": "BTC-USDT",
  "operation": 0,
  "type": 0,
  "quantity": "0.01000000",
  "price": "1917.48000000",
  "executed": true,
  "quantity_left": "0E-8",
  "updated": 1556289070017,
  "created": 1556289065082,
  "vwap": "0E-8",
  "otc_percent": null,
  "otc_limit": null,
  "matches": [
    {
      "id": 491569,
      "order_price": "1917.00000000",
      "quantity": "0.00100000"
    }
  ]
}