API Description API Url: https://yourtoken.app/api/Get-Currencies
API Parameters: API None
{ "data":[ { "id":"1", "name":"Bitcoin", "symbol":"BTC", "min_withdraw":"0.10000000", "max_withdraw":"100.00000000", "min_deposit":"0.00000000", "max_deposit":"0.00000000", "image":"https:\/\/res.cloudinary.com\/wlifiles\/image\/upload\/v1545112929\/unutst8qnbzbmsqu9mrh.png" }, { "id":"2", "name":"Ethereum", "symbol":"ETH", "min_withdraw":"0.10000000", "max_withdraw":"99.00000000", "min_deposit":"0.00000000", "max_deposit":"0.00000000", "image":"https:\/\/res.cloudinary.com\/wlifiles\/image\/upload\/v1545112929\/unutst8qnbzbmsqu9mrh.png" },... ] }
API Description API Url: https://yourtoken.app/api/Get-Ticker/BTC_USD
API Parameters:
API market: API The market name e.g. 'BTC_USD' (API required)
{ "data":{ "bid":"5,706.02375752", "ask":"5,706.02375752", "last":"6,367.53003000", "market":"BTC_USD" } }
API Description API Url: https://yourtoken.app/api/Get-MarketHistory/XRP_USD/10
API Parameters:
API market: API The market name e.g. 'XRP_USD' (API required)
API count: API The max amount
{ "data":[ { "id":"28", "timeStamp":"2019-09-10 15:48:31", "quantity":"1.00000000", "price":"111.00000000", "orderType":"buy", "total":"116.00" }, { "id":"29", "timeStamp":"2019-09-10 15:48:32", "quantity":"1.00000000", "price":"100.00000000", "orderType":"buy", "total":"105.00" } ] }
API Description API Url: https://yourtoken.app/api/Get-MarketSummaries
API Parameters: API None
{ "data":[ { "market":"BTC_USD", "volume":"5.00000000", "last":"100.00000000", "bid":"5,699.97530122", "ask":"5,699.97530122", "openBuyOrders":"0", "openSellOrders":"0" }, { "market":"ETH_USD", "volume":"0.00000000", "last":"0.00000000", "bid":"468.89755000", "ask":"198.89794650", "openBuyOrders":"0", "openSellOrders":"0" }, { "market":"XRP_USD", "volume":"0.00000000", "last":"0.00000000", "bid":"0.00028621", "ask":"0.00028621", "openBuyOrders":"0", "openSellOrders":"0" }, { "market":"LTC_USD", "volume":"0.00000000", "last":"84.81071000", "bid":"54.07262211", "ask":"55.16499831", "openBuyOrders":"0", "openSellOrders":"0" }, { "market":"TCH_BTC", "volume":"0.00000000", "last":"0.00000000", "bid":"1.74210362", "ask":"1.81320990", "openBuyOrders":"0", "openSellOrders":"0" } ] }
API Description API Url: https://yourtoken.app/api/Get-OrderBook/XRP_USD/both/20
API Parameters:
API market: API The market name e.g. 'XRP_USD'
API type: API The order book
API count: API The max amount
{ "data":{ "buy":[ { "quantity":"1.00000000", "rate":"111.00000000" }, { "quantity":"1.00000000", "rate":"100.00000000" }, { "quantity":"1.00000000", "rate":"101.00000000" } ] } }
$url = "http://testcURL.com/?item1=value&item2=value2"; // API Url // Get cURL resource $curl_handle=curl_init(); // Set some options - we are passing in a useragent too here curl_setopt($curl_handle, CURLOPT_URL,$url); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2); // Receive server response ... curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl_handle, CURLOPT_USERAGENT, 'Your application name'); // Send the request & save response to $resp $content = curl_exec($curl_handle); // Close request to clear up some resources curl_close($curl_handle);
URI: | The uri endpoint e.g. api/GetOrder |
api key page: | API Your Yourtoken api key page(apiKey) |
api secret page: | API Your Yourtoken api secret page(apiSecret) |
API POST PARAMS: | API JSON post parameters e.g. currency,orderId,market,count |
API Description API Url: https://yourtoken.app/api/GetOrder
API Parameters:
API orderID: API The order to return (API required)
{ "data":{ "Id":"17", "Pair","BTC_USD", "OrderType":"Limit", "Type":"buy", "Amount":"1.00000000", "Price":"233.00000000", "Total":"238.00", "Fee":"5", "Status":"active", "Timestamp":"2019-09-26 13:25:18", "date":"2019-09-26 13:25:18" } }
API Description API Url: https://yourtoken.app/api/GetOrders
API Parameters:
API market: API The market name e.g. 'BTC_USD' (API dataa)
API count: API The max
{ "data":[ { "trade_id":"2", "OrderId":"2", "userId":"1", "Amount":"0.10000000", "Price":"100.00000000", "Type":"buy", "Fee":"5", "Total":"15.00", "orderDateTime":"2019-09-24", "ordertype":"limit", "datetime":"2019-09-24 19:39:19", "pair":"BTC_USD", "status":"active", "stoporderprice":"0", "fee_per":"5", "tradetime":"2019-09-24 19:39:19", }, { "trade_id":"2", "userId":"1", "Amount":"0.10000000", "Price":"100.00000000", "Type":"buy", "Fee":"5", "Total":"15.00", "orderDateTime":"2019-09-24", "ordertype":"limit", "datetime":"2019-09-24 19:39:19", "pair":"XRP_USD", "status":"active", "stoporderprice":"0", "fee_per":"5", "tradetime":"2019-09-24 19:39:19", },.... ] }
API Description API Url: https://yourtoken.app/api/SubmitOrder
API Parameters:
API pair: API The market name e.g. 'BTC_USD' (API required)
API order: The order type name e.g. 'limit', 'market', 'stoporder' (API required)
API type: The type name e.g. 'Buy', 'Sell' (API required)
amount: The amount to buy/sell (API required)
price: The price to buy/sell for (API required)
{ "status":"success", "message":"order placed", "response": { "orders":0, "type":"sell", "new_array": { "0":{ "price":250, "amount":0.3 } }, "stop":0, "active": { "amount":"0.3", "price":"250", "total":"75", "datetime":"2019-05-23 07:30", "id":"SxBVoA17SMlAVczWvaN-w_qu3pFk9RuYgFZ3DvIoq1A", "type":"Sell", "ordertype":"Limit" } } }
API Description API Url: https://yourtoken.app/api/CancelOrder
API Parameters:
API market: API The market name e.g. 'BTC_USD' (API required)
API orderID: API The order to return (API required)
{ "success":"Order Cancelled Successfully!" }
API Description API Url: https://yourtoken.app/api/GetTradeHistory
API Parameters:
API market: API The market name e.g. 'BTC_USD' (optional, default: 'all') (API dataa)
API count: API The max
{ "data":[ { "tradeId":"5", "Amount":"12", "Price":"2", "filledAmount":"1", "total":"101.00000000", "type":"Buy", "Ordertype":"Limit", "datetime":"2019-04-11 16:44", "status":"Filled", "userId":"2" },..... ] }
API Description API Url: https://yourtoken.app/api/Cancel_allpendingOrder
API Parameters:
API market: API The market name e.g. 'BTC_USD' (API required)
API type: The type name e.g. 'Buy', 'Sell' (API required)
{ "success":"Pending Orders has been Cancelled Successfully!" }
// Set some options - we are passing in a useragent too here $data = array( 'apiKey'=>'xxxxxxxxxxx', 'apiSecret'=>'xxxxxxxxxxxx', 'market'=>BTC_USD, 'orderID'=>12 ); $data_string = json_encode($data); // Get cURL resource $ch = curl_init('http//:example.com/xxxxxxxxxxxxxx/cancelOrder'); // API Url curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); // Receive server response ... curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string)) ); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); // Send the request & save response to $resp $respse = curl_exec($ch); // Close request to clear up some resources curl_close($ch);