NAV
json

Introduction

Welcome to the XBTS Free Market API! You can use our API to access XBTS DEX API endpoints, which can get information on market assets, trade pairs, order book, tickers, trade history from blockchain.

Data is broadcasted from the blockchain!

API endpoint https://cmc.xbts.io/api/v2/

Summary

Overview of market data for all tickers & all markets.

Request URL GET https://cmc.xbts.io/v2/summary

About Data:

The above command returns JSON structured like this:

{
  "tickers": {
    "BTS_STH": {
      "base_id": 463,
      "quote_id": 5602,
      "base_symbol": "BTS",
      "quote_symbol": "STH",
      "last": "0.18800000",
      "sell": "0.20408163",
      "buy": "0.18800000",
      "base_volume": "306.34583",
      "quote_volume": "1635.48191",
      "change": "1.34",
      "type": "spot",
      "isFrozen": 0,
      "url": "https://ex.xbts.io/market/XBTSX.STH_BTS"
    },
    "USDT_BTC": {
      "base_id": 825,
      "quote_id": 1,
      "base_symbol": "USDT",
      "quote_symbol": "BTC",
      "last": "31438.94939968",
      "sell": "31438.94939968",
      "buy": "31255.93000000",
      "base_volume": "5957.699194",
      "quote_volume": "0.19573896",
      "change": "0.75",
      "type": "spot",
      "isFrozen": 0,
      "url": "https://ex.xbts.io/market/XBTSX.BTC_XBTSX.USDT"
    }
  },
  "assets": {
    "STH": {
      "name": "SmartHoldem",
      "ucid": 5602,
      "can_withdraw": true,
      "can_deposit": true,
      "min_withdraw": 10,
      "max_withdraw ": 0,
      "maker_fee": 0.1,
      "taker_fee": 0.1,
      "id": "4099",
      "precision": 6,
      "decimals": 8,
      "prefix": "XBTSX.",
      "active": true
    },
    "CNY": {
      "name": "bitCNY",
      "ucid": -1,
      "can_withdraw": false,
      "can_deposit": false,
      "min_withdraw": 1,
      "max_withdraw ": 0,
      "maker_fee": 0,
      "taker_fee": 0,
      "id": "113",
      "precision": 4,
      "decimals": 4,
      "prefix": "",
      "active": true
    },
    "BTC": {
      "name": "Bitcoin",
      "ucid": 1,
      "can_withdraw": true,
      "can_deposit": true,
      "min_withdraw": 0.005,
      "max_withdraw ": 0,
      "maker_fee": 0.1,
      "taker_fee": 0.1,
      "id": "4157",
      "precision": 8,
      "decimals": 8,
      "prefix": "XBTSX.",
      "active": true
    }
  },
  "total": {
    "pairs": 288,
    "assets": 60
  }
}

Assets

Display all listed coins & tokens

Request URL GET https://cmc.xbts.io/v2/assets

About Return Data:

The above command returns JSON structured like this:

{
  "STH": {
    "name": "SmartHoldem",
    "ucid": 5602,
    "can_withdraw": true,
    "can_deposit": true,
    "min_withdraw": 10,
    "max_withdraw ": 0,
    "maker_fee": 0.1,
    "taker_fee": 0.1,
    "id": "4099",
    "precision": 6,
    "decimals": 8,
    "prefix": "XBTSX.",
    "active": true
  },
  "BTS": {
    "name": "BitShares",
    "ucid": 463,
    "can_withdraw": true,
    "can_deposit": true,
    "min_withdraw": 0.1,
    "max_withdraw ": 0,
    "maker_fee": 0,
    "taker_fee": 0,
    "id": "0",
    "precision": 5,
    "decimals": 5,
    "prefix": "",
    "active": true
  },
  "BTC": {
    "name": "Bitcoin",
    "ucid": 1,
    "can_withdraw": true,
    "can_deposit": true,
    "min_withdraw": 0.005,
    "max_withdraw ": 0,
    "maker_fee": 0.1,
    "taker_fee": 0.1,
    "id": "4157",
    "precision": 8,
    "decimals": 8,
    "prefix": "XBTSX.",
    "active": true
  },
  "USDT": {
    "name": "TetherUSD",
    "ucid": 825,
    "can_withdraw": true,
    "can_deposit": true,
    "min_withdraw": 10,
    "max_withdraw ": 0,
    "maker_fee": 0.08,
    "taker_fee": 0.08,
    "id": "5589",
    "precision": 6,
    "decimals": 6,
    "prefix": "XBTSX.",
    "active": true
  }
}

Tickers

All Tickers

Summary of all tickers

Request URL GET https://cmc.xbts.io/v2/tickers

About Return Data:

The above command returns JSON structured like this:

