API (Application Programming Interface)

Contents

  1. API Version
  2. How does it work?
  3. Error processing
  4. Receiving service conditions
  5. List of available wallet cryptocurrencies
  6. List of wallets
  7. Creating a new wallet
  8. Updating (renaming) a wallet
  9. Deleting a wallet
  10. Receiving current wallet balance
  11. Receiving a list of unconfirmed incoming transactions
  12. Receiving a list of pending outgoing transactions (withdrawal requests)
  13. Receiving history (confirmed entries about deposit and withdrawal of funds)
  14. Receiving overall number of entries in history
  15. Receiving a list of wallet addresses
  16. Receiving overall number of wallet addresses
  17. Transferring money (creating a request for money withdrawal)
  18. Checking request status for money withdrawal
  19. Creating a one-time payment
  20. Checking the status of one-time incoming payment
API Version

Current API version: 1.1. Documentation on previous versions can be found here: 1.0

How does it work?

All API methods:

  • are called using HTTP-method POST
  • must be authorized with the API-key (it can be found in the "Settings" section of your wallet), which is passed as the value of the required string parameter api_key
  • use JSON for a request and response (headers 'Accept' and 'Content-Type' must be 'application/json')

Amount values are given out and taken in as big integer numbers. For example, for BTC (Bitcoin) all amounts are represented in satoshi: 1 satoshi = 0.00000001 BTC or 100000000 satoshi = 1 BTC.

When you deposit to the addresses generated via the API (by using the command /wallets/new), a service fee is charged. Its amount is proportional to miners’ fee and its size can be received using the command /conditions.

Error processing

All commands may return a list of errors that occurred during execution as a response. In the overwhelming majority of cases, they are validation errors of input values. А list of errors is returned as the object with a single parameter 'errors', which contains an enumeration of parameters with which a particular error is associated. Each parameter, in its turn, contains an array of string errors.

Example of an error in JSON format:

  1. {"errors":{"wallet":["Incorrect parameter"]}}

It is guaranteed that no other returned response contains an object with the 'errors' parameter.

Receiving service conditions
URL

https://rahakott.io/api/v1.1/conditions

Request parameters

None.

Response

The array of cryptocurrencies is returned as a response. It contains the following parameters:

  • service_internal_fee (number) - internal fee (for transfers between Rahakott accounts)
  • service_fee (number) - service fee (charged for transfers to an external wallet)
  • min_fee (number) - minimum network fee
  • min_amount (number) - minimum transfer amount
  • min_confirms (number) - minimum required number of confirmations for depositing funds to the account
  • api_deposit_fee (number) - fee for depositing to the address generated via the API
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/conditions
  2. {"api_key":"1234567890abcdef1234567890abcdef"}
  3. >>>
  4. {"BTC": {"service_internal_fee":0,"service_fee":0,"min_fee": 10000,"min_amount": 10000,"min_confirms": 2,"api_deposit_fee": 5000}}
List of available wallet cryptocurrencies
URL

https://rahakott.io/api/v1.1/currencies

Request parameters

None.

Response

The list of available cryptocurrencies is returned as a response.

Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/currencies
  2. {"api_key":"1234567890abcdef1234567890abcdef"}
  3. >>>
  4. ["BTC","BCH"]
List of wallets
URL

https://rahakott.io/api/v1.1/wallets

Request parameters
  • currency (string, required) - currency of the wallets
Response

The array of objects is returned as a response and it has the descriptions of the following parameters of the wallets:

  • oid (string) - unique wallet identifier
  • currency (string) - wallet currency
  • name (string) - wallet name; in case null is specified, this is the default wallet (main wallet)
  • current_address (string) - current wallet address
  • created_at (date) - date of wallet creation
  • updated_at (date) - date of wallet update (currently the update is associated with renaming the wallet)
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/wallets
  2. {"api_key":"1234567890abcdef1234567890abcdef","currency":"BTC"}
  3. >>>
  4. [
  5. {"currency":"BTC","name":null,"created_at":"2017-11-23 13:34:48","updated_at":"2017-11-23 13:34:48","oid":"2bb027c2ca0143bcaf0b9e2460f6bfd1","current_address":"mtQRpiBCd4JpQ4ATfUyVgQyW8kSQQViTuZ"},
  6. {"currency":"BTC","name":"Additional","created_at":"2017-11-23 13:43:57","updated_at":"2017-11-23 13:43:57","oid":"efecc1468fe33d06c510658eaca75297","current_address":"mtaHjMjdbRDb9y6977aRT3zS6QfVYnXp7k"}
  7. ]
