Wallet management functions

1. Wallet balance
2. Transfer
3. Transaction info
4. List of transactions
An API request is HTTP POST request to one of the hosts specified in the User's Dashboard. General view of an API request URL:
http(s)://API_HOST/v1/<function>/<params>
Data of the POST request always has 3 parameters:
public_key=<PUBLIC_KEY>&rnd=<RND>&signature=<SIGNATURE>
PUBLIC_KEY – user's public key, RND – random set of latin letters and numbers, SIGNATURE – signature of API request, PRIVATE_KEY – user's private key.
The public and private keys of user are unique for each user and are displayed in the User's Dashboard. The request sender generates RND, for security reasons it is recommended to generate a new RND for each request.
For all examples below user's public key (PUBLIC_KEY) is equal
67DbHjAodk9Cbic98mG98492d4N1IB29m51P3j
private key (PRIVATE_KEY) is
35CJ1KMG57HPjNaF4MCEe9HiAEKF39eNigikJ2393
RND is
J04PDiMH9pH2k10Il713D5c76f1
Every API function has certain weight, the total weight of functions per 1 minute must be equal or less than limit of weight that is set for the user. Default limit is 10 scores. Contact support to increase the limit.

1. Function "wallet-balance"

Weight of function "wallet-balance" is 1 score.

General

http(s)://API_HOST/v1/wallet/<KIND>/balance
KIND – abbreviated cryptocurrency name, allowed values: BTC – Bitcoin, LTC – Litecoin, DASH – Dash, XMR – Monero, BCH – Bitcoin Cash.
SIGNATURE is calculated by the formula:
SHA512(PUBLIC_KEY+';'+RND+';'+KIND+';'+PRIVATE_KEY)

Response (JSON)

{
kind: KIND,
balance: BALANCE,
unlocked_balance: UNLOCKED_BALANCE
}
KIND – abbreviated cryptocurrency name, BALANCE – wallet balance, UNLOCKED_BALANCE – wallet balance that is available to spend.

Example

REQUEST URL:
http(s)://API_HOST/v1/wallet/ltc/balance
REQUEST DATA:
public_key=67DbHjAodk9Cbic98mG98492d4N1IB29m51P3j&rnd=J04PDiMH9pH2k10Il713D5c76f1&signature=7de07cd9fa4ccaf64247418a975ef505c4378e22e612bad440f125bc1f36fa25e00b9bae860da51a844da8c79bd392d1820d25a5c39547e103d1a1aeb1e4e789
JSON RESPONSE:
{"kind":"ltc","balance":"0.034","unlocked_balance":"0.034"}

2. Function "wallet-send-to"

Weight of function "wallet-send-to" is 5 scores.

General

http(s)://API_HOST/v1/wallet/<KIND>/send/<AMOUNT>/to/<ADDRESS>/sffa/<SUBTRACT_FEE_FROM_AMOUNT>/fee/<FEE>
KIND – abbreviated cryptocurrency name, AMOUNT – amount of cryptocurrency (decimal, separator is dot), ADDRESS – receiving transaction address, SUBTRACT_FEE_FROM_AMOUNT – the parameter that is responsible for subtract the fees from the transaction amount, allowed values true and false, FEE – miner fee in BTC/kB (0.00001 BTC/kB = 1 sat/vbyte), optional field.
Parameter SUBTRACT_FEE_FROM_AMOUNT is available for all cryptocurrencies except Monero (XMR). SUBTRACT_FEE_FROM_AMOUNT must be always false for Monero transfers.
If SUBTRACT_FEE_FROM_AMOUNT is equal true then BLOCKED_AMOUNT (blocked amount until transfer is not completed) will be equal AMOUNT. If SUBTRACT_FEE_FROM_AMOUNT = false then BLOCKED_AMOUNT will be equal to the sum of AMOUNT, potential miner fee and tax of the system.
Parameter FEE is available for Bitcoin (BTC) only, ignored for other cryptocurrencies. If FEE is not present in BTC transfer request then the system will calculate the minimum miner fee that makes transaction confirmed within the nearest 20 blocks.
SIGNATURE for the request without FEE is calculated by the formula:
SHA512(PUBLIC_KEY+';'+RND+';'+KIND+';'+AMOUNT+';'+ADDRESS+';'+SUBTRACT_FEE_FROM_AMOUNT+';'+PRIVATE_KEY)
SIGNATURE for the request with FEE is calculated by the formula:
SHA512(PUBLIC_KEY+';'+RND+';'+KIND+';'+AMOUNT+';'+ADDRESS+';'+SUBTRACT_FEE_FROM_AMOUNT+';'+FEE+';'+PRIVATE_KEY)

