Application Programming Interface

Table of contents

  1. Version
  2. How it works?
  3. Errors
  4. Service conditions algorithm
  5. API wallet
  6. Online payment API
  7. API of P2P Exchange
Version

The outdated version of the API 1.0 has been replaced by the newer version 1.1

To get access, you will need to enter your email address here .

How it works?

API methods:

  • invoked using the HTTP POST method
  • must be authorized through the API key (you can find it in the "Settings" section of your wallet), which is displayed as the value of the required string parameter api_key
  • apply JSON for request and response ('Accept' and 'Content-Type' headers must be 'application / json')

For example, the amounts for Bitcoins are represented in Satoshi: 100,000,000 Satoshi = 1 BTC or 1 Satoshi = 0.00000001 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.

Errors

Any command as a response can return a list of errors that occurred during execution. Most often these are input validation errors. You will see an object with the "errors" parameter containing a list of parameters associated with this error. All parameters, in turn, contain an enumeration 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.

Service conditions algorithm
URL

http://rahakott.net/api/v1.1/conditions

Parameters of request

None.

Response

As a response, we receive an array of cryptocurrencies containing the following parameters:

  • service_internal_fee (number) - commission for transfers between Rahakott accounts
  • service_fee (number) - commission for transfers to external wallets
  • min_fee (number) - network fee (minimum)
  • min_amount (number) - transfer amount (minimum)
  • min_confirms (number) - the required number of confirmations for crediting money to the account (minimum)
  • api_deposit_fee (number) - fee for transferring to the API address Example of request and response
Request and response example
  1. <<< POST http://rahakott.net/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}}

API wallet

Available cryptocurrencies for wallets
URL

http://rahakott.net/api/v1.1/currencies

Request parameters

None.

Response

As a response, we receive the list of available cryptocurrencies.

Example of request and response
  1. <<< POST http://rahakott.net/api/v1.1/currencies
  2. {"api_key":"1234567890abcdef1234567890abcdef"}
  3. >>>
  4. ["BTC","BCH"]
Wallets
URL

http://rahakott.net/api/v1.1/wallets

Parameters of request
  • currency (string, required) - wallets currency
Response

As a response, we receive objects with a description of such wallet parameters:

  • 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 http://rahakott.net/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. ]
Create a wallet
URL

http://rahakott.net/api/v1.1/wallets/new

Restrictions
  • The maximum number of new wallets is 60 per hour.
  • This command creates wallets that, if the balance is zero, will be automatically deleted after 14 days. To prevent the wallet from being deleted automatically, it is better to create it manually.
Request parameters
  • name (string, required) - wallet name, it must be unique within the account
  • currency (string, required) - wallet currency
Response

As a response, we get an object with the following parameters of the created wallet:

  • 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 http://rahakott.net/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"}
Update or rename a wallet
URL

http://rahakott.net/api/v1.1/wallets/update

Parameters of request
  • oid (string, required) - wallet ID obtained through the list of wallets or creating new requests
  • name (string, required) - unique wallet name within the account
Response

As a response, we get an object with the following parameters of the created wallet:

  • 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 http://rahakott.net/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"}
Delete a wallet
URL

http://rahakott.net/api/v1.1/wallets/delete

Parameters of request
  • oid (string, required) - wallet ID obtained through the list of wallets or creating new requests
Response

As an answer, we get the following parameters:

  • wallet_oid (string) - unique wallet identifier
  • deleted (boolean) - boolean, always equal to true
Example of request and response
  1. <<< POST http://rahakott.net/api/v1.1/wallets/delete
  2. {"api_key":"1234567890abcdef1234567890abcdef","oid":"2bb027c2ca0143bcaf0b9e2460f6bfd1"}
  3. >>>
  4. {"wallet_oid":"2bb027c2ca0143bcaf0b9e2460f6bfd1","deleted":true}
Get current balance
URL

http://rahakott.net/api/v1.1/wallets/balance

Parameters of request
  • oid (string, required) - wallet ID obtained through the list of wallets or creating new requests
Response

As an answer, we get the following parameters:

  • wallet_oid (string) - Wallet ID
  • confirmed (number) - confirmed cash balance
  • unconfirmed (number) - unconfirmed incoming transactions
Request and response example
  1. <<< POST http://rahakott.net/api/v1.1/wallets/balance
  2. {"api_key":"1234567890abcdef1234567890abcdef","oid":"2bb027c2ca0143bcaf0b9e2460f6bfd1"}
  3. >>>
  4. {"wallet_oid":"2bb027c2ca0143bcaf0b9e2460f6bfd1","confirmed":100000000,"unconfirmed":0}
Get a list of unconfirmed incoming transactions
URL

http://rahakott.net/api/v1.1/transactions/incoming

Parameters of request
  • wallet (string, required) - wallet ID
Response

In response, we receive the wallet identifier and the corresponding array of objects that have the following transaction parameters:

  • txid (string) - transaction ID
  • amount (number) - transfer amount
  • confirmations (number) - the number of transfers confirmations
  • created_at (date) - date of the transfer receipt
  • updated_at (date) - transfer update date (last update of the transaction number confirmation)
  • address (string) - transfer address
Request and response example
  1. <<< POST http://rahakott.net/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

http://rahakott.net/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 http://rahakott.net/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. ]}
Operations history
URL

http://rahakott.net/api/v1.1/history

Parameters of request
  • 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! With an unspecified limit of the parameter, its value is 50.