{
  "timestamp": 1654634804,
  "ticker": {
    "BTS_STH": {
      "base_id": 463,
      "quote_id": 5602,
      "base_symbol": "BTS",
      "quote_symbol": "STH",
      "last": "0.18800000",
      "sell": "0.20408163",
      "buy": "0.18800000",
      "base_volume": "306.34583",
      "quote_volume": "1635.48191",
      "change": "1.34",
      "type": "spot",
      "isFrozen": 0,
      "url": "https://ex.xbts.io/market/XBTSX.STH_BTS"
    },
    "USDT_USDC": {
      "base_id": 825,
      "quote_id": 3408,
      "base_symbol": "USDT",
      "quote_symbol": "USDC",
      "last": "1.01000000",
      "sell": "1.01000000",
      "buy": "0.99000000",
      "base_volume": "254.824794",
      "quote_volume": "253.676391",
      "change": "0",
      "type": "spot",
      "isFrozen": 0,
      "url": "https://ex.xbts.io/market/XBTSX.USDC_XBTSX.USDT"
    },
    "USDT_HIVE": {
      "base_id": 825,
      "quote_id": 5370,
      "base_symbol": "USDT",
      "quote_symbol": "HIVE",
      "last": "0.60027678",
      "sell": "0.59979400",
      "buy": "0.59520900",
      "base_volume": "5597.333138",
      "quote_volume": "9523.454411",
      "change": "8.13",
      "type": "spot",
      "isFrozen": 0,
      "url": "https://ex.xbts.io/market/XBTSX.HIVE_XBTSX.USDT"
    }
  },
  "totalPairs": 288
}

This endpoint retrieves all tickers.

Ticker

Get specific ticker

Request URL GET https://cmc.xbts.io/v2/tickers/<ticker>

Request Data:

ticker - as USDT_BTC

About Return Data:

The above command returns JSON structured like this GET https://cmc.xbts.io/v2/tickers/BTS_STH:

{
  "BTS_STH": {
    "base_id": 463,
    "quote_id": 5602,
    "base_symbol": "BTS",
    "quote_symbol": "STH",
    "last": "0.18800000",
    "sell": "0.20408163",
    "buy": "0.18800000",
    "base_volume": "306.34583",
    "quote_volume": "1635.48191",
    "change": "1.34",
    "type": "spot",
    "isFrozen": 0,
    "url": "https://ex.xbts.io/market/XBTSX.STH_BTS",
    "timestamp": 1654640489
  }
}

Query Parameters

Parameter Description
ticker Any XBTS ticker ex. BTS_STH

Orderbook

Return open orders for one ticker

Request URL GET /orderbook/<ticker>

The above command returns JSON structured like this GET https://cmc.xbts.io/v2/orderbook/BTS_STH?depth=50

{
  "timestamp": 1654641085,
  "base": "BTS",
  "quote": "STH",
  "bids": [
    {
      "price": "0.18800000",
      "quote": "0.980372",
      "base": "0.18431"
    },
    {
      "price": "0.18700000",
      "quote": "1.844331",
      "base": "0.34489"
    },
    {
      "price": "0.18600000",
      "quote": "11.693387",
      "base": "2.17497"
    }
  ],
  "asks": [
    {
      "price": "0.36363620",
      "quote": "50",
      "base": "18.18181"
    },
    {
      "price": "0.39500000",
      "quote": "10000",
      "base": "3950"
    },
    {
      "price": "0.39603960",
      "quote": "50",
      "base": "19.80198"
    }
  ]
}

Trades

Trade history

Returns last trades history (up to 300) for specified ticker

Request URL GET https://cmc.xbts.io/v2/trades/<ticker>?limit=300

The above command returns JSON structured like this GET https://cmc.xbts.io/v2/trades/BTS_STH?limit=100

[
  {
    "trade_id": "190539730",
    "price": "0.18800000",
    "base_volume": "18.61569",
    "quote_volume": "99.019628",
    "timestamp": 1654614921,
    "type": "sell"
  },
  {
    "trade_id": "190539728",
    "price": "0.18900025",
    "base_volume": "0.11409",
    "quote_volume": "0.603650",
    "timestamp": 1654614921,
    "type": "sell"
  },
  {
    "trade_id": "190539476",
    "price": "0.18900000",
    "base_volume": "18.78591",
    "quote_volume": "99.396350",
    "timestamp": 1654609419,
    "type": "sell"
  }
]

Market history

Returns market price & volume history for specified ticker

Request URL GET https://cmc.xbts.io/v2/history/market/<ticker>

The above command returns JSON structured like this GET https://cmc.xbts.io/v2/history/market/BTS_STH

[
  {
    "base": "BTS",
    "quote": "STH",
    "date": "2021-11-20T00:00:00",
    "base_volume": "75712.59218",
    "quote_volume": "875887.287249",
    "high_price": "0.09950",
    "low_price": "0.07214",
    "open_price": "0.08031",
    "close_price": "0.09950",
    "avg_price": "0.08786"
  },
  {
    "base": "BTS",
    "quote": "STH",
    "date": "2021-11-21T00:00:00",
    "base_volume": "127192.52779",
    "quote_volume": "1870899.535698",
    "high_price": "0.09950",
    "low_price": "0.06000",
    "open_price": "0.08245",
    "close_price": "0.09900",
    "avg_price": "0.08524"
  },
  {
    "base": "BTS",
    "quote": "STH",
    "date": "2021-11-22T00:00:00",
    "base_volume": "3501.53982",
    "quote_volume": "39503.639947",
    "high_price": "0.09800",
    "low_price": "0.07800",
    "open_price": "0.08900",
    "close_price": "0.08321",
    "avg_price": "0.08705"
  }
]