Cone.io API Reference API Reference

The Cone documentation provides all the information you need to interact with our services. http://cone.io. API endpoint, requires user and password for authentication and fetching data: https://api.cone.io/ The API is focused on three main entities. Exchanges - Data related to crypto exchanges and associated transactions Pricing - Data related to pricing for crypto assets Blockchain - Data related to blockchain and smart contracts running on the blockchain.

API Endpoint
https://api.cone.io/
Schemes: https
Version: 1.0.0

Authorization

Login

POST /login

Login to access Cone services. Before being able to sign any requests, you must create an API key via the Cone website. Upon creating a key you will have 2 pieces of information, which you must remember - The Key and Secret will be randomly generated and provided by Cone

Parameter Type Description
username string

Username will be generated by the Cone.io team.

password string

Password will be generated and provided by the Cone.io team.

Request Example
{
  "username": "string",
  "password": "string"
}
200 OK
Parameter Type Description
access_token string

Authorization token

id_token string

ID token

expires_in number

Expires in

token_type string

Type of token

403 Forbidden
Parameter Type Description
error string

Error string

error_description string

Error description


CURL:
curl -X POST \
  https://api.cone.io/login \
  -d '{
    "username":"your@email.here",
    "password":"YOUR_PASSWORD_HERE"
}'
Response Example (200 OK)
{
  "access_token": "string",
  "id_token": "string",
  "expires_in": "number",
  "token_type": "string"
}
Response Example (403 Forbidden)
{
  "error": "string",
  "error_description": "string"
}

Pricing API

Assets

GET /pricing/assets

Get all assets for which Cone pricing API is supported.

200 OK
Array of Objects:
Parameter Type Description
id string

Asset Id

name string

Asset name

Response Content-Types: application/json

CURL:
curl https://api.cone.io/pricing/assets \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
[
  {
    "id": "string",
    "name": "string"
  }
]

Exchanges

GET /pricing/exchanges

Get a list of all exchanges for which pricing data is available.

200 OK
Array of Objects:
Parameter Type Description
id string

exchange Id

name string

exchange name

website string

exchange website


CURL:
curl https://api.cone.io/pricing/exchanges \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
[
  {
    "id": "string",
    "name": "string",
    "website": "string"
  }
]

Orderbook

GET /pricing/orderbook

Get orderbook data for specified currency pairs at the given exchange.

REQUEST PARAMETERS
Parameter Type Description
limit
in query
number

Limit

exchangeId
in query
string

Exchange Id

currency
in query
string

Currency for example "ETH/BTC"

200 OK
Parameter Type Description
asks object

Asks

bids object

Bids

timestamp number

Timestamp


CURL:
curl https://api.cone.io/pricing/orderbook?exchangeId=binance&currency=ETH/BTC&limit=100 \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
{
  "asks": "object",
  "bids": "object",
  "timestamp": "number"
}

Rates

GET /pricing/rates/{assetId}/{rateAssetId}

Get pricing data for given crypto currency pair at the specified date and time.

REQUEST PARAMETERS
Parameter Type Description
assetId
in path
string

Asset Id

rateAssetId
in path
string

Rate asset Id

200 OK
Parameter Type Description
asset string

Asset

exchange string

Exchange

price string

Price

rate_asset string

Asset rate

time string

Time

Response Content-Types: application/json

CURL:
curl https://api.cone.io/pricing/rates/BTC/USD?time=2019-01-10T21:38:31.528887Z \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
{
  "asset": "string",
  "exchange": "string",
  "price": "string",
  "rate_asset": "string",
  "time": "string"
}

Transactions

GET /pricing/transactions

Get transactions for with the given crypto currency pairs at specified exchange.

REQUEST PARAMETERS
Parameter Type Description
exchangeId
in query
string

Exchange Id

currency
in query
string

Currency for example "BTC/USDC"

200 OK
Parameter Type Description
address string

Address

amount number

Amount

currency string

Currency

datetime string

Date and time

fee object

Fee

id string

Id

status string

Status

timestamp string

Timestamp

txid string

Transaction Id

type string

Type

updated number
Response Content-Types: application/json

CURL:
curl -X GET \
https://api.cone.io/pricing/transactions?exchangeId=bitz&currency=BTC/USDC \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
{
  "address": "string",
  "amount": "number",
  "currency": "string",
  "datetime": "string",
  "fee": "object",
  "id": "string",
  "status": "string",
  "timestamp": "string",
  "txid": "string",
  "type": "string",
  "updated": "number"
}

Exchange API

Connect

POST /exchanges/connect

Create a new association with an exchange source as indicated by the exchange id.

Parameter Type Description
clientId string

Client Id

clientSecret string

Client Secret

exchangeId string