Response

In response, we receive the wallet identifier and the corresponding array of objects that have the following historic entry parameters:

  • txid (string) - ID of the transaction associated with the record
  • 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) - the address of one of the transaction's parties
  • amount (number) - the amount of money transferred after the commission has been paid
  • service_fee (number) - transaction fee
  • failed (boolean) - indicates success of the operation
  • created_at (date) - date of entry
Request and response example
  1. <<< POST http://rahakott.net/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

http://rahakott.net/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 http://rahakott.net/api/v1.1/history/count
  2. {"api_key":"1234567890abcdef1234567890abcdef","wallet":"2bb027c2ca0143bcaf0b9e2460f6bfd1"}
  3. >>>
  4. {"wallet":"abadf547c544f067661604db8ab522ee","history_count":2}
Get all wallet addresses
URL

http://rahakott.net/api/v1.1/addresses

Parameters of request
  • wallet (string, required) - wallet ID
  • offset (number, optional) - offset from the start of the record, identical to the OFFSET parameter in the SQL query
  • limit (number, optional) - the maximum number of records in the output, identical to the LIMIT parameter in the SQL query

Attention! With an unspecified limit of the parameter, its value is 50.

Response

In response, we receive the wallet ID and the associated array of objects with the following address parameters:

  • address (string) - unique wallet address
  • current (boolean) - a boolean value to indicate the wallet address (there can be only one)
  • created_at (date) - when the address was created
Request and response example
  1. <<< POST http://rahakott.net/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. ]}
Get overall number of wallet addresses
URL

http://rahakott.net/api/v1.1/addresses/count

Parameters of request
  • wallet (string, required) - wallet ID
Response

As a response, we get the following parameters:

  • wallet (string) - wallet ID
  • addresses_count (number) - total number of wallet addresses
Example of request and response
  1. <<< POST http://rahakott.net/api/v1.1/addresses/count
  2. {"api_key":"1234567890abcdef1234567890abcdef","wallet":"2bb027c2ca0143bcaf0b9e2460f6bfd1"}
  3. >>>
  4. {"wallet":"abadf547c544f067661604db8ab522ee","addresses_count":2}
Create a withdrawal request
URL

http://rahakott.net/api/v1.1/send

Parameters of request
  • wallet (string, required) - wallet ID
  • recipient (string, required) - address of the recipient
  • amount (number, required) - the amount of money to be transferred
  • external_only (boolean, optional) - boolean value to indicate external transfer (via blockchain), default false
  • subtract_fees (boolean, optional) - boolean value to denote subtract all commissions from the transfer amount (mainly when all funds are withdrawn from the account), by default false
  • payment_id (string, optional, XMR only) – payment ID
  • maximize_limit (boolean, optional, ETH only) – boolean value to indicate a higher gas limit
  • strong_mixing (boolean, optional) - boolean with strong mixing
Response

As a response, we get the following parameters:

  • wallet (string) - wallet ID
  • request (string) - ID of the withdrawal request, sometimes used to check status
Example of request and response
  1. <<< POST http://rahakott.net/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

http://rahakott.net/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 http://rahakott.net/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}

Online payment API

Create a one-time payment
URL

http://rahakott.net/api/v1.1/payment

Limitation

Maximum number of new addresses for one-time payment: 90 per hour.

Parameters of request
  • wallet (string, required) - wallet ID (except for XMR and ETH)
  • lifetime (number, required) - the lifetime of the transaction in days (up to 14)
Response

As a response, we receive an object with a description of the following request parameters:

  • payment (string) - payment ID
  • address (string) - address for incoming payment
Example of request and response
  1. <<< POST http://rahakott.net/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

http://rahakott.net/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 http://rahakott.net/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

All advertising
URL

http://rahakott.net/api/v1.1/market/offers

Parameters of request
  • mode (string, required) - exchange direction (variants of values "buy" or "sell")
  • amount (number, optional) - amount in fiat for ad limit filtering
  • 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 http://rahakott.net/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 advertising
URL

http://rahakott.net/api/v1.1/market/offers/add

Parameters of request
  • mode (string, required) - exchange direction
  • 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 trade amount
  • limit_max (number, optional) - maximum trade amount
  • 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 http://rahakott.net/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

http://rahakott.net/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 http://rahakott.net/api/v1.1/market/offers/update
  2. {"api_key":"1234567890abcdef1234567890abcdef",
  3. "oid":"1234567890abcdef1234567890abcdef",
  4. "equation":"10000.0"}
Deletion of advertising
URL

http://rahakott.net/api/v1.1/market/offers/delete

Parameters of request
  • oid (string, required) - unique advertisement identifier
Response

As a response, we get the oid field and the boolean value of a successful deletion.

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

http://rahakott.net/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 http://rahakott.net/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

http://rahakott.net/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 http://rahakott.net/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

http://rahakott.net/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 http://rahakott.net/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. ]
Update a state of deal
URL

http://rahakott.net/api/v1.1/market/deals/state

Parameters of request
  • oid (string, required) - trade ID
  • state (string, required) - the state of the deal at the current moment:
    • 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 http://rahakott.net/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

http://rahakott.net/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 http://rahakott.net/api/v1.1/market/dictionary
  2. {"api_key":"1234567890abcdef1234567890abcdef","label":"regions"}
  3. >>>
  4. {"1": "Russia","2": "USA","3": "Europe","4": "China"}