Creating a new wallet
URL

https://rahakott.io/api/v1.1/wallets/new

Request parameters
  • name (string, required) - wallet name, it must be unique within the account
  • currency (string, required) - wallet currency
Response

The object with the following parameters of the created wallet is returned as a response:

  • oid (string) - unique wallet identifier
  • currency (string) - wallet currency
  • name (string) - wallet name; in case null is specified, this is the default wallet (main wallet)
  • current_address (string) - current wallet address
  • created_at (date) - date of wallet creation
  • updated_at (date) - date of wallet update (currently the update is associated with renaming the wallet)
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/wallets/new
  2. {"api_key":"1234567890abcdef1234567890abcdef","name":"New wallet","currency":"BTC"}
  3. >>>
  4. {"currency":"BTC","name":"New wallet","created_at":"2017-11-23 13:34:48","updated_at":"2017-11-23 13:34:48","oid":"2bb027c2ca0143bcaf0b9e2460f6bfd1","current_address":"mtQRpiBCd4JpQ4ATfUyVgQyW8kSQQViTuZ"}
Updating (renaming) a wallet
URL

https://rahakott.io/api/v1.1/wallets/update

Request parameters
  • oid (string, required) - unique wallet identifier received via a list of wallets or creating a new wallet requests
  • name (string, required) - wallet name, it must be unique within the account
Response

The object with the description of the following parameters is returned as a response:

  • oid (string) - unique wallet identifier
  • currency (string) - wallet currency
  • name (string) - wallet name; in case null is specified, this is the default wallet (main wallet)
  • current_address (string) - current wallet address
  • created_at (date) - date of wallet creation
  • updated_at (date) - date of wallet update (currently the update is associated with renaming the wallet)
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/wallets/update
  2. {"api_key":"1234567890abcdef1234567890abcdef","oid":"2bb027c2ca0143bcaf0b9e2460f6bfd1","name":"Updated wallet"}
  3. >>>
  4. {"currency":"BTC","name":"Updated wallet","created_at":"2017-11-23 13:34:48","updated_at":"2017-11-23 13:34:48","oid":"2bb027c2ca0143bcaf0b9e2460f6bfd1","current_address":"mtQRpiBCd4JpQ4ATfUyVgQyW8kSQQViTuZ"}
Deleting a wallet
URL

https://rahakott.io/api/v1.1/wallets/delete

Request parameters
  • oid (string, required) - unique wallet identifier received via a list of wallets or creating a new wallet requests
Response

The following parameters are returned as a response:

  • wallet_oid (string) - unique wallet identifier
  • deleted (boolean) - boolean, which always equals true
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/wallets/delete
  2. {"api_key":"1234567890abcdef1234567890abcdef","oid":"2bb027c2ca0143bcaf0b9e2460f6bfd1"}
  3. >>>
  4. {"wallet_oid":"2bb027c2ca0143bcaf0b9e2460f6bfd1","deleted":true}
Receiving current wallet balance
URL

https://rahakott.io/api/v1.1/wallets/balance

Request parameters
  • oid (string, required) - unique wallet identifier received via a list of wallets or creating a new wallet requests
Response

The following parameters are returned as a response:

  • wallet_oid (string) - unique wallet identifier
  • confirmed (number) - confirmed wallet balance
  • unconfirmed (number) - unconfirmed wallet balance, i.e. the sum of unconfirmed incoming transactions
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/wallets/balance
  2. {"api_key":"1234567890abcdef1234567890abcdef","oid":"2bb027c2ca0143bcaf0b9e2460f6bfd1"}
  3. >>>
  4. {"wallet_oid":"2bb027c2ca0143bcaf0b9e2460f6bfd1","confirmed":100000000,"unconfirmed":0}
