API Endpoints
Ping
GET
https://app.citrn.io/api/ping
Ping to the API
Receive the balances on a specific date
POST
https://app.citrn.io/api/balances
The balance inquiry for the selected date and currency. Please note that the date is UTC-timezoned.
For previous dates, the balance amounts returned will be 23:59 UTC.
For today's inquiries, the balance amounts will be recent.
Headers
X-Process-Key*
String
Header for request authorization
The value is unique and provided during onboarding
X-Process-Signature*
String
Header for request authorization
The value is unique and provided during onboarding
Request Body
date
String
Date format YYYY-MM-DD, if date is not entered, the response will provide the balances for the current date
currencies
String
List of currencies in ISO format (example USDT, ETH, BTC) If empty, all currencies available will be returned
Receive crypto
POST
https://app.citrn.io/api/addresses/take
Receiving cryptocurrency to the wallet
Headers
X-Process-Key*
String
Header for request authorization
The value is unique and provided during onboarding
X-Process-Signature*
String
Header for request authorization
The value is unique and provided during onboarding
Request Body
foreign_id*
String
currency*
String
Cryptocurrency full name (example: USDTE, USDTT)
Withdraw crypto
POST
https://app.citrn.io/api/withdrawal/crypto
Withdraw cryptocurrency from the wallet
Headers
X-Process-Key*
String
Header for request authorization
The value is unique and provided during onboarding
X-Process-Signature*
String
Header for request authorization
The value is unique and provided during onboarding
Request Body
address*
String
Address of the receiver
foreign_id*
String
ID of the transaction
amount*
String
Amount of the transaction
convert_to
String
The currency in which the payment is made. (example EUR, USDTE, USDTT)
currency*
String
key
String
Secret key
memo
String
Tag from currency cryptoprocessing.
Required for transactions TON as a comment for the
Supported currencies
POST
https://app.citrn.io/api/currencies/list
Get a list of all supported currencies
Headers
X-Process-Key*
String
Header for request authorization
The value is unique and provided during onboarding
X-Process-Signature*
String
Header for request authorization
The value is unique and provided during onboarding
Request body
type
String
Currency type: "crypto", "fiat"
Get the list of currency exchange rates
GET
https://app.citrn.io/api/rates
Exchangeable currencies
POST
https://app.citrn.io/api/currencies/pairs
Get the list of exchangeable currencies
Headers
X-Process-Key*
String
Header for request authorization
The value is unique and provided during onboarding
X-Process-Signature*
String
Header for request authorization
The value is unique and provided during onboarding
Request Body
currency_from
String
Filter by currency ISO that exchanges from, example: BTC
currency_to
String
Filter by currency ISO that can be converted to, example: EUR
Most recent currency rates
POST
https://app.citrn.io/api/currencies/rates
Get the list of most recent currency rates
Headers
X-Process-Key*
String
Header for request authorization
The value is unique and provided during onboarding
X-Process-Signature*
String
Header for request authorization
The value is unique and provided during onboarding
Request Body
currency_from
String
Currency from which to see the rates
currency_to
String
Currency to which to see the rates
List of current balances
POST
https://app.citrn.io/api/accounts/list
Get the list of current balances
Headers
X-Process-Key*
String
Header for request authorization
The value is unique and provided during onboarding
X-Process-Signature*
String
Header for request authorization
The value is unique and provided during onboarding
Create exchange quota
POST
https://app.citrn.com/api/exchange/create-quota
Creating the exchange quota is required to make the currency exchange.
Request_coin parameter must be either equal to from_coin or to_coin.
If request_coin is equal to from_coin, the requested amount is set and the final amount depends (to_coin) on the exchange rate and fees.
If request_coin is equal to to_coin, the final amount is set and the amount that will be possibly charged from the customer (if the exchange is confirmed with the make-exchange request) depends on the exchange rate and fees.
The response will provide the quote_id that is required to confirm the transaction.
Headers
X-Process-Key*
String
Header for request authorization
The value is unique and provided during onboarding
X-Process-Signature*
String
Header for request authorization
The value is unique and provided during onboarding
Request Body
from_coin*
String
Cryptocurrency full name (example: USDTE, USDTT)
to_coin*
String
Cryptocurrency full name (example: USDTE, USDTT)
request_amount*
String
The requested amount for the transaction
request_coin*
String
Cryptocurrency full name (example: USDTE, USDTT).
The parameter sets in which currency the request_amount is.
Perform the currency exchange
POST
https://app.citrn.com/api/exchange/make-exchange
After the exchange quota is placed successfully, the response returns the quote_id which is used in this request to perform the currency exchange.
Headers
X-Process-Key*
String
Header for request authorization
The value is unique and provided during onboarding
X-Process-Signature*
String
Header for request authorization
The value is unique and provided during onboarding
Request Body
quote_id*
String
The quote_id is received on the stage of creating an exchange quote (if successful).
Create a redirect payment
POST
https://app.citrn.com/api/payments/create-payment
Initiates a redirect payment process by creating a session that directs the user to an external payment gateway, returning a unique session ID and redirect URL for the user to complete their transaction.
Headers
X-Process-Key*
String
Header for request authorization
The value is unique and provided during onboarding
X-Process-Signature*
String
Header for request authorization
The value is unique and provided during onboarding
Request Body
foreign_id*
String
The ID of the user who initiated the deposit
coin_name*
String
The name of of the currency selected. by the user
return_url*
String
Url to which the user is redirected after making the transaction
Error handling
When a transaction is executed, the system may return a specific error_code indicating a validation issue or another reason why the operation cannot be completed.
If an error_code is returned, the transaction will not be executed, and all associated actions will be rolled back.
List of error codes and relevant status messages
coin_not_found
Specified coin does not exist
network_not_found
Specified network is not recognized
address_not_found
Wallet address is missing or invalid
invalid_address
Provided address is not valid
resource_not_found
Requested resource could not be located
coin_not_supported
Coin is not supported on this platform
balance_not_enough
Insufficient balance to complete the action
network_not_available
Network is temporarily inaccessible
withdraw_disabled
Withdrawals are currently disabled
duplication_request
Repeated request detected
amount_too_low
Amount is below the minimum allowed
invalid_amount
Provided amount is not valid
withdrawal_virtual_coin
Withdrawal for virtual/test coin not allowed
withdrawal_base_coin_mismatch
Coin and base coin do not match
commission_not_found
Commission details not found
create_quota_error
Failed to create quota record
process_exchange_quota_error
Error processing exchange quota
payment_not_found
Payment record not found
payment_expired
Payment request has expired
Last updated
Was this helpful?