SINGLE SECURE BIT.AC CRYPTO WALLET

Multicurrency cryptowallet with built-in instant exchange

API DOCUMENTATION

User token acquire (initial authorization)

url: /api/user/token

method: POST

login

required

user email address


password

optional

hashed user password


hash

optional

random hash request


2facode

optional

2FA code


device

optional

user device id


To acquire token you have to make 2 requests:

1) random hash acquiring
example data

{
    "login" : "[email protected]",
    "hash" : "1"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "hash" : "0b8f88b8825e17cbb9a599e1b5e2c4f3"
}

2) hashing your password with given random hash - password = md5("0b8f88b8825e17cbb9a599e1b5e2c4f3" + md5(user_password))
example data (without 2FA)

{
    "login" : "[email protected]",
    "password" : "5830b51aa94dd013ebe39e14ab372e60"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "token" : "e9347cfb001d79793536772e33d08a76"
}

response (unsuccessful):

{
    "code" : 4,
    "message" : "Authentication invalid."
}

example data (with 2FA)

{
    "login" : "[email protected]",
    "password" : "5830b51aa94dd013ebe39e14ab372e60",
    "2facode" : "123456"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "token" : "e9347cfb001d79793536772e33d08a76"
}

response (unsuccessful):

{
    "code" : 4,
    "message" : "Authentication invalid."
}

response (wrong 2FA code):

{
    "code" : 6,
    "message" : "2FA invalid."
}

Change user password

url: /api/settings/changepassword

method: POST

token

required

user token


password

required

user password


new_password

required

new user password


new_password2

required

new user password confirmation


example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "password" : "1234567890",
    "new_password" : "0987654321",
    "new_password2" : "0987654321"
}

response (successful):

{
    "code" : 0,
    "message" : "Success."
}

response (wrong password):

{
    "code" : 3,
    "message" : "Request invalid.",
    "errors" : {
        "password" : "Wrong password"
    }
}

response (wrong new password confirmation):

{
    "code" : 3,
    "message" : "Request invalid.",
    "errors" : {
        "new_password2" : "Passwords don\u0027t match"
    }
}

Enable/disable 2FA

url: /api/settings/twofa

method: POST

token

required

user token


method

required

2FA method - 0 = Google Authenticator (default), 1 = Email


password

required

user password = md5(hash + md5(user_password)) to enable | 2FA code to disable


- enable
example data // Google Authenticator

{
    "login" : "[email protected]",
    "hash" : "1"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "hash" : "37bf97215a3199ceac1e2aea96d60427"
}

example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "method" : 0,
    "password" : "284c5ea76b4b5878b16a25f96106ff88",
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "totp" : 1,
    "secret" : "YTFNQVH7REYO3WOOUG4JCML3RWS7ZEF6"
}

response (wrong password):

{
    "code" : 3,
    "message" : "Request invalid.",
    "errors" : {
        "password" : "Wrong password"
    }
}

example data // Email

{
    "login" : "[email protected]",
    "hash" : "1"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "hash" : "37bf97215a3199ceac1e2aea96d60427"
}

example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "method" : 1,
    "password" : "284c5ea76b4b5878b16a25f96106ff88",
}

response (successful):

{
    "code" : 0,
    "message" : "Success."
}

response (wrong password):

{
    "code" : 3,
    "message" : "Request invalid.",
    "errors" : {
        "password" : "Wrong password"
    }
}

- disable
example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "password" : "123456",
}

response (successful):

{
    "code" : 0,
    "message" : "Success."
}

response (wrong 2FA code):

{
    "code" : 3,
    "message" : "Request invalid.",
    "errors" : {
        "password" : "Wrong password"
    }
}

Confirm 2FA (to enable 2FA)

url: /api/settings/validatetwofa

method: POST

token

required

user token


code

required

2FA code


example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "code" : "123456"
}

response (successful):

{
    "code" : 0,
    "message" : "Success."
}

response (wrong 2FA code):