Response (JSON)

{
transaction_id: TRANSACTION_ID,
amount: AMOUNT,
blocked_amount: BLOCKED_AMOUNT,
address: ADDRESS,
sffa: SUBTRACT_FEE_FROM_AMOUNT,
fee: FEE,
created_at: CREATED_AT
}
TRANSACTION_ID – internal transaction ID, BLOCKED_AMOUNT – blocked amount, it is blocked, but not subtract from the balance until the transaction is not completed. The blocked amount is usually greater than the amount that will be subtract from the balance when the transaction is completed.
FEE will be equal unset if the parameter is not set in request or not supported for cryptocurrency.

Example #1

REQUEST URL:
http(s)://API_HOST/v1/wallet/ltc/send/0.01/to/M8NASPjHR8pT6FFNJKSvZVdFCEpaqTjxTE/sffa/true
REQUEST DATA:
public_key=67DbHjAodk9Cbic98mG98492d4N1IB29m51P3j&rnd=J04PDiMH9pH2k10Il713D5c76f1&signature=e61421b2ed705d91f78ee7496560437523812f7cff5107dc31e696d24c68d5178f937802b3e5cf4db3e3e3170565bd2d62a0dffe0ed9a11bd6e7036de6a4b51b
JSON RESPONSE:
{"transaction_id":2783,"amount":"0.01","blocked_amount":"0.01","address":"M8NASPjHR8pT6FFNJKSvZVdFCEpaqTjxTE","sffa":true,"fee":"unset","created_at":"2022-02-04T12:05:01.000+03:00"}

Example #2

REQUEST URL:
http(s)://API_HOST/v1/wallet/btc/send/0.00015/to/34ZVpoqVHbepG7bFELqzfPiBpqxbQxnq6W/sffa/true/fee/0.00001/
REQUEST DATA:
public_key=67DbHjAodk9Cbic98mG98492d4N1IB29m51P3j&rnd=J04PDiMH9pH2k10Il713D5c76f1&signature=155f46b8453ffd4d22319eb5ebf970b59349a636d20bbcd2f2e49405c59bda9067a10410ab23d4ca9342e829ec5fe9058a6f1057559cb535c9c637055cbbb7c7
JSON RESPONSE:
{"transaction_id":2785,"amount":"0.00015","blocked_amount":"0.00015","address":"34ZVpoqVHbepG7bFELqzfPiBpqxbQxnq6W","sffa":true,"fee":"0.00001","created_at":"2022-02-04T12:07:07.000+03:00"}

3. Function "wallet-transaction-info"

Weight of function "wallet-transaction-info" is 1 score.

General

http(s)://API_HOST/v1/wallet/<KIND>/transaction/<TRANSACTION_ID>/info
KIND – abbreviated cryptocurrency name, TRANSACTION_ID – internal transaction ID, returned in wallet-send-to.
SIGNATURE is calculated by the formula:
SHA512(PUBLIC_KEY+';'+RND+';'+KIND+';'+TRANSACTION_ID+';'+PRIVATE_KEY)

Response (JSON) for undefined type transaction (not completed transfer)

{
transaction_id: TRANSACTION_ID,
amount: AMOUNT,
address: ADDRESS,
blocked_amount: BLOCKED_AMOUNT,
sffa: SUBTRACT_FEE_FROM_AMOUNT,
fee: FEE,
created_at: CREATED_AT
}

Response (JSON) for internal transaction

{
transaction_id: TRANSACTION_ID,
amount: AMOUNT,
address: ADDRESS,
hash: HASH,
type: TYPE,
created_at: CREATED_AT
}

Response (JSON) for external transaction

