Public API


  • Contents
  • Methods
    • info
    • ticker
    • depth
    • trades

Contents

This API provides access to information such as: pair tickers, active pair orders, last pair trades, etc.

All requests to the public API occur at the following address: https://api.wbbexchange.pro//

Pairs are listed using the ' - ' sign to separate, for example: https://api.wbbexchange.pro/ticker/eth_usd-wbbc_usd

Many couples work with all methods presented in Public Api.

All responses from api come in JSON format.


Methods

info

This method provides all the information about current active pairs, such as: the maximum number of decimal places during bidding, the minimum price, the maximum price, the minimum quantity for buying / selling, the minimum total and commission for the pair.

Data is updated every 60 seconds, it does not make sense to request information more often.

Request example:

https://api.wbbexchange.pro/info

Response example:

{
  "eth_usd": {
  "decimalPlaces": 6,
  "minPrice": 0.1,
  "maxPrice": 99999,
  "minAmount": 0.01,
  "minTotal": 1,
  "feeBuy": 0.25,
  "feeSell": 0.25
  },
  # etc
}

decimalPlaces : the number of decimal places allowed when bidding
minPrice : the minimum price allowed for bidding
maxPrice : the maximum price allowed for bidding
minAmount : the minimum amount allowed for buying / selling
minTotal : the minimum total allowed for buying / selling
feeBuy : pair commission on purchase
feeSell : pair commission on sale


ticker

This method provides all the information about the trades on the pair, such as: maximum price, minimum price, average price, trading volume, trading volume in currency, last transaction, purchase price and sale. All information provided in the last 24 hours.

Data is updated every 2 seconds.

Request example:

https://api.wbbexchange.pro/ticker/eth_usd

Response example:

{
  "eth_usd": {
    "high": 109.88,
    "low": 91.14,
    "avg": 100.51,
    "vol": 1632898.2249,
    "volCur": 16541.51969,
    "last": 101.773,
    "buy": 101.9,
    "sell": 101.773
  },
  # etc
}

high: maximum price
low: minimum price
avg: average price
vol: trade volume
volСur: trade volume in currency
last: the price of the last trade
buy: buy price
sell: sell price


depth

This method provides information about the active orders of the pair, orders with the same price are summed up.

Additionally, it accepts the optional GET parameter limit, which indicates how many orders should be displayed (default is 150). Accepts no more than 5000.

Data is updated every 2 seconds.

Request example:

  https://api.wbbexchange.pro/depth/eth_usd?limit=150

Response example:

{
  "btc_usd": {
    "asks": [
      [
        103.426, // Price
        0.01 // Amount
      ],
      [
        103.5,
        15
      ],
      [
        103.504,
        0.425
      ],
      [
        103.505,
        0.1
      ],
      # etc
    ],
    "bids": [
      [
        103.2,
        2.48502251
      ],
      [
        103.082,
        0.46540304
      ],
      [
        102.91,
        0.99007913
      ],
      [
        102.83,
        0.07832332
      ],
      # etc
    ]
  }
  # etc
}

asks: sell orders bids: buy orders


trades

This method provides information on recent transactions.

Additionally, it accepts the optional GET parameter limit, which indicates how many transactions should be withdrawn (by default, 150). Accepts no more than 5000.

Data is updated every 2 seconds.

Request example:

  https://api.wbbexchange.pro/trades/eth_usd

Response example:

{  
  "eth_usd": {  
    {  
        "price":1,
        "amount":0.975, // Total: amount + feeAmount = 1
        "total":0.975, // amount * price //for all trades in array
        "isBuy":true, //Buy/Sell
        "tids":[345, 347], //Array of Trade ids with the same price
        "timestamp":1541601037354,
        "feeAmount":0.025, // ETH
      },
      {  
          "price":1,
          "amount":1, // Total: amount + feeAmount = 1
          "total":1, // amount * price //for all trades in array
          "isBuy":false, //Buy/Sell
          "tids":[348], //Array of Trade ids with the same price
          "timestamp":1541601037354,
          "feeAmount":0.025, // USD
      },
      # etc
    ]
  }
}

isBuy: buy/sell
price: buy price/sell price
amount: the total number of purchased / sold currency, taking into account commission
tids: Array of transaction IDs
timestamp: the UNIX time of the transaction (in milliseconds)
feeAmount: Number of commissions from overcharging currency user, for example if the user has bought 1 ETH at the commission (0.25%) , the commission will be equal to 0.0025 ETH, and the amount will be equal to 0.9975 ETH, if the user has sold 1 ETH for 3 USD, then the commission will be equal to 0.0075 USD, the user will receive 2.9925 USD, and the amount will be equal to 1 ETH


gettrades

This method provides information on recent transactions.

Additionally, it accepts the optional GET parameter limit, which indicates how many transactions should be withdrawn (by default, 150). Accepts no more than 5000.

Data is updated every 5 seconds.

Request example:

https://api.wbbexchange.pro/gettrades/eth_usd

Response example:

{  
  "eth_usd": {  
    {  
        "price": 1,
        "amount": 0.975, // Total: amount + feeAmount = 1
        "total": 0.975, // amount * price
        "isBuy": true, // Buy/Sell
        "tid": 347, // Trade id
        "timestamp":1541601037354,
        "feeAmount":0.025, // ETH
      },
      {  
        "price": 1,
        "amount": 1, 
        "total": 1, 
        "isBuy": false, 
        "tid": 348,
        "timestamp": 1541601037354,
        "feeAmount": 0.025, // USD
      },
      # etc
    ]
  }
}

isBuy: buy/sell
price: buy price/sell price
amount: the total number of purchased / sold currency, taking into account commission
tid: Transaction ID
timestamp: the UNIX time of the transaction (in milliseconds)
feeAmount: Number of commissions from overcharging currency user, for example if the user has bought 1 ETH at the commission (0.25%) , the commission will be equal to 0.0025 ETH, and the amount will be equal to 0.9975 ETH, if the user has sold 1 ETH for 3 USD, then the commission will be equal to 0.0075 USD, the user will receive 2.9925 USD, and the amount will be equal to 1 ETH