API (Application Programming Interface)

Contents

  1. API Version
  2. How does it work?
  3. Error processing
  4. Receiving service conditions
  5. Wallet API
  6. API of receiving payments
  7. API of P2P Exchange
API Version

Current API version: 1.1. API version 1.0 has been deprecated.

To access the API and the API key, it is required to provide your email for feedback on this page .

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 or /payment), 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}}

Wallet API

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

Restrictions
  • Limit for creating new wallets: 60 new wallets per hour.
  • Wallets created by means of this command will be automatically deleted in 14 days in case the balance is zero. To manage a wallet that will not be automatically deleted, create it manually.
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)
  • strong_mixing (boolean, optional) - boolean signifying using strong mixing
  • 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

Attention! If the parameter limit is not specified, its value equals to 50.

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 after charging a service fee
  • service_fee (number) - service fee for the transaction
  • 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

Attention! If the parameter limit is not specified, its value equals to 50.

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}

API of receiving payments

Creating a one-time payment
URL

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

Restriction

Limit for creating one-time payment addresses: 90 new addresses per hour.

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}

API of P2P Exchange

List of advertisements
URL

https://rahakott.io/api/v1.1/market/offers

Request parameters
  • mode (string, required) - exchange direction, allowed values "buy" or "sell"
  • amount (number, optional) - amount in fiat for advertisement filtering by their limits
  • currency_base (string, optional) - cryptocurrency
  • currency_rate (string, optional) - fiat currency
  • region (number, optional) - region code, see the command /market/dictionary
  • method (number, optional) - payment method code, see the command /market/dictionary
  • own (boolean, optional) - boolean of requesting only your own advertisements
Response

The array of objects with the description of the following parameters of advertisements is returned as a response:

  • oid (string) - unique advertisement identifier
  • created_at (date) - date of the advertisement creation
  • updated_at (date) - date of the advertisement update
  • mode (string) - exchange direction (values "buy" or "sell")
  • region (number) - region code, see the command /market/dictionary
  • method (number) - payment method code, see the command /market/dictionary
  • currency_base (string) - cryptocurrency
  • currency_rate (string) - fiat currency
  • title (string) - advertisement title
  • username (string) - username of the advertisement owner
  • market_price (number) - advertisement price
  • limit_min (number) - minimum deal amount of the advertisement
  • limit_max (number) - maximum deal amount of the advertisement
  • terms (string) - terms of trade
  • margin (number) - margin (only for your own advertisements)
  • equation (number or string) - fixed price or exchange name (only for your own advertisements)
  • open_*_start, open_*_end (числа) - beginning and end of trade time in minutes from the day start (only for your own advertisements)
  • track_liquidity (boolean) - boolean of tracking limits when opening deals (only for your own advertisements)
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/market/offers
  2. {"api_key":"1234567890abcdef1234567890abcdef","mode":"sell","currency_base":"BTC","currency_rate":USD}
  3. >>>
  4. [
  5. {"oid": "1234567890abcdef1234567890abcdef","created_at": "2019-06-19 11:20:46","updated_at": "2019-06-19 11:20:46","mode": "sell","region": 1,"method": 4,"currency_base": "BTC","currency_rate": "USD",
  6. "equation": "10000","limit_min": null,"limit_max": null,"track_liquidity": false,"terms": "Just do it!","open_sun_start": 0,"open_sun_end": 1440,"title": "Selling BTC","username": "Rahakott","market_price": "10000",}
  7. ]
New advertisement
URL

https://rahakott.io/api/v1.1/market/offers/add

