PHPackages                             trtlservices/ts-api-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. trtlservices/ts-api-php

ActiveLibrary[API Development](/categories/api)

trtlservices/ts-api-php
=======================

PHP wrapper for TRTL Services RESTFUL API.

0.9.0(7y ago)175AGPL-3.0PHPPHP &gt;=7.1.3

Since Nov 20Pushed 7y agoCompare

[ Source](https://github.com/trtl-services/ts-api-php)[ Packagist](https://packagist.org/packages/trtlservices/ts-api-php)[ Docs](https://trtl.services)[ RSS](/packages/trtlservices-ts-api-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

TRTL Service PHP API Interface
==============================

[](#trtl-service-php-api-interface)

This wrapper allows you to easily interact with the [TRTL Services](https://trtl.services) 0.9.0 API to quickly develop applications that interact with the [TurtleCoin](https://turtlecoin.lol) Network.

Table of Contents
=================

[](#table-of-contents)

1. [Installation](#installation)
2. [Intialization](#intialization)
3. [Documentation](#documentation)
4. [Methods](#methods)

Installation
============

[](#installation)

```
composer require trtlservices/ts-api-php
```

Intialization
=============

[](#intialization)

```
use TRTLservices\TRTLServices;

$config = [
    'token' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoidGVzdCIsImFwcElkIjo0LCJ1c2VySWQiOjYsInBlcm1pc3Npb25zIjpbImFkZHJlc3M6bmV3Il0sImlhdCI6MTUzNjU4NTM2NywiZXhwIjoxNTM5MTc3MzY3LCJhdWQiOiJ0dXJ0bGV3YWxsZXQuaW8iLCJpc3MiOiJUUlRMIFNlcnZpY2VzIiwianRpIjoiMzMifQ.AEHXmvTo8RfNuZ15Y3IGPRhZPaJxFSmOZvVv2YGN9L4We7bXslIPxhMv_n_5cNW8sIgE2Fr-46OTb5H5AFgpjA',
    'timeout' => 2000
];

$TS = new TRTLServices($config);
```

Reponse Formattng
-----------------

[](#reponse-formattng)

```
// The result field from the RPC response
$response->result();

// RPC response as JSON string
$response->toJson();

// RPC response as an array
$response->toArray();
```

Documentation
=============

[](#documentation)

API documentation is available at

Methods
-------

[](#methods)

### createAddress()

[](#createaddress)

Create a new TRTL addresses

```
$TS->createAddress()
```

### getAddress(address)

[](#getaddressaddress)

Get address details by address

```
$TS->getAddress("TRTLuxH78akDMCsXycnU5HjJE6zPCgM4KRNNQSboqh1yiTnvxuhNVUL9tK92j9kurSKdXVHFmjSRkaNBxM6Nb3G8eQGL7aj113A")
```

### deleteAddress(address)

[](#deleteaddressaddress)

Delete a selected TRTL addresses

```
$TS->deleteAdddress("TRTLuxH78akDMCsXycnU5HjJE6zPCgM4KRNNQSboqh1yiTnvxuhNVUL9tK92j9kurSKdXVHFmjSRkaNBxM6Nb3G8eQGL7aj113A")
```

### getAddresses()

[](#getaddresses)

View all addresses.

```
$TS->getAddresses()
```

### scanAddress(address, blockIndex)

[](#scanaddressaddress-blockindex)

Scan an address for transactions between a 100 block range starting from the specified blockIndex.

```
$TS->scanAddress("TRTLuxH78akDMCsXycnU5HjJE6zPCgM4KRNNQSboqh1yiTnvxuhNVUL9tK92j9kurSKdXVHFmjSRkaNBxM6Nb3G8eQGL7aj113A", 899093)
```

### getAddressKeys(address)

[](#getaddresskeysaddress)

Get the public and secret spend key of an address.

```
$TS->getAddressKeys("TRTLuxH78akDMCsXycnU5HjJE6zPCgM4KRNNQSboqh1yiTnvxuhNVUL9tK92j9kurSKdXVHFmjSRkaNBxM6Nb3G8eQGL7aj113A")
```

### integrateAddress(address, paymentId)

[](#integrateaddressaddress-paymentid)

Create an integrated address with an address and payment ID.

```
$TS->integrateAddress("TRTLuxH78akDMCsXycnU5HjJE6zPCgM4KRNNQSboqh1yiTnvxuhNVUL9tK92j9kurSKdXVHFmjSRkaNBxM6Nb3G8eQGL7aj113A", "7d89a2d16365a1198c46db5bbe1af03d2b503a06404f39496d1d94a0a46f8804")
```

### getIntegratedAddresses(address)

[](#getintegratedaddressesaddress)

Get all integrated addresses by address.

```
$TS->getIntegratedAddresses("TRTLuxH78akDMCsXycnU5HjJE6zPCgM4KRNNQSboqh1yiTnvxuhNVUL9tK92j9kurSKdXVHFmjSRkaNBxM6Nb3G8eQGL7aj113A")
```

### getFee(amount)

[](#getfeeamount)

Calculate the TRTL Services fee for an amount specified in TRTL with two decimal points.

```
$TS->getFee(1092.19)
```

### createTransfer(sender, receiver, amount, fee, paymentId, extra)

[](#createtransfersender-receiver-amount-fee-paymentid-extra)

Send a TRTL transaction with an address with the amount specified two decimal points.

```
$TS->createTransfer(
  "TRTLuxH78akDMCsXycnU5HjJE6zPCgM4KRNNQSboqh1yiTnvxuhNVUL9tK92j9kurSKdXVHFmjSRkaNBxM6Nb3G8eQGL7aj113A",
  "TRTLuzAzNs1E1RBFhteX56A5353vyHuSJ5AYYQfoN97PNbcMDvwQo4pUWHs7SYpuD9ThvA7AD3r742kwTmWh5o9WFaB9JXH8evP",
  1000.01,
  1.2,
  "7d89a2d16365a1198c46db5bbe1af03d2b503a06404f39496d1d94a0a46f8804",
  "3938f915a11582f62d93f82f710df9203a029f929fd2f915f2701d947f920f99"
)
```

#### You can leave the last two fields (paymentId and extra) blank.

[](#you-can-leave-the-last-two-fields-paymentid-and-extra-blank)

### getTransfer(address)

[](#gettransferaddress)

Get a transaction details specified by transaction hash.

```
$TS->getTransfer("EohMUzR1DELyeQM9RVVwpmn5Y1DP0lh1b1ZpLQrfXQsgtvGHnDdJSG31nX2yESYZ")
```

### getWallet()

[](#getwallet)

Get wallet container info and health check.

```
$TS->getWallet()
```

### getStatus()

[](#getstatus)

Get the current status of the TRTL Services infrastructure.

```
$TS->getStatus()
```

License
=======

[](#license)

```
Copyright (C) 2018 Rashed Mohammed, The TurtleCoin Developers

Please see the included LICENSE file for more information.

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2732d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/35935509?v=4)[Fexra](/maintainers/fexra)[@fexra](https://github.com/fexra)

---

Top Contributors

[![fexra](https://avatars.githubusercontent.com/u/35935509?v=4)](https://github.com/fexra "fexra (13 commits)")

---

Tags

TurtleCoinTRTL ServicesTRTL API WrapperTRTL AppsTurtleCoin Apps

### Embed Badge

![Health badge](/badges/trtlservices-ts-api-php/health.svg)

```
[![Health](https://phpackages.com/badges/trtlservices-ts-api-php/health.svg)](https://phpackages.com/packages/trtlservices-ts-api-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