{
    "code" : 3,
    "message" : "Request invalid.",
    "error" : "Wrong 2FA code."
}

Send 2FA code (for email method)

url: /api/settings/sendtwofa

method: POST

token

required

user token


example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
}

response (successful):

{
    "code" : 0,
    "message" : "Success."
}

Get/set 2FA settings

url: /api/settings/twofasettings

method: POST

token

required

user token


2facode

required

2FA code


login

optional

check 2FA on login - 0 | 1


send

optional

check 2FA on send - 0 | 1


example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "2facode" : "123456"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "enabled" : true,
    "login" : true,
    "send" : true
}

example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "2facode" : "123456",
    "login" : "0"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "enabled" : true,
    "login" : false,
    "send" : true
}

Get wallets list

url: /api/wallets/list

method: POST

token

required

user token


example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "result" : [
        {
            "id" : "56d43d78c8f62e982b8b456f",
            "coin" : "BTC",
            "balance" : 1.0131,
            "created" : 145160640,
            "wallet_id" : "AAAAAAAAAAAAAAAAA"
        }, {
            "id" : "56d43d7dc8f62eb6298b456b",
            "coin" : "LTC",
            "balance" : 0.757989,
            "created" : 145160640,
            "wallet_id" : "BBBBBBBBBBBBBBBBB"
        }, {
            "id" : "56d716c5c8f62ee9118b4574",
            "coin" : "CLAM",
            "balance" : 1.99797735,
            "created" : 145160640,
            "wallet_id" : "CCCCCCCCCCCCCCCCC"
        }
    ]
}

response (wrong token):

{
    "code" : 4,
    "message" : "Authentication invalid.",
    "errors" : []
}

List of available currencies

url: /api/wallets/currencieslist

method: GET

response:

{
    "code" : 0,
    "message" : "Success.",
    "result" : [
        {
            "title" : "Bitcoin",
            "short" : "BTC",
            "img" : "https:\/\/bit.ac\/img\/coins\/small\/BTC.png"
        }, {
            "title" : "Dash",
            "short" : "DASH",
            "img" : "https:\/\/bit.ac\/img\/coins\/small\/DASH.png"
        }, {
            "title" : "Monero",
            "short" : "XMR",
            "img" : "https:\/\/bit.ac\/img\/coins\/small\/XMR.png"
        }, //etc.
    ]
}

List of withdrawal fees

url: /api/wallets/fees

method: GET

response:

{
    "code" : 0,
    "message" : "Success.",
    "result" : [
        {
            "currency" : "BTC",
            "fee" : "0.0001"
        }, {
            "currency" : "LTC",
            "fee" : "0.001"
        }, {
            "currency" : "DOGE",
            "fee" : "1"
        }, //etc.
    ]
}

Get summary balance in BTC and USD

url: /api/wallets/balance

method: POST

token

required

user token


example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "btc_balance" : 1.02283553,
    "usd_balance" : 433.68
}

Create new wallet

url: /api/wallets/add

method: POST

token

required

user token


coin

required

short currency name ('BTC', 'LTC', etc.)


example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "coin" : "DOGE"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "result" : {
        "id" : "56fa71adc8f62e70388b457b",
        "balance" : 0,
        "created" : 145160640
    }
}

response (unknown coin):

{
    "code" : 3,
    "message" : "Request invalid.",
    "errors" : {
        "coin" : "Invalid value"
    }
}

response (wallet already exists):

{
    "code" : 1,
    "message" : "Error.",
    "errors" : {
        "coin" : "Wallet already exist"
    }
}

Send coin

url: /api/wallets/update-send-form

method: POST

token

required

user token


send_currency

required

short currency name to send ('BTC', 'LTC', etc.)


receive_currency

required

short currency name to receive ('BTC', 'LTC', etc.)


amount

required

receive amount


recipient

required

currency address or user email


payment_id

optional

used only for receive_currency = "XMR" (Monero)


