PHP code example of sun-otc / sun-otc-open
1. Go to this page and download the library: Download sun-otc/sun-otc-open library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sun-otc / sun-otc-open example snippets
use SunOTC\SunOTC;
$data = '{"app_id":"123","merc_order_id":"200611184930170114"}';
$OtcService = (new SunOTC('', Dictionary::PRI_KEY));
$OtcService->getOrderMsg($data);
// //查询交易限制
$data = '{"app_id":"123"}';
$OtcService = (new SunOTC('', Dictionary::PRI_KEY));
$OtcService->getTradeLimit($data);*/
//查询商户资产
$data = '{"app_id":"123","merc_order_id":"200611184930170114"}';
$OtcService = (new SunOTC('',Dictionary::PRI_KEY));
$OtcService->getMercAsset($data);
//查询价格
$data = '{"app_id":"123","coin":"USDT"}';
$OtcService = (new SunOTC('', Dictionary::PRI_KEY));
$OtcService->getTradePrice($data);