Receiving a list of unconfirmed incoming transactions
URL

https://rahakott.io/api/v1.1/transactions/incoming

Request parameters
  • wallet (string, required) - unique wallet identifier
Response

The wallet identifier and connected with it array of objects are sent as a response. The objects have the following transaction parameters:

  • txid (string) - transaction unique identifier
  • amount (number) - amount of transfered funds
  • confirmations (number) - number of transaction confirmations
  • created_at (date) - date of transaction receipt of the wallet
  • updated_at (date) - date of transaction update (corresponds to the time of the last transaction number confirmation update)
  • address (string) - address to which the transaction was received
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/transactions/incoming
  2. {"api_key":"1234567890abcdef1234567890abcdef","wallet":"2bb027c2ca0143bcaf0b9e2460f6bfd1"}
  3. >>>
  4. {"wallet":"abadf547c544f067661604db8ab522ee",
  5. "incoming":[
  6. {"txid":"3c084f02968b48c175c176a64a8aaf49a60e5716e8dd5ade8f97d773dbdaf458","amount":1000000,"confirmations":1,"created_at":"2017-11-24 11:26:21","updated_at":"2017-11-24 11:26:21","address":"mviz3utBwH8PCTS5XZhj3YCKCkWH1mZUvc"}
  7. {"txid":"2f46615cbaa76b786b344e603d6adbec2890a3b3bfa676c8b8a6b87b9792ff1a","amount":2000000,"confirmations":0,"created_at":"2017-11-24 11:27:39","updated_at":"2017-11-24 11:27:39","address":"mviz3utBwH8PCTS5XZhj3YCKCkWH1mZUvc"}
  8. ]}
Receiving a list of pending outgoing transactions (withdrawal requests)
URL

https://rahakott.io/api/v1.1/transactions/outgoing

Request parameters
  • wallet (string, required) - unique wallet identifier
Response

The wallet identifier and connected with it array of objects are sent as a response. The objects have the following transaction parameters:

  • request (string) - unique identifier of the withdrawal request
  • address (string) - recipient's address
  • amount (number) - amount of transferred funds
  • external_only (boolean) - boolean signifying using external transfer (via the blockchain) for funds sending
  • subtract_fees (boolean) - boolean signifying subtracting all fees from the transfer amount (is usually used for the withdrawal of all funds from the account)
  • executed (boolean) - if true, the request is completed; if false, the request is waiting to be executed; on completion, the parameter 'error' should be checked
  • error (string) - if not null, an error occurred during the request execution
  • created_at (date) - date of request creation for the withdrawal
  • updated_at (date) - date of request update
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/transactions/outgoing
  2. {"api_key":"1234567890abcdef1234567890abcdef","wallet":"2bb027c2ca0143bcaf0b9e2460f6bfd1"}
  3. >>>
  4. {"wallet":"abadf547c544f067661604db8ab522ee",
  5. "outgoing":[
  6. {"created_at":"2017-11-24 12:02:21","updated_at":"2017-11-24 12:02:21","address":"mviz3utBwH8PCTS5XZhj3YCKCkWH1mZUvc","amount":2000000,"external_only":false,"subtract_fees":false,"error":null,"request":"62c7cbfb0eb039e68c9691d7f31ece19","executed":false},
  7. {"created_at":"2017-11-24 12:02:14","updated_at":"2017-11-24 12:02:14","address":"mviz3utBwH8PCTS5XZhj3YCKCkWH1mZUvc","amount":1000000,"external_only":false,"subtract_fees":false,"error":null,"request":"abadf547c544f067661604db8ab522ee","executed":false}
  8. ]}
Receiving history (confirmed entries about deposit and withdrawal of funds)
URL

https://rahakott.io/api/v1.1/history

Request parameters
  • wallet (string, required) - unique wallet identifier
  • offset (number, optional) - offset from the beginning of entries, similar to OFFSET parameter in SQL-request
  • limit (number, optional) - maximum number of entries in output, similar to LIMIT parameter in SQL-request
Response

