jccdex / jcc_rpc_php
a php jcc rpc framework
Installs: 61
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 3
pkg:composer/jccdex/jcc_rpc_php
Requires
- php: >=7.2
- guzzlehttp/guzzle: ^6.3@dev
Requires (Dev)
- phpunit/phpunit: ^8.3@dev
This package is auto-updated.
Last update: 2025-11-23 22:26:03 UTC
README
Installation
The recommended way to install jcc_rpc_php is through Composer.
# Install Composer curl -sS https://getcomposer.org/installer | php
Next, run the Composer command to install the latest stable version of jcc_rpc_php:
php composer.phar require jccdex/jcc_rpc_php # OR composer require jccdex/jcc_rpc_php
Help and docs
Config API
getConfig
use JccDex\Http\Config; $config = new Config(['jccdex.cn', 'eth626892d.jccdex.cn'], 443, true); // $config = new Config('jccdex.cn', 443, true); echo $config->getConfig();
Exchange API
firstly Instantiate an object
use JccDex\Http\Exchange; $exchange = new Exchange(['ewdjbbl8jgf.jccdex.cn'], 443, true);
getBalances
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| address | string | 是 |
echo $exchange->getBalances($address);
getHistoricTransactions
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| address | string | 是 |
| ledger | string | 否 |
| seq | string | 否 |
echo $exchange->getHistoricTransactions($address, $ledger, $seq);
getHistoricPayments
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| address | string | 是 |
| ledger | string | 否 |
| seq | string | 否 |
echo $exchange->getHistoricPayments($address, $ledger, $seq);
getOrders
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| address | string | 是 |
| page | string | 是 |
echo $exchange->getOrders($address, $page);
createOrder
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| sign | string | 是 |
echo $exchange->createOrder($sign);
deleteOrder
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| sign | string | 是 |
echo $exchange->deleteOrder($sign);
getSequence
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| address | string | 是 |
echo $exchange->getSequence($address);
transferAccount
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| sign | string | 是 |
echo $exchange->getSequence($sign);
Info API
firstly Instantiate an object
use JccDex\Http\Info; $info = new Info(["i3b44eb75ef.jccdex.cn", "i059e8792d5.jccdex.cn", "i352fb2ef56.jccdex.cn"], 443, true);
getAllTickers
echo $info->getAllTickers();
getTicker
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| base | string | 是 |
| counter | string | 是 |
echo $exchange->getTicker($base, $counter);
getDepth
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| base | string | 是 |
| counter | string | 是 |
| type | string | 是 |
echo $exchange->getDepth($base, $counter, $type);
getKline
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| base | string | 是 |
| counter | string | 是 |
| type | string | 是 |
echo $exchange->getKline($base, $counter, $type);
getHistory
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| base | string | 是 |
| counter | string | 是 |
| type | string | 是 |
| time | string | 是 |
echo $exchange->getHistory($base, $counter, $type, $time);
getTickerFromCMC
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| token | string | 是 |
| currency | string | 是 |
echo $exchange->getTickerFromCMC($token, $currency);
Biz API
firstly Instantiate an object
use JccDex\Http\Biz; $biz = new Biz(['ewdjbbl8jgf.jccdex.cn'], 443, true);
getSmsCode
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| phone | string | 是 |
| verifyType | string | 是 |
echo $biz->getSmsCode($phone, $verifyType);
getImgCode
echo $biz->getImgCode($phone, $verifyType);
checkSmsCode
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| phone | string | 是 |
| verifyType | string | 是 |
| verifyCodeType | string | 是 |
echo $biz->checkSmsCode($phone, $verifyType, $verifyCodeType);
checkImgCode
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| imgCode | string | 是 |
echo $biz->checkImgCode($userName, $imgCode);
isActive
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
echo $biz->isActive($userName);
register
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| password | string | 是 |
| publicKey | string | 是 |
| verifyCode | string | 是 |
| imgCode | string | 是 |
echo $biz->register($userName, $password, $publicKey, $verifyCode, $imgCode);
emailRegister
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| password | string | 是 |
| publicKey | string | 是 |
| verifyCode | string | 是 |
| imgCode | string | 是 |
echo $biz->emailRegister($userName, $password, $publicKey, $verifyCode, $imgCode);
login
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| password | string | 是 |
| imgCode | string | 是 |
echo $biz->login($userName, $password, $imgCode);
logout
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
echo $biz->logout($userName);
getMyself
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
echo $biz->getMyself($userName);
uploadImage
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| data | string | 是 |
echo $biz->uploadImage($userName, $data);
verify
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| data | string | 是 |
echo $biz->verify($userName, $data);
changeMobile
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| phone | string | 是 |
| verifyCode | string | 是 |
| password | string | 是 |
echo $biz->changeMobile($phone, $verifyCode, $password);
changePassword
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| newPwd | string | 是 |
| oldPwd | string | 是 |
echo $biz->changePassword($userName, $newPwd, $oldPwd);
resetPassword
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| verifyCode | string | 是 |
| oldPwd | string | 是 |
echo $biz->resetPassword($userName, $verifyCode, $oldPwd);
bindEmail
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| string | 是 | |
| verifyCode | string | 是 |
| password | string | 是 |
echo $biz->bindEmail($userName, $email, $verifyCode, $password);
uploadWallet
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| publicKey | string | 是 |
echo $biz->uploadWallet($userName, $publicKey);
getToken
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
echo $biz->getToken($userName);
getHelp
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| url | string | 是 |
echo $biz->getHelp($url);
getAbout
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| url | string | 是 |
echo $biz->getAbout($url);
createDepositOrder
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| base | string | 是 |
| amount | string | 是 |
| baseWallet | string | 是 |
| jtWallet | string | 是 |
| agentWallet | string | 是 |
| agentID | string | 是 |
echo $biz->createDepositOrder($userName, $base, $amount, $baseWallet, $jtWallet, $agentWallet, $agentID);
cancelDepositOrder
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| base | string | 是 |
| orderID | string | 是 |
echo $biz->cancelDepositOrder($userName, $base, $orderID);
updateDepositOrder
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| base | string | 是 |
| orderID | string | 是 |
| hash | string | 是 |
echo $biz->updateDepositOrder($userName, $base, $orderID, $hash);
getDepositDetail
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| base | string | 是 |
| orderID | string | 是 |
echo $biz->getDepositDetail($userName, $base, $orderID);
getPendingDeposit
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| base | string | 是 |
echo $biz->getPendingDeposit($userName, $base);
getDepositOrders
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| base | string | 是 |
| page | string | 是 |
echo $biz->getDepositOrders($userName, $base, $page);
createWithdrawOrder
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| base | string | 是 |
| amount | string | 是 |
| baseWallet | string | 是 |
| jtWallet | string | 是 |
| agentWallet | string | 是 |
| agentID | string | 是 |
echo $biz->createWithdrawOrder($userName, $base, $amount, $baseWallet, $jtWallet, $agentWallet, $agentID);
getWithdrawOrders
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| base | string | 是 |
| page | string | 是 |
echo $biz->getWithdrawOrders($userName, $base, $page);
updateWithdrawOrder
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| orderID | string | 是 |
| hash | string | 是 |
echo $biz->updateWithdrawOrder($userName, $orderID, $hash);
getWithdrawDetail
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| base | string | 是 |
| orderID | string | 是 |
echo $biz->getWithdrawDetail($userName, $base, $orderID);
getAgentInfo
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
| base | string | 是 |
echo $biz->getAgentInfo($userName, $base);
getCoinlist
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| userName | string | 是 |
echo $biz->getCoinlist($userName);
getNewsReportList
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| count | string | 是 |
echo $biz->getNewsReportList($count);
getNoticeList
parameters
| 参数名 | 类型 | 必填 |
|---|---|---|
| type | string | 是 |
| count | string | 是 |
echo $biz->getNoticeList($type, $count);