承接 vittominacori/changelly-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vittominacori/changelly-php

Composer 安装命令:

composer require vittominacori/changelly-php

包简介

A PHP wrapper for Changelly API

README 文档

README

A PHP wrapper for Changelly APIs

Install

composer require vittominacori/changelly-php

Generate Api Key and Secret

Generate Key and Secret here.

Usage

Prepare requirements

require __DIR__ . '/vendor/autoload.php';

use Changelly\Changelly;

Create client

$changelly = new Changelly('yourApiKey', 'yourApiSecret');

Call APIs

getCurrencies

Description:

  • Returns a list of enabled currencies as a flat array.
$changelly->getCurrencies();

result:

[
  "btc",
  "eth",
  "etc",
  "exp",
  "xem",
  "lsk",
  "xmr",
  "strat",
  "rep",
  "lbc",
  "maid",
  "ltc",
  "bcn",
  "xrp",
  "doge",
  "amp",
  "nxt",
  "dash",
  "xdn",
  "nbt",
  "nav",
  "pot",
  "gnt",
  "waves",
  "usdt",
  "swt",
  "mln",
  "pivx",
  "trst",
  "edg",
  "rlc",
  "gno",
  "dcr",
  "gup",
  "lun",
  "str",
  "bat",
  "ant",
  "bnt",
  "cvc",
  "eos",
  "pay",
  "bch",
  "omg",
  "mco",
  "adx",
  "zrx",
  "qtum",
  "ptoy",
  "storj",
  "cfi",
  "hmq",
  "nmr",
  "salt",
  "btg",
  "dgb",
  "dnt",
  "vib",
  "rcn",
  "zcl",
  "stx",
  "kmd",
  "brd",
  "dcn",
  "ngc",
  "xmo",
  "noah",
  "zen"
]

getCurrenciesFull

Description:

  • Returns a full list of currencies as an array of objects. Each object has an "enabled" field displaying current availability of a coin.
$changelly->getCurrenciesFull();

result:

[
  {
    "name": "btc",
    "fullName": "Bitcoin",
    "enabled": true,
    "image": "https://changelly.com/coins/btc.svg"
  },
  {
    "name": "eth",
    "fullName": "Ethereum",
    "enabled": true,
    "image": "https://changelly.com/coins/eth.svg"
  },
  {
    "name": "etc",
    "fullName": "Ethereum Classic",
    "enabled": true,
    "image": "https://changelly.com/coins/etc.svg"
  },
  (...)
  {
    "name": "zen",
    "fullName": "Zencash",
    "enabled": true,
    "image": "https://changelly.com/coins/zen.svg"
  }
]

getMinAmount

Description:

  • Returns a minimum allowed payin amount required for a currency pair. Amounts less than a minimal will most likely fail the transaction.
$changelly->getMinAmount('btc', 'eth');

result:

"0.00150457"

getExchangeAmount

Description:

  • Returns estimated exchange value with your API partner fee included.
$changelly->getExchangeAmount('btc', 'eth', '1');

result:

"12.10716"

createTransaction

Description:

  • Creates a new transaction, generates a pay-in address and returns Transaction object with an ID field to track a transaction status.
$changelly->createTransaction('btc', 'eth', '0x123123...123', 0.3);

result:

{
  "id": "854e8d7dc9ef",
  "apiExtraFee": "0",
  "changellyFee": "0.5",
  "payinExtraId": null,
  "status": "new",
  "currencyFrom": "btc",
  "currencyTo": "eth",
  "amountTo": 0,
  "payinAddress": "36P9TNYPbZrGs8Udn84F9uAY95VYM2Xk4K",
  "payoutAddress": "0x123123...123",
  "createdAt": "2018-05-04T15:15:02.000Z"
}

getStatus

Description:

  • Returns status of a given transaction using a transaction ID provided.
$changelly->getStatus('854e8d7dc9ef');

result:

"waiting"

getTransactions

Description:

  • Returns an array of all transactions or a filtered list of transactions.
$changelly->getTransactions();

result:

[
  {
    "id": "854e8d7dc9ef",
    "createdAt": 1525446902,
    "payinConfirmations": "0",
    "status": "waiting",
    "currencyFrom": "btc",
    "currencyTo": "eth",
    "payinAddress": "36P9TNYPbZrGs8Udn84F9uAY95VYM2Xk4K",
    "payinExtraId": null,
    "payinHash": null,
    "payoutAddress": "0x123123...123",
    "payoutExtraId": null,
    "payoutHash": null,
    "amountFrom": "",
    "amountTo": "0",
    "networkFee": null,
    "changellyFee": "0.5",
    "apiExtraFee": "0"
  },
  (...)
]

vittominacori/changelly-php 适用场景与选型建议

vittominacori/changelly-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 129 次下载、GitHub Stars 达 6, 最近一次更新时间为 2018 年 05 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「client」 「crypto」 「exchange」 「changelly」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 vittominacori/changelly-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 vittominacori/changelly-php 我们能提供哪些服务?
定制开发 / 二次开发

基于 vittominacori/changelly-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 129
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-23