NAV Navbar
json
  • Introduction
  • Assets
  • Tickers
  • Market History
  • Account
  • Coin Info
  • Introduction

    Welcome to the official documentation XBTS DEX API! You can use our API to access public API endpoints.

    We have language bindings in Json! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

    information is broadcasted from the blockchain!

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

    Assets

    Total information about XBTS coins Since several exchanges operate in the blockchain, all XBTS-coins have a unique internal prefix - XBTSX.X

    List Available Assets on XBTS exchange.

    https://api.xbts.io/api/assets
    

    The above command returns JSON all balances by account:

    [
      {
          "ticker": "BTC",
          "title": "Bitcoin",
          "precision": 8,
          "market_fee_percent": 0.05,
          "market_supply": 1.258605,
          "type": "coin",
          "id": "4157",
          "issuer": "1.2.1014725",
          "prefix": "XBTSX",
          "website": "https://bitcoin.org",
          "explorer": "https://blockexplorer.com"
      },
      {
            "ticker": "COF",
            "title": "CoffeeCoin",
            "precision": 3,
            "market_fee_percent": 0.05,
            "market_supply": 602354.514,
            "type": "token_waves",
            "id": "4581",
            "issuer": "1.2.1106976",
            "prefix": "XBTSX",
            "website": "https://wavesplatform.com/",
            "explorer": "http://wavesexplorer.com/"
      },
      {
          "ticker": "STH",
          "title": "SmartHoldem",
          "precision": 6,
          "market_fee_percent": 0,
          "market_supply": 36557779.092862,
          "type": "coin",
          "id": "4099",
          "issuer": "1.2.1003283",
          "prefix": "XBTSX",
          "website": "https://smartholdem.io",
          "explorer": "https://blockexplorer.smartholdem.io"
      }
        ...
    

    GET https://api.xbts.io/api/assets

    Return JSON information about all XBTS assets.

    Tickers

    You can get a list of XBTS tickers in any direction: sth_bts,sth_btc,sth_ruble,onion_egc

    lowercase and uppercase tickers are supported: sth_bts,STH_BTC

    Get Single Ticker Pair

    https://api.xbts.io/ticker/sth_bts
    

    The above command returns JSON structured like this:

    {
      "STH_BTS": {
        "high": "0.00726",
        "low": "0.006764",
        "avg": "0.00701",
        "vol": "2440.94632",
        "vol_cur": "342373.964876",
        "last": "0.00678",
        "buy": "0.00676",
        "sell": "0.00718",
        "percent_change": "-5.96",
        "updated": 1547125050
      }
    }
    

    Get current ticker information from blockchain

    GET https://api.xbts.io/ticker/sth_btc

    Return JSON.

    Get Multi Tickers

    List pairs separated by commas, without spaces

    https://api.xbts.io/api/ticker/sth_bts,sth_waves,bts_btc,btc_ruble,nvc_btc
    

    The above command returns JSON structured like this:

    {
      "STH_BTS": {
        "high": "0.00726",
        "low": "0.006764",
        "avg": "0.00701",
        "vol": "2440.94632",
        "vol_cur": "342373.964876",
        "last": "0.00678",
        "buy": "0.00676",
        "sell": "0.00718",
        "percent_change": "-5.96",
        "updated": 1547125359
      },
      "BTS_BTC": {
        "high": "0.00001001",
        "low": "0.0000119",
        "avg": "0.00001095",
        "vol": "0.00510795",
        "vol_cur": "433.0283",
        "last": "0.00001011",
        "buy": "0.00001011",
        "sell": "0.00001189",
        "percent_change": "-15.07",
        "updated": 1547125359
      },
      "BTC_RUBLE": {
        "high": "273075.9148",
        "low": "273075.9148",
        "avg": "273075.9148",
        "vol": "0",
        "vol_cur": "0",
        "last": "273075.9148",
        "buy": "273075.9148",
        "sell": "300000",
        "percent_change": "0",
        "updated": 1547125359
      },
      ...
    }
    

    GET https://api.xbts.io/api/ticker/sth_bts,sth_waves,bts_btc,btc_ruble,nvc_btc

    Return JSON

    Liquid Pairs by Ticker

    https://api.xbts.io/api/liquid/sth
    

    The above command returns JSON structured like this:

    {
      "pairs": {
    ...
        "STH_BTS": {
          "high": "0.00726",
          "low": "0.006764",
          "avg": "0.00701",
          "vol": "2559.83066",
          "vol_cur": "358982.717585",
          "last": "0.00717",
          "buy": "0.00676",
          "sell": "0.00718",
          "percent_change": "-0.55",
          "updated": 1547126883
        },
        "STH_BTC": {
          "high": "0.00000006",
          "low": "0.00000008",
          "avg": "0.00000007",
          "vol": "0.00046462",
          "vol_cur": "6738.041932",
          "last": "0.00000006",
          "buy": "0.00000005",
          "sell": "0.00000006",
          "percent_change": "-24.99",
          "updated": 1547126883
        },
        "STH_ONION": {
          "high": "0.00076923",
          "low": "0.00076923",
          "avg": "0.00076923",
          "vol": "8.63261094",
          "vol_cur": "11222.394222",
          "last": "0.00076923",
          "buy": "0.00076923",
          "sell": "0.00125",
          "percent_change": "15.38",
          "updated": 1547126883
        },
        "STH_ETH": {
          "high": "0.0000019",
          "low": "0.0000025",
          "avg": "0.0000022",
          "vol": "0.0011181",
          "vol_cur": "525.314441",
          "last": "0.0000025",
          "buy": "0.000002",
          "sell": "0.000003",
          "percent_change": "28.2",
          "updated": 1547126883
        },
        ...
      },
      "count": 15
    }
    

    Get current information about liquid ticker pairs from blockchain

    https://api.xbts.io/api/liquid/sth

    Returns a list of all pairs that were traded for the specified ticker in the last 24 hours

    Market 24h Tickers

    https://api.xbts.io/api/market24
    

    The above command returns JSON structured like this:

    {
    ...
         "STH_BTS": {
          "high": "0.00692",
          "low": "0.00689",
          "avg": "0.0069",
          "vol": "2510.44111",
          "vol_cur": "365535.024925",
          "last": "0.00692",
          "buy": "0.00688",
          "sell": "0.00692",
          "percent_change": "-1.56",
          "updated": 1547589057
        },
        "BTC_BTS": {
          "high": "94786.72982",
          "low": "94786.72982",
          "avg": "94786.72982",
          "vol": "1278.91165",
          "vol_cur": "0.01351127",
          "last": "94786.72982",
          "buy": "84000.084",
          "sell": "94786.72982",
          "percent_change": "12.84",
          "updated": 1547589057
        },
        "WAVES_BTS": {
          "high": "72.5",
          "low": "72.5",
          "avg": "72.5",
          "vol": "0.07242",
          "vol_cur": "0.0009989",
          "last": "72.5",
          "buy": "72.5",
          "sell": "75",
          "percent_change": "0",
          "updated": 1547589057
        }
    }
    

    Get information about liquid market pairs in 24 hours

    https://api.xbts.io/api/market24

    Returns a list of all pairs that were traded on market in the last 24 hours

    Market History

    Get trades history of selected pair

    GET https://api.xbts.io/api/history/market/sth_bts/90/days

    are supported period: days or hours up to 365

    History by Days

    https://api.xbts.io/api/history/market/sth_bts/3/days
    

    The above command returns JSON Market History latest 3 days:

    [
      {
        "timeutc": "2019-01-08T00:00:00",
        "time": 1546894800,
        "open": "0.00724",
        "high": "0.00727",
        "low": "0.00678",
        "close": "0.00725",
        "vol": "2516.64974",
        "vol_cur": "348502.484273",
        "avg": "0.007025"
      },
      {
        "timeutc": "2019-01-09T00:00:00",
        "time": 1546981200,
        "open": "0.00722",
        "high": "0.00724",
        "low": "0.00677",
        "close": "0.00715",
        "vol": "2527.84542",
        "vol_cur": "352046.713053",
        "avg": "0.007005"
      },
      {
        "timeutc": "2019-01-10T00:00:00",
        "time": 1547067600,
        "open": "0.00714",
        "high": "0.00726",
        "low": "0.00676",
        "close": "0.00677",
        "vol": "2079.88220",
        "vol_cur": "291781.101463",
        "avg": "0.007010"
      }
    ]
    

    GET https://api.xbts.io/api/history/market/sth_bts/14/days

    Return JSON information about market history coin by days.

    ...

    History by Hours

    https://api.xbts.io/api/history/market/sth_bts/4/hours
    

    The above command returns JSON Market History Ticker by 4 Hours:

    [
      {
        "timeHuman": "2019-01-10T12:00:00",
        "timeServer": 1547118000,
        "open": "0.00717",
        "high": "0.00726",
        "low": "0.00676",
        "close": "0.00726",
        "vol": "534.15226",
        "vol_cur": "75071.409549",
        "avg": "0.007010"
      },
      {
        "timeHuman": "2019-01-10T13:00:00",
        "timeServer": 1547121600,
        "open": "0.00678",
        "high": "0.00718",
        "low": "0.00678",
        "close": "0.00678",
        "vol": "33.35672",
        "vol_cur": "4914.056362",
        "avg": "0.006980"
      },
      {
        "timeHuman": "2019-01-10T14:00:00",
        "timeServer": 1547125200,
        "open": "0.00676",
        "high": "0.00717",
        "low": "0.00676",
        "close": "0.00677",
        "vol": "130.47445",
        "vol_cur": "18320.734509",
        "avg": "0.006965"
      }
    ]
    

    GET https://api.xbts.io/api/history/market/sth_bts/4/hours

    Return JSON information about market history coin by hours.

    Account

    Information about accounts is public and is provided by the blockchain.

    Displays balances that are not in orders

    Get Account Balances

    https://api.xbts.io/account/getbalance/xbtsx
    

    The above command returns JSON all balances by account:

    {
      "BTS": "212.69768",
      "OPEN.DOGE": "0.0000",
      "DEEX": "0.1000",
      "PROTON": "0.0005",
      "ELECTRON": "1.0000",
      "NEXTCOIN": "0.0005",
      "VIRTUAL": "1.000",
      "CUBED.CNY": "0.000002",
      "XBTSX": "0.000000",
      "XBTSX.POST": "0.000000",
      "XBTSX.STH": "293.000002",
      "CUBED.USD": "0.000002"
    }
    

    GET https://api.xbts.io/account/getbalance/<AccountName>

    Return JSON information about all assets balances by account name.

    if not found account, return null:

    Coin Info

    https://api.xbts.io/info/STH
    

    The above command returns JSON structured like this:

    {
      "id": "1.3.4099",
      "ticker": "STH",
      "title": "SmartHoldem",
      "logo": "https://ex.xbts.io/asset-symbols/xbtsx.sth.png",
      "website": "https://smartholdem.io",
      "explorer": "https://blockexplorer.smartholdem.io",
      "type": "coin",
      "prefix": "XBTSX",
      "social": {
        "btt": "https://bitcointalk.org/index.php?topic=2169457.0",
        "github": "https://github.com/smartholdem",
        "twitter": "https://twitter.com/smartholdem",
        "telegram": "https://t.me/smartholdem",
        "community": "https://community.smartholdem.io"
      },
      "exchange": {
        "XBTS": "https://ex.xbts.io/?r=xbtsx"
      }
    }
    

    GET https://api.xbts.io/info/<COIN>

    Return JSON information about coin.