NAV Navbar
node.js

Introduction

Welcome to the Dovewallet API! You can use our API to access Dovewallet API endpoints, which can get information on various coin markets in our database.

We have language bindings in node.js! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Our APIs basically follow the rules of bittrex APIs.

Authentication

To authorize, use this code:

const crypto = require('crypto');
const request = require('request');
const querystring = require('querystring');

const BASE_URL = 'https://api.dovewallet.com/v1';
const method = "/market/buylimit";
const publicKey = "90d1415d13d8ea7061ccce5d26d99fe89c29b461";
const secretKey = "b9c100a09d553650dd8cbeaffc21d1";
const url = BASE_URL + method;
const now = Date.now();

const paramObject = {apikey: publicKey, nonce: now, market: 'adz-btc', quantity: '1', rate: '1'};
const query = querystring.stringify(objectSort(paramObject));
const apisign = crypto.createHmac('sha512', secretKey).update(url + "?" + query).digest('hex');

const options = {
    url: url + "?" + query,
    headers: {
        "apisign": apisign
    }
}

request(options, (error, response, body) => {
    if (error || response.statusCode != 200) {
        console.log(error, response.statusCode);
        return;
    }

    console.log(JSON.stringify(body));
});

function objectSort(object) {
    let newObject = Object.create(null);
    for(let key of Object.keys(object).sort()) {
        newObject[key] = object[key];
    }
    return newObject;
}

Make sure to replace publicKey, secretKey with your API keys. and please replace method, parameters with what you want.

Dovewallet uses API keys to allow access to the private APIs. You can register a new Dovewallet API key on our my-page/api page.

Dovewallet expects for the apisign to be included in private API requests to the server in a header that looks like the following:

apisign: 0ba5264acef900423cb31f02a6f1a2933e64004fbeb2f0187135665a73e5afabdd4eef3d41dcf8b9ef929793b332b1e2e75401190411cfb4372bc3eabb6bb40b

Public

getmarkets

// please refer to skeleton codes in our authentication section.
const method = "/public/getmarkets";
const paramObject = {};
const options = {
    url: url
}

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : [{
    "MarketCurrency": "BTC",
    "BaseCurrency": "DASH",
    "MarketCurrencyLong": "Bitcoin",
    "BaseCurrencyLong": "Dash",
    "MinTradeSize": 0.001,
    "MarketName": "DASH-BTC",
    "IsActive": true,
    "Created": null
  }, {
    "MarketCurrency": "BTC",
    "BaseCurrency": "BAT",
    "MarketCurrencyLong": "Bitcoin",
    "BaseCurrencyLong": "Basic Attention Token",
    "MinTradeSize": 0.001,
    "MarketName": "BAT-BTC",
    "IsActive": true,
    "Created": null
  }]
}

This endpoint retrieves information of markets.

HTTP Request

GET https://api.dovewallet.com/v1/public/getmarkets

getcurrencies

// please refer to skeleton codes in our authentication section.
const method = "/public/getcurrencies";
const paramObject = {};
const options = {
    url: url
}

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : [{
    "Currency": "BTC",
    "CurrencyLong": "Bitcoin",
    "MinConfirmation": 6,
    "TxFee": 0.001,
    "IsActive": true,
    "CoinType": null,
    "BaseAddress": null 
  }, {
    "Currency": "ESN",
    "CurrencyLong": "Ethersocial",
    "MinConfirmation": 30,
    "TxFee": 0,
    "IsActive": true,
    "CoinType": null,
    "BaseAddress": null
  }]
}

This endpoint retrieves information of currencies.

HTTP Request

GET https://api.dovewallet.com/v1/public/getcurrencies

getticker

// please refer to skeleton codes in our authentication section.
const method = "/public/getticker";
const paramObject = {market: 'btc-eth'};
const options = {
    url: url + "?" + query
}

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : {
    "Bid": null,
    "Ask": 0.2,
    "Last" : 0.2
  }
}

This endpoint retrieves ticker information of the market.

HTTP Request