Request parameters
  • mode (string, required) - exchange direction (values "buy" or "sell")
  • region (number, required) - region code, see the command /market/dictionary
  • method (number, required) - payment method code, see the command /market/dictionary
  • currency_base (string, required) - cryptocurrency
  • currency_rate (string, required) - fiat currency
  • title (string, required) - advertisement title
  • terms (string, required) - terms of trade
  • margin (number, required) - margin (only for your own advertisements)
  • equation (string, required) - fixed price or exchange name (only for your own advertisements)
  • limit_min (number, optional) - minimum deal amount of the advertisement
  • limit_max (number, optional) - maximum deal amount of the advertisement
  • open_*_start, open_*_end (numbers, optional) - beginning and end of trade time in minutes from the day start (only for your own advertisements)
  • track_liquidity (boolean, optional) - boolean of tracking limits when opening deals (only for your own advertisements)
Response

The object with the description of the advertisement parameters specified in the command /market/offers is returned as a response.

Request example
  1. <<< POST https://rahakott.io/api/v1.1/market/offers/add
  2. {"api_key":"1234567890abcdef1234567890abcdef","mode":"sell",
  3. "currency_base":"BTC","currency_rate":USD,"method":1,"region":1,"title":"Test",
  4. "terms":"My terms","margin":1,"equation":"10000.0"}
Advertisement update
URL

https://rahakott.io/api/v1.1/market/offers/update

Request parameters
  • oid (string, required) - unique advertisement identifier
  • mode (string, optional) - exchange direction (values "buy" or "sell")
  • region (number, optional) - region code, see the command /market/dictionary
  • method (number, optional) - payment method code, see the command /market/dictionary
  • currency_base (string, optional) - cryptocurrency
  • currency_rate (string, optional) - fiat currency
  • title (string, optional) - advertisement title
  • terms (string, optional) - terms of trade
  • margin (number, optional) - margin (only for your own advertisements)
  • equation (string, optional) - fixed price or exchange name (only for your own advertisements)
  • limit_min (number, optional) - minimum deal amount of the advertisement
  • limit_max (number, optional) - maximum deal amount of the advertisement
  • open_*_start, open_*_end (numbers, optional) - beginning and end of trade time in minutes from the day start (only for your own advertisements)
  • track_liquidity (boolean, optional) - boolean of tracking limits when opening deals (only for your own advertisements)
Response

The object with the description of the advertisement parameters specified in the command /market/offers is returned as a response.

Request example
  1. <<< POST https://rahakott.io/api/v1.1/market/offers/update
  2. {"api_key":"1234567890abcdef1234567890abcdef",
  3. "oid":"1234567890abcdef1234567890abcdef",
  4. "equation":"10000.0"}
Advertisement deletion
URL

https://rahakott.io/api/v1.1/market/offers/delete

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

The field oid and the boolean of success deleted are returned as a response.

Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/market/offers/update
  2. {"api_key":"1234567890abcdef1234567890abcdef","oid":"1234567890abcdef1234567890abcdef"}
  3. >>>
  4. {"oid": "1234567890abcdef1234567890abcdef","deleted":true}
List of deals
URL

https://rahakott.io/api/v1.1/market/deals

Request parameters
  • side (string, required) - side of the deal, may take "client","owner" or "both" values
Response

The array of objects with the description of the following parameters of deals is returned as a response:

  • oid (string) - unique deal identifier
  • created_at (date) - time of the deal start
  • updated_at (date) - time of the deal update (state update)
  • state (string) - present deal state:
    • open - deal is open, waiting for sending fiat by one of the sides
    • fiat_released - fiat funds have been sent
    • dispute - dispute over the deal has begun
  • price (number) - deal price
  • amount_base (number) - funds amount in cryptocurrency
  • amount_rate (number) - funds amount in fiat
  • currency_base (string) - cryptocurrency
  • currency_rate (string) - fiat currency
  • offer_mode (string) - exchange direction in the advertisement (values "buy" or "sell")
  • region (number) - region code, see the command /market/dictionary
  • method (number) - payment method code, see the command /market/dictionary
  • title (string) - advertisement title
  • offer_owner (string) - username of the advertisement owner
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/market/deals
  2. {"api_key":"1234567890abcdef1234567890abcdef","oid":"1234567890abcdef1234567890abcdef"}
  3. >>>
  4. [
  5. {"oid": "06ae755d602e2c258964a8bd74f6bb53","created_at": "2019-05-03 12:20:50","updated_at": "2019-06-05 13:45:02",
  6. "price": "10000","amount_base": "1","amount_rate": "10000","state": "open",
  7. "currency_base": "BTC","currency_rate": "USD","offer_mode": "sell","region": 1,"method": 1,"title": "Test","offer_owner": "Rahakott"}
  8. ]