example data (internal send)

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "send_currency" : "BTC",
    "receive_currency" : "BTC",
    "amount" : 0.02
    "recipient" : "[email protected]"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "result" : {
        "external_send" : false,
        "fee" : "0",
        "min_amount" : "0",
        "max_amount" : "1.0131",
        "send" : "0",
        "total" : "0.02",
        "usd" : "8.48",
        "valid" : true, // valid send request
        "valid_id" : "0e1e7022a1bc92d96335b4674374b808", // used in 'confirm-send' to confirm this send request
        "send_amount" : "0.02 Bitcoin (BTC)",
        "receive_amount" : "0.02 Bitcoin (BTC)" // recipient will receive 0.02 BTC
    },
    "errors" : []
}

example data (exchange & external send)

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "send_currency" : "BTC",
    "receive_currency" : "LTC",
    "amount" : 2
    "recipient" : "AAAAAAAAAAAAAAAAA"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "result" : {
        "external_send" : true,
        "fee" : "0.004",
        "min_amount" : "0.25266562",
        "max_amount" : "7.41943952",
        "send" : "0.01555104", // you will send 0.01555104 BTC to exchange
        "total" : "2.004", // you will receive 2.004 LTC (including exchange & send fee)
        "usd" : "6.57",
        "valid" : true, // valid send request
        "valid_id" : "716179e634592dbbac2efb55fc55250a", // used in 'confirm-send' to confirm this send request
        "send_amount" : "0.01555104 Bitcoin (BTC)",
        "receive_amount" : "2 Litecoin (LTC)" // recipient will receive 2 LTC
    },
    "errors" : []
}

example data (exchange & external send, amount is less than minimum, wrong recipient address)

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "send_currency" : "BTC",
    "receive_currency" : "LTC",
    "amount" : 0.02
    "recipient" : "AAAAAAAAAAAAAAAAA"
}

response (amount is less than minimum, wrong recipient address)

{
    "code" : 0,
    "message" : "Success.",
    "result" : {
        "external_send" : true,
        "fee" : "0.00103",
        "min_amount" : "0.25266562",
        "max_amount" : "7.42240952",
        "send" : "0.00016319",
        "total" : "0.02103",
        "usd" : "0.06",
        "valid" : false, // invalid send request
        "valid_id" : null,
        "send_amount" : "0.00016319 Bitcoin (BTC)",
        "receive_amount" : "0.02 Litecoin (LTC)"
    },
    "errors" : {
        "send_recipient" : true, // invalid recipient
        "messages" : [ "Invalid address (hash) or e-mail" ],
        "send_amount" : true, // invalid amount
        "less_than_min" : true // amount is less than minimum
    }
}

Confirm send request

url: /api/wallets/confirm-send

method: POST

token

required

user token


hash

required

valid_id from '/api/wallets/update-send-form'


2fa

optional

2FA code


example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "hash" : "0e1e7022a1bc92d96335b4674374b808"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
}

response (wrong hash):

{
    "code" : 3,
    "message" : "Request invalid."
}

response (wrong 2FA code):

{
    "code" : 6,
    "message" : "2FA invalid."
}

Exchange coin

url: /api/wallets/update-exchange-form

method: POST

token

required

user token


send_currency

required

short currency name to send ('BTC', 'LTC', etc.)


receive_currency

required

short currency name to receive ('BTC', 'LTC', etc.)


send_amount

optional

send amount (to exchange)


receive_amount

optional

receive amount (exchange for)


example data (get info about BTC -> CLAM exchange)

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "send_currency" : "BTC",
    "receive_currency" : "CLAM"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "result" : {
        "fee" : "0",
        "min_amount" : "1.04368336", // receive currency (CLAM)
        "max_amount" : "13.58719142", // receive currency (CLAM)
        "send" : "0",
        "receive" : "0",
        "total" : "0",
        "usd" : "0.00",
        "valid" : false,
        "valid_id" : null,
        "send_amount" : "0 Bitcoin (BTC)",
        "receive_amount" : "0 CLAMS (CLAM)",
        "exchange_commission" : "0.15" // exchange fee commission in % (percent)
    },
    "errors" : []
}