{
transaction_id: TRANSACTION_ID,
amount: AMOUNT,
address: ADDRESS,
hash: HASH,
confirms_received: CONFIRMS_RECEIVED,
type: TYPE,
created_at: CREATED_AT
}
HASH – hash (TXID) of transaction (it is equal to hash in blockchain for external transaction), AMOUNT – total amount that is subtracted from balance (<transaction amount> + <miner fee> + <tax of the system>), ADDRESS – receiving transaction address, TYPE – type of transaction, internal or external.
Transaction is internal if transfer is between different users of shared cryptowallet (ask support for details), miner fee and tax of the system are zero for these transfers. Other transactions are external.
CONFIRMS_RECEIVED can have the next values: positive number – the real number of confirmations that the transaction has got, the number of confirmations is less than necessary to be confirmed transaction; positive number with sign "+" at the end – the number of confirmations is greater or equal to the necessary number that makes transaction confirmed (transaction is confirmed, the number of confirmations will not update longer); -1 – transaction is canceled by a sender and it is not exist in the cryptocurrency blockchain, conflicted transaction.

Example

REQUEST URL:
http(s)://API_HOST/v1/wallet/btc/transaction/2785/info
REQUEST DATA:
public_key=67DbHjAodk9Cbic98mG98492d4N1IB29m51P3j&rnd=J04PDiMH9pH2k10Il713D5c76f1&signature=00338d63416a5a337a46f7d0d5980fec872148e0cf38b50e6efe9423815ed4e5cc9c29873ec18633e49ef093bcc6d22c9d57d5dd1192b084a19497b6960dc350
JSON RESPONSE:
{"transaction_id":2785,"amount":"-0.00015","address":"34ZVpoqVHbepG7bFELqzfPiBpqxbQxnq6W","hash":"1de723b3e5d1fcd990817656496f9070ebc53ef202fc23ff8af5f961ae2422d9","confirms_received":"0","type":"external","created_at":"2022-02-03T11:08:07.000+03:00"}

4. Function "wallet-transaction-list"

Weight of function "wallet-transaction-list" is 4 scores.

General

http(s)://API_HOST/v1/wallet/<KIND>/transaction/list/<OFFSET>
KIND – abbreviated cryptocurrency name, OFFSET – offset is in pages, 1 page has 40 transactions.
List of transactions is reverse ordered, the first in the list is the latest at the moment.
SIGNATURE is calculated by the formula:
SHA512(PUBLIC_KEY+';'+RND+';'+KIND+';'+OFFSET+';'+PRIVATE_KEY)

Response (JSON)

[
{
transaction_id: TRANSACTION_ID_1,
amount: AMOUNT_1,
hash: HASH_1
},
{
transaction_id: TRANSACTION_ID_2,
amount: AMOUNT_2,
hash: HASH_2
},
...
{
transaction_id: TRANSACTION_ID_N,
amount: AMOUNT_N,
hash: HASH_N
}
]
TRANSACTION_ID_(1,2,...,N) – internal transaction ID, AMOUNT_(1,2,...,N) – amount of cryptocurrency, HASH_(1,2,...,N) – hash (TXID) of transaction (it is equal to hash in blockchain for external transaction).

Example

REQUEST URL:
http(s)://API_HOST/v1/wallet/ltc/transaction/list/1
REQUEST DATA:
public_key=67DbHjAodk9Cbic98mG98492d4N1IB29m51P3j&rnd=J04PDiMH9pH2k10Il713D5c76f1&signature=38b97d1a8a4c79cfaf48ccb1325f72c8bf91f7d3d04dd9539f1ca820344615d3c885029fc1a05e823dfa706c44590afd395eddb9a59d356e38481cd815c1bba8
JSON RESPONSE:
[{"transaction_id":1189, "hash":"lola-internal-p5ooocm76bbd2hgna7fp1nmadba7cbp1a", "amount":"-0.00723648"}, {"transaction_id":1183, "hash":"a620c7290739d0b9a20ab56fa9f50377f509b2bfa34b36e15176dff34640ff32", "amount":"0.0015"}, {"transaction_id":1180, "hash":"a7a4336151552395af9d3ec6ac873dd4837cbd7506a6342babdcaa0b40c44dc5", "amount":"0.0025"}, {"transaction_id":1179, "hash":"5cf46f09896c92fc7eb0b465f92d648f79ae6dd9caba4bc896094cfd54d89b35", "amount":"0.0015"}, {"transaction_id":714, "hash":"0f1eef38929f65b90648406c9ee8e0d2276d585b22d325eefc115a26aecea3fd", "amount":"-0.00515"}, {"transaction_id":713, "hash":"e862b56799b19d9487dd01f93b59042122c8aa1d4aabe6dff3a18e711e1c8021", "amount":"-0.00311352"}]