API

API interface


Public JSON API is now available. The base URL for API is:
https://lcp.exchange/api/public/v1/

Every call has a common heading object structure as follows:
{"code":xxx,"msg":[string],"timestamp":[unix_timestamp],"data":[object_or_array]}

code/msg:
200 / Success
404 / Not found.
501 / Method not implemented.
506 / Parameter not acceptable.

timestamp:
Unix timestamp of when the request was made (server time)

data:
According to the following table

Name Script Parameters Example Result example (data)
summary get.php cmd=summary https://lcp.exchange/api/public/v1/get.php?cmd=summary {"id":"1","last":"245913.580246910000","lowest_ask":"300000.000000000000","highest_bid":"166666.666666670000","percent_change":0,"base_volume":"8299.284498104176","quote_volume":"0.040860960000","is_frozen":"0","high_24hr":0,"low_24hr":0,"volume_24hr":0},"LCP_LTC":{"id":"2","last":"1510.000000000000","lowest_ask":null,"highest_bid":null,"percent_change":0,"base_volume":"80.467909995534","quote_volume":"0.054902460000","is_frozen":"0","high_24hr":0,"low_24hr":0,"volume_24hr":0},"LCP_DOGE":{"id":"4","last":"16.000000000000","lowest_ask":"16.000000000000","highest_bid":null,"percent_change":0,"base_volume":"66.393948000000","quote_volume":"630.300000000000","is_frozen":"0","high_24hr":0,"low_24hr":0,"volume_24hr":0},"LCP_BTB":{"id":"3","last":"40.000000000000","lowest_ask":"65.000000000000","highest_bid":"40.000000000000","percent_change":0,"base_volume":"100.100000100000","quote_volume":"1.608461540000","is_frozen":"0","high_24hr":0,"low_24hr":0,"volume_24hr":0},"LCP_BTG":{"id":"5","last":"29.000000000000","lowest_ask":"30.000000000000","highest_bid":"15.000000000000","percent_change":0,"base_volume":"112.385236880000","quote_volume":"3.810985180000","is_frozen":"0","high_24hr":0,"low_24hr":0,"volume_24hr":0},"LCP_BCF":{"id":"7","last":"0.009000000000","lowest_ask":"0.010000000000","highest_bid":null,"percent_change":0,"base_volume":"14.359999999600","quote_volume":"1084.444444440000","is_frozen":"0","high_24hr":0,"low_24hr":0,"volume_24hr":0},"LCP_HODL":{"id":"6","last":"0.000000130000","lowest_ask":null,"highest_bid":null,"percent_change":0,"base_volume":"0.000226000000","quote_volume":"2200.000000000000","is_frozen":"1","high_24hr":0,"low_24hr":0,"volume_24hr":0}}
ticker get.php cmd=ticker https://lcp.exchange/api/public/v1/get.php?cmd=ticker {"LCP_BTC":{"id":"1","base_id":null,"quote_id":null,"last_price":"245913.580246910000","base_volume":0,"quote_volume":0,"type":"permanent","is_frozen":"0"},"LCP_LTC":{"id":"2","base_id":null,"quote_id":null,"last_price":"1510.000000000000","base_volume":0,"quote_volume":0,"type":"permanent","is_frozen":"0"},"LCP_DOGE":{"id":"4","base_id":null,"quote_id":null,"last_price":"16.000000000000","base_volume":0,"quote_volume":0,"type":"permanent","is_frozen":"0"},"LCP_BTB":{"id":"3","base_id":null,"quote_id":null,"last_price":"40.000000000000","base_volume":0,"quote_volume":0,"type":"permanent","is_frozen":"0"},"LCP_BTG":{"id":"5","base_id":null,"quote_id":null,"last_price":"29.000000000000","base_volume":0,"quote_volume":0,"type":"permanent","is_frozen":"0"},"LCP_BCF":{"id":"7","base_id":null,"quote_id":null,"last_price":"0.009000000000","base_volume":0,"quote_volume":0,"type":"permanent","is_frozen":"0"},"LCP_HODL":{"id":"6","base_id":null,"quote_id":null,"last_price":"0.000000130000","base_volume":0,"quote_volume":0,"type":"permanent","is_frozen":"1"}}
assets get.php cmd=assets https://lcp.exchange/api/public/v1/get.php?cmd=summary {"LCP":{"name":"Litecoin Plus","unified_cryptoasset_id":"331","can_withdraw":"1","can_deposit":"1","can_trade":"1","min_withdraw":"1.000000000000","max_withdraw":"10000.000000000000","maker_fee":"0.2%","taker_fee":"0.2%"},"BTC":{"name":"Bitcoin","unified_cryptoasset_id":"1","can_withdraw":"1","can_deposit":"1","can_trade":"1","min_withdraw":"0.001500000000","max_withdraw":"0.100000000000","maker_fee":"0.2%","taker_fee":"0.2%"},"LTC":{"name":"Litecoin","unified_cryptoasset_id":"2","can_withdraw":"1","can_deposit":"1","can_trade":"1","min_withdraw":"0.004000000000","max_withdraw":"10.000000000000","maker_fee":"0.2%","taker_fee":"0.2%"},"DOGE":{"name":"Dogecoin","unified_cryptoasset_id":"74","can_withdraw":"1","can_deposit":"1","can_trade":"1","min_withdraw":"20.000000000000","max_withdraw":"300000.000000000000","maker_fee":"0.2%","taker_fee":"0.2%"},"BTB":{"name":"BitBar","unified_cryptoasset_id":"14","can_withdraw":"1","can_deposit":"1","can_trade":"1","min_withdraw":"1.000000000000","max_withdraw":"300.000000000000","maker_fee":"0.2%","taker_fee":"0.2%"},"BTG":{"name":"BitGem","unified_cryptoasset_id":"0","can_withdraw":"1","can_deposit":"1","can_trade":"1","min_withdraw":"1.000000000000","max_withdraw":"300.000000000000","maker_fee":"0.2%","taker_fee":"0.2%"},"BCF":{"name":"BitcoinFast","unified_cryptoasset_id":"0","can_withdraw":"1","can_deposit":"1","can_trade":"1","min_withdraw":"10.000000000000","max_withdraw":"100000.000000000000","maker_fee":"0.2%","taker_fee":"0.2%"},"HODL":{"name":"HOdlcoin","unified_cryptoasset_id":"1195","can_withdraw":"1","can_deposit":"0","can_trade":"0","min_withdraw":"0.000000000000","max_withdraw":"10000000.000000000000","maker_fee":"0.2%","taker_fee":"0.2%"}}
orderbook get.php cmd=orderbook
market_pair=LCP_[ticker_b]
depth=[n >= 0]
https://lcp.exchange/api/public/v1/get.php?cmd=orderbook&market_pair=LCP_BTC&depth=5 {"bids":[["166666.666666670000","0.001500000000"],["160000.000000000000","0.001500000000"],["153846.153846150000","0.001500000000"],["148148.148148150000","0.001500000000"],["142857.142857140000","0.003000000000"]],"ask":[["300000.000000000000","0.000143310000"],["500000.000000000000","0.005158340000"],["3000000000000.000000000000","0.000000520000"]]}
trades get.php cmd=trades market_pair=LCP_[ticker_b] https://lcp.exchange/api/public/v1/get.php?cmd=trades&market_pair=LCP_DOGE [{"trade_id":"295","price":"16.000000000000","base_volume":16,"quote_volume":"1.000000000000","timestamp":1585912585,"type":"buy"},{"trade_id":"58","price":"0.100000000000","base_volume":0.1,"quote_volume":"1.000000000000","timestamp":1583473737,"type":"buy"},{"trade_id":"129","price":"0.100000000000","base_volume":0.4,"quote_volume":"4.000000000000","timestamp":1584675087,"type":"buy"},{"trade_id":"132","price":"0.100000000000","base_volume":0.9,"quote_volume":"9.000000000000","timestamp":1584677729,"type":"buy"},{"trade_id":"50","price":"0.052631580000","base_volume":15.789473999999998,"quote_volume":"300.000000000000","timestamp":1583756418,"type":"buy"},{"trade_id":"135","price":"0.050000000000","base_volume":0.0075,"quote_volume":"0.150000000000","timestamp":1584682885,"type":"buy"},{"trade_id":"59","price":"0.050000000000","base_volume":0.0075,"quote_volume":"0.150000000000","timestamp":1583473762,"type":"sell"},{"trade_id":"76","price":"0.052631580000","base_volume":15.789473999999998,"quote_volume":"300.000000000000","timestamp":1583788365,"type":"sell"},{"trade_id":"57","price":"0.100000000000","base_volume":0.5,"quote_volume":"5.000000000000","timestamp":1584675087,"type":"sell"},{"trade_id":"131","price":"0.100000000000","base_volume":0.9,"quote_volume":"9.000000000000","timestamp":1584677729,"type":"sell"}]