Application Program Interface

Through TaurusBit API you can build secure, automated trading into your software. The API will always be free to use.

This document is intended to assist software developers who want to develop applications using TaurusBit API. It fully documents our application programming interface (API) that allows developers to interact with our system.

To use the information provided here, you should first have access to an active TaurusBit account. You should also be familiar with:

  • RESTful web services
  • HTTP/1.1
  • JSON (JavaScript Object Notation)

Our Application Program Interface will allow you to automate the process of making trades, receiving information about your account, fetching history of trades and transactions within your own software.

Since our API is based on REST principles, it's very easy to write and test applications. You can use your browser to access URLs, and you can use pretty much any HTTP client in any programming language to interact with the API.

All responses from TaurusBit API are in JSON format.

In order to use our API, first of all you need to setup your account.

To create a new API, you have to sign in your TaurusBit account and open the "API Settings" section. You can give your API a name, and specify which permissions it will have.

Our application will generate your Api-Key and Api-Secure keys, which are both needed to properly make calls to our Application Program Interface.

Name Length Description
Api-Key 36 chars Identifies your Account API in our system.
Api-Secure 64 chars Key to sign your request data when using our API.

API Authentication is based on the Api-Key and Api-Secure keys secrecy. If any of those get compromised, you should immediately disable and revoke (i.e. delete) the API from your account.

TaurusBit REST API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported. The Base URL for all the requests is:

https://www.taurusbit.com/api/

Each request to our API needs to be authorized using your API-Key, an HMAC (Hash-based Message Authentication Code) signed with your API-Secure key and to avoid relay attacks also a timestamp. The three parameters are bundled in the HTTP Request using additional HTTP Headers, API-Key, Api-Sign and Api-Timestamp.

  • Api-Key: The same as generated by our system when you created the API.
  • Api-Sign: message digest as lowercase hexits, generated using HMAC-SHA256 algorithm. Constructed from the the following concatenated strings: [API Method URL]:[POST Parameters]:[Timestamp].
  • Api-Timestamp: current timestamp in UNIX format.

Here is an example written in PHP on how to generate the API-Sign header.

$apiKey = '{your Api-Key}';
$apiSecure = '{your Api-Secure}';

$apiURL = '/api/orders/make'; // Replace with the API Method you want to call
$postData = http_build_query($postData); // URL-Encoded query string like: param0=foo&param1=bar (empty on non-POST requests)
$timestamp = time(); // Use current time stamp

$apiSign = hash_hmac('sha256', $apiURL.':'.$postData.':'.$timestamp, $apiSecure); // This is your generated API-Sign header
This section describes how to get your account balances using our API.

Resurce URI

https://www.taurusbit.com/api/balance

Method

GET

POST Data

Null

Response

A successful call will return a JSON object.

{
  "success": true,
  "balances": [
    {
      "currency": "BTC",
      "value": 0.00
    },
    {
      "currency": "USD",
      "value": 0.00
    },
    ...
  ]
}
Name Type Description
success Boolean Will always return true on a successful call.
balances Array of Objects Will return all your balances in an Array of Objects.

  • currency: Currency abbreviation.
  • value: Float value of your balance.

This section describes how to fetch the list of your open orders.

Resurce URI

https://www.taurusbit.com/api/orders/opened

Method

GET

POST Data

Null

Response

A successful call will return a JSON object.

{
  "success": true,
  "orders": [
    {
      "id": 1,
      "userid": 1,
      "pair": "BTCEUR",
      "type": "buy",
      "price": 74.12,
      "sell": "EUR",
      "sellAmount": 74.12,
      "sold": 8.1644,
      "buy": "BTC",
      "buyAmount": 1,
      "bought": 0.1103,
      "fee": 0.0004,
      "open": "2013-08-12T17:27:34.000Z",
      "close": null
    },
    ...
  ]
}
Name Type Description
success Boolean Will always return true on a successful call.
orders Array of Objects Will return all your open orders in an Array of Objects.

  • id: Order ID.
  • userid: Your Account ID.
  • pair: Currency pair.
  • type: Order type, buy/sell.
  • price: Order price.
  • sell: Currency you are selling.
  • sellAmount: Amount you are selling.
  • sold: Amount of 'sell' currency that has been traded.
  • buy: Currency you are buying.
  • buyAmount: Amount you are buying.
  • bought: Amount of 'buy' currency that has been traded.
  • fee: Trading fee that has been deducted from your balance.
  • open: ISO 8601 representation of the time your order has been submitted on our system.
This section describes how to make a new trade.

Resurce URI

https://www.taurusbit.com/api/orders/make

Method

POST

POST Data

Name Type Description
sell String Currency you are selling
sell String Currency you are buying
amount Float Amount of 'sell' you are selling
price Float Order price

Response

A successful call will return a JSON object.

{
  "success": true,
  "order": {
    "id": 1,
    "userid": 1,
    "pair": "BTCUSD",
    "type": "buy",
    "buy": "BTC",
    "sell": "USD",
    "price": 81.2,
    "buyAmount": 0.2531,
    "sellAmount": 20.55,
    "bought": "0",
    "sold": "0",
    "fee": "0"
  }
}
Name Type Description
success Boolean Will always return true on a successful call.
order Object Will return your new order details.

  • id: Order ID.
  • userid: Your Account ID.
  • pair: Currency pair.
  • type: Order type, buy/sell.
  • buy: Currency you are buying.
  • sell: Currency you are selling.
  • price: Order price.
  • buyAmount: Amount you are buying.
  • sellAmount: Amount you are selling.
  • bought: Amount of 'buy' currency that has been traded.
  • sold: Amount of 'sell' currency that has been traded.
  • fee: Trading fee that has been deducted from your balance.
This section describes how to cancel an open order.

Resurce URI

https://www.taurusbit.com/api/orders/cancel

Method

POST

POST Data

Name Type Description
id Integer Order ID as recorded in our system

Response

A successful call will return a JSON object.

{
  "success": true,
  "amount": 20.55
}
Name Type Description
success Boolean Will always return true on a successful call.
amount Float Will return the amount that has been credited back to your account balance.

Here you can download ready-made modules in different programming languages to make integration with your software fast and hassle-free.

PHP Implementation of TaurusBit Application Program Interface (v0.1 - 4kb)

More coming soon...