Below you can find information about the errors you might encounter while working with the SimpleSwap API.
Currency
The /get_currency command gives you information about a particular currency.
Possible errors:
- 400 – Request parameters are not valid. One or several entered parameters are incorrect, missing, or in an improper format. For instance, you might have provided an empty value for the API key parameter. Make sure you have entered the correct data.
- 401 – Wrong API key. This error indicates a problem with the authorization with the API key provided in the request: the API key is either missing, expired, or does not match a valid key associated with your account. Please check if you entered the API key correctly (e.g. abcdef12-3456-7890-abcd-ef1234567890).
- 404 – Symbol not found. This means that the symbol you entered in your request is not recognized or does not exist in SimpleSwap's database. Please double-check its spelling.
The /get_all_currencies command provides you with a list of all supported currencies.
Possible errors:
- 400 – Request parameters are not valid. One or several entered parameters are incorrect, missing, or in an improper format. For instance, you might have provided an empty value for the API key parameter. Make sure you have entered the correct data.
- 401 – Wrong API key. This error indicates a problem with the authorization with the API key provided in the request: the API key is either missing, expired, or does not match a valid key associated with your account. Please check if you entered the API key correctly (e.g. abcdef12-3456-7890-abcd-ef1234567890).
Pairs
The /get_pairs command returns all active pairs with a specified currency.
Possible errors:
- 400 – Request parameters are not valid. One or several entered parameters are incorrect, missing, or in an improper format. For instance, you might have provided an empty value for the API key parameter. Make sure you have entered the correct data.
- 401 – This error indicates a problem with the authorization with the API key provided in the request: the API key is either missing, expired, or does not match a valid key associated with your account. Please check if you entered the API key correctly (e.g. abcdef12-3456-7890-abcd-ef1234567890).
- 404 – Symbol not found. This means that the symbol you entered in your request is not recognized or does not exist in SimpleSwap's database. Please double-check its spelling.
The /get_all_pairs gives you a list of all active exchange pairs. You can pass "true" for the “fixed” parameter if you want to request fixed-rate pairs and any other value if you are interested in floating-rate pairs.
Possible errors:
- 400 – Request parameters are not valid. One or several entered parameters are incorrect, missing, or in an improper format. For instance, you might have provided an empty value for the API key parameter. Make sure you have entered the correct data.
- 401 – Wrong API key. This error indicates a problem with the authorization with the API key provided in the request: the API key is either missing, expired, or does not match a valid key associated with your account. Please check if you entered the API key correctly (e.g. abcdef12-3456-7890-abcd-ef1234567890).
Exchange
The /create_exchange command creates a new exchange. Note that in case of creating a fiat exchange, the server response will contain a redirect_url field. It is necessary for the client to follow this link to complete the exchange.
Possible errors:
- 400 – Request parameters are not valid. One or several entered parameters are incorrect, missing, or in an improper format. For instance, you might have provided an empty value for the API key parameter. Make sure you have entered the correct data.
- 401 – Wrong API key. This error indicates a problem with the authorization with the API key provided in the request: the API key is either missing, expired, or does not match a valid key associated with your account. Please check if you entered the API key correctly (e.g. abcdef12-3456-7890-abcd-ef1234567890).
- 404 – Pair not found. The specified trading pair does not exist or is not supported by the API. Please make sure you have typed the tickers correctly, and that the trading pair is available.
- 422 – Amount is out of range. The amount you provided in the “amount” parameter is either too high or too low, exceeding the acceptable limits set by the API. You can check the available range using the /get_ranges command.
The /get_exchange command shows information connected to a particular exchange. You can retrieve such information as the currency from and to which it was done, the current status of the exchange, etc.
Possible errors:
- 400 – Request parameters are not valid. One or several entered parameters are incorrect, missing, or in an improper format. For instance, you might have provided an empty value for the API key parameter. Make sure you have entered the correct data.
- 401 – Wrong API key. This error indicates a problem with the authorization with the API key provided in the request: the API key is either missing, expired, or does not match a valid key associated with your account. Please check if you entered the API key correctly (e.g. abcdef12-3456-7890-abcd-ef1234567890).
- 404 – Exchange not found. The ID of the requested exchange is incorrect. Please ensure that you are using the correct one.
The /get_exchanges command provides a list of exchanges created with the API key.
Possible errors:
- 400 – Request parameters are not valid. One or several entered parameters are incorrect, missing, or in an improper format. With this command, the specified limit for transactions can be between 0 and 1000, and the date format for choosing the period for display must be ISO 8601. ('2000-01-01' or '2000-01-01T00:00:00Z'). For example, 2023-05-26T10:26:57.079Z. Please double-check the entered data.
- 401 – Wrong API key. This error indicates a problem with the authorization with the API key provided in the request: the API key is either missing, expired, or does not match a valid key associated with your account. Please check if you entered the API key correctly (e.g. abcdef12-3456-7890-abcd-ef1234567890).
The /get_ranges command gives you the information about the smallest and largest (if applicable) amount for the exchange between selected currencies. Choose “true” for the “fixed” parameter to request fixed-rate pairs and any other value for floating-rate pairs.
Possible errors:
- 400 – Request parameters are not valid. One or several entered parameters are incorrect, missing, or in an improper format. For instance, you might have provided an empty value for the API key parameter. Make sure you have entered the correct data.
- 401 – Wrong API key. This error indicates a problem with the authorization with the API key provided in the request: the API key is either missing, expired, or does not match a valid key associated with your account. Please check if you entered the API key correctly (e.g. abcdef12-3456-7890-abcd-ef1234567890).
- 404 – Pair not found. The specified trading pair does not exist or is not supported by the API. Please make sure you have typed the tickers correctly, and that the trading pair is available.
The /get_estimated command gives you the information about an estimated exchange amount. Choose “true” for the “fixed” parameter to request fixed-rate pairs and any other value for floating-rate pairs.
Possible errors:
- 400 – Request parameters are not valid. One or several entered parameters are incorrect, missing, or in an improper format. For instance, you might have provided an empty value for the API key parameter. Make sure you have entered the correct data.
- 401 – Wrong API key. This error indicates a problem with the authorization with the API key provided in the request: the API key is either missing, expired, or does not match a valid key associated with your account. Please check if you entered the API key correctly (e.g. abcdef12-3456-7890-abcd-ef1234567890).
- 404 – Pair not found. The specified trading pair does not exist or is not supported by the API. Please make sure you have typed the tickers correctly, and that the trading pair is available.
- 422 – Amount is out of range. The amount you provided in the “amount” parameter is either too high or too low, exceeding the acceptable limits set by the API. You can check the available range using the /get_ranges command.
The /check_exchanges command is used to see if it is possible to create an exchange with the given parameters. Choose “true” for the “fixed” parameter to request fixed-rate pairs and any other value for floating-rate pairs. If the exchange is possible, the returned result will state “true.”
Possible errors:
- 400 – Request parameters are not valid. One or several entered parameters are incorrect, missing, or in an improper format. For instance, you might have provided an empty value for the API key parameter. Make sure you have entered the correct data for all required parameters.
- 401 – Wrong API key. This error indicates a problem with the authorization with the API key provided in the request: the API key is either missing, expired, or does not match a valid key associated with your account. Please check if you entered the API key correctly (e.g. abcdef12-3456-7890-abcd-ef1234567890).
- 404 – Pair not found. The specified trading pair does not exist or is not supported by the API. Please make sure you have typed the tickers correctly, and that the trading pair is available.
- 422 – Amount is out of range. The amount you provided in the “amount” parameter is either too high or too low, exceeding the acceptable limits set by the API. You can check the available range using the /get_ranges command.
If you have followed the advice listed above but the problem persists, please contact our support team via the Help Center.