Wallet management functions

1. Wallet balance
2. Transfer
3. Transaction info
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, ZEC – Z-Cash, 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) and transfer to Z-Cash z-address. SUBTRACT_FEE_FROM_AMOUNT must be always false for Monero transfers and Z-Cash z-address 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 on the blockchain, 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.

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"}