The wallet identifier and connected with it array of objects are sent as a response. The objects have the following historic entry parameters:

  • txid (string) - unique transaction number with which this entry is associated
  • request_id (string) - unique identifier of the request for the withdrawal according to which this entry in history was created; in case of receiving funds entry, this parameter value equals null
  • address (string) - address of the sender or recipient.
  • amount (number) - amount of transferred funds
  • failed (boolean) - boolean signifying the success of the operation
  • created_at (date) - entry date
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/history
  2. {"api_key":"1234567890abcdef1234567890abcdef","wallet":"2bb027c2ca0143bcaf0b9e2460f6bfd1","offset":0,"limit":50}
  3. >>>
  4. {"wallet":"abadf547c544f067661604db8ab522ee",
  5. "history":[
  6. {"amount":2000000,"txid":"2f46615cbaa76b786b344e603d6adbec2890a3b3bfa676c8b8a6b87b9792ff1a","address":"mviz3utBwH8PCTS5XZhj3YCKCkWH1mZUvc","failed":false,"created_at":"2017-11-24 11:48:44","request_id":null},{"amount":1000000,"txid":"3c084f02968b48c175c176a64a8aaf49a60e5716e8dd5ade8f97d773dbdaf458","address":"mviz3utBwH8PCTS5XZhj3YCKCkWH1mZUvc","failed":false,"created_at":"2017-11-24 11:48:44","request_id":null}
  7. ]}
Receiving overall number of entries in history
URL

https://rahakott.io/api/v1.1/history/count

Request parameters
  • wallet (string, required) - unique wallet identifier
Response

The following parameters are sent as a response:

  • wallet (string) - unique wallet identifier
  • history_count (number) - number of entries in history
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/history/count
  2. {"api_key":"1234567890abcdef1234567890abcdef","wallet":"2bb027c2ca0143bcaf0b9e2460f6bfd1"}
  3. >>>
  4. {"wallet":"abadf547c544f067661604db8ab522ee","history_count":2}
Receiving a list of wallet addresses
URL

https://rahakott.io/api/v1.1/addresses

Request parameters
  • wallet (string, required) - unique wallet identifier
  • offset (number, optional) - offset from the beginning of addresses, similar to OFFSET parameter in SQL-request
  • limit (number, optional) - maximum number of addresses in output, similar to LIMIT parameter in SQL-request
Response

The wallet identifier and connected with it array of objects are sent as a response. The objects have the following address parameters:

  • address (string) - unique address
  • current (boolean) - boolean signifying current wallet address. There may be only one current address in the wallet.
  • created_at (date) - date of address creation
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/addresses
  2. {"api_key":"1234567890abcdef1234567890abcdef","wallet":"2bb027c2ca0143bcaf0b9e2460f6bfd1","offset":0,"limit":50}
  3. >>>
  4. {"wallet":"abadf547c544f067661604db8ab522ee",
  5. "addresses":[
  6. {"address":"mviz3utBwH8PCTS5XZhj3YCKCkWH1mZUvc","current":false,"created_at":"2017-11-24 11:25:38"},
  7. {"address":"mn18nUWGL8sHsxKXCbBJ8G7nAbmA8XB7Vb","current":true,"created_at":"2017-11-24 12:58:00"}
  8. ]}
Receiving overall number of wallet addresses
URL

https://rahakott.io/api/v1.1/addresses/count

Request parameters
  • wallet (string, required) - unique wallet identifier
Response

The following parameters are sent as a response:

  • wallet (string) - unique wallet identifier
  • addresses_count (number) - number of wallet addresses
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/addresses/count
  2. {"api_key":"1234567890abcdef1234567890abcdef","wallet":"2bb027c2ca0143bcaf0b9e2460f6bfd1"}
  3. >>>
  4. {"wallet":"abadf547c544f067661604db8ab522ee","addresses_count":2}
Transferring money (creating a request for money withdrawal)
URL

https://rahakott.io/api/v1.1/send

Request parameters
  • wallet (string, required) - unique wallet identifier
  • recipient (string, required) - recipient's address
  • amount (number, required) - amount of transfered funds
  • external_only (boolean, optional) - boolean signifying using external transfer (via the blockchain), false by default
  • subtract_fees (boolean, optional) - boolean signifying subtracting all fees from the transfer amount (is usually used for the withdrawal of all funds from the account), false by default
  • payment_id (string, optional, XMR only) – payment identifier
  • maximize_limit (boolean, optional, ETH only) – boolean signifying using higher gas limit
  • strong_mixing (boolean, optional) - boolean signifying using strong mixing