GET https://api.dovewallet.com/v1/public/getticker

URL Parameters

Parameter Description
market The market currency pair to get ticker information (ex : eth-btc)

getmarketsummaries

// please refer to skeleton codes in our authentication section.
const method = "/public/getmarketsummaries";
const paramObject = {};
const options = {
    url: url
}

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : [{
    "MarketName": "BAT-ETH",
    "High": 0.0000052,
    "Low": 0.0000048,
    "Volume": 300.15877811,
    "Last": 0.0000051,
    "BaseVolume": 0.511223547,
    "TimeStamp" : "2018-12-20T2:30:51.471",
    "Bid" : 0.0000051,
    "Ask" : 0.00000512,
    "OpenBuyOrders" : 7,
    "OpenSellOrders" : 8,
    "PrevDay" : 0.000005,
    "Created" : "2018-11-21T8:52:00.000"
  }, {
    "MarketName": "BTC-ETH",
    "High": 0.0000054,
    "Low": 0.0000049,
    "Volume": 5778.12215788,
    "Last": 0.000005,
    "BaseVolume": 0.4,
    "TimeStamp" : "2018-12-20T2:30:51.471",
    "Bid" : 0.000005,
    "Ask" : 0.00000492,
    "OpenBuyOrders" : 20,
    "OpenSellOrders" : 55,
    "PrevDay" : 0.000004,
    "Created" : "2018-11-21T8:52:00.000"
  }]
}

This endpoint retrieves summaries of markets.

HTTP Request

GET https://api.dovewallet.com/v1/public/getmarketsummaries

getmarketsummary

// please refer to skeleton codes in our authentication section.
const method = "/public/getmarketsummary";
const paramObject = {market: 'btc-eth'};
const options = {
    url: url + "?" + query
}

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : [{
    "MarketName": "BTC-ETH",
    "High": 0.0000054,
    "Low": 0.0000049,
    "Volume": 5778.12215788,
    "Last": 0.000005,
    "BaseVolume": 0.4,
    "TimeStamp" : "2018-12-20T2:30:51.471",
    "Bid" : 0.000005,
    "Ask" : 0.00000492,
    "OpenBuyOrders" : 20,
    "OpenSellOrders" : 55,
    "PrevDay" : 0.000004,
    "Created" : "2018-11-21T8:52:00.000"
  }]
}

This endpoint retrieves a summary of the market.

HTTP Request

GET https://api.dovewallet.com/v1/public/getmarketsummary

URL Parameters

Parameter Description
market The market currency pair to get a summary (ex : eth-btc)

getorderbook

// please refer to skeleton codes in our authentication section.
const method = "/public/getorderbook";
const paramObject = {market: 'btc-eth', type: 'both'};
const options = {
    url: url + "?" + query
}

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : {
    "buy": [{
        "Quantity": 29, 
        "Rate": 0.5
    }],
    "sell" : [{
        "Quantity": 3, 
        "Rate": 2
      }, {
        "Quantity": 1.5, 
        "Rate": 1
    }]
  }
}

This endpoint retrieves an order book of the market.

HTTP Request

GET https://api.dovewallet.com/v1/public/getorderbook

URL Parameters

Parameter Description
market The market currency pair to get an order book (ex : eth-btc)
type The type of orders to get an order book (buy, sell, both)

getmarkethistory

// please refer to skeleton codes in our authentication section.
const method = "/public/getmarkethistory";
const paramObject = {market: 'btc-eth'};
const options = {
    url: url + "?" + query
}

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : [{
    "Id": 1545273051471753,
    "TimeStamp": "2018-12-20T2:30:51.471",
    "Quantity": 60.18415689,
    "Price": 0.00001,
    "Total": 0.00060184,
    "FillType": null,
    "OrderType" : "BUY"
  }, {
    "Id": 1545273051471754,
    "TimeStamp": "2018-12-20T2:30:51.472",
    "Quantity": 21.18785511,
    "Price": 0.122,
    "Total": 2.58491832,
    "FillType": null,
    "OrderType" : "SELL"
  }]
}