Exchange Id

Request Example
{
  "clientId": "string",
  "clientSecret": "string",
  "exchangeId": "string"
}
200 OK
400 Bad Request

CURL:
curl -X POST \
  https://api.cone.io/exchanges/connect \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
  -d '{
	"exchangeId":"bitz",
	"clientId":"YOUR_CLIENT_ID",
	"clientSecret":"YOUR_CLIENT_SECRET"
}'

Place order

POST /exchanges/order/create

Create a new order to be executed on the exchange.

Parameter Type Description
exchangeId string

Exchange Id

symbol string

A string literal symbol of the market you wish to trade on, like BTC/USD, ZEC/ETH, DOGE/DASH, etc...

type string

Limit or market, other types aren't unified yet

side string

A string literal for the direction of your order, buy or sell.

amount string

How much of currency you want to trade.

price string

How much quote currency you are willing to pay for a trade lot of base currency (for limit orders only).

params object

Optional parameters

Parameter Type Description
stopPrice string

Your stop price

type string

stopLimit

Request Example
{
  "exchangeId": "string",
  "symbol": "string",
  "type": "string",
  "side": "string",
  "amount": "string",
  "price": "string",
  "params": {
    "stopPrice": "string",
    "type": "string"
  }
}
200 OK
Array of Objects:
Parameter Type Description
id string

order Id

info object

info

400 Bad Request

CURL:
curl -X POST \
https://api.cone.io/exchanges/order/create \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
-d '{
        "exchangeId":"bitfinex",
        "symbol":"btc/usd",
        "type":"limit",
        "side":"buy",
        "price":"12",
        "amount":"14"
    }'
Response Example (200 OK)
[
  {
    "id": "string",
    "info": "object"
  }
]

Cancel order

POST /exchanges/order/cancel

Cancel open order that is pending execution on an exchange.

Parameter Type Description
exchangeId string

Exchange Id

order_id string

Order id

Request Example
{
  "exchangeId": "string",
  "order_id": "string"
}
200 OK
400 Bad Request

CURL:
curl -X POST \
  https://api.cone.io/exchanges/order/cancel \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
  -d '{
  "exchangeId":"bitbay",
  "order_id":"123"
}'

Disconnect

POST /exchanges/disconnect

Disconnect from an existing session with an exchange.

Parameter Type Description
exchangeId string

Exchange Id

Request Example
{
  "exchangeId": "string"
}
200 OK

CURL:
curl -X POST \
  https://api.cone.io/exchanges/disconnect \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
  -d '{
	"exchangeId":"bitz"
}'

Exchanges list

GET /exchanges

Get all exchanges supported by Cone API.

200 OK
Array of Objects:
Parameter Type Description
id string

Exchange Id

name string

Exchange name

website string

Exchange website


CURL:
curl https://api.cone.io/exchanges \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
[
  {
    "id": "string",
    "name": "string",
    "website": "string"
  }
]

Balance

POST /exchanges/balance

Get the balance for all assets for the user at the given exchange

Parameter Type Description
exchangeId string

Exchange Id

Request Example
{
  "exchangeId": "string"
}
200 OK
Parameter Type Description
info object

Information object

Parameter Type Description
makerCommission number

Marker commission

takerCommission number

Taker commission

buyerCommission number

Buyer commission

sellerCommission number

Seller commission

canTrade bool

Can trade

canWithdraw bool

Can withdraw

canDeposit bool

Can deposit

updateTime number

Update time

accountType string

Account type

balances object[]

Array of balances

Array of Objects:
Parameter Type Description
asset string

Asset

free string

Free

locked string

Locked

400 Bad Request

CURL:
curl -X POST \
https://api.cone.io/exchanges/balance \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
-d '{"exchangeId":"binance"}'
Response Example (200 OK)
{
  "info": {
    "makerCommission": "number",
    "takerCommission": "number",
    "buyerCommission": "number",
    "sellerCommission": "number",
    "canTrade": "bool",
    "canWithdraw": "bool",
    "canDeposit": "bool",
    "updateTime": "number",
    "accountType": "string",
    "balances": [
      {
        "asset": "string",
        "free": "string",
        "locked": "string"
      }
    ]
  }
}

Blockchain API

Transation list

GET /blockchain/rawaddr

Returns a list of transactions at the blockchain address.

REQUEST PARAMETERS
Parameter Type Description
blockchainId
in query
string

Blockchain Id "eth" or "btc"

address
in query
string

Blockchain address

200 OK
Parameter Type Description
address string

address

balance string

balance

txs array

list of transactions

400 Bad Request

CURL:
curl https://api.cone.io/blockchain/rawaddr?blockchainId=eth&address=0x1e0fc0565190306126810f847010b21a5e753e72 \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
{
  "address": "string",
  "balance": "string",
  "txs": "array"
}

