Apidocument

Cryptobucks Exchange Market REST API Documentation

Welcome to the Cryptobucks Exchange Market REST API documentation. This API (Application Programming Interface) will allow you to access the functionality of this exchange by means of HTTP requests, making integration with your own applications possible.


Connecting to the API

You can access the API at the following url:

https://c-bucks.com/api

You are permited to make up to 20 requests a minute.

Public api Methods


Return all the trading pairs supported by Cryptobucks Exchange

GET https://c-bucks.com/api/availablepairs


Response:

    {"status":"1","message":"Success","combinations":"USD_BTC,BTC_CBUCKS,USD_CBUCKS,BTC_ETH,CBUCKS_USD,CBUCKS_ETH"}

Tickers API

returns the tickers for all the supported trading pairs at once, cached in 10 seconds

GET https://c-bucks.com/api/returnTicker


Response:

    {
      "status": 1,
      "data": [
        {
          "first_currency": "BTC",
          "second_currency": "USD",
          "last_market_price": "8705.12000000",
          "lowestaskprice": "8705.12000000",
          "highestbidprice": "8705.12000000",
          "volume": "1741.0240"
        },
        {
          "first_currency": "CBUCKS",
          "second_currency": "BTC",
          "last_market_price": "0.01123457",
          "lowestaskprice": "0.0000",
          "highestbidprice": "0.0000",
          "volume": "0.0000"
        },
        {
          "first_currency": "CBUCKS",
          "second_currency": "USD",
          "last_market_price": "100.00000000",
          "lowestaskprice": "0.0000",
          "highestbidprice": "0.0000",
          "volume": "0.0000"
        },
        {
          "first_currency": "ETH",
          "second_currency": "BTC",
          "last_market_price": "0.02000000",
          "lowestaskprice": "0.0000",
          "highestbidprice": "0.0000",
          "volume": "0.0000"
        },
        {
          "first_currency": "USD",
          "second_currency": "CBUCKS",
          "last_market_price": "0.01000000",
          "lowestaskprice": "0.0000",
          "highestbidprice": "0.0000",
          "volume": "0.0000"
        },
        {
          "first_currency": "ETH",
          "second_currency": "CBUCKS",
          "last_market_price": "1.81818182",
          "lowestaskprice": "0.0000",
          "highestbidprice": "0.0000",
          "volume": "0.0000"
        }
      ]
    }

Ticker API

returns the current ticker for the selected currency, cached in 10 seconds:

Links:

GET https://c-bucks.com/api/customticker/BTC_USD

GET https://c-bucks.com/api/customticker/CBUCKS_BTC

GET https://c-bucks.com/api/customticker/CBUCKS_USD

GET https://c-bucks.com/api/customticker/ETH_BTC

GET https://c-bucks.com/api/customticker/USDT_CBUCKS

GET https://c-bucks.com/api/customticker/ETH_CBUCKS


Parameters:

Response:

    {
      "status": 1,
      "data": [
        {
          "first_currency": "BTC",
          "second_currency": "USD",
          "last_market_price": "8705.12000000",
          "lowestaskprice": "8705.12000000",
          "highestbidprice": "8705.12000000",
          "volume": "1741.0240"
        }
      ]
    }

Depth API

Return the market depth including ask and bid orders.

Links:

GET https://c-bucks.com/api/getOrderbook/BTC_USD

GET https://c-bucks.com/api/getOrderbook/CBUCKS_BTC

GET https://c-bucks.com/api/getOrderbook/CBUCKS_USD

GET https://c-bucks.com/api/getOrderbook/ETH_BTC

GET https://c-bucks.com/api/getOrderbook/USDT_CBUCKS

GET https://c-bucks.com/api/getOrderbook/ETH_CBUCKS


Parameters:

Response:

    {
        "status": 1,
        "data": [
            {
                "first_currency": "BTC",
                "second_currency": "ETH",
                "last_market_price": "0.41000000",
                "lowestaskprice": "0.20000000",
                "highestbidprice": "0.41000000",
                "volume": "4.9700"
            },]}

Trade History API

Return the most recent 80 trade history records:

Links:

GET https://c-bucks.com/api/tradehistorys/BTC_USD

GET https://c-bucks.com/api/tradehistorys/CBUCKS_BTC

GET https://c-bucks.com/api/tradehistorys/CBUCKS_USD

GET https://c-bucks.com/api/tradehistorys/ETH_BTC

GET https://c-bucks.com/api/tradehistorys/USDT_CBUCKS

GET https://c-bucks.com/api/tradehistorys/ETH_CBUCKS


Parameters:

Response:

    {
      "status": "1",
      "result": {
        "pair": "BTC_USD",
        "transaction_history": [
          {
            "datetime": "2019-12-13 11:23:18",
            "type": "increase",
            "price": "8705.12",
            "amount": "0.1",
            "from_cur": "BTC",
            "to_cur": "USD",
            "sell_fee": 0.870512,
            "buy_fee": 0.0001,
            "sellordertype": "limit",
            "buyordertype": "limit"
          },
          {
            "datetime": "2019-12-13 11:08:44",
            "type": "increase",
            "price": "8705.12",
            "amount": "0.1",
            "from_cur": "BTC",
            "to_cur": "USD",
            "sell_fee": 0.870512,
            "buy_fee": 0.0001,
            "sellordertype": "limit",
            "buyordertype": "limit"
          }
        ]
      }
    }

Product list

Return list of all pairs traded on exchange.:

GET https://c-bucks.com/api/products

Response:

    [ id: "BTC-USD", fromSymbol: "BTC", toSymbol: "USD"]

Historical trades

Return historical trades executed. Trades returned in ascending order. Option available to query historical trades based on tradeID, default is to return latest 100 trades.

GET https://c-bucks.com/api/trade/BTC_USD

Parameter Type Description
pair String example: BTC_USD
fromId Integer query by tradeID, display trades after this ID inclusive (optional, default to return latest trades)
limit Integer number of trades returned (optional, default to 100)

Response:

Response Parameter Type Description
id Integer Numerical tradeId
price Float Price at which trade executed
amount Float Amount of trade
type String Buy or sell

Updated Order Book

This API gets the order book of a specified market. Both asks and bids are sorted from highest price to lowest.

URL: https://c-bucks.com/api/order_book?market=[CURR_A]_[CURR_B]&limit=5

Replace [CURR_A] and [CURR_B] with the selected currencies.

Valid Limits : ['5','10','20','50','100','500','1000']

Links:

GET https://c-bucks.com/api/order_book?market=BTC_USD&limit=5

GET https://c-bucks.com/api/order_book?market=CBUCKS_BTC&limit=5

GET https://c-bucks.com/api/order_book?market=CBUCKS_USD&limit=5

GET https://c-bucks.com/api/order_book?market=ETH_BTC&limit=5

GET https://c-bucks.com/api/order_book?market=USDT_CBUCKS&limit=5

GET https://c-bucks.com/api/order_book?market=ETH_CBUCKS&limit=5

Response:

    "Status":1,"message":"Operation is successful"
    
    "asks":[ ["0.02845499",32.3285], ["0.02510000",0.13607769], ["0.02491600",0.8545154], ["0.02490000",1], ["0.02483937",1.1928373] ],
    
    "bids":[ ["5.29273620",0.03121], ["0.99000000",0.005], ["0.61594321",15], ["0.61594235",10], ["0.61593212",13] ]

Market Data endpoints

This API gets the order book of a specified market. Both asks and bids are sorted from highest price to lowest with Last updated Id.

URL: https://c-bucks.com/api/market_data?market=[CURR_A]_[CURR_B]&limit=5

Replace [CURR_A] and [CURR_B] with the selected currencies.

Valid Limits : ['5','10','20','50','100','500','1000']

Links:

GET https://c-bucks.com/api/market_data?market=BTC_USD&limit=5

GET https://c-bucks.com/api/market_data?market=CBUCKS_BTC&limit=5

GET https://c-bucks.com/api/market_data?market=CBUCKS_USD&limit=5

GET https://c-bucks.com/api/market_data?market=ETH_BTC&limit=5

GET https://c-bucks.com/api/market_data?market=USDT_CBUCKS&limit=5

GET https://c-bucks.com/api/market_data?market=ETH_CBUCKS&limit=5

Response:

    "Status":1,"data"
    
    "asks":[ ["0.02845499",32.3285], ["0.02510000",0.13607769], ["0.02491600",0.8545154], ["0.02490000",1], ["0.02483937",1.1928373] ],
    
    "bids":[ ["5.29273620",0.03121], ["0.99000000",0.005], ["0.61594321",15], ["0.61594235",10], ["0.61593212",13] ]

Private api Methods


How to get apikey & api secret

Step 1 : Go to login

Step 2 : After login click usercenter menu

GET https://c-bucks.com/login

This endpoint returns the all currency balances.

GET https://c-bucks.com/api/getAccountbalance?api_key=[apikey]&api_secret=[apisecret]

Replace api_key[apikey] and api_secret[apisecret] with the selected users.

Response:

    {
        "status": 1,
        "data": {
            "BTC": "994.7",
            "ETH": "1000.0588",
            "USDT": 1000,
            "CBUCKS": 1000,
            "USD": 1000,
           
        }
    } 

This endpoint returns the particular currency balances.

POST https://c-bucks.com/api/getCurrencybalance


Parameters:

  • currency (string) - BTC

Response:

    {
        "status": "1",
        "data": {
            "currencyname": "Bitcoin",
            "Available balance": "993.7"
        }
    }