This endpoint retrieves an order history of the market.

HTTP Request

GET https://api.dovewallet.com/v1/public/getmarkethistory

URL Parameters

Parameter Description
market The market to get an order history (ex : eth-btc)

Market

buylimit

// please refer to skeleton codes in our authentication section.
const method = "/market/buylimit";
const paramObject = {apikey: publicKey, nonce: now, market: 'btc-eth', quantity: '3', rate: '1'};

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : {
    "uuid": "5214"
  }
}

This endpoint places an order to buy.

HTTP Request

GET https://api.dovewallet.com/v1/market/buylimit

Header Settings

Key Description
apisign The api sign of the user to place an order to buy

URL Parameters

Parameter Description
nonce The nonce to place an order to buy (for skip - nonce : 0)
apikey The api key of the user to place an order to buy
market The market pair of coins to trade with each other (ex : eth-btc)
quantity The market to place an order to buy
rate The market to place an order to buy
walletId The wallet id to place an order to buy (optional - ex : 21)

selllimit

// please refer to skeleton codes in our authentication section.
const method = "/market/selllimit";
const paramObject = {apikey: publicKey, nonce: now, market: 'btc-eth', quantity: '3', rate: '1'};

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : {
    "uuid": "1477"
  }
}

This endpoint places an order to sell.

HTTP Request

GET https://api.dovewallet.com/v1/market/selllimit

Header Settings

Key Description
apisign The api sign of the user to place an order to sell

URL Parameters

Parameter Description
nonce The nonce to place an order to sell (for skip - nonce : 0)
apikey The api key of the user to place an order to sell
market The market to place an order to sell (ex : eth-btc)
quantity The market to place an order to sell
rate The market to place an order to sell
walletId The wallet id to place an order to sell (optional - ex : 21)

cancel

// please refer to skeleton codes in our authentication section.
const method = "/market/cancel";
const paramObject = {apikey: publicKey, nonce: now, uuid: '157'};

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : null
}

This endpoint places an order to cancel.

HTTP Request

GET https://api.dovewallet.com/v1/market/cancel

Header Settings

Key Description
apisign The api sign of the user to place an order to cancel

URL Parameters

Parameter Description
nonce The nonce to place an order to cancel (for skip - nonce : 0)
apikey The api key of the user to place an order to cancel
uuid The uuid of the order to place an order to cancel
walletId The wallet id to place an order to sell (optional - ex : 21)

getopenorders

// please refer to skeleton codes in our authentication section.
const method = "/market/getopenorders";
const paramObject = {apikey: publicKey, nonce: now, market: 'btc-eth'};

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : [{
    "Uuid": null,
    "OrderUuid": "523",
    "Exchange": "BTC-ETH",
    "OrderType": "LIMIT_SELL",
    "Quantity": 15,
    "QuantityRemaining": 5,
    "Limit": 1,
    "CommissionPaid": 0,
    "Price": 0,
    "PricePerUnit": null,
    "Opened": "2018-12-23T12:10:35.125",
    "Closed": null,
    "CancelInitiated": false,
    "ImmediateOrCancel": false,
    "IsConditional": false,
    "Condition": null,
    "ConditionTarget": null
  }, {
    "Uuid": null,
    "OrderUuid": "578",
    "Exchange": "ETH-BTC",
    "OrderType": "LIMIT_BUY",
    "Quantity": 25,
    "QuantityRemaining": 5,
    "Limit": 1,
    "CommissionPaid": 0,
    "Price": 0,
    "PricePerUnit": null,
    "Opened": "2018-12-23T12:10:35.125",
    "Closed": null,
    "CancelInitiated": false,
    "ImmediateOrCancel": false,
    "IsConditional": false,
    "Condition": null,
    "ConditionTarget": null
  }]
}

This endpoint retrieves open orders information of the market.

HTTP Request

GET https://api.dovewallet.com/v1/market/getopenorders

Header Settings

Key Description
apisign The api sign of the user to get open orders information