Deal chat
URL

https://rahakott.io/api/v1.1/market/deals/chat

Request parameters
  • oid (string, required) - unique deal identifier
  • skip (string, optional) - message identifier for skipping
Response

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

  • oid (string) - unique message identifier
  • created_at (date) - time of the message
  • message (string) - text of the message, may be blank
  • username (string) - username of the author of the message
  • attachment (boolean) - boolean of an existence of an attachment in the message
Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/market/deals/chat
  2. {"api_key":"1234567890abcdef1234567890abcdef","oid":"1234567890abcdef1234567890abcdef"}
  3. >>>
  4. [
  5. {"oid": "715b2b3e79df42d55e5f4533db9787a2","created_at": "2019-07-24 10:02:19","message": "Hello world, again","username": "Someone","attachment": false},
  6. {"oid": "76e99959cbe9ccbb5b009010fbc07312","created_at": "2019-07-24 10:01:22","message": "Hello world!","username": "Rahakott","attachment": false}
  7. ]
Sending a message to a deal chat
URL

https://rahakott.io/api/v1.1/market/deals/chat/message

Request parameters
  • oid (string, required) - unique deal identifier
  • message (string, required) - text of the message
Response

The object with the description of message parameters specified in the command /market/deals/chat is returned as a response.

Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/market/deals/chat
  2. {"api_key":"1234567890abcdef1234567890abcdef","oid":"1234567890abcdef1234567890abcdef"}
  3. >>>
  4. [
  5. {"oid": "715b2b3e79df42d55e5f4533db9787a2","created_at": "2019-07-24 10:02:19","message": "Hello world, again","username": "Someone","attachment": false},
  6. {"oid": "76e99959cbe9ccbb5b009010fbc07312","created_at": "2019-07-24 10:01:22","message": "Hello world!","username": "Rahakott","attachment": false}
  7. ]
Deal state update
URL

https://rahakott.io/api/v1.1/market/deals/state

Request parameters
  • oid (string, required) - unique deal identifier
  • state (string, required) - new deal state, allowed values:
    • fiat_released - fiat funds are sent
    • closed - confirmation of receiving fiat funds and closing the deal
    • canceled - cancelling the deal
    • dispute - starting a dispute over the deal
Response

The object with the description of parameters specified in the command /market/deals is returned as a response.

Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/market/deals/chat
  2. {"api_key":"1234567890abcdef1234567890abcdef","oid":"1234567890abcdef1234567890abcdef"}
  3. >>>
  4. [
  5. {"oid": "715b2b3e79df42d55e5f4533db9787a2","created_at": "2019-07-24 10:02:19","message": "Hello world, again","username": "Someone","attachment": false},
  6. {"oid": "76e99959cbe9ccbb5b009010fbc07312","created_at": "2019-07-24 10:01:22","message": "Hello world!","username": "Rahakott","attachment": false}
  7. ]
Receiving a dictionary
URL

https://rahakott.io/api/v1.1/market/dictionary

Request parameters
  • label (string, required) - symbolic name of a dictionary:
    • regions - associative dictionary of codes and names of regions
    • payment_methods - associative dictionary of codes and names of payment methods
Response

The associative dictionary of values is returned as a response.

Request and response example
  1. <<< POST https://rahakott.io/api/v1.1/market/dictionary
  2. {"api_key":"1234567890abcdef1234567890abcdef","label":"regions"}
  3. >>>
  4. {"1": "Russia","2": "USA","3": "Europe","4": "China"}