example data (get info about CLAM -> FCT exchange (temporarily unavailable))

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "send_currency" : "CLAM",
    "receive_currency" : "FCT"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "result" : {
        "fee" : "0",
        "min_amount" : "0",
        "max_amount" : "0",
        "send" : "0",
        "receive" : "0",
        "total" : "0",
        "usd" : "0.00",
        "valid" : false,
        "valid_id" : null,
        "send_amount" : "0 CLAMS (CLAM)",
        "receive_amount" : "0 Factom (FCT)",
        "exchange_commission" : "0.30"
    },
    "errors" : {
        "min_max" : "Temporarily unavailable."
    }
}

example data (exchange BTC for 5 CLAM)

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "send_currency" : "BTC",
    "receive_currency" : "CLAM",
    "receive_amount" : 5
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "result" : {
        "fee" : "0.00751127",
        "min_amount" : "1.04368336",
        "max_amount" : "13.58719142",
        "send" : "0.00996737", // you will send
        "receive" : "5.00000952", // you will receive (can be a bit more than you requested)
        "total" : "5.00752079", // receive amount including fee
        "usd" : "4.08", // usd equivalent
        "valid" : true, // valid exchange request
        "valid_id" : "ed2b1f468c5f915f3f1cf75d7068baae", // used in 'confirm-exchange' to confirm this request
        "send_amount" : "0.00996737 Bitcoin (BTC)",
        "receive_amount" : "5.00000952 CLAMS (CLAM)",
        "exchange_commission" : "0.15" // exchange fee commission in % (percent)
    },
    "errors" : []
}

example data (exchange 0.01 BTC for CLAM)

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "send_currency" : "BTC",
    "receive_currency" : "CLAM",
    "send_amount" : 0.01
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
    "result" : {
        "fee" : "0.00753674",
        "min_amount" : "1.04368336",
        "max_amount" : "13.58719142",
        "send" : "0.01", // you will send
        "receive" : "5.01695767", // you will receive
        "total" : "5.02449441", // receive amount including fee
        "usd" : "4.10", // usd equivalent
        "valid" : true, // valid exchange request
        "valid_id" : "0bb0096e771f967c220b9343bf75c7bb", // used in 'confirm-exchange' to confirm this request
        "send_amount" : "0.01 Bitcoin (BTC)",
        "receive_amount" : "5.01695767 CLAMS (CLAM)",
        "exchange_commission" : "0.15" // exchange fee commission in % (percent)
    },
    "errors" : []
}

example data (exchange less than minimum BTC for CLAM)

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "send_currency" : "BTC",
    "receive_currency" : "CLAM",
    "send_amount" : 0.001
}

response:

{
    "code" : 0,
    "message" : "Success.",
    "result" : {
        "fee" : "0",
        "min_amount" : "1.04368336",
        "max_amount" : "13.58719142",
        "send" : "0.001",
        "receive" : "0",
        "total" : "0",
        "usd" : "0.40",
        "valid" : false,
        "valid_id" : null,
        "send_amount" : "0.001 Bitcoin (BTC)",
        "receive_amount" : "0 CLAMS (CLAM)",
        "exchange_commission" : "0.15"
    },
    "errors" : {
        "send_amount" : true, // invalid amount
        "less_than_min" : true // amount is less than minimum
    }
}

example data (exchange BTC for more than maximum CLAM)

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "send_currency" : "BTC",
    "receive_currency" : "CLAM",
    "send_amount" : 20
}

response:

{
    "code" : 0,
    "message" : "Success.",
    "result" : {
        "fee" : "0.03004506",
        "min_amount" : "1.04368336",
        "max_amount" : "13.58719142",
        "send" : "0",
        "receive" : "20",
        "total" : "20.03004506",
        "usd" : "16.34",
        "valid" : false,
        "valid_id" : null,
        "send_amount" : "0 Bitcoin (BTC)",
        "receive_amount" : "20 CLAMS (CLAM)",
        "exchange_commission" : "0.15"
    },
    "errors" : {
        "receive_amount" : true, // invalid amount
        "more_than_max" : true // amount is more than maximum
    }
}

Confirm exchange request

url: /api/wallets/confirm-exchange

method: POST

token

required

user token


hash

required

valid_id from '/api/wallets/update-exchange-form'


2fa

optional

2FA code


example data

{
    "token" : "e9347cfb001d79793536772e33d08a76",
    "hash" : "ed2b1f468c5f915f3f1cf75d7068baae"
}

response (successful):

{
    "code" : 0,
    "message" : "Success.",
}

response (wrong hash):

{
    "code" : 3,
    "message" : "Request invalid."
}

response (wrong 2FA code):

{
    "code" : 6,
    "message" : "2FA invalid."
}

Get transactions list

url: /api/transactions/list

method: POST

token

required

user token


to_date

required

(UNIX timestamp) get transactions that were created before "to_date" (use 0 for current timestamp)


count

required

number of transactions to fetch


example data

{
    "code" : 0,
    "message" : "Success.",
    "result" : [
        { // internal send
            "type" : "send",
            "status" : "complete",
            "created" : 145160644,
            "fee" : 0,
            "receive_amount" : 0.02,
            "send_amount" : 0.02,
            "receive_coins" : "BTC",
            "send_coins" : "BTC",
            "send_wallet" : {
                "type" : "label",
                "value" : "BTC"
            },
            "receive_wallet" : {
                "type" : "label",
                "value" : "BTC"
            },
            "status_link" : null
        }, { // external send
            "type" : "send",
            "status" : "pending",
            "created" : 145160643,
            "fee" : 0.0001,
            "receive_amount" : 0.001,
            "send_amount" : 0.0011,
            "receive_coins" : "BTC",
            "send_coins" : "BTC",
            "send_wallet" : {
                "type" : "label",
                "value" : "BTC"
            },
            "receive_wallet" : {
                "type" : "address",
                "value" : "AAAAAAAAAAAAAAAAA"
            },
            "status_link" : "https:\/\/blockchain.info\/tx\/some_txid"
        }, { // external receive
            "type" : "receive",
            "status" : "complete",
            "created" : 145160642,
            "fee" : 0,
            "receive_amount" : 0.0001,
            "send_amount" : 0.0001,
            "receive_coins" : "BTC",
            "send_coins" : "BTC",
            "send_wallet" : {
                "type" : "address",
                "value" : "BBBBBBBBBBBBBBBBB"
            },
            "receive_wallet" : {
                "type" : "label",
                "value" : "BTC"
            },
            "status_link" : "https:\/\/blockchain.info\/tx\/some_txid"
        }, { // exchange BTC -> LTC
            "type" : "receive",
            "status" : "complete",
            "created" : 145160641,
            "fee" : 0.00056849,
            "receive_amount" : 0.37842994,
            "send_amount" : 0.37842994,
            "receive_coins" : "LTC",
            "send_coins" : "LTC",
            "send_wallet" : {
                "type":"system",
                "value":"system"
            },
            "receive_wallet" : {
                "type" : "label",
                "value" : "LTC"
            },
            "status_link" : null
        }, { // exchange BTC -> LTC
            "type" : "send",
            "status" : "complete",
            "created" : 145160640,
            "fee" : 0,
            "receive_amount" : 0.003,
            "send_amount" : 0.003,
            "receive_coins" : "BTC",
            "send_coins" : "BTC",
            "send_wallet" : {
                "type" : "label",
                "value" : "BTC"
            },
            "receive_wallet" : {
                "type" : "system",
                "value" : "system"
            },
            "status_link" : null
        }
    ]
}