URL Parameters

Parameter Description
nonce The nonce to get open orders information (optional)
apikey The api key of the user to get open orders information
market The market to get open orders information (optional - ex : eth-btc)

Account

getbalances

// please refer to skeleton codes in our authentication section.
const method = "/account/getbalances";
const paramObject = {apikey: publicKey, nonce: now};

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : [{
    "Currency": "BTC",
    "Balance": 1061.499124105,
    "Available": 1059.270898105,
    "Pending": 2.228226,
    "CryptoAddress": "9Reb9uFHVhiAyHLF2XpWX1S3Y9UN5Gsc8N",
    "Requested": false,
    "Uuid": null
  }, {
    "Currency": "ETH",
    "Balance": 104845.910165684,
    "Available": 104840.905165684,
    "Pending": 5.005,
    "CryptoAddress": "MRWo92GtfAxVyJogQVf24mNKpdvmWfrGBJ",
    "Requested": false,
    "Uuid": null
  }]
}

This endpoint retrieves balances information.

HTTP Request

GET https://api.dovewallet.com/v1/account/getbalances

Header Settings

Key Description
apisign The api sign of the user to get balances information

URL Parameters

Parameter Description
nonce The nonce to get balances information (optional)
apikey The api key of the user to get balances information
walletId The wallet id to get balances information (optional - default : the first trade wallet)

getbalance

// please refer to skeleton codes in our authentication section.
const method = "/account/getbalance";
const paramObject = {apikey: publicKey, nonce: now, currency: 'btc'};

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : {
    "Currency": "BTC",
    "Balance": 1061.499124105,
    "Available": 1059.270898105,
    "Pending": 2.228226,
    "CryptoAddress": "36FzdbtJB2WJyxFr1VKeTMtc4ncea9SfU4",
    "Requested": false,
    "Uuid": null
  }
}

This endpoint retrieves balance information of the wallet.

HTTP Request

GET https://api.dovewallet.com/v1/account/getbalance

Header Settings

Key Description
apisign The api sign of the user to get balance information

URL Parameters

Parameter Description
nonce The nonce to get balance information (optional)
apikey The api key of the user to get balance information
walletId The wallet id to get balance information (optional - default : the first trade wallet)
currency The currency to get balance information

getdepositaddress

// please refer to skeleton codes in our authentication section.
const method = "/account/getdepositaddress";
const paramObject = {apikey: publicKey, nonce: now, currency: 'btc'};

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : {
    "Currency": "BTC",
    "Address" : "3QR6Hr2pzRDCLgEqbFw4pJHJp5BVaDeYrL"
  }
}

This endpoint retrieves a deposit address.

HTTP Request

GET https://api.dovewallet.com/v1/account/getdepositaddress

Header Settings

Key Description
apisign The api sign of the user to get a deposit address

URL Parameters

Parameter Description
nonce The nonce to get a deposit address (optional)
apikey The api key of the user to get a deposit address
walletId The wallet id to get a deposit address (optional - default : the first trade wallet)
currency The currency to get a deposit address

withdraw

// please refer to skeleton codes in our authentication section.
const method = "/account/withdraw";
const paramObject = {apikey: publicKey, nonce: now, currency: 'btc', 
      address: '32vuyKYN7wPzjPfWcjL7CZaq1XfV5TRmy5', quantity: '1'};

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : {
    "uuid": "1234455"
  }
}

This endpoint withdraw the amount of the currency.

HTTP Request

GET https://api.dovewallet.com/v1/account/withdraw

Header Settings

Key Description
apisign The api sign of the user to withdraw

URL Parameters

Parameter Description
nonce The nonce to withdraw (for skip - nonce : 0)
apikey The api key of the user to withdraw
walletId The wallet id to withdraw (optional - default : the first trade wallet)
currency The currency to withdraw
address The address of the wallet to withdraw
quantity The amount of currencies to withdraw

getorder

