API information
General information
This API accepts both GET and POST requests.
Request parameters are standard HTTP parameters
Response parameters are in JSON format
API main endpoint: https://exch.cx/api
Rates in a standartized XML format are available at https://exch.cx/rates.xml
/api/create - Create a new exchange order
Request parameters
from_currency - Currency to send
to_currency - Currency to receive
to_address - Address for to_currency
refund_address - Refund address for from_currency, needed when an exchange fails (Optional; possible to provide during REFUND_REQUEST state)
rate_mode - Rate mode - flat or dynamic (Optional; Default: dynamic)
ref - Referrer ID (Optional)
fee_option - Network fee option - s for slow, m for medium, f for quick (Optional; Default: f; Used only when to_currency is BTC,ETH,DAI,USDC or USDT )
Response parameters
orderid - Exchange order ID for /api/order
/api/order - Get an exchange order information and state
Request parameters
orderid - Exchange order ID created by /api/create
Response parameters
created - Order creation timestamp
state - Current state of the exchange, possible values: CREATED, CANCELLED, AWAITING_INPUT, CONFIRMING_INPUT, EXCHANGING, CONFIRMING_SEND, COMPLETE, REFUND_REQUEST, REFUND_PENDING, CONFIRMING_REFUND, REFUNDED
from_currency - Currency to send
from_addr - Address for from_currency (this address should be deposited in order to initiate the exchange)
to_currency - Currency to receive
to_address - Address for to_currency
rate_mode - Rate mode (flat or dynamic)
rate - Current rate
svc_fee - Service fee (included in the calculated amount of to_currency)
network_fee - Network fee (included in the calculated amount of to_currency)
from_amount_received - Amount of from_currency received (null when no amount received yet)
to_amount - Amount of to_currency to be sent (null when no amount received yet)
transaction_id_received - Transaction ID for from_currency received (null when no amount received yet)
transaction_id_sent - Transaction ID for to_currency sent (null when exchange not finished yet)
min_input - Minimum amount of from_currency to deposit
max_input - Maximum amount of from_currency to deposit
state_error - Current error state, if any (only present on error)
orderid - Exchange order ID
/api/rates - Get exchange rates
Request parameters
rate_mode - Rate mode - flat or dynamic (Optional; Default: dynamic)
Response parameters
Represents a nested object with keys for exchange symbols in the following format: FROMCURRENCY_TOCURRENCY; for example, the rate for Bitcoin/Litecoin will have the following key: BTC_LTC
Each symbol is an object with the following parameters:
rate - Exchange rate with fee (includes a service fee of the chosen rate_mode)
svc_fee - Service fee for selected rate_mode
rate_mode - Selected rate_mode
reserve - Total reserve of the currency to receive (the amount this exchange service is capable of sending)