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://cxch.cx/api
An API key (api_key parameter) might be required for each endpoint if the service is under abnormal load. Contact support@cxch.cx or create a support ticket to request an API key.
Rates in a standartized XML format are available at https://cxch.cx/rates.xml
/api/rates - Get cxchange rates
Request parameters
rate_mode - Rate mode - flat or dynamic (Optional; Default: dynamic)
Response parameters
Represents a nested object with keys for cxchange 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 - cxchange 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 cxchange service is capable of sending)
/api/volume - Get 24 hours volume for each currency
Request parameters
None
Response parameters
A JSON object containing the following parameters for each element:
volume - 24h volume (inbound and outbound)

Additional note
We do not export per-pair volumes for privacy reasons (mainly to harden traceability of our cxchanges)
/api/status - Get status for each network
Request parameters
None
Response parameters
status - Node status - online or offline
aggregated_balance - Aggregated pool balance (for BTC only)
mixed_balance - Mixed pool balance (for BTC only)
/api/create - Create a new cxchange 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 cxchange 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 )
aggregation - BTC aggregation pool - yes for aggregated (receive and send), no for mixed (receive and send), any for any (send only) (Optional; Default: yes when from_currency is BTC, any when to_currency is BTC)
Response parameters
orderid - cxchange order ID for /api/order
/api/order - Get an cxchange order information and state
Request parameters
orderid - cxchange order ID created by /api/create
Response parameters
created - Order creation timestamp
state - Current state of the cxchange, possible values: CREATED, CANCELLED, AWAITING_INPUT, CONFIRMING_INPUT, cxchANGING, FUNDED, BRIDGING, 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 cxchange)
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)
wallet_pool - Selected wallet pool (currently only supported when to_currency is BTC) - aggregated for aggregated, mixed for mixed, any for all available
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 cxchange not finished yet)
refund_private_key - Private key in case an ETH token is refunded in the REFUNDED state (when from_currency is one of USDC, DAI, USDT)
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)
refund_available - Refund user action availability for the current state of the order (Boolean)
orderid - cxchange order ID
/api/order/fetch_guarantee - Fetch Letter of Guarantee for an order
Request parameters
orderid - cxchange order ID created by /api/create
Response parameters
The response is a file containing a Letter of Guarantee signed with the address 1P59vP5TNXAFRnQJvZSkwhYXejYW3tcxch
/api/order/refund - Request a refund for an order if available
Request parameters
orderid - cxchange order ID created by /api/create
Response parameters
result - true for a successful request, false for a failed request (Boolean)
error - Error message in case the request failed
/api/order/refund_confirm - Confirm a refund and provide a refund address if required (only when the order's state is REFUND_REQUEST)
Request parameters
orderid - cxchange order ID created by /api/create
refund_address - Address for from_currency to send a refund
Response parameters
result - true for a successful request, false for a failed request (Boolean)
error - Error message in case the request failed
/api/order/revalidate_address - Revalidate a new address when the order's state_error is TO_ADDRESS_INVALID
Request parameters
orderid - cxchange order ID created by /api/create
to_address - Address for to_currency
Response parameters
result - true for a successful request, false for a failed request (Boolean)
error - Error message in case the request failed
/api/order/remove - Remove the order's data immediately (only when the order's state is COMPLETE)
Request parameters
orderid - cxchange order ID created by /api/create
Response parameters
result - true for a successful request, false for a failed request (Boolean)
error - Error message in case the request failed
/api/order/support_message - Send a message to the in-order support chat
Request parameters
orderid - cxchange order ID created by /api/create
supportmessage - Message
Response parameters
result - true for a successful request, false for a failed request (Boolean)
error - Error message in case the request failed
/api/order/support_messages - Get in-order support chat messages
Request parameters
orderid - cxchange order ID created by /api/create
Response parameters
A json array with messages containing timestamp, sender, message and read_by_support (if the message's sender is USER) for each element