// please refer to skeleton codes in our authentication section.
const method = "/account/getorder";
const paramObject = {apikey: publicKey, nonce: now, uuid: '2457'};

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : {
    "AccountId": null,
    "Uuid": null,
    "OrderUuid": "2457",
    "Exchange": "BTC-ETH",
    "OrderType": "LIMIT_SELL",
    "Quantity": 1,
    "QuantityRemaining": 0,
    "Limit": 1,
    "Reserved": 1,
    "ReserveRemaining": 0,
    "CommissionReserved": 0,
    "CommissionReserveRemaining": 0,
    "CommissionPaid": 1,
    "Price": 1,
    "PricePerUnit": 1,
    "Opened": "2018-12-20T2:25:46.190",
    "Closed": "2018-12-20T4:14:28.983",
    "IsOpen": false,
    "Sentinel": null,
    "CancelInitiated": false,
    "ImmediateOrCancel": false,
    "IsConditional": false,
    "Condition": null,
    "ConditionTarget": null
  }
}

This endpoint retrieves information of the order.

HTTP Request

GET https://api.dovewallet.com/v1/account/getorder

Header Settings

Key Description
apisign The api sign of the user to get information of the order

URL Parameters

Parameter Description
nonce The nonce to get information of the order (optional)
apikey The api key of the user to get information of the order
uuid The uuid of the order to get information of the order

getorderhistory

// please refer to skeleton codes in our authentication section.
const method = "/account/getorderhistory";
const paramObject = {apikey: publicKey, nonce: now, market: 'btc-eth'};

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : [{
    "OrderUuid": "17",
    "Exchange": "BTC-ETH",
    "TimeStamp": "2018-12-23T12:10:35.125",
    "OrderType": "LIMIT_BUY",
    "Limit": 0.00000002,
    "Quantity": 2,
    "QuantityRemaining": 2000,
    "Commission": 0,
    "Price": 2,
    "PricePerUnit": 2,
    "IsConditional": false,
    "Condition": null,
    "ConditionTarget": null,
    "ImmediateOrCancel": false
  }, {
    "OrderUuid": "2457",
    "Exchange": "BTC-ETH",
    "TimeStamp": "2018-12-20T4:14:28.983",
    "OrderType": "LIMIT_SELL",
    "Limit": 1,
    "Quantity": 1,
    "QuantityRemaining": 0,
    "Commission": 0.001,
    "Price": 1,
    "PricePerUnit": 1,
    "IsConditional": false,
    "Condition": null,
    "ConditionTarget": null,
    "ImmediateOrCancel": false
  }]
}

This endpoint retrieves an order history of markets.

HTTP Request

GET https://api.dovewallet.com/v1/account/getorderhistory

Header Settings

Key Description
apisign The api sign of the user to get an order history

URL Parameters

Parameter Description
nonce The nonce to get an order history (optional)
apikey The api key of the user to get an order history
market The market to get an order history (optional - ex : eth-btc)
walletId The wallet Id to get an order history (optional - ex : 21)

getwithdrawalhistory

// please refer to skeleton codes in our authentication section.
const method = "/account/getwithdrawalhistory";
const paramObject = {apikey: publicKey, nonce: now, currency: 'btc'};

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : [{
    "PaymentUuid": "159",
    "Currency": "ADZ",
    "Amount": 0.002,
    "Address": "9Hj3NDfdrhoNrBa9N1yr93WwrF4UwLhpFR",
    "Opened": "2018-11-26T1:25:17.823",
    "Authorized": true,
    "PendingPayment": false,
    "TxCost": 0,
    "TxId": "dea9c085e2574b41d804dd4e85c2d39206429ad6346bde05052775a538f32c0b",
    "Canceled": false,
    "InvalidAddress": false
  }, {
    "PaymentUuid": "3435921815",
    "Currency": "ETH",
    "Amount": 20,
    "Address": "0xf7723c7f5f4354bcdc7c3496749b4e51ff37d93f",
    "Opened": "2018-12-23T09:10:35.125",
    "Authorized": true,
    "PendingPayment": false,
    "TxCost": 0.2,
    "TxId": "0x938e96a86906de800c7d479eb7b33474b5975ac5b600f27b56d2a0254b84fa4c",
    "Canceled": false,
    "InvalidAddress": false
  }]
}

