To view the documentation page a screen width of at least 920px is required.

CoinBight API service reference

General info

CoinBight provides a simple and reliable API service for cryptocurrency wallets interoperability with your application. The API service, along with the CoinBight personal account, is designed in such a way as to ensure the approachable interaction of your application with several different cryptocurrencies through a common interface. Such a system can significantly simplify the interoperability of your application with various blockchain networks since you do not need to spend your money and time on expensive server equipment and its maintenance.

Features of CoinBight API:

  • obtain information on the API service status;
  • obtain the current balance of your cryptocurrency wallets;
  • validation of a cryptocurrency addresses;
  • obtain a transaction list of your wallet;
  • create new addresses for your wallet;
  • transfer funds from your wallets.

Supported cryptocurrencies:

  • BTC / Bitcoin;
  • BCH / Bitcoin Cash;
  • BTG / Bitcoin Gold;
  • LTC / Litecoin;
  • XRP / Ripple;
  • TRX / TRON.

Our team is working on implementing additional digital currencies. The list of supported cryptocurrencies will be expanded in the nearest future.


Connection

The CoinBight API service has a single connection point at:

http://api.coinbight.com/api/v1/{method}
{method} in the address must be replaced with the identifier of the API method you need. Information on supported methods can be found below.

To call a specific procedure, execute a POST request to the address indicating the desired method.

As an example, let's show how does the address for calling the status method look like:

http://api.coinbight.com/api/v1/status
The request must contain the body request message parameters which are transmitted via POST. Some parameters are required, for example, API Key (api_key parameter). Different methods require the indication of various mandatory or optional parameters. A detailed list of possible parameters for each method is described below in the description of each supported method.

Login

Each request to the CoinBight API must be followed by the required api_key parameter (API Key). The API Key is a unique identifier that allows the server to determine which user makes this request, and also provides for all necessary security checks. To create a key, you must be registered and have an active account on the website CoinBight.com.

The API Key is a sequence of different characters (letters and numbers). For clarity, let's give an example of a key:

608caf4b183fa26a1090287023b2d84e1818ba84acb707d06d

CoinBight personal account (section Profile/Security) contains functionality for creating and deleting keys. For security purposes, to create a key, you must specify the time of its life (work time), as well as a list of allowed IP addresses from which requests can be made using this key. When trying to request from an unregistered IP address, the API service will show an error.

Also, when creating a key, you can specify what type of requests will be allowed for this key. All supported methods (queries) are divided into three main categories:

  • view;
  • creating an address;
  • sending funds.

The "View" category is a group of methods whose purpose is to obtain information. These include the following methods: status, getBalance, validateAddress, and getTransactions. This category of requests is necessarily allowed for each API key.

As for the "Create Address" categories (createAddress method) and "Sending funds" (send and sendMany methods), they are optional and may be included at your discretion. 

Thus, you can create API Keys with limited or full functionality, based on your security requirements.

If a request attempt is made to use an API Key that does not exist, has expired, or has been deleted, the API will show an error describing the reason for the request failure. Here is an example of an API response when using a nonexistent key:

{
    "status" : "error",
    "message" : "Invalid api key"
}

Method status

API service status information

The status method is an information method and serves to obtain information about the current service status.

The final address to call the status method:

http://api.coinbight.com/api/v1/status

Request parameters:

Parameter Description and format
api_key
required
API Key
Example: 608caf4b183fa26a1090287023b2d84e1818ba84acb707d06d

API response structure:

Value key Description and format
status
Indicator of request success/failure.
Values: ok
server
Current service status.
Values: on or off
dt
Server date and time of the request.
Example: 2019-01-10 14:45:30

API response example:

{
    "status" : "ok",
    "server" : "on",
    "dt" : "2020-03-14 14:37:35"
}

Method getBalance

Getting the current wallet balance

The getBalance method is an information method and serves to obtain the balance of your cryptocurrency wallet.

Available for cryptocurrencies:

The final address to call the getBalance method:

http://api.coinbight.com/api/v1/getbalance

Request parameters:

Parameter Description and format
api_key
required
API Key
Example: 608caf4b183fa26a1090287023b2d84e1818ba84acb707d06d
crypt
required
Cryptocurrency code of wallet used in request.
Example: btc, xrp, ltc
wallet_id
required
ID of CoinBight wallet
Example: 0f331fe23a-add227ac9d-b9433a75fe-a268b297f7

API response structure:

Value key Description and format
status
Indicator of request success/failure.
Values: ok
crypt
Cryptocurrency code used in request.
Example: btc, xrp, ltc
balance
Balance in the smallest units of the wallet cryptocurrency (for example, in Satoshi for Bitcoin).
Example: 1150000
balance_formatted
Formatted balance in whole units of wallet cryptocurrency.
Example: 2.30412000

API response example:

{
    "status" : "ok",
    "balance" : "71404514",
    "crypt" : "xrp",
    "balance_formatted" : "71.404514"
}

Method validateAddress

Address validation

The validateAddress method is an information method and serves to validate the selected cryptocurrency address.

Available for cryptocurrencies:

The final address to call the validateAddress method:

http://api.coinbight.com/api/v1/validateaddress

Request parameters:

Parameter Description and format
api_key
required
API Key
Example: 608caf4b183fa26a1090287023b2d84e1818ba84acb707d06d
crypt
required
Cryptocurrency code of wallet used in request.
Example: btc, xrp, ltc
address
required
Address to check for validity.
Example: 3J5HAvdpWjZKgK4DEs3ZzhbVaW1L6wxi7g

API response structure:

Value key Description and format
status
Indicator of request success/failure.
Values: ok
crypt
Cryptocurrency code used in request.
Example: btc, xrp, ltc
address_valid
Validity pointer of verified address.
Values: 1

API response example:

{
    "status" : "ok",
    "address_valid" : 1,
    "crypt" : "btc"
}

Method getTransactions

Obtain transaction list

The getTransactions method is an information method and serves to obtain a transaction list of your wallet cryptocurrency.

Available for cryptocurrencies:

The final address to call the getTransactions method:

http://api.coinbight.com/api/v1/gettransactions

Request parameters:

Parameter Description and format
api_key
required
API Key
Example: 608caf4b183fa26a1090287023b2d84e1818ba84acb707d06d
crypt
required
Cryptocurrency code of wallet used in request.
Example: btc, xrp, ltc
wallet_id
required
ID of CoinBight wallet
Example: 0f331fe23a-add227ac9d-b9433a75fe-a268b297f7

API response structure:

Value key Description and format
status
Indicator of request success/failure.
Values: ok
crypt
Cryptocurrency code used in request.
Example: btc, xrp, ltc
transactions
JSON array with wallet transaction list.
Example: [{...},{...},{...}]
transactions[i].coin
Transaction cryptocurrency code
Example: btc, xrp, ltc
transactions[i].txid
Hash transactions
Example: a2b7c12682f428731b143813fc15d31a19949deb11096ce5f0b7e5f2fb817e3e
transactions[i].full
An additional array of transaction information (specific to each cryptocurrency).
transactions[i].amount
Amount of sent/received cryptocurrency (in minimum units of cryptocurrency, for example, in Satoshi for Bitcoin).
Example: -110000 or 54990000
transactions[i].state
Transaction status (confirmed or not confirmed by the network).
Values: confirmed or not_confirmed
transactions[i].type
Receiving or sending cryptocurrency.
Values: send or receive
transactions[i].confirmations
The number of transactions confirmed by the network.
Example: 0, 1, 229
transactions[i].coin_specific
Optional data array specific to the transactions of each cryptocurrency. May contain various data, such as the Destination Tag for Ripple.
Example: {} or {"destination_tag":"425"}

API response example:

{
   "status":"ok",
   "transactions":[
      {
         "coin":"btc",
         "txid":"a2b7c1268435f2f428731b10b7e813fc15d31a19949deb11096ce5f2fb817e3e",
         "full":{
            "address":"3EeU3MjmPyKWEZKhrtuXcZ256bKdvbRGeo",
            "category":"send",
            "amount":-0.0001,
            "vout":0,
            "fee":-4.016e-5,
            "confirmations":1140,
            "blockhash":"0000000000000000000cda0ebb32d195171acc76d7ad980422a67059c289eb43",
            "blockindex":2450,
            "blocktime":1583511938,
            "txid":"a2b7c126843813fc15d31a19949deb11096ce5f2f428731b10b7e5f2fb817e3e",
            "walletconflicts":[

            ],
            "time":1583509718,
            "timereceived":1583509718,
            "bip125-replaceable":"no",
            "abandoned":false
         },
         "amount":"-11000",
         "state":"confirmed",
         "type":"send",
         "confirmations":1140,
         "coin_specific":[

         ]
      },
      {...},
      {...},
      {...},
      {...}
   ],
   "crypt":"btc"
}

Method createAddress

New address creation

The createAddress method creates a new address for receiving funds on the selected wallet.

Available for cryptocurrencies:

The final address to call the createAddress method:

http://api.coinbight.com/api/v1/createaddress

Request parameters:

Parameter Description and format
api_key
required
API Key
Example: 608caf4b183fa26a1090287023b2d84e1818ba84acb707d06d
crypt
required
Cryptocurrency code of wallet used in request.
Example: btc, xrp, ltc
wallet_id
required
ID of CoinBight wallet
Example: 0f331fe23a-add227ac9d-b9433a75fe-a268b297f7
label
not required
Address name (may contain letters, digits, space character, as well as "_", "-", "#", ".". If you do not pass this parameter, or leave an empty string, the address name will be generated automatically.
Example: My address label #1

API response structure:

Value key Description and format
status
Indicator of request success/failure.
Values: ok
crypt
Cryptocurrency code used in request.
Example: btc, xrp, ltc
new_address
Created address.
Example: 3H6DpzDbuUHmAtw6k4KRAuwKm6cS9TxZJb
new_address_label
Name of created address.
Example: Address #6

API response example:

{
    "status" : "ok",
    "new_address" : "3Ct31Q8oTjzyMjqyAMEUW4FDqpPYeBWtyf",
    "crypt" : "btc"
}

Method send

Sending funds to the address

send method sends the specified amount of cryptocurrency to the specified address.

Available for cryptocurrencies:

The final address to call the send method:

http://api.coinbight.com/api/v1/send

Request parameters:

Parameter Description and format
api_key
required
API Key
Example: 608caf4b183fa26a1090287023b2d84e1818ba84acb707d06d
crypt
required
Cryptocurrency code of wallet used in request.
Example: btc, xrp, ltc
wallet_id
required
CoinBight wallet ID from which funds will be sent.
Example: 0f331fe23a-add227ac9d-b9433a75fe-a268b297f7
address
required
Cryptocurrency address to which funds will be sent.
Example: 3Ct31Q8oTjzyMjqyAMEUW4FDqpPYeBWtyf
amount
required
The number of cryptocurrencies to send (in whole units of cryptocurrency).
Example: 1.25
password
required
Wallet security password in string format.
coin_specific
not required
Additional optional data for some cryptocurrencies (e.g. Destination Tag for Ripple). Must be transmitted in JSON format.
Example for Ripple: {"destination_tag":"1025"}
btc_priority
only for BTC/Bitcoin (required)
Bitcoin transaction priority. Must be passed in JSON format as the value of the coin_specific parameter.
Values: high, normal, low
Example: {"btc_priority":"high"}
destination_tag
only for XRP/Ripple
not required
Destination Tag for Ripple transaction (in the format from 1 to 10 digits). Must be passed in JSON format as the value of the coin_specific parameter.
Examples: 10, 558, 9440080
JSON example: {"destination_tag":"558"}

API response structure:

Value key Description and format
status
Indicator of request success/failure.
Values: ok
crypt
Cryptocurrency code used in request.
Example: btc, xrp, ltc
hash
Hash of created transaction.
Example: 0ACEA7F7032F6C7498CFA20C5251CC7432CA88FC708C42D950610467255F53B9

API response example:

{
    "status" : "ok",
    "crypt" : "xrp",
    "hash" : "0ACEA7F7032F6C7498CFA20C5251CC7432CA88FC708C42D950610467255F53B9"
}

Method sendMany

Sending funds to multiple addresses

The sendMany method sends cryptocurrency to a list of specified addresses.

Available for cryptocurrencies:

The final address to call the sendMany method:

http://api.coinbight.com/api/v1/sendmany

Request parameters:

Parameter Description and format
api_key
required
API Key
Example: 608caf4b183fa26a1090287023b2d84e1818ba84acb707d06d
crypt
required
Cryptocurrency code of wallet used in request.
Example: btc, xrp, ltc
wallet_id
required
CoinBight wallet ID from which funds will be sent.
Example: 0f331fe23a-add227ac9d-b9433a75fe-a268b297f7
send_array
required
A JSON array in which the key is the address for sending funds, and the value is the amount of cryptocurrency.
Example: {"3Ct31Q8oTjzyMjqyAMEUW4FDqptyf":"0.2","3Ct31Q8oTjzyMjqyAMEUW4FDqptyf":"0.095"}
password
required
Wallet security password in string format.
coin_specific
not required
Additional optional data for some cryptocurrencies (e.g. Destination Tag for Ripple). Must be transmitted in JSON format.
Example for Ripple: {"destination_tag":"1025"}
btc_priority
only for BTC/Bitcoin (required)
Bitcoin transaction priority. Must be passed in JSON format as the value of the coin_specific parameter.
Values: high, normal, low
Example: {"btc_priority":"high"}
destination_tag
only for XRP/Ripple
not required
Destination Tag for Ripple transaction (in the format from 1 to 10 digits). Must be passed in JSON format as the value of the coin_specific parameter.
Examples: 10, 558, 9440080
JSON example: {"destination_tag":"558"}

API response structure:

Value key Description and format
status
Indicator of request success/failure.
Values: ok
crypt
Cryptocurrency code used in request.
Example: btc, xrp, ltc
hash
Hash of created transaction.
Example: 0ACEA7F7032F6C7498CFA20C5251CC7432CA88FC708C42D950610467255F53B9

API response example:

{
    "status" : "ok",
    "crypt" : "xrp",
    "hash" : "0ACEA7F7032F6C7498CFA20C5251CC7432CA88FC708C42D950610467255F53B9"
}