Unspent

GET /blockchain/unspent

Query for unspent balance at the given wallet address in blockchain.

REQUEST PARAMETERS
Parameter Type Description
blockchainId
in query
string

Blockchain Id "eth" or "btc"

address
in query
string

Blockchain address

200 OK
Parameter Type Description
currency object

Currency

free number

Free

total number

Total

used number

Used

400 Bad Request

CURL:
curl https://api.cone.io/blockchain/unspent?blockchainId=eth&address=0x1e0fc0565190306126810f847010b21a5e753e72 \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
{
  "currency": "object",
  "free": "number",
  "total": "number",
  "used": "number"
}

Balance

GET /eth/account/{address}/balance

Get ethereum balance by specified address

REQUEST PARAMETERS
Parameter Type Description
address
in path
string

Ethereum address

200 OK

Ethereum balance of address in Wei


CURL:
curl https://api.cone.io/eth/account/0xd3fe1c237a5ddbb86d27b3c2ff00885629176765/balance \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
"number"

Transactions

GET /blockchain/account/{address}/txs

Get ethereum transactions by address

REQUEST PARAMETERS
Parameter Type Description
address
in path
string

Ethereum address

page
in query
number

Page, starting from 0

count
in query
number

Count on page

200 OK
Parameter Type Description
txs object[]

List of transactions

Array of Objects:
Parameter Type Description
txHash string

Hash of transacction

height number

Height

timestamp number

Timestamp

from string

From address

to string

To address

value string

Value of transaction

gasLimit string

Gas limit

gasUsed string

Gas used

gasPrice string

Gas price

totalCount number

Transactions count


CURL:
curl https://api.cone.io/eth/account/0xF17a6E540e2f2F9c47b45D4d243B2747b42Bc706/txs?page=0&count=10 \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
{
  "txs": [
    {
      "txHash": "string",
      "height": "number",
      "timestamp": "number",
      "from": "string",
      "to": "string",
      "value": "string",
      "gasLimit": "string",
      "gasUsed": "string",
      "gasPrice": "string"
    }
  ],
  "totalCount": "number"
}

Status

GET /blockchain/status

Get ethereum node status

200 OK
Parameter Type Description
isSyncing boolean

Is syncing

isLagged boolean

Is lagged

height number

Height


CURL:
curl https://api.cone.io/eth/status \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
{
  "isSyncing": "boolean",
  "isLagged": "boolean",
  "height": "number"
}

Block by height

GET /blockchain/block/{height}

Get block by height

REQUEST PARAMETERS
Parameter Type Description
height
in path
number

Height

200 OK
Parameter Type Description
height number

Height

hash string

Transaction hash

parentHash string

Parent transaction hash

uncleHash string

Uncle transaction hash

coinbase string

Coinbase

difficulty string

Difficulty

gasLimit string

Gas limit

gasUsed string

Gas used

timestamp string

Timestamp

nonce string

Nonce

txsCount number

Transactions count


CURL:
curl https://api.cone.io/eth/block/4434068 \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
{
  "height": "number",
  "hash": "string",
  "parentHash": "string",
  "uncleHash": "string",
  "coinbase": "string",
  "difficulty": "string",
  "gasLimit": "string",
  "gasUsed": "string",
  "timestamp": "string",
  "nonce": "string",
  "txsCount": "number"
}

Transactions by height

GET /blockchain/block/{height}/txs

Get ethereum transactions by height

REQUEST PARAMETERS
Parameter Type Description
height
in path
number

Height

page
in query
number

Page, starting from 0

count
in query
number

Count on page

200 OK
Parameter Type Description
txs object[]

Transactions list

Array of Objects:
Parameter Type Description
txHash string

Hash of transacction

height number

Height

timestamp number

Timestamp

from string

From address

to string

To address

value string

Value of transaction

gasLimit string

Gas limit

gasUsed string

Gas used

gasPrice string

Gas price

totalCount number

Transactions count


CURL:
curl https://api.cone.io/eth/block/4434068/txs?page=0&count=10 \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE'
Response Example (200 OK)
{
  "txs": [
    {
      "txHash": "string",
      "height": "number",
      "timestamp": "number",
      "from": "string",
      "to": "string",
      "value": "string",
      "gasLimit": "string",
      "gasUsed": "string",
      "gasPrice": "string"
    }
  ],
  "totalCount": "number"
}

Hook

POST /blockchain/hook

Set email hook at the given address. A notification will be sent to the given email when there is a transaction at the specified wallet address.

Email

Parameter Type Description
address string

Ethereum address

email string

Email

Request Example
{
  "address": "string",
  "email": "string"
}
200 OK