This endpoint retrieves a withdrawal history of the currency.

HTTP Request

GET https://api.dovewallet.com/v1/account/getwithdrawalhistory

Header Settings

Key Description
apisign The api sign of the user to get a withdrawal history

URL Parameters

Parameter Description
nonce The nonce to get a withdrawal history (optional)
apikey The api key of the user to get a withdrawal history
currency The currency to get a withdrawal history (optional)

getdeposithistory

// please refer to skeleton codes in our authentication section.
const method = "/account/getdeposithistory";
const paramObject = {apikey: publicKey, nonce: now, currency: 'btc'};

The above command returns JSON structured like this:

{
  "success" : true,
  "message" : "",
  "result" : [{
    "PaymentUuid": "3435922142",
    "Currency": "ADZ",
    "Amount": 0.002,
    "Address": "9Hj3NDfdrhoNrBa9N1yr93WwrF4UwLhpFR",
    "Opened": "2018-11-28T5:41:33.277",
    "Authorized": false,
    "PendingPayment": true,
    "TxCost": 0,
    "TxId": "dea9c085e2574b41d804dd4e85c2d39206429ad6346bde05052775a538f32c0b",
    "Canceled": false,
    "InvalidAddress": false
  },  {
    "PaymentUuid": "3883828",
    "Currency": "ETH",
    "Amount": 0.0012,
    "Address": "Xfc8DRahhdcbjunLWsdxmMUgdcg4C1nVrD",
    "Opened": "2018-12-25T09:10:35.125",
    "Authorized": true,
    "PendingPayment": false,
    "TxCost": 0.0000012,
    "TxId": "7dad1bb25a4756e9869d79ee32f0443e7d95571d9862266345915a5396fc1bca",
    "Canceled": false,
    "InvalidAddress": false
  }]
}

This endpoint retrieves a deposit history of the currency.

HTTP Request

GET https://api.dovewallet.com/v1/account/getdeposithistory

Header Settings

Key Description
apisign The api sign of the user to get a deposit history

URL Parameters

Parameter Description
nonce The nonce to get a deposit history (optional)
apikey The api key of the user to get a deposit history
currency The currency to get a deposit history (optional)

Errors

The Dovewallet API uses the following error messages:

Error Message Meaning
NETWORK_ERROR Network Error.
DB_ERROR DB Error.
UNEXPECTED_ERROR Unexpected Error.
NO_DATA There is no data.
ACCOUNT_LOCKED The user account is locked.
NOT_ENOUGH_BALANCE The wallet has not enough coins in your trading wallet. Check your available balance.
TOO_MANY_ORDERS You have too many open orders.
WRONG_KEY There is a no api key.
NO_PERMISSION The api key has no permission.
KEY_NOT_MATCHING The api key doesn't match with yours.
INVALID_MARKET The market name is wrong.
INVALID_TYPE The order type is wrong.
INVALID_NONCE The nounce is wrong.
INVALID_NUMBER The number is wrong.
INVALID_ORDER_ID The order id is wrong.
INVALID_CURRENCY The currency is wrong.
INVALID_WALLETID The wallet id is wrong.
INVALID_QUANTITY_OR_RATE The quantity or the rate is wrong.
INVALID_RANGE_OF_TOTAL The total is over the range.
INVALID_UUID The uuid is wrong.
INVALID_SIGN The sign is wrong.
MARKET_NOT_PROVIDED The market name is missing.
TYPE_NOT_PROVIDED The order type is missing.
NONCE_NOT_PROVIDED The nounce is missing.
CURRENCY_NOT_PROVIDED The currency is missing.
QUANTITY_NOT_PROVIDED The quantity is missing.
UUID_NOT_PROVIDED The uuid is missing.
APIKEY_OR_APISIGN_NOT_PROVIDED The api key or the apisign is missing.