Overview
The COINXCHANGE API v1.0 is a basic REST API that users can use to retrieve market data. The API, for ease, is mostly compatible with similar simple APIs made by other major exchanges. API calls are limited to 10 requests per second, with any request exceeding the rate limit denied by an https 503 response. All API responses are valid JSON arrays.
API Functions
- Market Summary
- Market Stats
- Market Trades
- Market Orders
- Market Chart Data
Market Summary
Function: Provides an overview of all markets. Data Refresh: every minute.
Function: Provides an overview of either the BTC or LTC market. Data Refresh: every minute.
Example: https://api.coinxchange.zone/v1/market/summary/BTC
JSON Response
[{ "market_id":"25", "code":"AUR", "exchange":"BTC", "last_price":"0.04600001", "yesterday_price":"0.04300000", "change":"+6.98", "24hhigh":"0.04980000", "24hlow":"0.04000050", "24hvol":"21.737" "top_bid":"0.04590000" "top_ask":"0.04600005" }, ... ]
Market Stats
Function: Provides stats for a single specific market. Data Refresh: every minute.
Example: https://api.coinxchange.zone/v1/market/stats/MONA/BTC
JSON Response
[{ "market_id":"25", "code":"AUR", "exchange":"BTC", "last_price":"0.04600001", "yesterday_price":"0.04300000", "change":"+6.98", "24hhigh":"0.04980000", "24hlow":"0.04000050", "24hvol":"21.737" "top_bid":"0.04590000" "top_ask":"0.04600005" }]
Market Trades
Function: Retrieves the last 100 trades for the specific market.
Example: https://api.coinxchange.zone/v1/market/trades/MONA/BTC
JSON Response
[{ "count":"100", "trades":[{ "type":"1", "price":"0.00000023", "amount":"412128.80177019", "total":"0.09478962", "time":"1394498289.2727" }, ... }]
Please note that 0=Buy, 1=Sell.
Market Orders
Function: Returns the best priced 50 orders for a given market.
Example: https://api.coinxchange.zone/v1/market/orders/MONA/BTC/BUY
JSON Response
[{ "count":"23", "type":"BUY", "orders":[{ "price":"0.00000023", "amount":"22446985.14519785", "total":"5.16280655" }, ... }]
Market Chart Data
This returns chart data, which we also use for our candlestick graphs for any given period. As with similar APIs, the period is optional ('6hh' (6 hours), '1DD' (24 hours), '3DD' (3 days), '7DD' (1 week) or 'MAX'). Market ID is visible as the URL in the address bar when browsing a market on our web site.
Example: https://api.coinxchange.zone/v1/market/chartdata/1/1DD
JSON Response
[{ "date":"2014-02-09 14:20", "open":"0.00000006", "close":"0.00000006", "high":"0.00000006", "low":"0.00000003", "coin_volume":"608.50000000" }, ... ]