Response

As a response the following parameters are sent:

  • wallet (string) - unique wallet identifier
  • request (string) - unique request identifier for the withdrawal, can be used for status check
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/send
  2. {"api_key":"1234567890abcdef1234567890abcdef","wallet":"abadf547c544f067661604db8ab522ee","recipient":"mn18nUWGL8sHsxKXCbBJ8G7nAbmA8XB7Vb","amount":1000000,"external_only":true,"subtract_fees":true}
  3. >>>
  4. {"wallet":"abadf547c544f067661604db8ab522ee","request":"4c33a83b399a3df263beca3601ad1bf1"}
Checking request status for money withdrawal
URL

https://rahakott.io/api/v1.1/send/check

Request parameters
  • wallet (string, required) - unique wallet identifier
  • request (string, required) - unique request identifier for the withdrawal
Response

An object with the description of the following request parameters is sent:

  • request (string) - unique identifier of the withdrawal request
  • address (string) - recipient's address
  • amount (number) - amount of transferred funds
  • external_only (boolean) - boolean signifying using external transfer (via the blockchain) for money sending
  • subtract_fees (boolean) - boolean signifying subtracting all fees from the transfer amount (is usually used for the withdrawal of all funds from the account)
  • strong_mixing (boolean) - boolean signifying using strong mixing
  • maximize_limit (boolean, ETH only) – boolean signifying using higher gas limit
  • executed (boolean) - if true, then the request has been executed; if false, the request is waiting for execution; on completion, the parameter 'error' should be checked
  • error (string) - if not null, then an error occurred during request execution
  • created_at (date) - date of withdrawal request creation
  • updated_at (date) - date of request update
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/send/check
  2. {"api_key":"1234567890abcdef1234567890abcdef","wallet":"2bb027c2ca0143bcaf0b9e2460f6bfd1", "request":"abadf547c544f067661604db8ab522ee"}
  3. >>>
  4. {"created_at":"2017-11-24 12:02:14","updated_at":"2017-11-24 12:02:14","address":"mviz3utBwH8PCTS5XZhj3YCKCkWH1mZUvc","amount":1000000,"external_only":false,"subtract_fees":false,"strong_mixing":false,"error":null,"request":"abadf547c544f067661604db8ab522ee","executed":false}
Creating a one-time payment
URL

https://rahakott.io/api/v1.1/payment

Request parameters
  • wallet (string, required) - unique wallet identifier (except for XMR and ETH)
  • lifetime (number, required) - payment lifetime in days (from 1 to 14)
Response

The object with the description of the following request parameters is returned as a response:

  • payment (string) - unique payment identifier
  • address (string) - address for an incoming payment
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/payment
  2. {"api_key":"1234567890abcdef1234567890abcdef","wallet":"2bb027c2ca0143bcaf0b9e2460f6bfd1","lifetime":2}
  3. >>>
  4. {"payment":"abadf547c544f067661604db8ab522ee","address":"mviz3utBwH8PCTS5XZhj3YCKCkWH1mZUvc"}
Checking the status of one-time incoming payment
URL

https://rahakott.io/api/v1.1/payment/check

Request parameters
  • payment (string, required) - unique payment identifier
Response

The object with the description of the following request parameters is returned as a response:

  • payment (string) - unique payment identifier
  • address (string) - address for an incoming payment
  • confirmed (number) - the sum of all confirmed incoming transactions to the payment address
  • unconfirmed (number) - the sum of all unconfirmed incoming transactions to the payment address
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/payment
  2. {"api_key":"1234567890abcdef1234567890abcdef","wallet":"2bb027c2ca0143bcaf0b9e2460f6bfd1","lifetime":2}
  3. >>>
  4. {"payment":"abadf547c544f067661604db8ab522ee","address":"mviz3utBwH8PCTS5XZhj3YCKCkWH1mZUvc","confirmed":1230000000,"unconfirmed":0}